From 09b634f3e529e720c7d69f58bcfe80624bde9322 Mon Sep 17 00:00:00 2001 From: kashyap-splunk <89500657+kashyap-splunk@users.noreply.github.com> Date: Thu, 9 Sep 2021 08:44:07 +0530 Subject: [PATCH] Update Go version and migrate to Go modules (#287) * Adding go.mod and go.sum to migrate to Go modules from Glide * Removed old Vendor folder after migrating to Go modules * Adding new Vendor folder after migrating to Go mudules * Removed Glide files, references in readme and updated CI/CD * Migrated from bolt to bbolt for cache module to resolve race issue --- .circleci/config.yml | 17 +- Makefile | 10 +- README.md | 5 +- cache/boltdb.go | 2 +- glide.lock | 123 - glide.yaml | 15 - go.mod | 51 + go.sum | 133 + utils/glide.lock | 70 - .../cfhttp/cf_http_suite_test.go | 13 - .../cfhttp/cf_http_test.go | 62 - .../cfhttp/handlers/cf_handlers.go | 42 - .../cfhttp/handlers/cf_handlers_suite_test.go | 13 - .../cfhttp/handlers/cf_handlers_test.go | 82 - .../unix_transport_suite_test.go | 13 - .../unix_transport/unix_transport_test.go | 170 - .../integration/integration_suite_test.go | 66 - .../cflager/integration/main.go | 21 - .../gofileutils/.travis.yml | 10 - .../gofileutils/README.md | 6 - .../gofileutils/bin/test | 9 - .../gofileutils/fileutils/file_utils_test.go | 165 - .../fileutils/fileutils_suite_test.go | 13 - .../fixtures/fileutils/some-dir/.gitkeep | 0 .../fixtures/fileutils/some-dir/some-file | 0 .../fixtures/fileutils/supervirus.zsh | 1 - .../gofileutils/fixtures/some.config | 0 .../fixtures/test_glob/app.stderr.log | 1 - .../fixtures/test_glob/app.stdout.log | 1 - .../other_logs/more_logs/more.stdout.log | 1 - .../test_glob/other_logs/other_app.stderr.log | 1 - .../test_glob/other_logs/other_app.stdout.log | 1 - .../sub_dir/other_sub_dir/.gitkeep | 0 .../gofileutils/glob/README.md | 26 - .../gofileutils/glob/dir.go | 86 - .../gofileutils/glob/dir_test.go | 68 - .../gofileutils/glob/glob.go | 100 - .../gofileutils/glob/glob_test.go | 110 - .../code.cloudfoundry.org/lager/chug/chug.go | 130 - .../lager/chug/chug_suite_test.go | 13 - .../lager/chug/chug_test.go | 247 - .../lager/chug/match_log_entry_test.go | 41 - .../lager/ginkgoreporter/ginkgo_reporter.go | 155 - .../ginkgoreporter_suite_test.go | 13 - .../ginkgoreporter/ginkgoreporter_test.go | 185 - .../lager/lager_suite_test.go | 13 - .../lager/lagerflags/NOTICE | 15 - .../lager/lagerflags/README.md | 56 - .../integration/integration_suite_test.go | 67 - .../lager/lagerflags/integration/main.go | 21 - .../lager/lagerflags/lagerflags.go | 50 - .../lager/lagertest/test_sink.go | 71 - .../lager/logger_test.go | 358 - .../lager/reconfigurable_sink_test.go | 66 - .../lager/writer_sink_test.go | 107 - .../Masterminds/semver/benchmark_test.go | 157 - .../Masterminds/semver/collection_test.go | 46 - .../Masterminds/semver/constraints_test.go | 477 - .../Masterminds/semver/version_test.go | 490 - .../github.com/Sirupsen/logrus/entry_test.go | 77 - .../Sirupsen/logrus/examples/basic/basic.go | 50 - .../Sirupsen/logrus/examples/hook/hook.go | 30 - .../Sirupsen/logrus/formatter_bench_test.go | 98 - .../logrus/formatters/logstash/logstash.go | 61 - .../formatters/logstash/logstash_test.go | 52 - .../github.com/Sirupsen/logrus/hook_test.go | 122 - .../Sirupsen/logrus/hooks/syslog/README.md | 39 - .../Sirupsen/logrus/hooks/syslog/syslog.go | 54 - .../logrus/hooks/syslog/syslog_test.go | 26 - .../Sirupsen/logrus/hooks/test/test.go | 67 - .../Sirupsen/logrus/hooks/test/test_test.go | 39 - .../Sirupsen/logrus/json_formatter_test.go | 120 - .../github.com/Sirupsen/logrus/logrus_test.go | 361 - .../Sirupsen/logrus/text_formatter_test.go | 61 - .../alecthomas/template/example_test.go | 71 - .../alecthomas/template/examplefiles_test.go | 182 - .../alecthomas/template/examplefunc_test.go | 54 - .../alecthomas/template/exec_test.go | 1044 - .../alecthomas/template/multi_test.go | 292 - .../alecthomas/template/parse/lex_test.go | 468 - .../alecthomas/template/parse/parse_test.go | 426 - .../alecthomas/template/testdata/file1.tmpl | 2 - .../alecthomas/template/testdata/file2.tmpl | 2 - .../alecthomas/template/testdata/tmpl1.tmpl | 3 - .../alecthomas/template/testdata/tmpl2.tmpl | 3 - .../github.com/alecthomas/units/bytes_test.go | 49 - vendor/github.com/boltdb/bolt/.gitignore | 3 - vendor/github.com/boltdb/bolt/Makefile | 54 - vendor/github.com/boltdb/bolt/README.md | 573 - vendor/github.com/boltdb/bolt/batch.go | 135 - .../boltdb/bolt/batch_benchmark_test.go | 170 - .../boltdb/bolt/batch_example_test.go | 148 - vendor/github.com/boltdb/bolt/batch_test.go | 167 - vendor/github.com/boltdb/bolt/bolt_test.go | 36 - vendor/github.com/boltdb/bolt/bolt_unix.go | 80 - vendor/github.com/boltdb/bolt/bolt_windows.go | 74 - vendor/github.com/boltdb/bolt/bucket_test.go | 1153 - .../github.com/boltdb/bolt/cmd/bolt/bench.go | 421 - .../boltdb/bolt/cmd/bolt/buckets.go | 33 - .../boltdb/bolt/cmd/bolt/buckets_test.go | 31 - .../github.com/boltdb/bolt/cmd/bolt/check.go | 47 - vendor/github.com/boltdb/bolt/cmd/bolt/get.go | 45 - .../boltdb/bolt/cmd/bolt/get_test.go | 54 - .../github.com/boltdb/bolt/cmd/bolt/info.go | 26 - .../boltdb/bolt/cmd/bolt/info_test.go | 31 - .../github.com/boltdb/bolt/cmd/bolt/keys.go | 41 - .../boltdb/bolt/cmd/bolt/keys_test.go | 42 - .../github.com/boltdb/bolt/cmd/bolt/main.go | 198 - .../boltdb/bolt/cmd/bolt/main_test.go | 69 - .../github.com/boltdb/bolt/cmd/bolt/pages.go | 57 - .../github.com/boltdb/bolt/cmd/bolt/stats.go | 77 - .../boltdb/bolt/cmd/bolt/stats_test.go | 61 - vendor/github.com/boltdb/bolt/cursor_test.go | 511 - vendor/github.com/boltdb/bolt/db.go | 732 - vendor/github.com/boltdb/bolt/db_test.go | 790 - vendor/github.com/boltdb/bolt/freelist.go | 241 - .../github.com/boltdb/bolt/freelist_test.go | 129 - vendor/github.com/boltdb/bolt/node_test.go | 156 - vendor/github.com/boltdb/bolt/page.go | 134 - vendor/github.com/boltdb/bolt/page_test.go | 29 - vendor/github.com/boltdb/bolt/quick_test.go | 79 - .../github.com/boltdb/bolt/simulation_test.go | 327 - vendor/github.com/boltdb/bolt/tx_test.go | 424 - .../go-cfclient/app_update_test.go | 26 - .../go-cfclient/app_usage_events_test.go | 61 - .../go-cfclient/appevents_test.go | 84 - .../go-cfclient/apps_test.go | 548 - .../go-cfclient/buildpacks_test.go | 375 - .../go-cfclient/cf_error_test.go | 33 - .../go-cfclient/cf_test.go | 212 - .../go-cfclient/client_test.go | 161 - .../go-cfclient/domains_test.go | 258 - .../environmentvariablegroups_test.go | 83 - .../go-cfclient/events_test.go | 53 - .../go-cfclient/gen_error.go | 115 - .../cloudfoundry-community/go-cfclient/go.mod | 20 - .../cloudfoundry-community/go-cfclient/go.sum | 65 - .../go-cfclient/info_test.go | 25 - .../go-cfclient/isolationsegments_test.go | 177 - .../go-cfclient/org_quotas_test.go | 148 - .../go-cfclient/orgs_test.go | 962 - .../go-cfclient/payloads_test.go | 4829 -- .../go-cfclient/processes_test.go | 32 - .../go-cfclient/route_mappings_test.go | 89 - .../go-cfclient/routes_test.go | 157 - .../go-cfclient/secgroups_test.go | 256 - .../go-cfclient/service_bindings_test.go | 158 - .../go-cfclient/service_brokers_test.go | 31 - .../go-cfclient/service_instances_test.go | 163 - .../go-cfclient/service_keys_test.go | 265 - .../service_plan_visibilities_test.go | 52 - .../go-cfclient/service_plans_test.go | 109 - .../go-cfclient/service_usage_events_test.go | 61 - .../go-cfclient/services_test.go | 66 - .../go-cfclient/space_quotas_test.go | 134 - .../go-cfclient/spaces_test.go | 726 - .../go-cfclient/stacks_test.go | 32 - .../go-cfclient/tasks_test.go | 258 - .../user_provided_service_instances_test.go | 135 - .../go-cfclient/users_test.go | 272 - .../cloudfoundry-incubator/uaago/.gitignore | 1 - .../cloudfoundry-incubator/uaago/.travis.yml | 10 - .../cloudfoundry-incubator/uaago/LICENSE | 176 - .../cloudfoundry-incubator/uaago/README.md | 21 - .../cloudfoundry-incubator/uaago/client.go | 162 - .../uaago/client_test.go | 372 - .../uaago/examples/auth_token/.gitignore | 1 - .../uaago/examples/auth_token/main.go | 29 - .../uaago/examples/refresh_token/.gitignore | 1 - .../uaago/examples/refresh_token/main.go | 43 - .../uaago/uaago_suite_test.go | 13 - .../cloudfoundry/noaa/consumer/async_test.go | 1051 - .../noaa/consumer/consumer_proxy_test.go | 241 - .../noaa/consumer/consumer_suite_test.go | 72 - .../noaa/consumer/handlers_test.go | 144 - .../noaa/consumer/mock_debug_printer_test.go | 26 - .../consumer/mock_token_refresher_test.go | 26 - .../cloudfoundry/noaa/consumer/sync_test.go | 451 - .../noaa/consumer/timeout_test.go | 91 - .../noaa/consumer/token_refresher_test.go | 209 - .../cloudfoundry/noaa/noaa_suite_test.go | 25 - .../noaa/samples/app_logs/main.go | 51 - .../noaa/samples/container_metrics/README.md | 69 - .../container_metrics/consumer/main.go | 45 - .../samples/container_metrics/emitter/main.go | 38 - .../noaa/samples/firehose/main.go | 59 - .../noaa/samples/token_refresher/main.go | 65 - .../noaa/sort_container_metrics_test.go | 34 - .../cloudfoundry/noaa/sort_recent_test.go | 34 - .../noaa/test_helpers/auth_failure.go | 16 - .../noaa/test_helpers/fake_debug_printer.go | 14 - .../noaa/test_helpers/fake_handler.go | 83 - .../cloudfoundry/sonde-go/.gitignore | 24 - .../cloudfoundry/sonde-go/.gitmodules | 4 - .../cloudfoundry/sonde-go/README.md | 22 - .../github.com/cloudfoundry/sonde-go/doc.go | 2 - .../cloudfoundry/sonde-go/generate-go.sh | 31 - .../sonde-go/go/go_preamble.proto | 5 - vendor/github.com/gogo/protobuf/.gitignore | 1 - vendor/github.com/gogo/protobuf/.mailmap | 8 - vendor/github.com/gogo/protobuf/.travis.yml | 21 - vendor/github.com/gogo/protobuf/Makefile | 128 - vendor/github.com/gogo/protobuf/README | 214 - vendor/github.com/gogo/protobuf/Readme.md | 50 - .../github.com/gogo/protobuf/codec/codec.go | 91 - .../gogo/protobuf/codec/codec_test.go | 54 - .../gogo/protobuf/install-protobuf.sh | 29 - vendor/github.com/gogo/protobuf/io/full.go | 102 - vendor/github.com/gogo/protobuf/io/io.go | 70 - vendor/github.com/gogo/protobuf/io/io_test.go | 221 - vendor/github.com/gogo/protobuf/io/uint32.go | 126 - vendor/github.com/gogo/protobuf/io/varint.go | 134 - .../github.com/gogo/protobuf/jsonpb/jsonpb.go | 713 - .../gogo/protobuf/jsonpb/jsonpb_test.go | 482 - .../jsonpb/jsonpb_test_proto/Makefile | 33 - .../jsonpb/jsonpb_test_proto/bytes.go | 7 - .../jsonpb_test_proto/more_test_objects.pb.go | 199 - .../jsonpb_test_proto/more_test_objects.proto | 57 - .../jsonpb_test_proto/test_objects.pb.go | 616 - .../jsonpb_test_proto/test_objects.proto | 114 - .../gogo/protobuf/plugin/compare/compare.go | 526 - .../protobuf/plugin/compare/comparetest.go | 107 - .../plugin/defaultcheck/defaultcheck.go | 133 - .../plugin/description/description.go | 201 - .../plugin/description/descriptiontest.go | 73 - .../protobuf/plugin/embedcheck/embedcheck.go | 199 - .../plugin/enumstringer/enumstringer.go | 104 - .../gogo/protobuf/plugin/equal/equal.go | 609 - .../gogo/protobuf/plugin/equal/equaltest.go | 96 - .../gogo/protobuf/plugin/face/face.go | 233 - .../gogo/protobuf/plugin/face/facetest.go | 82 - .../gogo/protobuf/plugin/gostring/gostring.go | 363 - .../protobuf/plugin/gostring/gostringtest.go | 90 - .../protobuf/plugin/marshalto/marshalto.go | 1353 - .../protobuf/plugin/oneofcheck/oneofcheck.go | 93 - .../gogo/protobuf/plugin/populate/populate.go | 776 - .../gogo/protobuf/plugin/size/size.go | 620 - .../gogo/protobuf/plugin/size/sizetest.go | 134 - .../gogo/protobuf/plugin/stringer/stringer.go | 296 - .../protobuf/plugin/stringer/stringertest.go | 83 - .../gogo/protobuf/plugin/testgen/testgen.go | 608 - .../gogo/protobuf/plugin/union/union.go | 209 - .../gogo/protobuf/plugin/union/uniontest.go | 86 - .../protobuf/plugin/unmarshal/unmarshal.go | 1330 - .../gogo/protobuf/proto/all_test.go | 2269 - .../gogo/protobuf/proto/clone_test.go | 300 - .../gogo/protobuf/proto/equal_test.go | 212 - .../gogo/protobuf/proto/extensions_test.go | 504 - .../gogo/protobuf/proto/message_set_test.go | 66 - .../protobuf/proto/proto3_proto/proto3.pb.go | 184 - .../protobuf/proto/proto3_proto/proto3.proto | 70 - .../gogo/protobuf/proto/proto3_test.go | 125 - .../gogo/protobuf/proto/size2_test.go | 63 - .../gogo/protobuf/proto/size_test.go | 164 - .../gogo/protobuf/proto/testdata/Makefile | 37 - .../protobuf/proto/testdata/golden_test.go | 86 - .../gogo/protobuf/proto/testdata/test.pb.go | 4056 -- .../protobuf/proto/testdata/test.pb.go.golden | 1737 - .../gogo/protobuf/proto/testdata/test.proto | 548 - .../gogo/protobuf/proto/text_parser_test.go | 573 - .../gogo/protobuf/proto/text_test.go | 474 - .../google/protobuf/compiler/plugin.proto | 150 - .../protobuf/google/protobuf/descriptor.proto | 779 - .../gogo/protobuf/protoc-gen-combo/combo.go | 174 - .../gogo/protobuf/protoc-gen-gofast/main.go | 48 - .../gogo/protobuf/protoc-gen-gogo/Makefile | 33 - .../gogo/protobuf/protoc-gen-gogo/doc.go | 51 - .../protoc-gen-gogo/generator/generator.go | 3154 -- .../protoc-gen-gogo/generator/helper.go | 446 - .../protoc-gen-gogo/generator/name_test.go | 85 - .../protobuf/protoc-gen-gogo/grpc/grpc.go | 463 - .../gogo/protobuf/protoc-gen-gogo/main.go | 57 - .../protobuf/protoc-gen-gogo/plugin/Makefile | 37 - .../protoc-gen-gogo/plugin/plugin.pb.go | 230 - .../protoc-gen-gogo/testdata/Makefile | 67 - .../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 | 948 - .../testdata/my_test/test.proto | 156 - .../protoc-gen-gogo/testdata/proto3.proto | 52 - .../gogo/protobuf/protoc-gen-gogofast/main.go | 47 - .../protobuf/protoc-gen-gogofaster/main.go | 50 - .../protobuf/protoc-gen-gogoslick/main.go | 59 - .../protobuf/protoc-min-version/minversion.go | 65 - .../gogo/protobuf/sortkeys/sortkeys.go | 101 - .../github.com/gogo/protobuf/test/.gitignore | 1 - vendor/github.com/gogo/protobuf/test/Makefile | 44 - .../protobuf/test/asymetric-issue125/Makefile | 30 - .../test/asymetric-issue125/asym.pb.go | 625 - .../test/asymetric-issue125/asym.proto | 52 - .../test/asymetric-issue125/asym_test.go | 40 - .../test/asymetric-issue125/asympb_test.go | 186 - .../protobuf/test/asymetric-issue125/pop.go | 64 - .../github.com/gogo/protobuf/test/bug_test.go | 252 - .../gogo/protobuf/test/casttype/Makefile | 31 - .../protobuf/test/casttype/casttype.proto | 79 - .../test/casttype/combos/both/casttype.pb.go | 2449 - .../test/casttype/combos/both/casttype.proto | 79 - .../casttype/combos/both/casttypepb_test.go | 513 - .../casttype/combos/marshaler/casttype.pb.go | 1561 - .../casttype/combos/marshaler/casttype.proto | 79 - .../combos/marshaler/casttypepb_test.go | 513 - .../casttype/combos/neither/casttype.pb.go | 1352 - .../casttype/combos/neither/casttype.proto | 79 - .../combos/neither/casttypepb_test.go | 457 - .../combos/unmarshaler/casttype.pb.go | 2241 - .../combos/unmarshaler/casttype.proto | 79 - .../combos/unmarshaler/casttypepb_test.go | 457 - .../casttype/combos/unsafeboth/casttype.pb.go | 2449 - .../casttype/combos/unsafeboth/casttype.proto | 79 - .../combos/unsafeboth/casttypepb_test.go | 513 - .../combos/unsafemarshaler/casttype.pb.go | 1562 - .../combos/unsafemarshaler/casttype.proto | 79 - .../combos/unsafemarshaler/casttypepb_test.go | 513 - .../combos/unsafeunmarshaler/casttype.pb.go | 2241 - .../combos/unsafeunmarshaler/casttype.proto | 79 - .../unsafeunmarshaler/casttypepb_test.go | 457 - .../gogo/protobuf/test/casttype/mytypes.go | 59 - .../gogo/protobuf/test/castvalue/Makefile | 39 - .../protobuf/test/castvalue/castvalue.pb.go | 862 - .../protobuf/test/castvalue/castvalue.proto | 66 - .../test/castvalue/castvaluepb_test.go | 457 - .../castvalue/combos/both/castvalue.pb.go | 1438 - .../castvalue/combos/both/castvalue.proto | 66 - .../castvalue/combos/both/castvaluepb_test.go | 513 - .../test/castvalue/combos/both/mytypes.go | 31 - .../combos/marshaler/castvalue.pb.go | 989 - .../combos/marshaler/castvalue.proto | 66 - .../combos/marshaler/castvaluepb_test.go | 513 - .../castvalue/combos/marshaler/mytypes.go | 31 - .../combos/unmarshaler/castvalue.pb.go | 1313 - .../combos/unmarshaler/castvalue.proto | 66 - .../combos/unmarshaler/castvaluepb_test.go | 457 - .../castvalue/combos/unmarshaler/mytypes.go | 31 - .../combos/unsafeboth/castvalue.pb.go | 1439 - .../combos/unsafeboth/castvalue.proto | 66 - .../combos/unsafeboth/castvaluepb_test.go | 513 - .../castvalue/combos/unsafeboth/mytypes.go | 31 - .../combos/unsafemarshaler/castvalue.pb.go | 989 - .../combos/unsafemarshaler/castvalue.proto | 66 - .../unsafemarshaler/castvaluepb_test.go | 513 - .../combos/unsafemarshaler/mytypes.go | 31 - .../combos/unsafeunmarshaler/castvalue.pb.go | 1313 - .../combos/unsafeunmarshaler/castvalue.proto | 66 - .../unsafeunmarshaler/castvaluepb_test.go | 457 - .../combos/unsafeunmarshaler/mytypes.go | 31 - .../gogo/protobuf/test/castvalue/mytypes.go | 31 - .../protobuf/test/combos/both/bug_test.go | 252 - .../protobuf/test/combos/both/thetest.pb.go | 40305 -------------- .../protobuf/test/combos/both/thetest.proto | 626 - .../test/combos/both/thetestpb_test.go | 16373 ------ .../gogo/protobuf/test/combos/both/uuid.go | 133 - .../test/combos/marshaler/bug_test.go | 252 - .../test/combos/marshaler/thetest.pb.go | 28773 ---------- .../test/combos/marshaler/thetest.proto | 626 - .../test/combos/marshaler/thetestpb_test.go | 16373 ------ .../protobuf/test/combos/marshaler/uuid.go | 133 - .../test/combos/unmarshaler/bug_test.go | 252 - .../test/combos/unmarshaler/thetest.pb.go | 36190 ------------- .../test/combos/unmarshaler/thetest.proto | 626 - .../test/combos/unmarshaler/thetestpb_test.go | 14637 ----- .../protobuf/test/combos/unmarshaler/uuid.go | 133 - .../test/combos/unsafeboth/bug_test.go | 252 - .../test/combos/unsafeboth/thetest.pb.go | 39492 -------------- .../test/combos/unsafeboth/thetest.proto | 626 - .../test/combos/unsafeboth/thetestpb_test.go | 16373 ------ .../protobuf/test/combos/unsafeboth/uuid.go | 133 - .../test/combos/unsafemarshaler/bug_test.go | 252 - .../test/combos/unsafemarshaler/thetest.pb.go | 28464 ---------- .../test/combos/unsafemarshaler/thetest.proto | 626 - .../combos/unsafemarshaler/thetestpb_test.go | 16373 ------ .../test/combos/unsafemarshaler/uuid.go | 133 - .../test/combos/unsafeunmarshaler/bug_test.go | 252 - .../combos/unsafeunmarshaler/thetest.pb.go | 35686 ------------- .../combos/unsafeunmarshaler/thetest.proto | 626 - .../unsafeunmarshaler/thetestpb_test.go | 14637 ----- .../test/combos/unsafeunmarshaler/uuid.go | 133 - .../test/custom-dash-type/customdash.go | 104 - .../gogo/protobuf/test/custom/custom.go | 147 - .../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 | 282 - .../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 - .../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 | 212 - .../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 | 313 - .../test/enumcustomname/enumcustomname.proto | 75 - .../gogo/protobuf/test/enumprefix/Makefile | 30 - .../protobuf/test/enumprefix/enumprefix.pb.go | 68 - .../protobuf/test/enumprefix/enumprefix.proto | 37 - .../gogo/protobuf/test/enumstringer/Makefile | 30 - .../test/enumstringer/enumstringer.pb.go | 586 - .../test/enumstringer/enumstringer.proto | 62 - .../test/enumstringer/enumstringerpb_test.go | 451 - .../gogo/protobuf/test/enumstringer/string.go | 41 - .../gogo/protobuf/test/example/Makefile | 30 - .../gogo/protobuf/test/example/example.pb.go | 2531 - .../gogo/protobuf/test/example/example.proto | 83 - .../protobuf/test/example/example_test.go | 35 - .../protobuf/test/example/examplepb_test.go | 1672 - .../gogo/protobuf/test/extension_test.go | 164 - .../gogo/protobuf/test/filedotname/Makefile | 31 - .../protobuf/test/filedotname/file.dot.pb.go | 573 - .../protobuf/test/filedotname/file.dot.proto | 62 - .../test/filedotname/file.dotpb_test.go | 246 - .../gogo/protobuf/test/fuzztests/Makefile | 31 - .../gogo/protobuf/test/fuzztests/fuzz.pb.go | 2937 -- .../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 | 971 - .../gogo/protobuf/test/group/group.proto | 65 - .../gogo/protobuf/test/group/grouppb_test.go | 541 - .../gogo/protobuf/test/importdedup/Makefile | 31 - .../test/importdedup/importdedup_test.go | 34 - .../protobuf/test/importdedup/proto.pb.go | 73 - .../protobuf/test/importdedup/proto.proto | 40 - .../test/importdedup/subpkg/customtype.go | 31 - .../test/importdedup/subpkg/subproto.pb.go | 55 - .../test/importdedup/subpkg/subproto.proto | 36 - .../test/indeximport-issue72/Makefile | 31 - .../indeximport-issue72/index/index.pb.go | 519 - .../indeximport-issue72/index/index.proto | 45 - .../indeximport-issue72/index/indexpb_test.go | 155 - .../indeximport-issue72/indeximport.pb.go | 472 - .../indeximport-issue72/indeximport.proto | 46 - .../indeximport-issue72/indeximportpb_test.go | 156 - .../gogo/protobuf/test/issue34/Makefile | 30 - .../protobuf/test/issue34/issue34_test.go | 82 - .../gogo/protobuf/test/issue34/proto.pb.go | 352 - .../gogo/protobuf/test/issue34/proto.proto | 43 - .../gogo/protobuf/test/issue42order/Makefile | 30 - .../protobuf/test/issue42order/issue42.pb.go | 627 - .../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 | 370 - .../gogo/protobuf/test/issue8/proto.proto | 42 - .../gogo/protobuf/test/issue8/protopb_test.go | 108 - .../gogo/protobuf/test/mapsproto2/Makefile | 34 - .../mapsproto2/combos/both/mapsproto2.pb.go | 7637 --- .../mapsproto2/combos/both/mapsproto2.proto | 117 - .../mapsproto2/combos/both/mapsproto2_test.go | 104 - .../combos/both/mapsproto2pb_test.go | 752 - .../combos/marshaler/mapsproto2.pb.go | 3959 -- .../combos/marshaler/mapsproto2.proto | 117 - .../combos/marshaler/mapsproto2_test.go | 104 - .../combos/marshaler/mapsproto2pb_test.go | 752 - .../combos/neither/mapsproto2.pb.go | 3189 -- .../combos/neither/mapsproto2.proto | 117 - .../combos/neither/mapsproto2_test.go | 104 - .../combos/neither/mapsproto2pb_test.go | 668 - .../combos/unmarshaler/mapsproto2.pb.go | 6867 --- .../combos/unmarshaler/mapsproto2.proto | 117 - .../combos/unmarshaler/mapsproto2_test.go | 104 - .../combos/unmarshaler/mapsproto2pb_test.go | 668 - .../combos/unsafeboth/mapsproto2.pb.go | 7632 --- .../combos/unsafeboth/mapsproto2.proto | 117 - .../combos/unsafeboth/mapsproto2_test.go | 104 - .../combos/unsafeboth/mapsproto2pb_test.go | 752 - .../combos/unsafemarshaler/mapsproto2.pb.go | 3962 -- .../combos/unsafemarshaler/mapsproto2.proto | 117 - .../combos/unsafemarshaler/mapsproto2_test.go | 104 - .../unsafemarshaler/mapsproto2pb_test.go | 752 - .../combos/unsafeunmarshaler/mapsproto2.pb.go | 6860 --- .../combos/unsafeunmarshaler/mapsproto2.proto | 117 - .../unsafeunmarshaler/mapsproto2_test.go | 104 - .../unsafeunmarshaler/mapsproto2pb_test.go | 668 - .../gogo/protobuf/test/mapsproto2/doc.go | 1 - .../protobuf/test/mapsproto2/header.proto | 69 - .../protobuf/test/mapsproto2/mapsproto2.proto | 117 - .../test/mapsproto2/mapsproto2_test.go.in | 104 - .../gogo/protobuf/test/mixbench/marshal.txt | 49 - .../gogo/protobuf/test/mixbench/marshaler.txt | 49 - .../gogo/protobuf/test/mixbench/mixbench.go | 138 - .../gogo/protobuf/test/mixbench/unmarshal.txt | 49 - .../protobuf/test/mixbench/unmarshaler.txt | 49 - .../test/mixbench/unsafe_marshaler.txt | 49 - .../test/mixbench/unsafe_unmarshaler.txt | 49 - .../gogo/protobuf/test/moredefaults/Makefile | 30 - .../gogo/protobuf/test/moredefaults/md.pb.go | 343 - .../gogo/protobuf/test/moredefaults/md.proto | 53 - .../protobuf/test/moredefaults/md_test.go | 61 - .../protobuf/test/moredefaults/mdpb_test.go | 187 - .../gogo/protobuf/test/nopackage/Makefile | 30 - .../protobuf/test/nopackage/nopackage.pb.go | 413 - .../protobuf/test/nopackage/nopackage.proto | 33 - .../protobuf/test/nopackage/nopackage_test.go | 38 - .../gogo/protobuf/test/oneof/Makefile | 31 - .../protobuf/test/oneof/combos/both/one.pb.go | 5662 -- .../protobuf/test/oneof/combos/both/one.proto | 103 - .../test/oneof/combos/both/onepb_test.go | 743 - .../test/oneof/combos/marshaler/one.pb.go | 4746 -- .../test/oneof/combos/marshaler/one.proto | 103 - .../test/oneof/combos/marshaler/onepb_test.go | 743 - .../test/oneof/combos/neither/one.pb.go | 4366 -- .../test/oneof/combos/neither/one.proto | 103 - .../test/oneof/combos/neither/onepb_test.go | 631 - .../test/oneof/combos/unmarshaler/one.pb.go | 5282 -- .../test/oneof/combos/unmarshaler/one.proto | 103 - .../oneof/combos/unmarshaler/onepb_test.go | 631 - .../test/oneof/combos/unsafeboth/one.pb.go | 5631 -- .../test/oneof/combos/unsafeboth/one.proto | 103 - .../oneof/combos/unsafeboth/onepb_test.go | 743 - .../oneof/combos/unsafemarshaler/one.pb.go | 4757 -- .../oneof/combos/unsafemarshaler/one.proto | 103 - .../combos/unsafemarshaler/onepb_test.go | 743 - .../oneof/combos/unsafeunmarshaler/one.pb.go | 5243 -- .../oneof/combos/unsafeunmarshaler/one.proto | 103 - .../combos/unsafeunmarshaler/onepb_test.go | 631 - .../gogo/protobuf/test/oneof/doc.go | 1 - .../gogo/protobuf/test/oneof/one.proto | 103 - .../gogo/protobuf/test/oneof3/Makefile | 31 - .../test/oneof3/combos/both/one.pb.go | 3415 -- .../test/oneof3/combos/both/one.proto | 82 - .../test/oneof3/combos/both/onepb_test.go | 389 - .../test/oneof3/combos/marshaler/one.pb.go | 2850 - .../test/oneof3/combos/marshaler/one.proto | 82 - .../oneof3/combos/marshaler/onepb_test.go | 389 - .../test/oneof3/combos/neither/one.pb.go | 2643 - .../test/oneof3/combos/neither/one.proto | 82 - .../test/oneof3/combos/neither/onepb_test.go | 333 - .../test/oneof3/combos/unmarshaler/one.pb.go | 3208 -- .../test/oneof3/combos/unmarshaler/one.proto | 82 - .../oneof3/combos/unmarshaler/onepb_test.go | 333 - .../test/oneof3/combos/unsafeboth/one.pb.go | 3393 -- .../test/oneof3/combos/unsafeboth/one.proto | 82 - .../oneof3/combos/unsafeboth/onepb_test.go | 389 - .../oneof3/combos/unsafemarshaler/one.pb.go | 2859 - .../oneof3/combos/unsafemarshaler/one.proto | 82 - .../combos/unsafemarshaler/onepb_test.go | 389 - .../oneof3/combos/unsafeunmarshaler/one.pb.go | 3180 -- .../oneof3/combos/unsafeunmarshaler/one.proto | 82 - .../combos/unsafeunmarshaler/onepb_test.go | 333 - .../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 | 415 - .../protobuf/test/oneofembed/oneofembed.proto | 46 - .../test/oneofembed/oneofembedpb_test.go | 186 - .../gogo/protobuf/test/packed/Makefile | 30 - .../gogo/protobuf/test/packed/doc.go | 1 - .../gogo/protobuf/test/packed/packed.pb.go | 3419 -- .../gogo/protobuf/test/packed/packed.proto | 103 - .../gogo/protobuf/test/packed/packed_test.go | 323 - .../gogo/protobuf/test/protosize/Makefile | 30 - .../protobuf/test/protosize/protosize.pb.go | 620 - .../protobuf/test/protosize/protosize.proto | 46 - .../protobuf/test/protosize/protosize_test.go | 37 - .../test/protosize/protosizepb_test.go | 155 - .../gogo/protobuf/test/required/Makefile | 30 - .../test/required/requiredexample.pb.go | 2215 - .../test/required/requiredexample.proto | 83 - .../test/required/requiredexamplepb_test.go | 181 - .../protobuf/test/sizeunderscore/Makefile | 30 - .../test/sizeunderscore/sizeunderscore.pb.go | 567 - .../test/sizeunderscore/sizeunderscore.proto | 45 - .../sizeunderscore/sizeunderscorepb_test.go | 155 - .../gogo/protobuf/test/tags/Makefile | 30 - .../github.com/gogo/protobuf/test/tags/doc.go | 1 - .../gogo/protobuf/test/tags/tags.pb.go | 189 - .../gogo/protobuf/test/tags/tags.proto | 44 - .../gogo/protobuf/test/tags/tags_test.go | 119 - .../gogo/protobuf/test/theproto3/Makefile | 35 - .../test/theproto3/combos/both/proto3_test.go | 125 - .../theproto3/combos/both/theproto3.pb.go | 10831 ---- .../theproto3/combos/both/theproto3.proto | 164 - .../theproto3/combos/both/theproto3pb_test.go | 2186 - .../theproto3/combos/marshaler/proto3_test.go | 125 - .../combos/marshaler/theproto3.pb.go | 5876 --- .../combos/marshaler/theproto3.proto | 164 - .../combos/marshaler/theproto3pb_test.go | 2186 - .../theproto3/combos/neither/proto3_test.go | 125 - .../theproto3/combos/neither/theproto3.pb.go | 4774 -- .../theproto3/combos/neither/theproto3.proto | 164 - .../combos/neither/theproto3pb_test.go | 1934 - .../combos/unmarshaler/proto3_test.go | 125 - .../combos/unmarshaler/theproto3.pb.go | 9730 ---- .../combos/unmarshaler/theproto3.proto | 164 - .../combos/unmarshaler/theproto3pb_test.go | 1934 - .../combos/unsafeboth/proto3_test.go | 125 - .../combos/unsafeboth/theproto3.pb.go | 10822 ---- .../combos/unsafeboth/theproto3.proto | 164 - .../combos/unsafeboth/theproto3pb_test.go | 2186 - .../combos/unsafemarshaler/proto3_test.go | 125 - .../combos/unsafemarshaler/theproto3.pb.go | 5881 --- .../combos/unsafemarshaler/theproto3.proto | 164 - .../unsafemarshaler/theproto3pb_test.go | 2186 - .../combos/unsafeunmarshaler/proto3_test.go | 125 - .../combos/unsafeunmarshaler/theproto3.pb.go | 9718 ---- .../combos/unsafeunmarshaler/theproto3.proto | 164 - .../unsafeunmarshaler/theproto3pb_test.go | 1934 - .../gogo/protobuf/test/theproto3/doc.go | 1 - .../gogo/protobuf/test/theproto3/footer.proto | 21 - .../gogo/protobuf/test/theproto3/header.proto | 95 - .../gogo/protobuf/test/theproto3/maps.proto | 48 - .../protobuf/test/theproto3/proto3_test.go.in | 125 - .../protobuf/test/theproto3/theproto3.proto | 164 - .../gogo/protobuf/test/thetest.pb.go | 24656 --------- .../gogo/protobuf/test/thetest.proto | 626 - .../gogo/protobuf/test/thetestpb_test.go | 14637 ----- .../protobuf/test/unmarshalmerge/Makefile | 30 - .../test/unmarshalmerge/unmarshalmerge.pb.go | 1690 - .../test/unmarshalmerge/unmarshalmerge.proto | 75 - .../unmarshalmerge/unmarshalmerge_test.go | 99 - .../unmarshalmerge/unmarshalmergepb_test.go | 700 - .../gogo/protobuf/test/unrecognized/Makefile | 30 - .../protobuf/test/unrecognized/oldnew_test.go | 200 - .../test/unrecognized/unrecognized.pb.go | 4065 -- .../test/unrecognized/unrecognized.proto | 131 - .../test/unrecognized/unrecognizedpb_test.go | 1882 - .../protobuf/test/unrecognizedgroup/Makefile | 30 - .../test/unrecognizedgroup/oldnew_test.go | 128 - .../unrecognizedgroup/unrecognizedgroup.pb.go | 1728 - .../unrecognizedgroup/unrecognizedgroup.proto | 77 - .../unrecognizedgrouppb_test.go | 768 - vendor/github.com/gogo/protobuf/test/uuid.go | 133 - .../gogo/protobuf/test/uuid_test.go | 51 - .../gogo/protobuf/vanity/command/command.go | 152 - .../github.com/gogo/protobuf/vanity/enum.go | 78 - .../github.com/gogo/protobuf/vanity/field.go | 83 - .../github.com/gogo/protobuf/vanity/file.go | 175 - .../gogo/protobuf/vanity/foreach.go | 125 - vendor/github.com/gogo/protobuf/vanity/msg.go | 138 - .../gogo/protobuf/vanity/test/Makefile | 46 - .../gogo/protobuf/vanity/test/doc.go | 1 - .../vanity/test/fast/gogovanity.pb.go | 408 - .../protobuf/vanity/test/fast/proto3.pb.go | 312 - .../protobuf/vanity/test/fast/vanity.pb.go | 375 - .../vanity/test/faster/gogovanity.pb.go | 396 - .../protobuf/vanity/test/faster/proto3.pb.go | 313 - .../protobuf/vanity/test/faster/vanity.pb.go | 354 - .../protobuf/vanity/test/gofast/.gitignore | 1 - .../protobuf/vanity/test/gogovanity.proto | 39 - .../gogo/protobuf/vanity/test/proto3.proto | 35 - .../vanity/test/slick/gogovanity.pb.go | 512 - .../protobuf/vanity/test/slick/proto3.pb.go | 403 - .../protobuf/vanity/test/slick/vanity.pb.go | 449 - .../gogo/protobuf/vanity/test/vanity.proto | 36 - .../gogo/protobuf/vanity/test/vanity_test.go | 93 - .../gogo/protobuf/version/version.go | 78 - vendor/github.com/golang/protobuf/.gitignore | 16 - vendor/github.com/golang/protobuf/LICENSE | 3 - .../github.com/golang/protobuf/Make.protobuf | 40 - vendor/github.com/golang/protobuf/Makefile | 55 - vendor/github.com/golang/protobuf/README.md | 241 - .../golang/protobuf/_conformance/Makefile | 33 - .../protobuf/_conformance/conformance.go | 161 - .../conformance_proto/conformance.pb.go | 1472 - .../conformance_proto/conformance.proto | 285 - .../golang/protobuf/jsonpb/jsonpb.go | 829 - .../golang/protobuf/jsonpb/jsonpb_test.go | 561 - .../jsonpb/jsonpb_test_proto/Makefile | 33 - .../jsonpb_test_proto/more_test_objects.pb.go | 200 - .../jsonpb_test_proto/more_test_objects.proto | 57 - .../jsonpb_test_proto/test_objects.pb.go | 769 - .../jsonpb_test_proto/test_objects.proto | 135 - .../github.com/golang/protobuf/proto/Makefile | 43 - .../golang/protobuf/proto/all_test.go | 2278 - .../golang/protobuf/proto/any_test.go | 300 - .../github.com/golang/protobuf/proto/clone.go | 46 +- .../golang/protobuf/proto/clone_test.go | 300 - .../golang/protobuf/proto/decode.go | 668 +- .../golang/protobuf/proto/decode_test.go | 256 - .../golang/protobuf/proto/discard.go | 350 + .../golang/protobuf/proto/encode.go | 1200 +- .../golang/protobuf/proto/encode_test.go | 83 - .../github.com/golang/protobuf/proto/equal.go | 30 +- .../golang/protobuf/proto/equal_test.go | 224 - .../golang/protobuf/proto/extensions.go | 205 +- .../golang/protobuf/proto/extensions_test.go | 508 - .../github.com/golang/protobuf/proto/lib.go | 129 +- .../golang/protobuf/proto/message_set.go | 81 +- .../golang/protobuf/proto/message_set_test.go | 66 - .../golang/protobuf/proto/pointer_reflect.go | 595 +- .../golang/protobuf/proto/pointer_unsafe.go | 366 +- .../golang/protobuf/proto/properties.go | 442 +- .../protobuf/proto/proto3_proto/proto3.pb.go | 219 - .../protobuf/proto/proto3_proto/proto3.proto | 78 - .../golang/protobuf/proto/proto3_test.go | 125 - .../golang/protobuf/proto/size2_test.go | 63 - .../golang/protobuf/proto/size_test.go | 164 - .../golang/protobuf/proto/table_marshal.go | 2767 + .../golang/protobuf/proto/table_merge.go | 654 + .../golang/protobuf/proto/table_unmarshal.go | 2051 + .../golang/protobuf/proto/testdata/Makefile | 50 - .../protobuf/proto/testdata/golden_test.go | 86 - .../golang/protobuf/proto/testdata/test.pb.go | 4061 -- .../golang/protobuf/proto/testdata/test.proto | 548 - .../github.com/golang/protobuf/proto/text.go | 65 +- .../golang/protobuf/proto/text_parser.go | 87 +- .../golang/protobuf/proto/text_parser_test.go | 662 - .../golang/protobuf/proto/text_test.go | 474 - .../golang/protobuf/protoc-gen-go/Makefile | 33 - .../protoc-gen-go/descriptor/Makefile | 39 - .../protoc-gen-go/descriptor/descriptor.pb.go | 2076 - .../golang/protobuf/protoc-gen-go/doc.go | 51 - .../protobuf/protoc-gen-go/generator/Makefile | 40 - .../protoc-gen-go/generator/generator.go | 2808 - .../protoc-gen-go/generator/name_test.go | 85 - .../protobuf/protoc-gen-go/grpc/grpc.go | 463 - .../protobuf/protoc-gen-go/link_grpc.go | 34 - .../golang/protobuf/protoc-gen-go/main.go | 98 - .../protobuf/protoc-gen-go/plugin/Makefile | 45 - .../protoc-gen-go/plugin/plugin.pb.go | 229 - .../protoc-gen-go/plugin/plugin.pb.golden | 83 - .../protobuf/protoc-gen-go/testdata/Makefile | 73 - .../testdata/extension_base.proto | 46 - .../testdata/extension_extra.proto | 38 - .../protoc-gen-go/testdata/extension_test.go | 210 - .../testdata/extension_user.proto | 100 - .../protoc-gen-go/testdata/grpc.proto | 59 - .../protoc-gen-go/testdata/imp.pb.go.golden | 113 - .../protobuf/protoc-gen-go/testdata/imp.proto | 70 - .../protoc-gen-go/testdata/imp2.proto | 43 - .../protoc-gen-go/testdata/imp3.proto | 38 - .../protoc-gen-go/testdata/main_test.go | 46 - .../protoc-gen-go/testdata/multi/multi1.proto | 44 - .../protoc-gen-go/testdata/multi/multi2.proto | 46 - .../protoc-gen-go/testdata/multi/multi3.proto | 43 - .../protoc-gen-go/testdata/my_test/test.pb.go | 866 - .../testdata/my_test/test.pb.go.golden | 866 - .../protoc-gen-go/testdata/my_test/test.proto | 156 - .../protoc-gen-go/testdata/proto3.proto | 53 - .../github.com/golang/protobuf/ptypes/any.go | 136 - .../golang/protobuf/ptypes/any/any.pb.go | 155 - .../golang/protobuf/ptypes/any/any.proto | 140 - .../golang/protobuf/ptypes/any_test.go | 113 - .../github.com/golang/protobuf/ptypes/doc.go | 35 - .../golang/protobuf/ptypes/duration.go | 102 - .../protobuf/ptypes/duration/duration.pb.go | 114 - .../protobuf/ptypes/duration/duration.proto | 98 - .../golang/protobuf/ptypes/duration_test.go | 121 - .../golang/protobuf/ptypes/empty/empty.pb.go | 69 - .../golang/protobuf/ptypes/empty/empty.proto | 53 - .../golang/protobuf/ptypes/regen.sh | 66 - .../protobuf/ptypes/struct/struct.pb.go | 382 - .../protobuf/ptypes/struct/struct.proto | 96 - .../golang/protobuf/ptypes/timestamp.go | 125 - .../protobuf/ptypes/timestamp/timestamp.pb.go | 127 - .../protobuf/ptypes/timestamp/timestamp.proto | 111 - .../golang/protobuf/ptypes/timestamp_test.go | 138 - .../protobuf/ptypes/wrappers/wrappers.pb.go | 200 - .../protobuf/ptypes/wrappers/wrappers.proto | 119 - vendor/github.com/google/uuid/json_test.go | 62 - vendor/github.com/google/uuid/seq_test.go | 66 - vendor/github.com/google/uuid/sql_test.go | 113 - vendor/github.com/google/uuid/uuid_test.go | 525 - .../gorilla/websocket/bench_test.go | 19 - .../gorilla/websocket/client_server_test.go | 451 - .../gorilla/websocket/client_test.go | 72 - .../gorilla/websocket/compression_test.go | 31 - .../github.com/gorilla/websocket/conn_test.go | 402 - .../gorilla/websocket/example_test.go | 46 - .../websocket/examples/autobahn/README.md | 13 - .../examples/autobahn/fuzzingclient.json | 14 - .../websocket/examples/autobahn/server.go | 246 - .../gorilla/websocket/examples/chat/README.md | 91 - .../gorilla/websocket/examples/chat/client.go | 131 - .../gorilla/websocket/examples/chat/home.html | 98 - .../gorilla/websocket/examples/chat/hub.go | 53 - .../gorilla/websocket/examples/chat/main.go | 43 - .../websocket/examples/command/README.md | 19 - .../websocket/examples/command/home.html | 96 - .../websocket/examples/command/main.go | 188 - .../gorilla/websocket/examples/echo/README.md | 17 - .../gorilla/websocket/examples/echo/client.go | 81 - .../gorilla/websocket/examples/echo/server.go | 132 - .../websocket/examples/filewatch/README.md | 9 - .../websocket/examples/filewatch/main.go | 193 - .../github.com/gorilla/websocket/json_test.go | 119 - .../gorilla/websocket/server_test.go | 51 - .../github.com/gorilla/websocket/util_test.go | 74 - vendor/github.com/hpcloud/tail/.gitignore | 3 + vendor/github.com/hpcloud/tail/.travis.yml | 18 + vendor/github.com/hpcloud/tail/CHANGES.md | 63 + vendor/github.com/hpcloud/tail/Dockerfile | 19 + vendor/github.com/hpcloud/tail/LICENSE.txt | 21 + vendor/github.com/hpcloud/tail/Makefile | 11 + vendor/github.com/hpcloud/tail/README.md | 28 + vendor/github.com/hpcloud/tail/appveyor.yml | 11 + .../hpcloud/tail/ratelimiter/Licence | 7 + .../hpcloud/tail/ratelimiter/leakybucket.go | 97 + .../hpcloud/tail/ratelimiter/memory.go | 58 + .../hpcloud/tail/ratelimiter/storage.go | 6 + vendor/github.com/hpcloud/tail/tail.go | 438 + vendor/github.com/hpcloud/tail/tail_posix.go | 11 + .../github.com/hpcloud/tail/tail_windows.go | 12 + vendor/github.com/hpcloud/tail/util/util.go | 48 + .../hpcloud/tail/watch/filechanges.go | 36 + .../github.com/hpcloud/tail/watch/inotify.go | 128 + .../hpcloud/tail/watch/inotify_tracker.go | 260 + .../github.com/hpcloud/tail/watch/polling.go | 118 + vendor/github.com/hpcloud/tail/watch/watch.go | 20 + .../hpcloud/tail/winfile/winfile.go | 92 + .../kelseyhightower/envconfig/.travis.yml | 7 - .../kelseyhightower/envconfig/MAINTAINERS | 2 - .../kelseyhightower/envconfig/README.md | 165 - .../kelseyhightower/envconfig/doc.go | 8 - .../kelseyhightower/envconfig/env_os.go | 7 - .../kelseyhightower/envconfig/env_syscall.go | 7 - .../kelseyhightower/envconfig/envconfig.go | 254 - .../envconfig/envconfig_test.go | 648 - .../mailru/easyjson/benchmark/codec_test.go | 279 - .../mailru/easyjson/benchmark/data.go | 148 - .../mailru/easyjson/benchmark/data_codec.go | 6911 --- .../mailru/easyjson/benchmark/data_ffjson.go | 6723 --- .../mailru/easyjson/benchmark/data_var.go | 350 - .../mailru/easyjson/benchmark/default_test.go | 118 - .../mailru/easyjson/benchmark/dummy_test.go | 11 - .../easyjson/benchmark/easyjson_test.go | 184 - .../mailru/easyjson/benchmark/example.json | 415 - .../mailru/easyjson/benchmark/ffjson_test.go | 190 - .../mailru/easyjson/benchmark/ujson.sh | 7 - .../mailru/easyjson/bootstrap/bootstrap.go | 180 - .../mailru/easyjson/buffer/pool_test.go | 79 - .../mailru/easyjson/easyjson/main.go | 83 - .../github.com/mailru/easyjson/gen/decoder.go | 387 - .../github.com/mailru/easyjson/gen/encoder.go | 313 - .../mailru/easyjson/gen/generator.go | 395 - .../mailru/easyjson/gen/generator_test.go | 49 - .../mailru/easyjson/jlexer/lexer_test.go | 192 - .../mailru/easyjson/opt/gotemplate_Bool.go | 79 - .../mailru/easyjson/opt/gotemplate_Float32.go | 79 - .../mailru/easyjson/opt/gotemplate_Float64.go | 79 - .../mailru/easyjson/opt/gotemplate_Int.go | 79 - .../mailru/easyjson/opt/gotemplate_Int16.go | 79 - .../mailru/easyjson/opt/gotemplate_Int32.go | 79 - .../mailru/easyjson/opt/gotemplate_Int64.go | 79 - .../mailru/easyjson/opt/gotemplate_Int8.go | 79 - .../mailru/easyjson/opt/gotemplate_String.go | 79 - .../mailru/easyjson/opt/gotemplate_Uint.go | 79 - .../mailru/easyjson/opt/gotemplate_Uint16.go | 79 - .../mailru/easyjson/opt/gotemplate_Uint32.go | 79 - .../mailru/easyjson/opt/gotemplate_Uint64.go | 79 - .../mailru/easyjson/opt/gotemplate_Uint8.go | 79 - .../mailru/easyjson/opt/optional/opt.go | 80 - vendor/github.com/mailru/easyjson/opt/opts.go | 22 - .../mailru/easyjson/parser/parser.go | 78 - .../mailru/easyjson/parser/parser_unix.go | 29 - .../mailru/easyjson/parser/parser_windows.go | 33 - .../mailru/easyjson/tests/basic_test.go | 133 - .../github.com/mailru/easyjson/tests/data.go | 545 - .../mailru/easyjson/tests/nothing.go | 3 - .../mailru/easyjson/tests/omitempty.go | 12 - .../mailru/easyjson/tests/required_test.go | 28 - .../github.com/mailru/easyjson/tests/snake.go | 10 - vendor/github.com/onsi/ginkgo/.gitignore | 5 +- vendor/github.com/onsi/ginkgo/.travis.yml | 10 +- vendor/github.com/onsi/ginkgo/CHANGELOG.md | 63 +- vendor/github.com/onsi/ginkgo/CONTRIBUTING.md | 33 + vendor/github.com/onsi/ginkgo/README.md | 36 +- vendor/github.com/onsi/ginkgo/RELEASING.md | 14 + .../github.com/onsi/ginkgo/config/config.go | 17 +- .../onsi/ginkgo/extensions/table/table.go | 98 - .../ginkgo/extensions/table/table_entry.go | 81 - .../extensions/table/table_suite_test.go | 13 - .../ginkgo/extensions/table/table_test.go | 64 - .../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 | 44 - .../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 | 291 - .../onsi/ginkgo/ginkgo/nodot/nodot.go | 194 - .../ginkgo/ginkgo/nodot/nodot_suite_test.go | 91 - .../onsi/ginkgo/ginkgo/nodot/nodot_test.go | 81 - .../onsi/ginkgo/ginkgo/nodot_command.go | 76 - .../onsi/ginkgo/ginkgo/notifications.go | 141 - .../onsi/ginkgo/ginkgo/run_command.go | 192 - .../run_watch_and_build_command_flags.go | 160 - .../onsi/ginkgo/ginkgo/suite_runner.go | 172 - .../ginkgo/ginkgo/testrunner/log_writer.go | 52 - .../ginkgo/ginkgo/testrunner/run_result.go | 27 - .../ginkgo/ginkgo/testrunner/test_runner.go | 506 - .../ginkgo/testrunner/test_runner_test.go | 56 - .../ginkgo/ginkgo/testsuite/test_suite.go | 111 - .../ginkgo/testsuite/testsuite_suite_test.go | 13 - .../ginkgo/ginkgo/testsuite/testsuite_test.go | 202 - .../ginkgo/testsuite/vendor_check_go15.go | 16 - .../testsuite/vendor_check_go15_test.go | 202 - .../ginkgo/testsuite/vendor_check_go16.go | 15 - .../onsi/ginkgo/ginkgo/unfocus_command.go | 38 - .../onsi/ginkgo/ginkgo/version_command.go | 23 - .../onsi/ginkgo/ginkgo/watch/delta.go | 22 - .../onsi/ginkgo/ginkgo/watch/delta_tracker.go | 71 - .../onsi/ginkgo/ginkgo/watch/dependencies.go | 91 - .../onsi/ginkgo/ginkgo/watch/package_hash.go | 103 - .../ginkgo/ginkgo/watch/package_hashes.go | 82 - .../onsi/ginkgo/ginkgo/watch/suite.go | 87 - .../onsi/ginkgo/ginkgo/watch_command.go | 172 - vendor/github.com/onsi/ginkgo/ginkgo_dsl.go | 68 +- .../convert_fixtures/extra_functions_test.go | 14 - .../convert_fixtures/nested/nested_test.go | 10 - .../subpackage/nested_subpackage_test.go | 9 - .../convert_fixtures/outside_package_test.go | 16 - .../_fixtures/convert_fixtures/xunit_test.go | 41 - .../extra_functions_test.go | 17 - .../fixtures_suite_test.go | 13 - .../nested_subpackage_test.go | 11 - .../convert_goldmasters/nested_suite_test.go | 13 - .../convert_goldmasters/nested_test.go | 13 - .../outside_package_test.go | 19 - .../convert_goldmasters/suite_test.go | 13 - .../convert_goldmasters/xunit_test.go | 44 - .../_fixtures/coverage_fixture/coverage.go | 21 - .../coverage_fixture_suite_test.go | 13 - .../coverage_fixture/coverage_fixture_test.go | 31 - .../external_coverage.go | 9 - .../does_not_compile_suite_test.go | 13 - .../does_not_compile/does_not_compile_test.go | 11 - .../eventually_failing_suite_test.go | 13 - .../eventually_failing_test.go | 29 - ...ing_synchronized_setup_tests_suite_test.go | 35 - .../fail_fixture/fail_fixture_suite_test.go | 13 - .../fail_fixture/fail_fixture_test.go | 99 - .../failing_after_suite_suite_test.go | 22 - .../failing_after_suite_test.go | 15 - .../failing_before_suite_suite_test.go | 22 - .../failing_before_suite_test.go | 15 - .../failing_ginkgo_tests.go | 5 - .../failing_ginkgo_tests_suite_test.go | 13 - .../failing_ginkgo_tests_test.go | 17 - .../_fixtures/flags_tests/flags.go | 9 - .../_fixtures/flags_tests/flags_suite_test.go | 13 - .../_fixtures/flags_tests/flags_test.go | 95 - .../focused_fixture_suite_test.go | 13 - .../focused_fixture/focused_fixture_test.go | 63 - .../hanging_suite/hanging_suite_suite_test.go | 13 - .../hanging_suite/hanging_suite_test.go | 29 - .../more_ginkgo_tests/more_ginkgo_tests.go | 5 - .../more_ginkgo_tests_suite_test.go | 13 - .../more_ginkgo_tests_test.go | 17 - .../_fixtures/no_tests/no_tests.go | 4 - .../passing_ginkgo_tests.go | 9 - .../passing_ginkgo_tests_suite_test.go | 13 - .../passing_ginkgo_tests_test.go | 30 - .../passing_suite_setup_suite_test.go | 26 - .../passing_suite_setup/passing_suite_test.go | 28 - .../progress_fixture_suite_test.go | 13 - .../progress_fixture/progress_fixture_test.go | 39 - .../skip_fixture/skip_fixture_suite_test.go | 13 - .../skip_fixture/skip_fixture_test.go | 72 - .../suite_command_tests/suite_command.go | 9 - .../suite_command_suite_test.go | 13 - .../suite_command_tests/suite_command_test.go | 18 - .../synchronized_setup_tests_suite_test.go | 43 - .../_fixtures/tags_tests/ignored_test.go | 17 - .../tags_tests/tags_tests_suite_test.go | 13 - .../_fixtures/tags_tests/tags_tests_test.go | 11 - .../test_description_suite_test.go | 13 - .../test_description/test_description_test.go | 23 - .../_fixtures/watch_fixtures/A/A.go | 7 - .../watch_fixtures/A/A_suite_test.go | 13 - .../_fixtures/watch_fixtures/A/A_test.go | 14 - .../_fixtures/watch_fixtures/B/B.go | 7 - .../watch_fixtures/B/B_suite_test.go | 13 - .../_fixtures/watch_fixtures/B/B_test.go | 14 - .../_fixtures/watch_fixtures/C/C.go | 5 - .../watch_fixtures/C/C_suite_test.go | 13 - .../_fixtures/watch_fixtures/C/C_test.go | 14 - .../_fixtures/watch_fixtures/D/D.go | 7 - .../watch_fixtures/D/D_suite_test.go | 13 - .../_fixtures/watch_fixtures/D/D_test.go | 14 - .../_fixtures/xunit_tests/xunit_tests.go | 5 - .../_fixtures/xunit_tests/xunit_tests_test.go | 11 - .../onsi/ginkgo/integration/convert_test.go | 121 - .../onsi/ginkgo/integration/coverage_test.go | 54 - .../onsi/ginkgo/integration/fail_test.go | 48 - .../onsi/ginkgo/integration/flags_test.go | 231 - .../onsi/ginkgo/integration/integration.go | 1 - .../integration/integration_suite_test.go | 91 - .../onsi/ginkgo/integration/interrupt_test.go | 51 - .../ginkgo/integration/precompiled_test.go | 53 - .../onsi/ginkgo/integration/progress_test.go | 75 - .../onsi/ginkgo/integration/run_test.go | 382 - .../onsi/ginkgo/integration/skip_test.go | 43 - .../ginkgo/integration/subcommand_test.go | 395 - .../ginkgo/integration/suite_command_test.go | 63 - .../ginkgo/integration/suite_setup_test.go | 178 - .../onsi/ginkgo/integration/tags_test.go | 27 - .../integration/test_description_test.go | 25 - .../integration/verbose_and_succinct_test.go | 90 - .../onsi/ginkgo/integration/watch_test.go | 239 - .../codelocation/code_location_suite_test.go | 13 - .../codelocation/code_location_test.go | 79 - .../container_node_suite_test.go | 13 - .../containernode/container_node_test.go | 212 - .../internal/failer/failer_suite_test.go | 13 - .../ginkgo/internal/failer/failer_test.go | 141 - .../ginkgo/internal/leafnodes/benchmarker.go | 4 +- .../onsi/ginkgo/internal/leafnodes/it_node.go | 3 +- .../ginkgo/internal/leafnodes/it_node_test.go | 22 - .../leafnodes/leaf_node_suite_test.go | 13 - .../ginkgo/internal/leafnodes/measure_node.go | 3 +- .../internal/leafnodes/measure_node_test.go | 154 - .../onsi/ginkgo/internal/leafnodes/runner.go | 8 +- .../ginkgo/internal/leafnodes/setup_nodes.go | 3 +- .../internal/leafnodes/setup_nodes_test.go | 40 - .../internal/leafnodes/shared_runner_test.go | 359 - .../ginkgo/internal/leafnodes/suite_nodes.go | 3 +- .../internal/leafnodes/suite_nodes_test.go | 230 - .../synchronized_after_suite_node.go | 5 +- .../synchronized_after_suite_node_test.go | 196 - .../synchronized_before_suite_node.go | 7 +- .../synchronized_before_suite_node_test.go | 445 - .../onsi/ginkgo/internal/remote/aggregator.go | 11 +- .../ginkgo/internal/remote/aggregator_test.go | 311 - .../remote/fake_output_interceptor_test.go | 17 - .../internal/remote/fake_poster_test.go | 33 - .../internal/remote/forwarding_reporter.go | 61 +- .../remote/forwarding_reporter_test.go | 180 - .../internal/remote/output_interceptor.go | 3 + .../remote/output_interceptor_unix.go | 28 + .../internal/remote/output_interceptor_win.go | 3 + .../internal/remote/remote_suite_test.go | 13 - .../onsi/ginkgo/internal/remote/server.go | 28 +- .../ginkgo/internal/remote/server_test.go | 269 - .../remote/syscall_dup_linux_arm64.go | 2 +- .../internal/remote/syscall_dup_solaris.go | 2 +- .../internal/remote/syscall_dup_unix.go | 2 +- .../internal/spec/index_computer_test.go | 149 - .../onsi/ginkgo/internal/spec/spec.go | 71 +- .../ginkgo/internal/spec/spec_suite_test.go | 13 - .../onsi/ginkgo/internal/spec/spec_test.go | 657 - .../onsi/ginkgo/internal/spec/specs.go | 21 +- .../onsi/ginkgo/internal/spec/specs_test.go | 335 - .../{spec => spec_iterator}/index_computer.go | 2 +- .../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/spec_runner.go | 105 +- .../specrunner/spec_runner_suite_test.go | 13 - .../internal/specrunner/spec_runner_test.go | 794 - .../onsi/ginkgo/internal/suite/suite.go | 34 +- .../ginkgo/internal/suite/suite_suite_test.go | 35 - .../onsi/ginkgo/internal/suite/suite_test.go | 408 - .../ginkgo/internal/writer/fake_writer.go | 5 + .../onsi/ginkgo/internal/writer/writer.go | 30 +- .../internal/writer/writer_suite_test.go | 13 - .../ginkgo/internal/writer/writer_test.go | 75 - .../onsi/ginkgo/reporters/default_reporter.go | 7 +- .../ginkgo/reporters/default_reporter_test.go | 415 - .../onsi/ginkgo/reporters/junit_reporter.go | 17 +- .../ginkgo/reporters/junit_reporter_test.go | 247 - .../ginkgo/reporters/reporters_suite_test.go | 13 - .../stenographer/fake_stenographer.go | 8 +- .../reporters/stenographer/stenographer.go | 30 +- .../reporters/stenographer/support/README.md | 6 - .../ginkgo/reporters/teamcity_reporter.go | 5 +- .../reporters/teamcity_reporter_test.go | 213 - vendor/github.com/onsi/ginkgo/types/types.go | 13 + .../onsi/ginkgo/types/types_suite_test.go | 13 - .../onsi/ginkgo/types/types_test.go | 99 - vendor/github.com/onsi/gomega/.gitignore | 2 + vendor/github.com/onsi/gomega/.travis.yml | 19 +- vendor/github.com/onsi/gomega/CHANGELOG.md | 63 +- vendor/github.com/onsi/gomega/CONTRIBUTING.md | 14 + vendor/github.com/onsi/gomega/README.md | 8 +- vendor/github.com/onsi/gomega/RELEASING.md | 12 + .../github.com/onsi/gomega/format/format.go | 154 +- .../onsi/gomega/format/format_suite_test.go | 13 - .../onsi/gomega/format/format_test.go | 449 - .../github.com/onsi/gomega/gbytes/buffer.go | 229 - .../onsi/gomega/gbytes/buffer_test.go | 158 - .../onsi/gomega/gbytes/gbuffer_suite_test.go | 13 - .../onsi/gomega/gbytes/say_matcher.go | 105 - .../onsi/gomega/gbytes/say_matcher_test.go | 163 - .../gomega/gexec/_fixture/firefly/main.go | 36 - vendor/github.com/onsi/gomega/gexec/build.go | 78 - .../onsi/gomega/gexec/exit_matcher.go | 88 - .../onsi/gomega/gexec/exit_matcher_test.go | 113 - .../onsi/gomega/gexec/gexec_suite_test.go | 26 - .../onsi/gomega/gexec/prefixed_writer.go | 53 - .../onsi/gomega/gexec/prefixed_writer_test.go | 43 - .../github.com/onsi/gomega/gexec/session.go | 214 - .../onsi/gomega/gexec/session_test.go | 178 - .../github.com/onsi/gomega/ghttp/handlers.go | 209 - .../onsi/gomega/ghttp/test_server.go | 334 - .../gomega/ghttp/test_server_suite_test.go | 13 - .../onsi/gomega/ghttp/test_server_test.go | 604 - vendor/github.com/onsi/gomega/gomega_dsl.go | 124 +- .../gomega/internal/assertion/assertion.go | 19 +- .../assertion/assertion_suite_test.go | 13 - .../internal/assertion/assertion_test.go | 252 - .../asyncassertion/async_assertion.go | 25 +- .../async_assertion_suite_test.go | 13 - .../asyncassertion/async_assertion_test.go | 345 - .../internal/fakematcher/fake_matcher.go | 23 - .../internal/oraclematcher/oracle_matcher.go | 25 + .../testingtsupport/testing_t_support.go | 46 +- .../testingtsupport/testing_t_support_test.go | 12 - vendor/github.com/onsi/gomega/matchers.go | 173 +- vendor/github.com/onsi/gomega/matchers/and.go | 63 + .../matchers/assignable_to_type_of_matcher.go | 11 +- .../assignable_to_type_of_matcher_test.go | 30 - .../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 | 7 +- .../gomega/matchers/be_closed_matcher_test.go | 70 - .../onsi/gomega/matchers/be_empty_matcher.go | 1 + .../gomega/matchers/be_empty_matcher_test.go | 52 - .../matchers/be_equivalent_to_matcher.go | 3 +- .../matchers/be_equivalent_to_matcher_test.go | 50 - .../onsi/gomega/matchers/be_false_matcher.go | 1 + .../gomega/matchers/be_false_matcher_test.go | 20 - .../onsi/gomega/matchers/be_identical_to.go | 37 + .../gomega/matchers/be_nil_matcher_test.go | 28 - .../gomega/matchers/be_numerically_matcher.go | 19 +- .../matchers/be_numerically_matcher_test.go | 148 - .../onsi/gomega/matchers/be_sent_matcher.go | 4 +- .../gomega/matchers/be_sent_matcher_test.go | 106 - .../gomega/matchers/be_temporally_matcher.go | 3 +- .../matchers/be_temporally_matcher_test.go | 98 - .../onsi/gomega/matchers/be_true_matcher.go | 1 + .../gomega/matchers/be_true_matcher_test.go | 20 - .../onsi/gomega/matchers/be_zero_matcher.go | 3 +- .../gomega/matchers/be_zero_matcher_test.go | 30 - .../onsi/gomega/matchers/consist_of_test.go | 75 - .../matchers/contain_element_matcher_test.go | 76 - .../matchers/contain_substring_matcher.go | 3 +- .../contain_substring_matcher_test.go | 36 - .../onsi/gomega/matchers/equal_matcher.go | 20 +- .../gomega/matchers/equal_matcher_test.go | 44 - .../onsi/gomega/matchers/have_cap_matcher.go | 28 + .../onsi/gomega/matchers/have_key_matcher.go | 3 +- .../gomega/matchers/have_key_matcher_test.go | 73 - .../matchers/have_key_with_value_matcher.go | 3 +- .../have_key_with_value_matcher_test.go | 82 - .../onsi/gomega/matchers/have_len_matcher.go | 1 + .../gomega/matchers/have_len_matcher_test.go | 53 - .../gomega/matchers/have_occurred_matcher.go | 12 +- .../matchers/have_occurred_matcher_test.go | 28 - .../gomega/matchers/have_prefix_matcher.go | 1 + .../matchers/have_prefix_matcher_test.go | 36 - .../gomega/matchers/have_suffix_matcher.go | 3 +- .../matchers/have_suffix_matcher_test.go | 36 - .../gomega/matchers/match_error_matcher.go | 11 +- .../matchers/match_error_matcher_test.go | 93 - .../gomega/matchers/match_json_matcher.go | 30 +- .../matchers/match_json_matcher_test.go | 59 - .../gomega/matchers/match_regexp_matcher.go | 3 +- .../matchers/match_regexp_matcher_test.go | 44 - .../onsi/gomega/matchers/match_xml_matcher.go | 134 + .../gomega/matchers/match_yaml_matcher.go | 76 + .../matchers/matcher_tests_suite_test.go | 29 - vendor/github.com/onsi/gomega/matchers/not.go | 30 + vendor/github.com/onsi/gomega/matchers/or.go | 67 + .../onsi/gomega/matchers/panic_matcher.go | 10 +- .../gomega/matchers/panic_matcher_test.go | 36 - .../onsi/gomega/matchers/receive_matcher.go | 34 +- .../gomega/matchers/receive_matcher_test.go | 280 - .../matchers/semi_structured_data_support.go | 92 + .../onsi/gomega/matchers/succeed_matcher.go | 9 +- .../gomega/matchers/succeed_matcher_test.go | 39 - .../matchers/support/goraph/MIT.LICENSE | 20 - .../goraph/bipartitegraph/bipartitegraph.go | 10 +- .../bipartitegraph/bipartitegraphmatching.go | 6 +- .../matchers/support/goraph/util/util.go | 4 +- .../onsi/gomega/matchers/type_support.go | 26 +- .../onsi/gomega/matchers/with_transform.go | 72 + vendor/github.com/onsi/gomega/types/types.go | 13 +- vendor/github.com/pkg/errors/bench_test.go | 63 - vendor/github.com/pkg/errors/errors_test.go | 251 - vendor/github.com/pkg/errors/example_test.go | 205 - vendor/github.com/pkg/errors/format_test.go | 535 - vendor/github.com/pkg/errors/stack_test.go | 274 - .../{Sirupsen => sirupsen}/logrus/.gitignore | 0 .../{Sirupsen => sirupsen}/logrus/.travis.yml | 0 .../logrus/CHANGELOG.md | 0 .../{Sirupsen => sirupsen}/logrus/LICENSE | 0 .../{Sirupsen => sirupsen}/logrus/README.md | 0 .../{Sirupsen => sirupsen}/logrus/doc.go | 0 .../{Sirupsen => sirupsen}/logrus/entry.go | 0 .../{Sirupsen => sirupsen}/logrus/exported.go | 0 .../logrus/formatter.go | 0 .../{Sirupsen => sirupsen}/logrus/hooks.go | 0 .../logrus/json_formatter.go | 0 .../{Sirupsen => sirupsen}/logrus/logger.go | 0 .../{Sirupsen => sirupsen}/logrus/logrus.go | 0 .../logrus/terminal_bsd.go | 0 .../logrus/terminal_linux.go | 0 .../logrus/terminal_notwindows.go | 0 .../logrus/terminal_solaris.go | 0 .../logrus/terminal_windows.go | 0 .../logrus/text_formatter.go | 0 .../{Sirupsen => sirupsen}/logrus/writer.go | 0 vendor/go.etcd.io/bbolt/.gitignore | 7 + vendor/go.etcd.io/bbolt/.travis.yml | 18 + .../boltdb/bolt => go.etcd.io/bbolt}/LICENSE | 0 vendor/go.etcd.io/bbolt/Makefile | 36 + vendor/go.etcd.io/bbolt/README.md | 958 + .../bolt => go.etcd.io/bbolt}/bolt_386.go | 2 +- .../bolt => go.etcd.io/bbolt}/bolt_amd64.go | 2 +- .../bolt => go.etcd.io/bbolt}/bolt_arm.go | 2 +- vendor/go.etcd.io/bbolt/bolt_arm64.go | 9 + .../bolt => go.etcd.io/bbolt}/bolt_linux.go | 4 +- vendor/go.etcd.io/bbolt/bolt_mips64x.go | 9 + vendor/go.etcd.io/bbolt/bolt_mipsx.go | 9 + .../bolt => go.etcd.io/bbolt}/bolt_openbsd.go | 4 +- vendor/go.etcd.io/bbolt/bolt_ppc.go | 9 + vendor/go.etcd.io/bbolt/bolt_ppc64.go | 9 + vendor/go.etcd.io/bbolt/bolt_ppc64le.go | 9 + vendor/go.etcd.io/bbolt/bolt_riscv64.go | 9 + vendor/go.etcd.io/bbolt/bolt_s390x.go | 9 + vendor/go.etcd.io/bbolt/bolt_unix.go | 86 + vendor/go.etcd.io/bbolt/bolt_unix_aix.go | 90 + vendor/go.etcd.io/bbolt/bolt_unix_solaris.go | 88 + vendor/go.etcd.io/bbolt/bolt_windows.go | 141 + .../bbolt}/boltsync_unix.go | 4 +- .../bolt => go.etcd.io/bbolt}/bucket.go | 87 +- vendor/go.etcd.io/bbolt/compact.go | 114 + .../bolt => go.etcd.io/bbolt}/cursor.go | 73 +- vendor/go.etcd.io/bbolt/db.go | 1232 + .../boltdb/bolt => go.etcd.io/bbolt}/doc.go | 4 +- .../bolt => go.etcd.io/bbolt}/errors.go | 9 +- vendor/go.etcd.io/bbolt/freelist.go | 404 + vendor/go.etcd.io/bbolt/freelist_hmap.go | 178 + vendor/go.etcd.io/bbolt/mlock_unix.go | 36 + vendor/go.etcd.io/bbolt/mlock_windows.go | 11 + .../boltdb/bolt => go.etcd.io/bbolt}/node.go | 93 +- vendor/go.etcd.io/bbolt/page.go | 204 + .../boltdb/bolt => go.etcd.io/bbolt}/tx.go | 265 +- vendor/go.etcd.io/bbolt/unsafe.go | 39 + vendor/golang.org/x/net/.gitattributes | 10 - vendor/golang.org/x/net/.gitignore | 2 - vendor/golang.org/x/net/CONTRIBUTING.md | 26 - vendor/golang.org/x/net/README.md | 16 - vendor/golang.org/x/net/bpf/asm.go | 41 - vendor/golang.org/x/net/bpf/constants.go | 222 - vendor/golang.org/x/net/bpf/doc.go | 82 - vendor/golang.org/x/net/bpf/instructions.go | 726 - .../golang.org/x/net/bpf/instructions_test.go | 593 - vendor/golang.org/x/net/bpf/setter.go | 10 - .../x/net/bpf/testdata/all_instructions.bpf | 1 - .../x/net/bpf/testdata/all_instructions.txt | 88 - vendor/golang.org/x/net/bpf/vm.go | 150 - vendor/golang.org/x/net/bpf/vm_aluop_test.go | 512 - vendor/golang.org/x/net/bpf/vm_bpf_test.go | 199 - .../golang.org/x/net/bpf/vm_extension_test.go | 49 - .../golang.org/x/net/bpf/vm_instructions.go | 182 - vendor/golang.org/x/net/bpf/vm_jump_test.go | 726 - vendor/golang.org/x/net/bpf/vm_load_test.go | 258 - vendor/golang.org/x/net/bpf/vm_ret_test.go | 115 - .../golang.org/x/net/bpf/vm_scratch_test.go | 247 - vendor/golang.org/x/net/bpf/vm_test.go | 144 - vendor/golang.org/x/net/codereview.cfg | 1 - .../golang.org/x/net/context/context_test.go | 583 - .../x/net/context/ctxhttp/ctxhttp_test.go | 117 - .../x/net/context/withtimeout_test.go | 31 - vendor/golang.org/x/net/dict/dict.go | 210 - .../x/net/dns/dnsmessage/example_test.go | 132 - .../x/net/dns/dnsmessage/message.go | 2606 - .../x/net/dns/dnsmessage/message_test.go | 1451 - vendor/golang.org/x/net/go.mod | 9 - vendor/golang.org/x/net/go.sum | 6 - .../golang.org/x/net/html/atom/atom_test.go | 109 - vendor/golang.org/x/net/html/atom/gen.go | 712 - .../golang.org/x/net/html/atom/table_test.go | 376 - .../x/net/html/charset/charset_test.go | 237 - .../html/charset/testdata/HTTP-charset.html | 48 - .../charset/testdata/HTTP-vs-UTF-8-BOM.html | 48 - .../testdata/HTTP-vs-meta-charset.html | 49 - .../testdata/HTTP-vs-meta-content.html | 49 - .../testdata/No-encoding-declaration.html | 47 - .../x/net/html/charset/testdata/README | 9 - .../html/charset/testdata/UTF-16BE-BOM.html | Bin 2670 -> 0 bytes .../html/charset/testdata/UTF-16LE-BOM.html | Bin 2682 -> 0 bytes .../testdata/UTF-8-BOM-vs-meta-charset.html | 49 - .../testdata/UTF-8-BOM-vs-meta-content.html | 48 - .../testdata/meta-charset-attribute.html | 48 - .../testdata/meta-content-attribute.html | 48 - vendor/golang.org/x/net/html/entity_test.go | 29 - vendor/golang.org/x/net/html/escape_test.go | 97 - vendor/golang.org/x/net/html/example_test.go | 40 - vendor/golang.org/x/net/html/node_test.go | 146 - vendor/golang.org/x/net/html/parse_test.go | 423 - vendor/golang.org/x/net/html/render_test.go | 156 - .../issue_30600_parse_panics_in_cell_mode.dat | 12 - ...e_30961_error_nested_unknown_tag_types.dat | 11 - .../x/net/html/testdata/go/select.dat | 12 - .../x/net/html/testdata/go/template.dat | 62 - .../golang.org/x/net/html/testdata/go1.html | 2237 - .../x/net/html/testdata/webkit/README | 28 - .../x/net/html/testdata/webkit/adoption01.dat | 194 - .../x/net/html/testdata/webkit/adoption02.dat | 31 - .../x/net/html/testdata/webkit/comments01.dat | 135 - .../x/net/html/testdata/webkit/doctype01.dat | 370 - .../x/net/html/testdata/webkit/entities01.dat | 603 - .../x/net/html/testdata/webkit/entities02.dat | 249 - .../html/testdata/webkit/html5test-com.dat | 246 - .../x/net/html/testdata/webkit/inbody01.dat | 43 - .../x/net/html/testdata/webkit/isindex.dat | 40 - ...pending-spec-changes-plain-text-unsafe.dat | Bin 115 -> 0 bytes .../testdata/webkit/pending-spec-changes.dat | 52 - .../testdata/webkit/plain-text-unsafe.dat | Bin 4166 -> 0 bytes .../x/net/html/testdata/webkit/ruby.dat | 298 - .../net/html/testdata/webkit/scriptdata01.dat | 308 - .../testdata/webkit/scripted/adoption01.dat | 15 - .../testdata/webkit/scripted/webkit01.dat | 28 - .../x/net/html/testdata/webkit/tables01.dat | 212 - .../x/net/html/testdata/webkit/template.dat | 1326 - .../x/net/html/testdata/webkit/tests1.dat | 1952 - .../x/net/html/testdata/webkit/tests10.dat | 799 - .../x/net/html/testdata/webkit/tests11.dat | 482 - .../x/net/html/testdata/webkit/tests12.dat | 62 - .../x/net/html/testdata/webkit/tests14.dat | 74 - .../x/net/html/testdata/webkit/tests15.dat | 208 - .../x/net/html/testdata/webkit/tests16.dat | 2299 - .../x/net/html/testdata/webkit/tests17.dat | 153 - .../x/net/html/testdata/webkit/tests18.dat | 269 - .../x/net/html/testdata/webkit/tests19.dat | 1237 - .../x/net/html/testdata/webkit/tests2.dat | 763 - .../x/net/html/testdata/webkit/tests20.dat | 455 - .../x/net/html/testdata/webkit/tests21.dat | 221 - .../x/net/html/testdata/webkit/tests22.dat | 157 - .../x/net/html/testdata/webkit/tests23.dat | 155 - .../x/net/html/testdata/webkit/tests24.dat | 79 - .../x/net/html/testdata/webkit/tests25.dat | 219 - .../x/net/html/testdata/webkit/tests26.dat | 313 - .../x/net/html/testdata/webkit/tests3.dat | 305 - .../x/net/html/testdata/webkit/tests4.dat | 59 - .../x/net/html/testdata/webkit/tests5.dat | 191 - .../x/net/html/testdata/webkit/tests6.dat | 663 - .../x/net/html/testdata/webkit/tests7.dat | 390 - .../x/net/html/testdata/webkit/tests8.dat | 148 - .../x/net/html/testdata/webkit/tests9.dat | 457 - .../testdata/webkit/tests_innerHTML_1.dat | 741 - .../x/net/html/testdata/webkit/tricky01.dat | 261 - .../x/net/html/testdata/webkit/webkit01.dat | 610 - .../x/net/html/testdata/webkit/webkit02.dat | 159 - vendor/golang.org/x/net/html/token_test.go | 748 - vendor/golang.org/x/net/http/httpguts/guts.go | 50 - .../golang.org/x/net/http/httpguts/httplex.go | 346 - .../x/net/http/httpguts/httplex_test.go | 119 - .../x/net/http/httpproxy/export_test.go | 13 - .../x/net/http/httpproxy/go19_test.go | 13 - .../golang.org/x/net/http/httpproxy/proxy.go | 370 - .../x/net/http/httpproxy/proxy_test.go | 351 - vendor/golang.org/x/net/http2/.gitignore | 2 - vendor/golang.org/x/net/http2/Dockerfile | 51 - vendor/golang.org/x/net/http2/Makefile | 3 - vendor/golang.org/x/net/http2/README | 20 - vendor/golang.org/x/net/http2/ciphers.go | 641 - vendor/golang.org/x/net/http2/ciphers_test.go | 309 - .../x/net/http2/client_conn_pool.go | 282 - vendor/golang.org/x/net/http2/databuffer.go | 146 - .../golang.org/x/net/http2/databuffer_test.go | 155 - vendor/golang.org/x/net/http2/errors.go | 133 - vendor/golang.org/x/net/http2/errors_test.go | 24 - vendor/golang.org/x/net/http2/flow.go | 50 - vendor/golang.org/x/net/http2/flow_test.go | 87 - vendor/golang.org/x/net/http2/frame.go | 1614 - vendor/golang.org/x/net/http2/frame_test.go | 1235 - vendor/golang.org/x/net/http2/go111.go | 29 - vendor/golang.org/x/net/http2/gotrack.go | 170 - vendor/golang.org/x/net/http2/gotrack_test.go | 33 - vendor/golang.org/x/net/http2/h2c/h2c.go | 495 - vendor/golang.org/x/net/http2/h2c/h2c_test.go | 58 - .../golang.org/x/net/http2/h2demo/.gitignore | 6 - .../golang.org/x/net/http2/h2demo/Dockerfile | 37 - vendor/golang.org/x/net/http2/h2demo/Makefile | 33 - vendor/golang.org/x/net/http2/h2demo/README | 16 - .../x/net/http2/h2demo/deployment-prod.yaml | 28 - vendor/golang.org/x/net/http2/h2demo/go.mod | 13 - vendor/golang.org/x/net/http2/h2demo/go.sum | 103 - .../golang.org/x/net/http2/h2demo/h2demo.go | 565 - .../golang.org/x/net/http2/h2demo/rootCA.key | 27 - .../golang.org/x/net/http2/h2demo/rootCA.pem | 26 - .../golang.org/x/net/http2/h2demo/rootCA.srl | 1 - .../golang.org/x/net/http2/h2demo/server.crt | 20 - .../golang.org/x/net/http2/h2demo/server.key | 27 - .../x/net/http2/h2demo/service.yaml | 17 - vendor/golang.org/x/net/http2/h2demo/tmpl.go | 1991 - vendor/golang.org/x/net/http2/h2i/README.md | 97 - vendor/golang.org/x/net/http2/h2i/h2i.go | 522 - vendor/golang.org/x/net/http2/headermap.go | 88 - vendor/golang.org/x/net/http2/hpack/encode.go | 240 - .../x/net/http2/hpack/encode_test.go | 386 - vendor/golang.org/x/net/http2/hpack/hpack.go | 504 - .../x/net/http2/hpack/hpack_test.go | 770 - .../golang.org/x/net/http2/hpack/huffman.go | 222 - vendor/golang.org/x/net/http2/hpack/tables.go | 479 - .../x/net/http2/hpack/tables_test.go | 214 - vendor/golang.org/x/net/http2/http2.go | 384 - vendor/golang.org/x/net/http2/http2_test.go | 290 - vendor/golang.org/x/net/http2/not_go111.go | 20 - vendor/golang.org/x/net/http2/pipe.go | 163 - vendor/golang.org/x/net/http2/pipe_test.go | 130 - vendor/golang.org/x/net/http2/server.go | 2931 - .../x/net/http2/server_push_test.go | 519 - vendor/golang.org/x/net/http2/server_test.go | 3922 -- .../testdata/draft-ietf-httpbis-http2.xml | 5021 -- vendor/golang.org/x/net/http2/transport.go | 2610 - .../golang.org/x/net/http2/transport_test.go | 4321 -- vendor/golang.org/x/net/http2/write.go | 365 - vendor/golang.org/x/net/http2/writesched.go | 242 - .../x/net/http2/writesched_priority.go | 452 - .../x/net/http2/writesched_priority_test.go | 541 - .../x/net/http2/writesched_random.go | 72 - .../x/net/http2/writesched_random_test.go | 44 - .../golang.org/x/net/http2/writesched_test.go | 125 - vendor/golang.org/x/net/http2/z_spec_test.go | 356 - vendor/golang.org/x/net/icmp/diag_test.go | 299 - vendor/golang.org/x/net/icmp/dstunreach.go | 59 - vendor/golang.org/x/net/icmp/echo.go | 173 - vendor/golang.org/x/net/icmp/endpoint.go | 113 - vendor/golang.org/x/net/icmp/example_test.go | 63 - vendor/golang.org/x/net/icmp/extension.go | 170 - .../golang.org/x/net/icmp/extension_test.go | 332 - vendor/golang.org/x/net/icmp/helper_posix.go | 75 - vendor/golang.org/x/net/icmp/interface.go | 322 - vendor/golang.org/x/net/icmp/ipv4.go | 69 - vendor/golang.org/x/net/icmp/ipv4_test.go | 75 - vendor/golang.org/x/net/icmp/ipv6.go | 23 - vendor/golang.org/x/net/icmp/listen_posix.go | 100 - vendor/golang.org/x/net/icmp/listen_stub.go | 33 - vendor/golang.org/x/net/icmp/message.go | 162 - vendor/golang.org/x/net/icmp/message_test.go | 343 - vendor/golang.org/x/net/icmp/messagebody.go | 52 - vendor/golang.org/x/net/icmp/mpls.go | 77 - vendor/golang.org/x/net/icmp/multipart.go | 129 - .../golang.org/x/net/icmp/multipart_test.go | 567 - vendor/golang.org/x/net/icmp/packettoobig.go | 43 - vendor/golang.org/x/net/icmp/paramprob.go | 72 - vendor/golang.org/x/net/icmp/sys_freebsd.go | 11 - vendor/golang.org/x/net/icmp/timeexceeded.go | 57 - vendor/golang.org/x/net/idna/example_test.go | 70 - vendor/golang.org/x/net/idna/idna10.0.0.go | 734 - vendor/golang.org/x/net/idna/idna9.0.0.go | 682 - vendor/golang.org/x/net/idna/idna_test.go | 108 - vendor/golang.org/x/net/idna/punycode.go | 203 - vendor/golang.org/x/net/idna/punycode_test.go | 198 - vendor/golang.org/x/net/idna/tables10.0.0.go | 4559 -- vendor/golang.org/x/net/idna/tables11.0.0.go | 4653 -- vendor/golang.org/x/net/idna/tables9.0.0.go | 4486 -- vendor/golang.org/x/net/idna/trie.go | 72 - vendor/golang.org/x/net/idna/trieval.go | 119 - .../golang.org/x/net/internal/iana/const.go | 223 - vendor/golang.org/x/net/internal/iana/gen.go | 383 - .../x/net/internal/socket/cmsghdr.go | 11 - .../x/net/internal/socket/cmsghdr_bsd.go | 13 - .../internal/socket/cmsghdr_linux_32bit.go | 14 - .../internal/socket/cmsghdr_linux_64bit.go | 14 - .../internal/socket/cmsghdr_solaris_64bit.go | 14 - .../x/net/internal/socket/cmsghdr_stub.go | 17 - .../x/net/internal/socket/defs_aix.go | 39 - .../x/net/internal/socket/defs_darwin.go | 36 - .../x/net/internal/socket/defs_dragonfly.go | 36 - .../x/net/internal/socket/defs_freebsd.go | 36 - .../x/net/internal/socket/defs_linux.go | 41 - .../x/net/internal/socket/defs_netbsd.go | 39 - .../x/net/internal/socket/defs_openbsd.go | 36 - .../x/net/internal/socket/defs_solaris.go | 36 - .../golang.org/x/net/internal/socket/empty.s | 7 - .../x/net/internal/socket/error_unix.go | 31 - .../x/net/internal/socket/error_windows.go | 26 - .../x/net/internal/socket/iovec_32bit.go | 19 - .../x/net/internal/socket/iovec_64bit.go | 19 - .../internal/socket/iovec_solaris_64bit.go | 19 - .../x/net/internal/socket/iovec_stub.go | 11 - .../x/net/internal/socket/mmsghdr_stub.go | 21 - .../x/net/internal/socket/mmsghdr_unix.go | 42 - .../x/net/internal/socket/msghdr_bsd.go | 39 - .../x/net/internal/socket/msghdr_bsdvar.go | 16 - .../x/net/internal/socket/msghdr_linux.go | 36 - .../net/internal/socket/msghdr_linux_32bit.go | 24 - .../net/internal/socket/msghdr_linux_64bit.go | 24 - .../x/net/internal/socket/msghdr_openbsd.go | 14 - .../internal/socket/msghdr_solaris_64bit.go | 36 - .../x/net/internal/socket/msghdr_stub.go | 14 - .../x/net/internal/socket/rawconn.go | 64 - .../x/net/internal/socket/rawconn_mmsg.go | 73 - .../x/net/internal/socket/rawconn_msg.go | 76 - .../x/net/internal/socket/rawconn_nommsg.go | 15 - .../x/net/internal/socket/rawconn_nomsg.go | 15 - .../x/net/internal/socket/socket.go | 288 - .../x/net/internal/socket/socket_test.go | 298 - .../golang.org/x/net/internal/socket/sys.go | 33 - .../x/net/internal/socket/sys_bsd.go | 15 - .../x/net/internal/socket/sys_bsdvar.go | 23 - .../x/net/internal/socket/sys_const_unix.go | 17 - .../x/net/internal/socket/sys_darwin.go | 7 - .../net/internal/socket/sys_go1_11_darwin.go | 33 - .../x/net/internal/socket/sys_linkname.go | 42 - .../x/net/internal/socket/sys_linux.go | 27 - .../x/net/internal/socket/sys_linux_386.go | 55 - .../x/net/internal/socket/sys_linux_386.s | 11 - .../x/net/internal/socket/sys_linux_amd64.go | 10 - .../x/net/internal/socket/sys_linux_arm.go | 10 - .../x/net/internal/socket/sys_linux_arm64.go | 10 - .../x/net/internal/socket/sys_linux_mips.go | 10 - .../x/net/internal/socket/sys_linux_mips64.go | 10 - .../net/internal/socket/sys_linux_mips64le.go | 10 - .../x/net/internal/socket/sys_linux_mipsle.go | 10 - .../x/net/internal/socket/sys_linux_ppc64.go | 10 - .../net/internal/socket/sys_linux_ppc64le.go | 10 - .../net/internal/socket/sys_linux_riscv64.go | 12 - .../x/net/internal/socket/sys_linux_s390x.go | 55 - .../x/net/internal/socket/sys_linux_s390x.s | 11 - .../x/net/internal/socket/sys_netbsd.go | 25 - .../x/net/internal/socket/sys_posix.go | 183 - .../x/net/internal/socket/sys_solaris.go | 70 - .../x/net/internal/socket/sys_solaris_amd64.s | 11 - .../x/net/internal/socket/sys_stub.go | 63 - .../x/net/internal/socket/sys_unix.go | 33 - .../x/net/internal/socket/sys_windows.go | 71 - .../x/net/internal/socket/zsys_aix_ppc64.go | 61 - .../x/net/internal/socket/zsys_darwin_386.go | 51 - .../net/internal/socket/zsys_darwin_amd64.go | 53 - .../x/net/internal/socket/zsys_darwin_arm.go | 51 - .../net/internal/socket/zsys_darwin_arm64.go | 53 - .../internal/socket/zsys_dragonfly_amd64.go | 53 - .../x/net/internal/socket/zsys_freebsd_386.go | 51 - .../net/internal/socket/zsys_freebsd_amd64.go | 53 - .../x/net/internal/socket/zsys_freebsd_arm.go | 51 - .../net/internal/socket/zsys_freebsd_arm64.go | 53 - .../x/net/internal/socket/zsys_linux_386.go | 55 - .../x/net/internal/socket/zsys_linux_amd64.go | 58 - .../x/net/internal/socket/zsys_linux_arm.go | 55 - .../x/net/internal/socket/zsys_linux_arm64.go | 58 - .../x/net/internal/socket/zsys_linux_mips.go | 55 - .../net/internal/socket/zsys_linux_mips64.go | 58 - .../internal/socket/zsys_linux_mips64le.go | 58 - .../net/internal/socket/zsys_linux_mipsle.go | 55 - .../x/net/internal/socket/zsys_linux_ppc64.go | 58 - .../net/internal/socket/zsys_linux_ppc64le.go | 58 - .../net/internal/socket/zsys_linux_riscv64.go | 59 - .../x/net/internal/socket/zsys_linux_s390x.go | 58 - .../x/net/internal/socket/zsys_netbsd_386.go | 57 - .../net/internal/socket/zsys_netbsd_amd64.go | 60 - .../x/net/internal/socket/zsys_netbsd_arm.go | 57 - .../net/internal/socket/zsys_netbsd_arm64.go | 60 - .../x/net/internal/socket/zsys_openbsd_386.go | 51 - .../net/internal/socket/zsys_openbsd_amd64.go | 53 - .../x/net/internal/socket/zsys_openbsd_arm.go | 51 - .../net/internal/socket/zsys_openbsd_arm64.go | 53 - .../net/internal/socket/zsys_solaris_amd64.go | 52 - .../golang.org/x/net/internal/socks/client.go | 168 - .../x/net/internal/socks/dial_test.go | 170 - .../golang.org/x/net/internal/socks/socks.go | 317 - .../x/net/internal/sockstest/server.go | 241 - .../x/net/internal/sockstest/server_test.go | 103 - .../x/net/internal/timeseries/timeseries.go | 525 - .../internal/timeseries/timeseries_test.go | 170 - vendor/golang.org/x/net/ipv4/batch.go | 194 - vendor/golang.org/x/net/ipv4/bpf_test.go | 93 - vendor/golang.org/x/net/ipv4/control.go | 144 - vendor/golang.org/x/net/ipv4/control_bsd.go | 40 - .../golang.org/x/net/ipv4/control_pktinfo.go | 39 - vendor/golang.org/x/net/ipv4/control_stub.go | 13 - vendor/golang.org/x/net/ipv4/control_test.go | 21 - vendor/golang.org/x/net/ipv4/control_unix.go | 73 - .../golang.org/x/net/ipv4/control_windows.go | 12 - vendor/golang.org/x/net/ipv4/defs_aix.go | 39 - vendor/golang.org/x/net/ipv4/defs_darwin.go | 77 - .../golang.org/x/net/ipv4/defs_dragonfly.go | 38 - vendor/golang.org/x/net/ipv4/defs_freebsd.go | 75 - vendor/golang.org/x/net/ipv4/defs_linux.go | 122 - vendor/golang.org/x/net/ipv4/defs_netbsd.go | 37 - vendor/golang.org/x/net/ipv4/defs_openbsd.go | 37 - vendor/golang.org/x/net/ipv4/defs_solaris.go | 84 - vendor/golang.org/x/net/ipv4/dgramopt.go | 264 - vendor/golang.org/x/net/ipv4/doc.go | 244 - vendor/golang.org/x/net/ipv4/endpoint.go | 186 - vendor/golang.org/x/net/ipv4/example_test.go | 224 - vendor/golang.org/x/net/ipv4/gen.go | 199 - vendor/golang.org/x/net/ipv4/genericopt.go | 55 - vendor/golang.org/x/net/ipv4/header.go | 173 - vendor/golang.org/x/net/ipv4/header_test.go | 259 - vendor/golang.org/x/net/ipv4/helper.go | 80 - .../x/net/ipv4/helper_posix_test.go | 31 - .../golang.org/x/net/ipv4/helper_stub_test.go | 11 - vendor/golang.org/x/net/ipv4/iana.go | 38 - vendor/golang.org/x/net/ipv4/icmp.go | 57 - vendor/golang.org/x/net/ipv4/icmp_linux.go | 25 - vendor/golang.org/x/net/ipv4/icmp_stub.go | 25 - vendor/golang.org/x/net/ipv4/icmp_test.go | 95 - .../golang.org/x/net/ipv4/multicast_test.go | 338 - .../x/net/ipv4/multicastlistener_test.go | 265 - .../x/net/ipv4/multicastsockopt_test.go | 199 - vendor/golang.org/x/net/ipv4/packet.go | 117 - vendor/golang.org/x/net/ipv4/payload.go | 23 - vendor/golang.org/x/net/ipv4/payload_cmsg.go | 84 - .../golang.org/x/net/ipv4/payload_nocmsg.go | 39 - .../golang.org/x/net/ipv4/readwrite_test.go | 517 - vendor/golang.org/x/net/ipv4/sockopt.go | 44 - vendor/golang.org/x/net/ipv4/sockopt_posix.go | 71 - vendor/golang.org/x/net/ipv4/sockopt_stub.go | 42 - vendor/golang.org/x/net/ipv4/sys_aix.go | 38 - vendor/golang.org/x/net/ipv4/sys_asmreq.go | 119 - .../golang.org/x/net/ipv4/sys_asmreq_stub.go | 25 - vendor/golang.org/x/net/ipv4/sys_asmreqn.go | 42 - .../golang.org/x/net/ipv4/sys_asmreqn_stub.go | 21 - vendor/golang.org/x/net/ipv4/sys_bpf.go | 23 - vendor/golang.org/x/net/ipv4/sys_bpf_stub.go | 16 - vendor/golang.org/x/net/ipv4/sys_bsd.go | 37 - vendor/golang.org/x/net/ipv4/sys_darwin.go | 65 - vendor/golang.org/x/net/ipv4/sys_dragonfly.go | 35 - vendor/golang.org/x/net/ipv4/sys_freebsd.go | 76 - vendor/golang.org/x/net/ipv4/sys_linux.go | 59 - vendor/golang.org/x/net/ipv4/sys_solaris.go | 57 - vendor/golang.org/x/net/ipv4/sys_ssmreq.go | 52 - .../golang.org/x/net/ipv4/sys_ssmreq_stub.go | 21 - vendor/golang.org/x/net/ipv4/sys_stub.go | 13 - vendor/golang.org/x/net/ipv4/sys_windows.go | 67 - vendor/golang.org/x/net/ipv4/unicast_test.go | 244 - .../x/net/ipv4/unicastsockopt_test.go | 147 - .../golang.org/x/net/ipv4/zsys_aix_ppc64.go | 33 - vendor/golang.org/x/net/ipv4/zsys_darwin.go | 99 - .../golang.org/x/net/ipv4/zsys_dragonfly.go | 31 - .../golang.org/x/net/ipv4/zsys_freebsd_386.go | 93 - .../x/net/ipv4/zsys_freebsd_amd64.go | 95 - .../golang.org/x/net/ipv4/zsys_freebsd_arm.go | 95 - .../golang.org/x/net/ipv4/zsys_linux_386.go | 148 - .../golang.org/x/net/ipv4/zsys_linux_amd64.go | 150 - .../golang.org/x/net/ipv4/zsys_linux_arm.go | 148 - .../golang.org/x/net/ipv4/zsys_linux_arm64.go | 150 - .../golang.org/x/net/ipv4/zsys_linux_mips.go | 148 - .../x/net/ipv4/zsys_linux_mips64.go | 150 - .../x/net/ipv4/zsys_linux_mips64le.go | 150 - .../x/net/ipv4/zsys_linux_mipsle.go | 148 - .../golang.org/x/net/ipv4/zsys_linux_ppc.go | 148 - .../golang.org/x/net/ipv4/zsys_linux_ppc64.go | 150 - .../x/net/ipv4/zsys_linux_ppc64le.go | 150 - .../x/net/ipv4/zsys_linux_riscv64.go | 151 - .../golang.org/x/net/ipv4/zsys_linux_s390x.go | 150 - vendor/golang.org/x/net/ipv4/zsys_netbsd.go | 30 - vendor/golang.org/x/net/ipv4/zsys_openbsd.go | 30 - vendor/golang.org/x/net/ipv4/zsys_solaris.go | 100 - vendor/golang.org/x/net/ipv6/batch.go | 116 - vendor/golang.org/x/net/ipv6/bpf_test.go | 97 - vendor/golang.org/x/net/ipv6/control.go | 187 - .../x/net/ipv6/control_rfc2292_unix.go | 48 - .../x/net/ipv6/control_rfc3542_unix.go | 94 - vendor/golang.org/x/net/ipv6/control_stub.go | 13 - vendor/golang.org/x/net/ipv6/control_test.go | 21 - vendor/golang.org/x/net/ipv6/control_unix.go | 55 - .../golang.org/x/net/ipv6/control_windows.go | 12 - vendor/golang.org/x/net/ipv6/defs_aix.go | 82 - vendor/golang.org/x/net/ipv6/defs_darwin.go | 112 - .../golang.org/x/net/ipv6/defs_dragonfly.go | 84 - vendor/golang.org/x/net/ipv6/defs_freebsd.go | 105 - vendor/golang.org/x/net/ipv6/defs_linux.go | 147 - vendor/golang.org/x/net/ipv6/defs_netbsd.go | 80 - vendor/golang.org/x/net/ipv6/defs_openbsd.go | 89 - vendor/golang.org/x/net/ipv6/defs_solaris.go | 114 - vendor/golang.org/x/net/ipv6/dgramopt.go | 301 - vendor/golang.org/x/net/ipv6/doc.go | 243 - vendor/golang.org/x/net/ipv6/endpoint.go | 127 - vendor/golang.org/x/net/ipv6/example_test.go | 216 - vendor/golang.org/x/net/ipv6/gen.go | 199 - vendor/golang.org/x/net/ipv6/genericopt.go | 56 - vendor/golang.org/x/net/ipv6/header.go | 55 - vendor/golang.org/x/net/ipv6/header_test.go | 55 - vendor/golang.org/x/net/ipv6/helper.go | 59 - .../x/net/ipv6/helper_posix_test.go | 31 - .../golang.org/x/net/ipv6/helper_stub_test.go | 20 - .../golang.org/x/net/ipv6/helper_unix_test.go | 25 - .../x/net/ipv6/helper_windows_test.go | 9 - vendor/golang.org/x/net/ipv6/iana.go | 86 - vendor/golang.org/x/net/ipv6/icmp.go | 60 - vendor/golang.org/x/net/ipv6/icmp_bsd.go | 29 - vendor/golang.org/x/net/ipv6/icmp_linux.go | 27 - vendor/golang.org/x/net/ipv6/icmp_solaris.go | 27 - vendor/golang.org/x/net/ipv6/icmp_stub.go | 23 - vendor/golang.org/x/net/ipv6/icmp_test.go | 96 - vendor/golang.org/x/net/ipv6/icmp_windows.go | 22 - .../x/net/ipv6/mocktransponder_test.go | 34 - .../golang.org/x/net/ipv6/multicast_test.go | 264 - .../x/net/ipv6/multicastlistener_test.go | 261 - .../x/net/ipv6/multicastsockopt_test.go | 161 - vendor/golang.org/x/net/ipv6/payload.go | 23 - vendor/golang.org/x/net/ipv6/payload_cmsg.go | 70 - .../golang.org/x/net/ipv6/payload_nocmsg.go | 38 - .../golang.org/x/net/ipv6/readwrite_test.go | 509 - vendor/golang.org/x/net/ipv6/sockopt.go | 43 - vendor/golang.org/x/net/ipv6/sockopt_posix.go | 89 - vendor/golang.org/x/net/ipv6/sockopt_stub.go | 46 - vendor/golang.org/x/net/ipv6/sockopt_test.go | 131 - vendor/golang.org/x/net/ipv6/sys_aix.go | 77 - vendor/golang.org/x/net/ipv6/sys_asmreq.go | 24 - .../golang.org/x/net/ipv6/sys_asmreq_stub.go | 17 - vendor/golang.org/x/net/ipv6/sys_bpf.go | 23 - vendor/golang.org/x/net/ipv6/sys_bpf_stub.go | 16 - vendor/golang.org/x/net/ipv6/sys_bsd.go | 57 - vendor/golang.org/x/net/ipv6/sys_darwin.go | 78 - vendor/golang.org/x/net/ipv6/sys_freebsd.go | 92 - vendor/golang.org/x/net/ipv6/sys_linux.go | 74 - vendor/golang.org/x/net/ipv6/sys_solaris.go | 74 - vendor/golang.org/x/net/ipv6/sys_ssmreq.go | 54 - .../golang.org/x/net/ipv6/sys_ssmreq_stub.go | 21 - vendor/golang.org/x/net/ipv6/sys_stub.go | 13 - vendor/golang.org/x/net/ipv6/sys_windows.go | 75 - vendor/golang.org/x/net/ipv6/unicast_test.go | 186 - .../x/net/ipv6/unicastsockopt_test.go | 122 - .../golang.org/x/net/ipv6/zsys_aix_ppc64.go | 103 - vendor/golang.org/x/net/ipv6/zsys_darwin.go | 131 - .../golang.org/x/net/ipv6/zsys_dragonfly.go | 88 - .../golang.org/x/net/ipv6/zsys_freebsd_386.go | 122 - .../x/net/ipv6/zsys_freebsd_amd64.go | 124 - .../golang.org/x/net/ipv6/zsys_freebsd_arm.go | 124 - .../golang.org/x/net/ipv6/zsys_linux_386.go | 170 - .../golang.org/x/net/ipv6/zsys_linux_amd64.go | 172 - .../golang.org/x/net/ipv6/zsys_linux_arm.go | 170 - .../golang.org/x/net/ipv6/zsys_linux_arm64.go | 172 - .../golang.org/x/net/ipv6/zsys_linux_mips.go | 170 - .../x/net/ipv6/zsys_linux_mips64.go | 172 - .../x/net/ipv6/zsys_linux_mips64le.go | 172 - .../x/net/ipv6/zsys_linux_mipsle.go | 170 - .../golang.org/x/net/ipv6/zsys_linux_ppc.go | 170 - .../golang.org/x/net/ipv6/zsys_linux_ppc64.go | 172 - .../x/net/ipv6/zsys_linux_ppc64le.go | 172 - .../x/net/ipv6/zsys_linux_riscv64.go | 173 - .../golang.org/x/net/ipv6/zsys_linux_s390x.go | 172 - vendor/golang.org/x/net/ipv6/zsys_netbsd.go | 84 - vendor/golang.org/x/net/ipv6/zsys_openbsd.go | 93 - vendor/golang.org/x/net/ipv6/zsys_solaris.go | 131 - vendor/golang.org/x/net/lif/address.go | 105 - vendor/golang.org/x/net/lif/address_test.go | 123 - vendor/golang.org/x/net/lif/binary.go | 115 - vendor/golang.org/x/net/lif/defs_solaris.go | 90 - vendor/golang.org/x/net/lif/lif.go | 43 - vendor/golang.org/x/net/lif/link.go | 126 - vendor/golang.org/x/net/lif/link_test.go | 63 - vendor/golang.org/x/net/lif/sys.go | 21 - vendor/golang.org/x/net/lif/syscall.go | 28 - .../x/net/lif/zsys_solaris_amd64.go | 103 - vendor/golang.org/x/net/nettest/conntest.go | 464 - .../golang.org/x/net/nettest/conntest_test.go | 74 - vendor/golang.org/x/net/nettest/nettest.go | 345 - .../golang.org/x/net/nettest/nettest_stub.go | 11 - .../golang.org/x/net/nettest/nettest_unix.go | 21 - .../x/net/nettest/nettest_windows.go | 26 - .../x/net/netutil/helper_stub_test.go | 11 - .../x/net/netutil/helper_unix_test.go | 17 - .../x/net/netutil/helper_windows_test.go | 9 - vendor/golang.org/x/net/netutil/listen.go | 74 - .../golang.org/x/net/netutil/listen_test.go | 147 - vendor/golang.org/x/net/proxy/dial.go | 54 - vendor/golang.org/x/net/proxy/dial_test.go | 131 - vendor/golang.org/x/net/proxy/direct.go | 31 - vendor/golang.org/x/net/proxy/per_host.go | 155 - .../golang.org/x/net/proxy/per_host_test.go | 76 - vendor/golang.org/x/net/proxy/proxy.go | 149 - vendor/golang.org/x/net/proxy/proxy_test.go | 159 - vendor/golang.org/x/net/proxy/socks5.go | 42 - .../x/net/publicsuffix/example_test.go | 93 - vendor/golang.org/x/net/publicsuffix/gen.go | 717 - vendor/golang.org/x/net/publicsuffix/list.go | 181 - .../x/net/publicsuffix/list_test.go | 509 - vendor/golang.org/x/net/publicsuffix/table.go | 9962 ---- .../x/net/publicsuffix/table_test.go | 17632 ------- vendor/golang.org/x/net/route/address.go | 425 - .../x/net/route/address_darwin_test.go | 63 - vendor/golang.org/x/net/route/address_test.go | 103 - vendor/golang.org/x/net/route/binary.go | 90 - vendor/golang.org/x/net/route/defs_darwin.go | 114 - .../golang.org/x/net/route/defs_dragonfly.go | 113 - vendor/golang.org/x/net/route/defs_freebsd.go | 337 - vendor/golang.org/x/net/route/defs_netbsd.go | 112 - vendor/golang.org/x/net/route/defs_openbsd.go | 116 - vendor/golang.org/x/net/route/empty.s | 7 - vendor/golang.org/x/net/route/interface.go | 64 - .../x/net/route/interface_announce.go | 32 - .../x/net/route/interface_classic.go | 66 - .../x/net/route/interface_freebsd.go | 78 - .../x/net/route/interface_multicast.go | 30 - .../x/net/route/interface_openbsd.go | 90 - vendor/golang.org/x/net/route/message.go | 72 - .../x/net/route/message_darwin_test.go | 34 - .../x/net/route/message_freebsd_test.go | 88 - vendor/golang.org/x/net/route/message_test.go | 238 - vendor/golang.org/x/net/route/route.go | 123 - .../golang.org/x/net/route/route_classic.go | 75 - .../golang.org/x/net/route/route_openbsd.go | 65 - vendor/golang.org/x/net/route/route_test.go | 390 - vendor/golang.org/x/net/route/sys.go | 39 - vendor/golang.org/x/net/route/sys_darwin.go | 87 - .../golang.org/x/net/route/sys_dragonfly.go | 76 - vendor/golang.org/x/net/route/sys_freebsd.go | 163 - vendor/golang.org/x/net/route/sys_netbsd.go | 71 - vendor/golang.org/x/net/route/sys_openbsd.go | 80 - vendor/golang.org/x/net/route/syscall.go | 28 - .../x/net/route/syscall_go1_11_darwin.go | 28 - .../x/net/route/syscall_go1_12_darwin.go | 12 - vendor/golang.org/x/net/route/zsys_darwin.go | 99 - .../golang.org/x/net/route/zsys_dragonfly.go | 98 - .../x/net/route/zsys_freebsd_386.go | 126 - .../x/net/route/zsys_freebsd_amd64.go | 123 - .../x/net/route/zsys_freebsd_arm.go | 123 - .../x/net/route/zsys_freebsd_arm64.go | 123 - vendor/golang.org/x/net/route/zsys_netbsd.go | 97 - vendor/golang.org/x/net/route/zsys_openbsd.go | 101 - vendor/golang.org/x/net/trace/events.go | 532 - vendor/golang.org/x/net/trace/histogram.go | 365 - .../golang.org/x/net/trace/histogram_test.go | 325 - vendor/golang.org/x/net/trace/trace.go | 1130 - vendor/golang.org/x/net/trace/trace_test.go | 178 - vendor/golang.org/x/net/webdav/file.go | 795 - vendor/golang.org/x/net/webdav/file_test.go | 1183 - vendor/golang.org/x/net/webdav/if.go | 173 - vendor/golang.org/x/net/webdav/if_test.go | 322 - .../x/net/webdav/internal/xml/README | 11 - .../x/net/webdav/internal/xml/atom_test.go | 56 - .../x/net/webdav/internal/xml/example_test.go | 151 - .../x/net/webdav/internal/xml/marshal.go | 1223 - .../x/net/webdav/internal/xml/marshal_test.go | 1939 - .../x/net/webdav/internal/xml/read.go | 692 - .../x/net/webdav/internal/xml/read_test.go | 744 - .../x/net/webdav/internal/xml/typeinfo.go | 371 - .../x/net/webdav/internal/xml/xml.go | 1998 - .../x/net/webdav/internal/xml/xml_test.go | 752 - .../x/net/webdav/litmus_test_server.go | 94 - vendor/golang.org/x/net/webdav/lock.go | 445 - vendor/golang.org/x/net/webdav/lock_test.go | 731 - vendor/golang.org/x/net/webdav/prop.go | 469 - vendor/golang.org/x/net/webdav/prop_test.go | 716 - vendor/golang.org/x/net/webdav/webdav.go | 706 - vendor/golang.org/x/net/webdav/webdav_test.go | 349 - vendor/golang.org/x/net/webdav/xml.go | 519 - vendor/golang.org/x/net/webdav/xml_test.go | 906 - vendor/golang.org/x/net/websocket/client.go | 106 - vendor/golang.org/x/net/websocket/dial.go | 24 - .../golang.org/x/net/websocket/dial_test.go | 43 - .../x/net/websocket/exampledial_test.go | 31 - .../x/net/websocket/examplehandler_test.go | 26 - vendor/golang.org/x/net/websocket/hybi.go | 583 - .../golang.org/x/net/websocket/hybi_test.go | 608 - vendor/golang.org/x/net/websocket/server.go | 113 - .../golang.org/x/net/websocket/websocket.go | 451 - .../x/net/websocket/websocket_test.go | 665 - vendor/golang.org/x/net/xsrftoken/xsrf.go | 94 - .../golang.org/x/net/xsrftoken/xsrf_test.go | 83 - vendor/golang.org/x/oauth2/.travis.yml | 3 +- vendor/golang.org/x/oauth2/CONTRIBUTING.md | 15 +- vendor/golang.org/x/oauth2/LICENSE | 2 +- vendor/golang.org/x/oauth2/README.md | 72 +- .../x/oauth2/bitbucket/bitbucket.go | 16 - .../golang.org/x/oauth2/client_appengine.go | 25 - .../clientcredentials/clientcredentials.go | 84 +- .../clientcredentials_test.go | 96 - vendor/golang.org/x/oauth2/example_test.go | 45 - .../golang.org/x/oauth2/facebook/facebook.go | 16 - vendor/golang.org/x/oauth2/github/github.go | 16 - .../golang.org/x/oauth2/google/appengine.go | 86 - .../x/oauth2/google/appengine_hook.go | 13 - .../x/oauth2/google/appenginevm_hook.go | 14 - vendor/golang.org/x/oauth2/google/default.go | 155 - .../x/oauth2/google/example_test.go | 150 - vendor/golang.org/x/oauth2/google/google.go | 145 - .../golang.org/x/oauth2/google/google_test.go | 67 - vendor/golang.org/x/oauth2/google/jwt.go | 71 - vendor/golang.org/x/oauth2/google/sdk.go | 168 - vendor/golang.org/x/oauth2/google/sdk_test.go | 46 - .../oauth2/google/testdata/gcloud/credentials | 122 - .../oauth2/google/testdata/gcloud/properties | 2 - .../internal/client_appengine.go} | 10 +- .../internal/doc.go} | 5 +- vendor/golang.org/x/oauth2/internal/oauth2.go | 41 +- .../x/oauth2/internal/oauth2_test.go | 62 - vendor/golang.org/x/oauth2/internal/token.go | 88 +- .../x/oauth2/internal/token_test.go | 36 - .../golang.org/x/oauth2/internal/transport.go | 50 +- .../x/oauth2/internal/transport_test.go | 38 - vendor/golang.org/x/oauth2/jws/jws.go | 172 - .../golang.org/x/oauth2/jwt/example_test.go | 31 - vendor/golang.org/x/oauth2/jwt/jwt.go | 153 - vendor/golang.org/x/oauth2/jwt/jwt_test.go | 134 - .../golang.org/x/oauth2/linkedin/linkedin.go | 16 - vendor/golang.org/x/oauth2/oauth2.go | 77 +- vendor/golang.org/x/oauth2/oauth2_test.go | 471 - .../x/oauth2/odnoklassniki/odnoklassniki.go | 16 - vendor/golang.org/x/oauth2/paypal/paypal.go | 22 - vendor/golang.org/x/oauth2/token.go | 26 +- vendor/golang.org/x/oauth2/token_test.go | 72 - vendor/golang.org/x/oauth2/transport.go | 16 +- vendor/golang.org/x/oauth2/transport_test.go | 86 - vendor/golang.org/x/oauth2/vk/vk.go | 16 - vendor/golang.org/x/sys/.gitattributes | 10 - vendor/golang.org/x/sys/.gitignore | 2 - vendor/golang.org/x/sys/CONTRIBUTING.md | 26 - vendor/golang.org/x/sys/README.md | 18 - vendor/golang.org/x/sys/codereview.cfg | 1 - vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s | 17 - vendor/golang.org/x/sys/cpu/byteorder.go | 30 - vendor/golang.org/x/sys/cpu/cpu.go | 126 - vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go | 34 - vendor/golang.org/x/sys/cpu/cpu_arm.go | 9 - vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go | 21 - vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 16 - vendor/golang.org/x/sys/cpu/cpu_gccgo.c | 43 - vendor/golang.org/x/sys/cpu/cpu_gccgo.go | 26 - .../golang.org/x/sys/cpu/cpu_gccgo_s390x.go | 22 - vendor/golang.org/x/sys/cpu/cpu_linux.go | 59 - .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 67 - .../golang.org/x/sys/cpu/cpu_linux_ppc64x.go | 33 - .../golang.org/x/sys/cpu/cpu_linux_s390x.go | 161 - vendor/golang.org/x/sys/cpu/cpu_mips64x.go | 11 - .../golang.org/x/sys/cpu/cpu_other_arm64.go | 11 - vendor/golang.org/x/sys/cpu/cpu_s390x.s | 57 - vendor/golang.org/x/sys/cpu/cpu_test.go | 74 - vendor/golang.org/x/sys/cpu/cpu_wasm.go | 15 - vendor/golang.org/x/sys/cpu/cpu_x86.go | 59 - vendor/golang.org/x/sys/cpu/cpu_x86.s | 27 - .../x/sys/cpu/syscall_aix_ppc64_gc.go | 36 - vendor/golang.org/x/sys/go.mod | 3 - .../sys/internal/unsafeheader/unsafeheader.go | 30 + vendor/golang.org/x/sys/plan9/asm.s | 8 - vendor/golang.org/x/sys/plan9/asm_plan9_386.s | 30 - .../golang.org/x/sys/plan9/asm_plan9_amd64.s | 30 - vendor/golang.org/x/sys/plan9/asm_plan9_arm.s | 25 - vendor/golang.org/x/sys/plan9/const_plan9.go | 70 - vendor/golang.org/x/sys/plan9/dir_plan9.go | 212 - vendor/golang.org/x/sys/plan9/env_plan9.go | 31 - vendor/golang.org/x/sys/plan9/errors_plan9.go | 50 - vendor/golang.org/x/sys/plan9/mkall.sh | 150 - vendor/golang.org/x/sys/plan9/mkerrors.sh | 246 - vendor/golang.org/x/sys/plan9/mksyscall.go | 393 - .../golang.org/x/sys/plan9/mksysnum_plan9.sh | 23 - .../golang.org/x/sys/plan9/pwd_go15_plan9.go | 21 - vendor/golang.org/x/sys/plan9/pwd_plan9.go | 23 - vendor/golang.org/x/sys/plan9/race.go | 30 - vendor/golang.org/x/sys/plan9/race0.go | 25 - vendor/golang.org/x/sys/plan9/str.go | 22 - vendor/golang.org/x/sys/plan9/syscall.go | 77 - .../golang.org/x/sys/plan9/syscall_plan9.go | 349 - vendor/golang.org/x/sys/plan9/syscall_test.go | 33 - .../x/sys/plan9/zsyscall_plan9_386.go | 284 - .../x/sys/plan9/zsyscall_plan9_amd64.go | 284 - .../x/sys/plan9/zsyscall_plan9_arm.go | 284 - .../golang.org/x/sys/plan9/zsysnum_plan9.go | 49 - vendor/golang.org/x/sys/unix/README.md | 21 +- .../golang.org/x/sys/unix/affinity_linux.go | 42 +- vendor/golang.org/x/sys/unix/aliases.go | 3 +- vendor/golang.org/x/sys/unix/asm_aix_ppc64.s | 3 +- .../unix/{asm_netbsd_386.s => asm_bsd_386.s} | 12 +- .../{asm_netbsd_amd64.s => asm_bsd_amd64.s} | 10 +- .../unix/{asm_darwin_arm.s => asm_bsd_arm.s} | 11 +- .../{asm_darwin_amd64.s => asm_bsd_arm64.s} | 10 +- vendor/golang.org/x/sys/unix/asm_darwin_386.s | 29 - .../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 - .../x/sys/unix/asm_dragonfly_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_386.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_arm.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_arm64.s | 29 - vendor/golang.org/x/sys/unix/asm_linux_386.s | 3 +- .../golang.org/x/sys/unix/asm_linux_amd64.s | 3 +- vendor/golang.org/x/sys/unix/asm_linux_arm.s | 3 +- .../golang.org/x/sys/unix/asm_linux_arm64.s | 3 +- .../golang.org/x/sys/unix/asm_linux_mips64x.s | 3 +- .../golang.org/x/sys/unix/asm_linux_mipsx.s | 3 +- .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 3 +- .../golang.org/x/sys/unix/asm_linux_riscv64.s | 11 +- .../golang.org/x/sys/unix/asm_linux_s390x.s | 5 +- vendor/golang.org/x/sys/unix/asm_netbsd_arm.s | 29 - .../golang.org/x/sys/unix/asm_netbsd_arm64.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_386.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 - ...m_openbsd_arm64.s => asm_openbsd_mips64.s} | 5 +- .../golang.org/x/sys/unix/asm_solaris_amd64.s | 3 +- vendor/golang.org/x/sys/unix/asm_zos_s390x.s | 426 + .../golang.org/x/sys/unix/bluetooth_linux.go | 1 + vendor/golang.org/x/sys/unix/cap_freebsd.go | 1 + vendor/golang.org/x/sys/unix/constants.go | 3 +- vendor/golang.org/x/sys/unix/creds_test.go | 134 - vendor/golang.org/x/sys/unix/darwin_test.go | 210 - vendor/golang.org/x/sys/unix/dev_aix_ppc.go | 4 +- vendor/golang.org/x/sys/unix/dev_aix_ppc64.go | 4 +- .../golang.org/x/sys/unix/dev_linux_test.go | 56 - vendor/golang.org/x/sys/unix/dev_zos.go | 29 + vendor/golang.org/x/sys/unix/dirent.go | 92 +- vendor/golang.org/x/sys/unix/dirent_test.go | 150 - vendor/golang.org/x/sys/unix/endian_big.go | 3 +- vendor/golang.org/x/sys/unix/endian_little.go | 3 +- vendor/golang.org/x/sys/unix/env_unix.go | 3 +- vendor/golang.org/x/sys/unix/epoll_zos.go | 221 + .../x/sys/unix/errors_freebsd_386.go | 6 + .../x/sys/unix/errors_freebsd_amd64.go | 6 + .../x/sys/unix/errors_freebsd_arm64.go | 17 + .../x/sys/unix/example_exec_test.go | 19 - .../x/sys/unix/example_flock_test.go | 25 - vendor/golang.org/x/sys/unix/export_test.go | 9 - vendor/golang.org/x/sys/unix/fcntl.go | 13 +- vendor/golang.org/x/sys/unix/fcntl_darwin.go | 6 + .../x/sys/unix/fcntl_linux_32bit.go | 5 +- vendor/golang.org/x/sys/unix/fdset.go | 30 + vendor/golang.org/x/sys/unix/fstatfs_zos.go | 164 + vendor/golang.org/x/sys/unix/gccgo.go | 6 +- vendor/golang.org/x/sys/unix/gccgo_c.c | 6 + .../x/sys/unix/gccgo_linux_amd64.go | 1 + .../x/sys/unix/getdirentries_test.go | 83 - vendor/golang.org/x/sys/unix/ioctl.go | 51 +- vendor/golang.org/x/sys/unix/ioctl_linux.go | 196 + vendor/golang.org/x/sys/unix/ioctl_zos.go | 74 + vendor/golang.org/x/sys/unix/linux/Dockerfile | 53 - vendor/golang.org/x/sys/unix/linux/mkall.go | 775 - .../golang.org/x/sys/unix/linux/mksysnum.go | 143 - vendor/golang.org/x/sys/unix/linux/types.go | 2006 - vendor/golang.org/x/sys/unix/mkall.sh | 44 +- vendor/golang.org/x/sys/unix/mkasm_darwin.go | 61 - vendor/golang.org/x/sys/unix/mkerrors.sh | 144 +- vendor/golang.org/x/sys/unix/mkpost.go | 122 - vendor/golang.org/x/sys/unix/mksyscall.go | 407 - .../x/sys/unix/mksyscall_aix_ppc.go | 415 - .../x/sys/unix/mksyscall_aix_ppc64.go | 614 - .../x/sys/unix/mksyscall_solaris.go | 335 - .../golang.org/x/sys/unix/mksysctl_openbsd.go | 355 - vendor/golang.org/x/sys/unix/mksysnum.go | 190 - .../golang.org/x/sys/unix/mmap_unix_test.go | 41 - vendor/golang.org/x/sys/unix/openbsd_test.go | 113 - vendor/golang.org/x/sys/unix/pagesize_unix.go | 1 + vendor/golang.org/x/sys/unix/ptrace_darwin.go | 12 + vendor/golang.org/x/sys/unix/ptrace_ios.go | 12 + vendor/golang.org/x/sys/unix/race.go | 1 + vendor/golang.org/x/sys/unix/race0.go | 3 +- .../x/sys/unix/readdirent_getdents.go | 1 + .../x/sys/unix/readdirent_getdirentries.go | 1 + vendor/golang.org/x/sys/unix/sendfile_test.go | 98 - .../x/sys/unix/sockcmsg_dragonfly.go | 16 + .../golang.org/x/sys/unix/sockcmsg_linux.go | 2 +- vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 39 +- .../x/sys/unix/sockcmsg_unix_other.go | 47 + vendor/golang.org/x/sys/unix/str.go | 1 + vendor/golang.org/x/sys/unix/syscall.go | 46 +- vendor/golang.org/x/sys/unix/syscall_aix.go | 84 +- .../golang.org/x/sys/unix/syscall_aix_ppc.go | 8 +- .../x/sys/unix/syscall_aix_ppc64.go | 8 +- .../golang.org/x/sys/unix/syscall_aix_test.go | 168 - vendor/golang.org/x/sys/unix/syscall_bsd.go | 68 +- .../golang.org/x/sys/unix/syscall_bsd_test.go | 89 - .../x/sys/unix/syscall_darwin.1_12.go | 32 + .../x/sys/unix/syscall_darwin.1_13.go | 108 + .../golang.org/x/sys/unix/syscall_darwin.go | 263 +- .../x/sys/unix/syscall_darwin_386.go | 63 - .../x/sys/unix/syscall_darwin_amd64.go | 26 +- .../x/sys/unix/syscall_darwin_arm.go | 64 - .../x/sys/unix/syscall_darwin_arm64.go | 29 +- .../x/sys/unix/syscall_darwin_libSystem.go | 12 +- .../x/sys/unix/syscall_darwin_test.go | 72 - .../x/sys/unix/syscall_dragonfly.go | 113 +- .../x/sys/unix/syscall_dragonfly_amd64.go | 5 + .../golang.org/x/sys/unix/syscall_freebsd.go | 104 +- .../x/sys/unix/syscall_freebsd_386.go | 15 + .../x/sys/unix/syscall_freebsd_amd64.go | 15 + .../x/sys/unix/syscall_freebsd_arm.go | 11 + .../x/sys/unix/syscall_freebsd_arm64.go | 11 + .../x/sys/unix/syscall_freebsd_test.go | 312 - .../golang.org/x/sys/unix/syscall_illumos.go | 178 + vendor/golang.org/x/sys/unix/syscall_linux.go | 742 +- .../x/sys/unix/syscall_linux_386.go | 24 +- .../x/sys/unix/syscall_linux_amd64.go | 17 +- .../x/sys/unix/syscall_linux_amd64_gc.go | 4 +- .../x/sys/unix/syscall_linux_arm.go | 30 +- .../x/sys/unix/syscall_linux_arm64.go | 43 +- .../golang.org/x/sys/unix/syscall_linux_gc.go | 3 +- .../x/sys/unix/syscall_linux_gc_386.go | 3 +- .../x/sys/unix/syscall_linux_gc_arm.go | 14 + .../x/sys/unix/syscall_linux_gccgo_386.go | 1 + .../x/sys/unix/syscall_linux_gccgo_arm.go | 1 + .../x/sys/unix/syscall_linux_mips64x.go | 21 +- .../x/sys/unix/syscall_linux_mipsx.go | 23 +- .../x/sys/unix/syscall_linux_ppc.go | 276 + .../x/sys/unix/syscall_linux_ppc64x.go | 19 +- .../x/sys/unix/syscall_linux_riscv64.go | 23 +- .../x/sys/unix/syscall_linux_s390x.go | 19 +- .../x/sys/unix/syscall_linux_sparc64.go | 19 +- .../x/sys/unix/syscall_linux_test.go | 613 - .../golang.org/x/sys/unix/syscall_netbsd.go | 111 +- .../x/sys/unix/syscall_netbsd_386.go | 5 + .../x/sys/unix/syscall_netbsd_amd64.go | 5 + .../x/sys/unix/syscall_netbsd_arm.go | 5 + .../x/sys/unix/syscall_netbsd_arm64.go | 5 + .../x/sys/unix/syscall_netbsd_test.go | 51 - .../golang.org/x/sys/unix/syscall_openbsd.go | 95 +- .../x/sys/unix/syscall_openbsd_386.go | 5 + .../x/sys/unix/syscall_openbsd_amd64.go | 5 + .../x/sys/unix/syscall_openbsd_arm.go | 5 + .../x/sys/unix/syscall_openbsd_arm64.go | 5 + .../x/sys/unix/syscall_openbsd_mips64.go | 35 + .../x/sys/unix/syscall_openbsd_test.go | 58 - .../golang.org/x/sys/unix/syscall_solaris.go | 76 +- .../x/sys/unix/syscall_solaris_amd64.go | 5 + .../x/sys/unix/syscall_solaris_test.go | 55 - vendor/golang.org/x/sys/unix/syscall_test.go | 74 - vendor/golang.org/x/sys/unix/syscall_unix.go | 20 +- .../golang.org/x/sys/unix/syscall_unix_gc.go | 5 +- .../x/sys/unix/syscall_unix_gc_ppc64x.go | 3 +- .../x/sys/unix/syscall_unix_test.go | 760 - .../x/sys/unix/syscall_zos_s390x.go | 1829 + vendor/golang.org/x/sys/unix/timestruct.go | 29 +- .../golang.org/x/sys/unix/timestruct_test.go | 54 - vendor/golang.org/x/sys/unix/types_aix.go | 237 - vendor/golang.org/x/sys/unix/types_darwin.go | 283 - .../golang.org/x/sys/unix/types_dragonfly.go | 263 - vendor/golang.org/x/sys/unix/types_freebsd.go | 400 - vendor/golang.org/x/sys/unix/types_netbsd.go | 290 - vendor/golang.org/x/sys/unix/types_openbsd.go | 283 - vendor/golang.org/x/sys/unix/types_solaris.go | 266 - vendor/golang.org/x/sys/unix/xattr_bsd.go | 1 + vendor/golang.org/x/sys/unix/xattr_test.go | 207 - .../golang.org/x/sys/unix/zerrors_aix_ppc.go | 13 +- .../x/sys/unix/zerrors_aix_ppc64.go | 13 +- .../x/sys/unix/zerrors_darwin_amd64.go | 100 +- .../x/sys/unix/zerrors_darwin_arm.go | 1783 - .../x/sys/unix/zerrors_darwin_arm64.go | 100 +- .../x/sys/unix/zerrors_dragonfly_amd64.go | 140 +- .../x/sys/unix/zerrors_freebsd_386.go | 181 +- .../x/sys/unix/zerrors_freebsd_amd64.go | 179 +- .../x/sys/unix/zerrors_freebsd_arm.go | 46 +- .../x/sys/unix/zerrors_freebsd_arm64.go | 180 +- vendor/golang.org/x/sys/unix/zerrors_linux.go | 2923 + .../x/sys/unix/zerrors_linux_386.go | 3166 +- .../x/sys/unix/zerrors_linux_amd64.go | 3166 +- .../x/sys/unix/zerrors_linux_arm.go | 3178 +- .../x/sys/unix/zerrors_linux_arm64.go | 3154 +- .../x/sys/unix/zerrors_linux_mips.go | 3170 +- .../x/sys/unix/zerrors_linux_mips64.go | 3170 +- .../x/sys/unix/zerrors_linux_mips64le.go | 3170 +- .../x/sys/unix/zerrors_linux_mipsle.go | 3170 +- .../x/sys/unix/zerrors_linux_ppc.go | 879 + .../x/sys/unix/zerrors_linux_ppc64.go | 3289 +- .../x/sys/unix/zerrors_linux_ppc64le.go | 3289 +- .../x/sys/unix/zerrors_linux_riscv64.go | 3140 +- .../x/sys/unix/zerrors_linux_s390x.go | 3288 +- .../x/sys/unix/zerrors_linux_sparc64.go | 3267 +- .../x/sys/unix/zerrors_netbsd_386.go | 10 +- .../x/sys/unix/zerrors_netbsd_amd64.go | 10 +- .../x/sys/unix/zerrors_netbsd_arm.go | 10 +- .../x/sys/unix/zerrors_netbsd_arm64.go | 10 +- .../x/sys/unix/zerrors_openbsd_386.go | 25 +- .../x/sys/unix/zerrors_openbsd_amd64.go | 14 +- .../x/sys/unix/zerrors_openbsd_arm.go | 19 +- .../x/sys/unix/zerrors_openbsd_arm64.go | 9 + ...arwin_386.go => zerrors_openbsd_mips64.go} | 1666 +- .../x/sys/unix/zerrors_solaris_amd64.go | 29 +- .../x/sys/unix/zerrors_zos_s390x.go | 860 + ...acearm_linux.go => zptrace_armnn_linux.go} | 3 +- .../x/sys/unix/zptrace_linux_arm64.go | 17 + ...emips_linux.go => zptrace_mipsnn_linux.go} | 3 +- ...sle_linux.go => zptrace_mipsnnle_linux.go} | 3 +- ...trace386_linux.go => zptrace_x86_linux.go} | 3 +- .../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 1 + .../x/sys/unix/zsyscall_aix_ppc64.go | 1 + .../x/sys/unix/zsyscall_aix_ppc64_gc.go | 4 +- .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 4 +- .../x/sys/unix/zsyscall_darwin_386.1_11.go | 1810 - .../x/sys/unix/zsyscall_darwin_386.go | 2505 - .../x/sys/unix/zsyscall_darwin_386.s | 284 - .../x/sys/unix/zsyscall_darwin_amd64.1_13.go | 40 + .../x/sys/unix/zsyscall_darwin_amd64.1_13.s | 25 + .../x/sys/unix/zsyscall_darwin_amd64.go | 937 +- .../x/sys/unix/zsyscall_darwin_amd64.s | 865 +- .../x/sys/unix/zsyscall_darwin_arm.1_11.go | 1793 - .../x/sys/unix/zsyscall_darwin_arm.go | 2483 - .../x/sys/unix/zsyscall_darwin_arm.s | 282 - .../x/sys/unix/zsyscall_darwin_arm64.1_13.go | 40 + .../x/sys/unix/zsyscall_darwin_arm64.1_13.s | 25 + .../x/sys/unix/zsyscall_darwin_arm64.go | 926 +- .../x/sys/unix/zsyscall_darwin_arm64.s | 863 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 61 +- .../x/sys/unix/zsyscall_freebsd_386.go | 69 +- .../x/sys/unix/zsyscall_freebsd_amd64.go | 67 +- .../x/sys/unix/zsyscall_freebsd_arm.go | 57 +- .../x/sys/unix/zsyscall_freebsd_arm64.go | 59 +- .../x/sys/unix/zsyscall_illumos_amd64.go | 128 + ...darwin_amd64.1_11.go => zsyscall_linux.go} | 1408 +- .../x/sys/unix/zsyscall_linux_386.go | 1715 +- .../x/sys/unix/zsyscall_linux_amd64.go | 1715 +- .../x/sys/unix/zsyscall_linux_arm.go | 1715 +- .../x/sys/unix/zsyscall_linux_arm64.go | 1717 +- .../x/sys/unix/zsyscall_linux_mips.go | 1715 +- .../x/sys/unix/zsyscall_linux_mips64.go | 1715 +- .../x/sys/unix/zsyscall_linux_mips64le.go | 1715 +- .../x/sys/unix/zsyscall_linux_mipsle.go | 1715 +- .../x/sys/unix/zsyscall_linux_ppc.go | 762 + .../x/sys/unix/zsyscall_linux_ppc64.go | 1715 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 1715 +- .../x/sys/unix/zsyscall_linux_riscv64.go | 1713 +- .../x/sys/unix/zsyscall_linux_s390x.go | 1715 +- .../x/sys/unix/zsyscall_linux_sparc64.go | 1715 +- .../x/sys/unix/zsyscall_netbsd_386.go | 94 +- .../x/sys/unix/zsyscall_netbsd_amd64.go | 94 +- .../x/sys/unix/zsyscall_netbsd_arm.go | 94 +- .../x/sys/unix/zsyscall_netbsd_arm64.go | 94 +- .../x/sys/unix/zsyscall_openbsd_386.go | 63 +- .../x/sys/unix/zsyscall_openbsd_amd64.go | 63 +- .../x/sys/unix/zsyscall_openbsd_arm.go | 63 +- .../x/sys/unix/zsyscall_openbsd_arm64.go | 63 +- ...m64.1_11.go => zsyscall_openbsd_mips64.go} | 546 +- .../x/sys/unix/zsyscall_solaris_amd64.go | 38 +- .../x/sys/unix/zsyscall_zos_s390x.go | 1255 + .../x/sys/unix/zsysctl_openbsd_386.go | 4 +- .../x/sys/unix/zsysctl_openbsd_amd64.go | 2 + .../x/sys/unix/zsysctl_openbsd_arm.go | 2 + .../x/sys/unix/zsysctl_openbsd_arm64.go | 1 + .../x/sys/unix/zsysctl_openbsd_mips64.go | 280 + .../x/sys/unix/zsysnum_darwin_386.go | 436 - .../x/sys/unix/zsysnum_darwin_amd64.go | 2 + .../x/sys/unix/zsysnum_darwin_arm.go | 436 - .../x/sys/unix/zsysnum_darwin_arm64.go | 2 + .../x/sys/unix/zsysnum_dragonfly_amd64.go | 256 +- .../x/sys/unix/zsysnum_freebsd_386.go | 1 + .../x/sys/unix/zsysnum_freebsd_amd64.go | 1 + .../x/sys/unix/zsysnum_freebsd_arm.go | 1 + .../x/sys/unix/zsysnum_freebsd_arm64.go | 1 + .../x/sys/unix/zsysnum_linux_386.go | 16 + .../x/sys/unix/zsysnum_linux_amd64.go | 16 + .../x/sys/unix/zsysnum_linux_arm.go | 16 + .../x/sys/unix/zsysnum_linux_arm64.go | 16 + .../x/sys/unix/zsysnum_linux_mips.go | 16 + .../x/sys/unix/zsysnum_linux_mips64.go | 16 + .../x/sys/unix/zsysnum_linux_mips64le.go | 16 + .../x/sys/unix/zsysnum_linux_mipsle.go | 16 + .../x/sys/unix/zsysnum_linux_ppc.go | 434 + .../x/sys/unix/zsysnum_linux_ppc64.go | 16 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 16 + .../x/sys/unix/zsysnum_linux_riscv64.go | 16 + .../x/sys/unix/zsysnum_linux_s390x.go | 16 + .../x/sys/unix/zsysnum_linux_sparc64.go | 15 + .../x/sys/unix/zsysnum_netbsd_386.go | 1 + .../x/sys/unix/zsysnum_netbsd_amd64.go | 1 + .../x/sys/unix/zsysnum_netbsd_arm.go | 1 + .../x/sys/unix/zsysnum_netbsd_arm64.go | 1 + .../x/sys/unix/zsysnum_openbsd_386.go | 1 + .../x/sys/unix/zsysnum_openbsd_amd64.go | 1 + .../x/sys/unix/zsysnum_openbsd_arm.go | 1 + .../x/sys/unix/zsysnum_openbsd_arm64.go | 1 + .../x/sys/unix/zsysnum_openbsd_mips64.go | 221 + .../x/sys/unix/zsysnum_zos_s390x.go | 2670 + .../golang.org/x/sys/unix/ztypes_aix_ppc.go | 2 + .../golang.org/x/sys/unix/ztypes_aix_ppc64.go | 2 + .../x/sys/unix/ztypes_darwin_386.go | 499 - .../x/sys/unix/ztypes_darwin_amd64.go | 164 +- .../x/sys/unix/ztypes_darwin_arm.go | 500 - .../x/sys/unix/ztypes_darwin_arm64.go | 164 +- .../x/sys/unix/ztypes_dragonfly_amd64.go | 61 +- .../x/sys/unix/ztypes_freebsd_386.go | 67 +- .../x/sys/unix/ztypes_freebsd_amd64.go | 52 +- .../x/sys/unix/ztypes_freebsd_arm.go | 40 +- .../x/sys/unix/ztypes_freebsd_arm64.go | 82 +- .../x/sys/unix/ztypes_illumos_amd64.go | 40 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 3909 ++ .../golang.org/x/sys/unix/ztypes_linux_386.go | 1992 +- .../x/sys/unix/ztypes_linux_amd64.go | 1997 +- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 1996 +- .../x/sys/unix/ztypes_linux_arm64.go | 1997 +- .../x/sys/unix/ztypes_linux_mips.go | 1996 +- .../x/sys/unix/ztypes_linux_mips64.go | 1998 +- .../x/sys/unix/ztypes_linux_mips64le.go | 1998 +- .../x/sys/unix/ztypes_linux_mipsle.go | 1996 +- .../golang.org/x/sys/unix/ztypes_linux_ppc.go | 639 + .../x/sys/unix/ztypes_linux_ppc64.go | 1997 +- .../x/sys/unix/ztypes_linux_ppc64le.go | 1997 +- .../x/sys/unix/ztypes_linux_riscv64.go | 1998 +- .../x/sys/unix/ztypes_linux_s390x.go | 1997 +- .../x/sys/unix/ztypes_linux_sparc64.go | 1997 +- .../x/sys/unix/ztypes_netbsd_386.go | 38 +- .../x/sys/unix/ztypes_netbsd_amd64.go | 39 +- .../x/sys/unix/ztypes_netbsd_arm.go | 38 +- .../x/sys/unix/ztypes_netbsd_arm64.go | 39 +- .../x/sys/unix/ztypes_openbsd_386.go | 6 +- .../x/sys/unix/ztypes_openbsd_amd64.go | 6 +- .../x/sys/unix/ztypes_openbsd_arm.go | 6 +- .../x/sys/unix/ztypes_openbsd_arm64.go | 6 +- .../x/sys/unix/ztypes_openbsd_mips64.go | 569 + .../x/sys/unix/ztypes_solaris_amd64.go | 40 +- .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 406 + vendor/golang.org/x/sys/windows/aliases.go | 13 - .../x/sys/windows/asm_windows_386.s | 13 - .../x/sys/windows/asm_windows_amd64.s | 13 - .../x/sys/windows/asm_windows_arm.s | 11 - .../golang.org/x/sys/windows/dll_windows.go | 378 - .../golang.org/x/sys/windows/env_windows.go | 61 - vendor/golang.org/x/sys/windows/eventlog.go | 20 - .../golang.org/x/sys/windows/exec_windows.go | 97 - .../x/sys/windows/memory_windows.go | 26 - vendor/golang.org/x/sys/windows/mkerrors.bash | 63 - .../x/sys/windows/mkknownfolderids.bash | 27 - vendor/golang.org/x/sys/windows/mksyscall.go | 9 - vendor/golang.org/x/sys/windows/race.go | 30 - vendor/golang.org/x/sys/windows/race0.go | 25 - .../x/sys/windows/registry/export_test.go | 11 - .../golang.org/x/sys/windows/registry/key.go | 198 - .../x/sys/windows/registry/mksyscall.go | 9 - .../x/sys/windows/registry/registry_test.go | 756 - .../x/sys/windows/registry/syscall.go | 32 - .../x/sys/windows/registry/value.go | 387 - .../sys/windows/registry/zsyscall_windows.go | 120 - .../x/sys/windows/security_windows.go | 854 - vendor/golang.org/x/sys/windows/service.go | 225 - vendor/golang.org/x/sys/windows/str.go | 22 - .../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/eventlog/log_test.go | 51 - .../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 | 87 - 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 | 154 - .../golang.org/x/sys/windows/svc/mgr/mgr.go | 203 - .../x/sys/windows/svc/mgr/mgr_test.go | 282 - .../x/sys/windows/svc/mgr/recovery.go | 135 - .../x/sys/windows/svc/mgr/service.go | 75 - .../golang.org/x/sys/windows/svc/security.go | 62 - .../golang.org/x/sys/windows/svc/service.go | 364 - .../golang.org/x/sys/windows/svc/svc_test.go | 134 - vendor/golang.org/x/sys/windows/svc/sys_386.s | 69 - .../golang.org/x/sys/windows/svc/sys_amd64.s | 44 - vendor/golang.org/x/sys/windows/svc/sys_arm.s | 38 - vendor/golang.org/x/sys/windows/syscall.go | 74 - .../golang.org/x/sys/windows/syscall_test.go | 64 - .../x/sys/windows/syscall_windows.go | 1320 - .../x/sys/windows/syscall_windows_test.go | 225 - .../golang.org/x/sys/windows/types_windows.go | 1665 - .../x/sys/windows/types_windows_386.go | 22 - .../x/sys/windows/zerrors_windows.go | 6853 --- .../x/sys/windows/zknownfolderids_windows.go | 149 - .../x/sys/windows/zsyscall_windows.go | 3337 -- vendor/golang.org/x/text/AUTHORS | 3 + .../x/text/CONTRIBUTORS} | 4 +- vendor/golang.org/x/text/LICENSE | 27 + vendor/golang.org/x/text/PATENTS | 22 + .../x/text/encoding/charmap/charmap.go | 249 + .../x/text/encoding/charmap/tables.go | 7410 +++ vendor/golang.org/x/text/encoding/encoding.go | 335 + .../x/text/encoding/htmlindex/htmlindex.go | 86 + .../x/text/encoding/htmlindex/map.go | 105 + .../x/text/encoding/htmlindex/tables.go | 352 + .../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/shiftjis.go | 189 + .../x/text/encoding/japanese/tables.go | 26971 ++++++++++ .../x/text/encoding/korean/euckr.go | 177 + .../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 + .../text/encoding/simplifiedchinese/tables.go | 43999 ++++++++++++++++ .../text/encoding/traditionalchinese/big5.go | 199 + .../encoding/traditionalchinese/tables.go | 37142 +++++++++++++ .../x/text/encoding/unicode/override.go | 82 + .../x/text/encoding/unicode/unicode.go | 434 + vendor/golang.org/x/text/internal/tag/tag.go | 100 + .../internal/utf8internal/utf8internal.go | 87 + vendor/golang.org/x/text/language/Makefile | 16 + vendor/golang.org/x/text/language/common.go | 16 + vendor/golang.org/x/text/language/coverage.go | 197 + vendor/golang.org/x/text/language/doc.go | 102 + 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/cond.go | 187 + vendor/golang.org/x/text/runes/runes.go | 355 + .../golang.org/x/text/transform/transform.go | 705 + .../google.golang.org/appengine/.travis.yml | 18 - vendor/google.golang.org/appengine/README.md | 73 - .../google.golang.org/appengine/aetest/doc.go | 42 - .../appengine/aetest/instance.go | 51 - .../appengine/aetest/instance_classic.go | 21 - .../appengine/aetest/instance_test.go | 119 - .../appengine/aetest/instance_vm.go | 276 - .../appengine/aetest/user.go | 36 - .../google.golang.org/appengine/appengine.go | 113 - .../appengine/appengine_test.go | 49 - .../appengine/appengine_vm.go | 20 - .../appengine/blobstore/blobstore.go | 276 - .../appengine/blobstore/blobstore_test.go | 183 - .../appengine/blobstore/read.go | 160 - .../appengine/capability/capability.go | 52 - .../appengine/channel/channel.go | 83 - .../appengine/channel/channel_test.go | 21 - .../appengine/cloudsql/cloudsql.go | 62 - .../appengine/cloudsql/cloudsql_classic.go | 17 - .../appengine/cloudsql/cloudsql_vm.go | 16 - .../appengine/cmd/aebundler/aebundler.go | 342 - .../appengine/cmd/aedeploy/aedeploy.go | 276 - .../appengine/cmd/aefix/ae.go | 185 - .../appengine/cmd/aefix/ae_test.go | 144 - .../appengine/cmd/aefix/fix.go | 848 - .../appengine/cmd/aefix/main.go | 258 - .../appengine/cmd/aefix/main_test.go | 129 - .../appengine/cmd/aefix/typecheck.go | 673 - .../appengine/datastore/datastore.go | 407 - .../appengine/datastore/datastore_test.go | 1616 - .../appengine/datastore/doc.go | 351 - .../appengine/datastore/key.go | 309 - .../appengine/datastore/key_test.go | 204 - .../appengine/datastore/load.go | 430 - .../appengine/datastore/load_test.go | 656 - .../appengine/datastore/metadata.go | 78 - .../appengine/datastore/prop.go | 323 - .../appengine/datastore/prop_test.go | 543 - .../appengine/datastore/query.go | 724 - .../appengine/datastore/query_test.go | 583 - .../appengine/datastore/save.go | 294 - .../appengine/datastore/time_test.go | 65 - .../appengine/datastore/transaction.go | 87 - .../appengine/delay/delay.go | 278 - .../appengine/delay/delay_test.go | 375 - .../appengine/demos/guestbook/app.yaml | 14 - .../appengine/demos/guestbook/favicon.ico | Bin 1150 -> 0 bytes .../appengine/demos/guestbook/guestbook.go | 109 - .../appengine/demos/guestbook/index.yaml | 7 - .../demos/guestbook/templates/guestbook.html | 26 - .../appengine/demos/helloworld/app.yaml | 10 - .../appengine/demos/helloworld/favicon.ico | Bin 1150 -> 0 bytes .../appengine/demos/helloworld/helloworld.go | 50 - vendor/google.golang.org/appengine/errors.go | 46 - .../google.golang.org/appengine/file/file.go | 28 - .../google.golang.org/appengine/identity.go | 142 - .../appengine/image/image.go | 67 - .../appengine/internal/aetesting/fake.go | 81 - .../appengine/internal/api.go | 163 +- .../appengine/internal/api_classic.go | 16 +- .../appengine/internal/api_common.go | 9 +- .../appengine/internal/api_test.go | 466 - .../appengine/internal/app_id_test.go | 34 - .../app_identity/app_identity_service.pb.go | 296 - .../app_identity/app_identity_service.proto | 64 - .../appengine/internal/base/api_base.pb.go | 237 +- .../blobstore/blobstore_service.pb.go | 347 - .../blobstore/blobstore_service.proto | 71 - .../capability/capability_service.pb.go | 125 - .../capability/capability_service.proto | 28 - .../internal/channel/channel_service.pb.go | 154 - .../internal/channel/channel_service.proto | 30 - .../internal/datastore/datastore_v3.pb.go | 2217 +- .../internal/datastore/datastore_v3.proto | 10 + .../appengine/internal/identity.go | 47 +- .../appengine/internal/identity_classic.go | 52 +- .../{api_race_test.go => identity_flex.go} | 8 +- .../appengine/internal/identity_vm.go | 49 +- .../internal/image/images_service.pb.go | 845 - .../internal/image/images_service.proto | 162 - .../appengine/internal/internal_vm_test.go | 60 - .../appengine/internal/log/log_service.pb.go | 638 +- .../internal/mail/mail_service.pb.go | 229 - .../internal/mail/mail_service.proto | 45 - .../appengine/internal/main.go | 1 + .../appengine/internal/main_common.go | 7 + .../appengine/internal/main_vm.go | 27 +- .../internal/memcache/memcache_service.pb.go | 938 - .../internal/memcache/memcache_service.proto | 165 - .../appengine/internal/metadata.go | 3 +- .../internal/modules/modules_service.pb.go | 375 - .../internal/modules/modules_service.proto | 80 - .../appengine/internal/net_test.go | 58 - .../appengine/internal/regen.sh | 0 .../internal/remote_api/remote_api.pb.go | 192 +- .../appengine/internal/search/search.pb.go | 2127 - .../appengine/internal/search/search.proto | 388 - .../internal/socket/socket_service.pb.go | 1858 - .../internal/socket/socket_service.proto | 460 - .../internal/system/system_service.pb.go | 198 - .../internal/system/system_service.proto | 49 - .../taskqueue/taskqueue_service.pb.go | 1888 - .../taskqueue/taskqueue_service.proto | 342 - .../appengine/internal/transaction.go | 22 +- .../internal/urlfetch/urlfetch_service.pb.go | 216 +- .../internal/user/user_service.pb.go | 289 - .../internal/user/user_service.proto | 58 - .../internal/xmpp/xmpp_service.pb.go | 427 - .../internal/xmpp/xmpp_service.proto | 83 - vendor/google.golang.org/appengine/log/api.go | 40 - vendor/google.golang.org/appengine/log/log.go | 323 - .../appengine/log/log_test.go | 112 - .../google.golang.org/appengine/mail/mail.go | 123 - .../appengine/mail/mail_test.go | 65 - .../appengine/memcache/memcache.go | 526 - .../appengine/memcache/memcache_test.go | 263 - .../appengine/module/module.go | 113 - .../appengine/module/module_test.go | 124 - .../google.golang.org/appengine/namespace.go | 25 - .../appengine/namespace_test.go | 39 - .../appengine/remote_api/client.go | 174 - .../appengine/remote_api/client_test.go | 24 - .../appengine/remote_api/remote_api.go | 152 - .../appengine/runtime/runtime.go | 148 - .../appengine/runtime/runtime_test.go | 101 - .../google.golang.org/appengine/search/doc.go | 209 - .../appengine/search/field.go | 82 - .../appengine/search/search.go | 1121 - .../appengine/search/search_test.go | 1000 - .../appengine/search/struct.go | 251 - .../appengine/search/struct_test.go | 213 - .../google.golang.org/appengine/socket/doc.go | 10 - .../appengine/socket/socket_classic.go | 290 - .../appengine/socket/socket_vm.go | 64 - .../appengine/taskqueue/taskqueue.go | 496 - .../appengine/taskqueue/taskqueue_test.go | 116 - vendor/google.golang.org/appengine/timeout.go | 20 - .../google.golang.org/appengine/user/oauth.go | 52 - .../google.golang.org/appengine/user/user.go | 84 - .../appengine/user/user_classic.go | 35 - .../appengine/user/user_test.go | 99 - .../appengine/user/user_vm.go | 38 - .../google.golang.org/appengine/xmpp/xmpp.go | 253 - .../appengine/xmpp/xmpp_test.go | 173 - .../kingpin.v2/_examples/chat1/main.go | 20 - .../kingpin.v2/_examples/chat2/main.go | 38 - .../kingpin.v2/_examples/completion/main.go | 96 - .../kingpin.v2/_examples/curl/main.go | 105 - .../kingpin.v2/_examples/modular/main.go | 30 - .../kingpin.v2/_examples/ping/main.go | 20 - .../alecthomas/kingpin.v2/app_test.go | 404 - .../alecthomas/kingpin.v2/args_test.go | 84 - .../kingpin.v2/cmd/genvalues/main.go | 134 - .../alecthomas/kingpin.v2/cmd_test.go | 374 - .../alecthomas/kingpin.v2/completions_test.go | 78 - .../alecthomas/kingpin.v2/examples_test.go | 46 - .../alecthomas/kingpin.v2/flags_test.go | 330 - .../alecthomas/kingpin.v2/parser_test.go | 42 - .../alecthomas/kingpin.v2/parsers_test.go | 98 - .../alecthomas/kingpin.v2/usage_test.go | 65 - .../alecthomas/kingpin.v2/values_test.go | 89 - vendor/gopkg.in/fsnotify.v1/.editorconfig | 5 + vendor/gopkg.in/fsnotify.v1/.gitignore | 6 + vendor/gopkg.in/fsnotify.v1/.travis.yml | 30 + vendor/gopkg.in/fsnotify.v1/AUTHORS | 52 + vendor/gopkg.in/fsnotify.v1/CHANGELOG.md | 317 + vendor/gopkg.in/fsnotify.v1/CONTRIBUTING.md | 77 + vendor/gopkg.in/fsnotify.v1/LICENSE | 28 + vendor/gopkg.in/fsnotify.v1/README.md | 79 + vendor/gopkg.in/fsnotify.v1/fen.go | 37 + vendor/gopkg.in/fsnotify.v1/fsnotify.go | 66 + vendor/gopkg.in/fsnotify.v1/inotify.go | 337 + vendor/gopkg.in/fsnotify.v1/inotify_poller.go | 187 + vendor/gopkg.in/fsnotify.v1/kqueue.go | 521 + vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go | 11 + .../gopkg.in/fsnotify.v1/open_mode_darwin.go | 12 + vendor/gopkg.in/fsnotify.v1/windows.go | 561 + vendor/gopkg.in/tomb.v1/LICENSE | 29 + vendor/gopkg.in/tomb.v1/README.md | 4 + vendor/gopkg.in/tomb.v1/tomb.go | 176 + vendor/gopkg.in/yaml.v2/.travis.yml | 12 + .../lagerflags => gopkg.in/yaml.v2}/LICENSE | 25 + .../yaml.v2/LICENSE.libyaml} | 14 +- .../uaago => gopkg.in/yaml.v2}/NOTICE | 6 +- vendor/gopkg.in/yaml.v2/README.md | 133 + vendor/gopkg.in/yaml.v2/apic.go | 739 + vendor/gopkg.in/yaml.v2/decode.go | 813 + vendor/gopkg.in/yaml.v2/emitterc.go | 1685 + vendor/gopkg.in/yaml.v2/encode.go | 390 + vendor/gopkg.in/yaml.v2/parserc.go | 1095 + vendor/gopkg.in/yaml.v2/readerc.go | 412 + vendor/gopkg.in/yaml.v2/resolve.go | 258 + vendor/gopkg.in/yaml.v2/scannerc.go | 2712 + vendor/gopkg.in/yaml.v2/sorter.go | 113 + vendor/gopkg.in/yaml.v2/writerc.go | 26 + vendor/gopkg.in/yaml.v2/yaml.go | 466 + vendor/gopkg.in/yaml.v2/yamlh.go | 738 + vendor/gopkg.in/yaml.v2/yamlprivateh.go | 173 + vendor/modules.txt | 183 + 2621 files changed, 231556 insertions(+), 1092802 deletions(-) delete mode 100644 glide.lock delete mode 100644 glide.yaml create mode 100644 go.mod create mode 100644 go.sum delete mode 100644 utils/glide.lock delete mode 100644 vendor/code.cloudfoundry.org/cfhttp/cf_http_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/cfhttp/cf_http_test.go delete mode 100644 vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers.go delete mode 100644 vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_test.go delete mode 100644 vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_test.go delete mode 100644 vendor/code.cloudfoundry.org/cflager/integration/integration_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/cflager/integration/main.go delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/.travis.yml delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/README.md delete mode 100755 vendor/code.cloudfoundry.org/gofileutils/bin/test delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fileutils/file_utils_test.go delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fileutils/fileutils_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/some-dir/.gitkeep delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/some-dir/some-file delete mode 100755 vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/supervirus.zsh delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/some.config delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stderr.log delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stdout.log delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/more_logs/more.stdout.log delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stderr.log delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stdout.log delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/glob/README.md delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/glob/dir.go delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/glob/dir_test.go delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/glob/glob.go delete mode 100644 vendor/code.cloudfoundry.org/gofileutils/glob/glob_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/chug/chug.go delete mode 100644 vendor/code.cloudfoundry.org/lager/chug/chug_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/chug/chug_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/chug/match_log_entry_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgo_reporter.go delete mode 100644 vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/lager_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/lagerflags/NOTICE delete mode 100644 vendor/code.cloudfoundry.org/lager/lagerflags/README.md delete mode 100644 vendor/code.cloudfoundry.org/lager/lagerflags/integration/integration_suite_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/lagerflags/integration/main.go delete mode 100644 vendor/code.cloudfoundry.org/lager/lagerflags/lagerflags.go delete mode 100644 vendor/code.cloudfoundry.org/lager/lagertest/test_sink.go delete mode 100644 vendor/code.cloudfoundry.org/lager/logger_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/reconfigurable_sink_test.go delete mode 100644 vendor/code.cloudfoundry.org/lager/writer_sink_test.go delete mode 100644 vendor/github.com/Masterminds/semver/benchmark_test.go delete mode 100644 vendor/github.com/Masterminds/semver/collection_test.go delete mode 100644 vendor/github.com/Masterminds/semver/constraints_test.go delete mode 100644 vendor/github.com/Masterminds/semver/version_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/entry_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/examples/basic/basic.go delete mode 100644 vendor/github.com/Sirupsen/logrus/examples/hook/hook.go delete mode 100644 vendor/github.com/Sirupsen/logrus/formatter_bench_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go delete mode 100644 vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/hook_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md delete mode 100644 vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go delete mode 100644 vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/hooks/test/test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/json_formatter_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/logrus_test.go delete mode 100644 vendor/github.com/Sirupsen/logrus/text_formatter_test.go delete mode 100644 vendor/github.com/alecthomas/template/example_test.go delete mode 100644 vendor/github.com/alecthomas/template/examplefiles_test.go delete mode 100644 vendor/github.com/alecthomas/template/examplefunc_test.go delete mode 100644 vendor/github.com/alecthomas/template/exec_test.go delete mode 100644 vendor/github.com/alecthomas/template/multi_test.go delete mode 100644 vendor/github.com/alecthomas/template/parse/lex_test.go delete mode 100644 vendor/github.com/alecthomas/template/parse/parse_test.go delete mode 100644 vendor/github.com/alecthomas/template/testdata/file1.tmpl delete mode 100644 vendor/github.com/alecthomas/template/testdata/file2.tmpl delete mode 100644 vendor/github.com/alecthomas/template/testdata/tmpl1.tmpl delete mode 100644 vendor/github.com/alecthomas/template/testdata/tmpl2.tmpl delete mode 100644 vendor/github.com/alecthomas/units/bytes_test.go delete mode 100644 vendor/github.com/boltdb/bolt/.gitignore delete mode 100644 vendor/github.com/boltdb/bolt/Makefile delete mode 100644 vendor/github.com/boltdb/bolt/README.md delete mode 100644 vendor/github.com/boltdb/bolt/batch.go delete mode 100644 vendor/github.com/boltdb/bolt/batch_benchmark_test.go delete mode 100644 vendor/github.com/boltdb/bolt/batch_example_test.go delete mode 100644 vendor/github.com/boltdb/bolt/batch_test.go delete mode 100644 vendor/github.com/boltdb/bolt/bolt_test.go delete mode 100644 vendor/github.com/boltdb/bolt/bolt_unix.go delete mode 100644 vendor/github.com/boltdb/bolt/bolt_windows.go delete mode 100644 vendor/github.com/boltdb/bolt/bucket_test.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/bench.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/buckets.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/buckets_test.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/check.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/get.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/get_test.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/info.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/info_test.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/keys.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/keys_test.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/main.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/pages.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/stats.go delete mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/stats_test.go delete mode 100644 vendor/github.com/boltdb/bolt/cursor_test.go delete mode 100644 vendor/github.com/boltdb/bolt/db.go delete mode 100644 vendor/github.com/boltdb/bolt/db_test.go delete mode 100644 vendor/github.com/boltdb/bolt/freelist.go delete mode 100644 vendor/github.com/boltdb/bolt/freelist_test.go delete mode 100644 vendor/github.com/boltdb/bolt/node_test.go delete mode 100644 vendor/github.com/boltdb/bolt/page.go delete mode 100644 vendor/github.com/boltdb/bolt/page_test.go delete mode 100644 vendor/github.com/boltdb/bolt/quick_test.go delete mode 100644 vendor/github.com/boltdb/bolt/simulation_test.go delete mode 100644 vendor/github.com/boltdb/bolt/tx_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/app_update_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/app_usage_events_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/appevents_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/apps_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/buildpacks_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/cf_error_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/cf_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/client_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/domains_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/environmentvariablegroups_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/events_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/gen_error.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/go.mod delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/go.sum delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/info_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/isolationsegments_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/org_quotas_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/orgs_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/payloads_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/processes_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/route_mappings_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/routes_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/secgroups_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/service_bindings_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/service_brokers_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/service_instances_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/service_keys_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/service_plan_visibilities_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/service_plans_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/service_usage_events_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/services_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/space_quotas_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/spaces_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/stacks_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/tasks_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/user_provided_service_instances_test.go delete mode 100644 vendor/github.com/cloudfoundry-community/go-cfclient/users_test.go delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/.gitignore delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/.travis.yml delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/LICENSE delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/README.md delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/client.go delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/client_test.go delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/.gitignore delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/main.go delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/.gitignore delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/main.go delete mode 100644 vendor/github.com/cloudfoundry-incubator/uaago/uaago_suite_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/async_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/consumer_proxy_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/consumer_suite_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/handlers_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/mock_debug_printer_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/mock_token_refresher_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/sync_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/timeout_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/consumer/token_refresher_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/noaa_suite_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/samples/app_logs/main.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/samples/container_metrics/README.md delete mode 100644 vendor/github.com/cloudfoundry/noaa/samples/container_metrics/consumer/main.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/samples/container_metrics/emitter/main.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/samples/firehose/main.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/samples/token_refresher/main.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/sort_container_metrics_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/sort_recent_test.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/test_helpers/auth_failure.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/test_helpers/fake_debug_printer.go delete mode 100644 vendor/github.com/cloudfoundry/noaa/test_helpers/fake_handler.go delete mode 100644 vendor/github.com/cloudfoundry/sonde-go/.gitignore delete mode 100644 vendor/github.com/cloudfoundry/sonde-go/.gitmodules delete mode 100644 vendor/github.com/cloudfoundry/sonde-go/README.md delete mode 100644 vendor/github.com/cloudfoundry/sonde-go/doc.go delete mode 100755 vendor/github.com/cloudfoundry/sonde-go/generate-go.sh delete mode 100644 vendor/github.com/cloudfoundry/sonde-go/go/go_preamble.proto 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/codec/codec.go delete mode 100644 vendor/github.com/gogo/protobuf/codec/codec_test.go delete mode 100755 vendor/github.com/gogo/protobuf/install-protobuf.sh delete mode 100644 vendor/github.com/gogo/protobuf/io/full.go delete mode 100644 vendor/github.com/gogo/protobuf/io/io.go delete mode 100644 vendor/github.com/gogo/protobuf/io/io_test.go delete mode 100644 vendor/github.com/gogo/protobuf/io/uint32.go delete mode 100644 vendor/github.com/gogo/protobuf/io/varint.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto delete mode 100644 vendor/github.com/gogo/protobuf/plugin/compare/compare.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/description/description.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/equal/equal.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/face/face.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/face/facetest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/populate/populate.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/size/size.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/size/sizetest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/union/union.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/union/uniontest.go delete mode 100644 vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/all_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/clone_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/message_set_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto 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/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/golden_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden delete mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/test.proto 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/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/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/Makefile 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/generator.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.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/grpc/grpc.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/plugin/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.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-min-version/minversion.go delete mode 100644 vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go delete mode 100644 vendor/github.com/gogo/protobuf/test/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/test/Makefile 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/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/casttype.proto 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/casttype/combos/unsafeboth/casttype.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/mytypes.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/combos/unsafeboth/castvalue.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/mytypes.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/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/thetest.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/uuid.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/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/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/combos/unsafeboth/bug_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/uuid.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/bug_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/uuid.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/bug_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/uuid.go delete mode 100644 vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go delete mode 100644 vendor/github.com/gogo/protobuf/test/custom/custom.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/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/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/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/example/example.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/example/example.proto 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/importdedup/subpkg/customtype.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto 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/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/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/combos/unsafeboth/mapsproto2.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/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/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/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/combos/unsafeboth/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/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/combos/unsafeboth/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/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/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/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/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/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/combos/unsafeboth/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/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/thetest.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/thetest.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/thetestpb_test.go 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.go delete mode 100644 vendor/github.com/gogo/protobuf/test/uuid_test.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/command/command.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/enum.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/field.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/file.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/foreach.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/msg.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/fast/gogovanity.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.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/slick/gogovanity.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go 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 delete mode 100644 vendor/github.com/gogo/protobuf/version/version.go delete mode 100644 vendor/github.com/golang/protobuf/.gitignore delete mode 100644 vendor/github.com/golang/protobuf/Make.protobuf delete mode 100644 vendor/github.com/golang/protobuf/Makefile delete mode 100644 vendor/github.com/golang/protobuf/README.md delete mode 100644 vendor/github.com/golang/protobuf/_conformance/Makefile delete mode 100644 vendor/github.com/golang/protobuf/_conformance/conformance.go delete mode 100644 vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go delete mode 100644 vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb.go delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto delete mode 100644 vendor/github.com/golang/protobuf/proto/Makefile delete mode 100644 vendor/github.com/golang/protobuf/proto/all_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/any_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/clone_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/decode_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/discard.go delete mode 100644 vendor/github.com/golang/protobuf/proto/encode_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/equal_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/extensions_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/message_set_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go delete mode 100644 vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto delete mode 100644 vendor/github.com/golang/protobuf/proto/proto3_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/size2_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/size_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/table_marshal.go create mode 100644 vendor/github.com/golang/protobuf/proto/table_merge.go create mode 100644 vendor/github.com/golang/protobuf/proto/table_unmarshal.go delete mode 100644 vendor/github.com/golang/protobuf/proto/testdata/Makefile delete mode 100644 vendor/github.com/golang/protobuf/proto/testdata/golden_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/testdata/test.pb.go delete mode 100644 vendor/github.com/golang/protobuf/proto/testdata/test.proto delete mode 100644 vendor/github.com/golang/protobuf/proto/text_parser_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_test.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/Makefile delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/doc.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/main.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any_test.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/doc.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration_test.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/empty/empty.proto delete mode 100755 vendor/github.com/golang/protobuf/ptypes/regen.sh delete mode 100644 vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/struct/struct.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp_test.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto delete mode 100644 vendor/github.com/google/uuid/json_test.go delete mode 100644 vendor/github.com/google/uuid/seq_test.go delete mode 100644 vendor/github.com/google/uuid/sql_test.go delete mode 100644 vendor/github.com/google/uuid/uuid_test.go delete mode 100644 vendor/github.com/gorilla/websocket/bench_test.go delete mode 100644 vendor/github.com/gorilla/websocket/client_server_test.go delete mode 100644 vendor/github.com/gorilla/websocket/client_test.go delete mode 100644 vendor/github.com/gorilla/websocket/compression_test.go delete mode 100644 vendor/github.com/gorilla/websocket/conn_test.go delete mode 100644 vendor/github.com/gorilla/websocket/example_test.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/autobahn/README.md delete mode 100644 vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json delete mode 100644 vendor/github.com/gorilla/websocket/examples/autobahn/server.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/chat/README.md delete mode 100644 vendor/github.com/gorilla/websocket/examples/chat/client.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/chat/home.html delete mode 100644 vendor/github.com/gorilla/websocket/examples/chat/hub.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/chat/main.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/command/README.md delete mode 100644 vendor/github.com/gorilla/websocket/examples/command/home.html delete mode 100644 vendor/github.com/gorilla/websocket/examples/command/main.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/echo/README.md delete mode 100644 vendor/github.com/gorilla/websocket/examples/echo/client.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/echo/server.go delete mode 100644 vendor/github.com/gorilla/websocket/examples/filewatch/README.md delete mode 100644 vendor/github.com/gorilla/websocket/examples/filewatch/main.go delete mode 100644 vendor/github.com/gorilla/websocket/json_test.go delete mode 100644 vendor/github.com/gorilla/websocket/server_test.go delete mode 100644 vendor/github.com/gorilla/websocket/util_test.go create mode 100644 vendor/github.com/hpcloud/tail/.gitignore create mode 100644 vendor/github.com/hpcloud/tail/.travis.yml create mode 100644 vendor/github.com/hpcloud/tail/CHANGES.md create mode 100644 vendor/github.com/hpcloud/tail/Dockerfile create mode 100644 vendor/github.com/hpcloud/tail/LICENSE.txt create mode 100644 vendor/github.com/hpcloud/tail/Makefile create mode 100644 vendor/github.com/hpcloud/tail/README.md create mode 100644 vendor/github.com/hpcloud/tail/appveyor.yml create mode 100644 vendor/github.com/hpcloud/tail/ratelimiter/Licence create mode 100644 vendor/github.com/hpcloud/tail/ratelimiter/leakybucket.go create mode 100644 vendor/github.com/hpcloud/tail/ratelimiter/memory.go create mode 100644 vendor/github.com/hpcloud/tail/ratelimiter/storage.go create mode 100644 vendor/github.com/hpcloud/tail/tail.go create mode 100644 vendor/github.com/hpcloud/tail/tail_posix.go create mode 100644 vendor/github.com/hpcloud/tail/tail_windows.go create mode 100644 vendor/github.com/hpcloud/tail/util/util.go create mode 100644 vendor/github.com/hpcloud/tail/watch/filechanges.go create mode 100644 vendor/github.com/hpcloud/tail/watch/inotify.go create mode 100644 vendor/github.com/hpcloud/tail/watch/inotify_tracker.go create mode 100644 vendor/github.com/hpcloud/tail/watch/polling.go create mode 100644 vendor/github.com/hpcloud/tail/watch/watch.go create mode 100644 vendor/github.com/hpcloud/tail/winfile/winfile.go delete mode 100644 vendor/github.com/kelseyhightower/envconfig/.travis.yml delete mode 100644 vendor/github.com/kelseyhightower/envconfig/MAINTAINERS delete mode 100644 vendor/github.com/kelseyhightower/envconfig/README.md delete mode 100644 vendor/github.com/kelseyhightower/envconfig/doc.go delete mode 100644 vendor/github.com/kelseyhightower/envconfig/env_os.go delete mode 100644 vendor/github.com/kelseyhightower/envconfig/env_syscall.go delete mode 100644 vendor/github.com/kelseyhightower/envconfig/envconfig.go delete mode 100644 vendor/github.com/kelseyhightower/envconfig/envconfig_test.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/codec_test.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/data.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/data_codec.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/data_var.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/default_test.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/dummy_test.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/example.json delete mode 100644 vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go delete mode 100755 vendor/github.com/mailru/easyjson/benchmark/ujson.sh delete mode 100644 vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go delete mode 100644 vendor/github.com/mailru/easyjson/buffer/pool_test.go delete mode 100644 vendor/github.com/mailru/easyjson/easyjson/main.go delete mode 100644 vendor/github.com/mailru/easyjson/gen/decoder.go delete mode 100644 vendor/github.com/mailru/easyjson/gen/encoder.go delete mode 100644 vendor/github.com/mailru/easyjson/gen/generator.go delete mode 100644 vendor/github.com/mailru/easyjson/gen/generator_test.go delete mode 100644 vendor/github.com/mailru/easyjson/jlexer/lexer_test.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_String.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/optional/opt.go delete mode 100644 vendor/github.com/mailru/easyjson/opt/opts.go delete mode 100644 vendor/github.com/mailru/easyjson/parser/parser.go delete mode 100644 vendor/github.com/mailru/easyjson/parser/parser_unix.go delete mode 100644 vendor/github.com/mailru/easyjson/parser/parser_windows.go delete mode 100644 vendor/github.com/mailru/easyjson/tests/basic_test.go delete mode 100644 vendor/github.com/mailru/easyjson/tests/data.go delete mode 100644 vendor/github.com/mailru/easyjson/tests/nothing.go delete mode 100644 vendor/github.com/mailru/easyjson/tests/omitempty.go delete mode 100644 vendor/github.com/mailru/easyjson/tests/required_test.go delete mode 100644 vendor/github.com/mailru/easyjson/tests/snake.go create mode 100644 vendor/github.com/onsi/ginkgo/CONTRIBUTING.md create mode 100644 vendor/github.com/onsi/ginkgo/RELEASING.md 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/extensions/table/table_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/extensions/table/table_test.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/nodot_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_test.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/testrunner/test_runner_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_test.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_go15_test.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/integration/_fixtures/convert_fixtures/extra_functions_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested/nested_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested_without_gofiles/subpackage/nested_subpackage_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/outside_package_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/xunit_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/extra_functions_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/fixtures_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_subpackage_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/outside_package_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture/external_coverage.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/exiting_synchronized_setup_tests/exiting_synchronized_setup_tests_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/no_tests/no_tests.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_setup_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/synchronized_setup_tests/synchronized_setup_tests_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/ignored_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/convert_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/coverage_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/fail_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/flags_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/integration.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/integration_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/interrupt_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/precompiled_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/progress_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/run_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/skip_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/subcommand_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/suite_command_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/suite_setup_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/tags_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/test_description_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/verbose_and_succinct_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/watch_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/containernode/container_node_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/containernode/container_node_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/failer/failer_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/failer/failer_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/leaf_node_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/shared_runner_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/aggregator_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/fake_output_interceptor_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/fake_poster_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/remote_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/server_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/index_computer_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/spec_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/specs_test.go rename vendor/github.com/onsi/ginkgo/internal/{spec => spec_iterator}/index_computer.go (98%) create mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/suite/suite_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/suite/suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/default_reporter_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/reporters_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/README.md delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/types/types_suite_test.go delete mode 100644 vendor/github.com/onsi/ginkgo/types/types_test.go create mode 100644 vendor/github.com/onsi/gomega/CONTRIBUTING.md create mode 100644 vendor/github.com/onsi/gomega/RELEASING.md delete mode 100644 vendor/github.com/onsi/gomega/format/format_suite_test.go delete mode 100644 vendor/github.com/onsi/gomega/format/format_test.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/buffer.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/buffer_test.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/gbuffer_suite_test.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/say_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/say_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/_fixture/firefly/main.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/exit_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/gexec_suite_test.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/prefixed_writer.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/prefixed_writer_test.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/session.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/session_test.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/handlers.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/test_server.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/test_server_suite_test.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/test_server_test.go delete mode 100644 vendor/github.com/onsi/gomega/internal/assertion/assertion_suite_test.go delete mode 100644 vendor/github.com/onsi/gomega/internal/assertion/assertion_test.go delete mode 100644 vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_suite_test.go delete mode 100644 vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_test.go delete mode 100644 vendor/github.com/onsi/gomega/internal/fakematcher/fake_matcher.go create 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_test.go create mode 100644 vendor/github.com/onsi/gomega/matchers/and.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher_test.go create mode 100644 vendor/github.com/onsi/gomega/matchers/attributes_slice.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_a_directory.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go create 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_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_false_matcher_test.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_identical_to.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_nil_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_sent_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_temporally_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_true_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/consist_of_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/contain_element_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/contain_substring_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/equal_matcher_test.go create mode 100644 vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_key_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_len_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_occurred_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_prefix_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_suffix_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_error_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_json_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_regexp_matcher_test.go create mode 100644 vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/matcher_tests_suite_test.go create mode 100644 vendor/github.com/onsi/gomega/matchers/not.go create mode 100644 vendor/github.com/onsi/gomega/matchers/or.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/panic_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/receive_matcher_test.go create mode 100644 vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/MIT.LICENSE create mode 100644 vendor/github.com/onsi/gomega/matchers/with_transform.go delete mode 100644 vendor/github.com/pkg/errors/bench_test.go delete mode 100644 vendor/github.com/pkg/errors/errors_test.go delete mode 100644 vendor/github.com/pkg/errors/example_test.go delete mode 100644 vendor/github.com/pkg/errors/format_test.go delete mode 100644 vendor/github.com/pkg/errors/stack_test.go rename vendor/github.com/{Sirupsen => sirupsen}/logrus/.gitignore (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/.travis.yml (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/CHANGELOG.md (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/LICENSE (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/README.md (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/doc.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/entry.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/exported.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/formatter.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/hooks.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/json_formatter.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/logger.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/logrus.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/terminal_bsd.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/terminal_linux.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/terminal_notwindows.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/terminal_solaris.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/terminal_windows.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/text_formatter.go (100%) rename vendor/github.com/{Sirupsen => sirupsen}/logrus/writer.go (100%) create mode 100644 vendor/go.etcd.io/bbolt/.gitignore create mode 100644 vendor/go.etcd.io/bbolt/.travis.yml rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/LICENSE (100%) create mode 100644 vendor/go.etcd.io/bbolt/Makefile create mode 100644 vendor/go.etcd.io/bbolt/README.md rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/bolt_386.go (93%) rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/bolt_amd64.go (93%) rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/bolt_arm.go (93%) create mode 100644 vendor/go.etcd.io/bbolt/bolt_arm64.go rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/bolt_linux.go (77%) create mode 100644 vendor/go.etcd.io/bbolt/bolt_mips64x.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_mipsx.go rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/bolt_openbsd.go (94%) create mode 100644 vendor/go.etcd.io/bbolt/bolt_ppc.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_ppc64.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_ppc64le.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_riscv64.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_s390x.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_unix.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_unix_aix.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_unix_solaris.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_windows.go rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/boltsync_unix.go (83%) rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/bucket.go (89%) create mode 100644 vendor/go.etcd.io/bbolt/compact.go rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/cursor.go (86%) create mode 100644 vendor/go.etcd.io/bbolt/db.go rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/doc.go (94%) rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/errors.go (88%) create mode 100644 vendor/go.etcd.io/bbolt/freelist.go create mode 100644 vendor/go.etcd.io/bbolt/freelist_hmap.go create mode 100644 vendor/go.etcd.io/bbolt/mlock_unix.go create mode 100644 vendor/go.etcd.io/bbolt/mlock_windows.go rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/node.go (86%) create mode 100644 vendor/go.etcd.io/bbolt/page.go rename vendor/{github.com/boltdb/bolt => go.etcd.io/bbolt}/tx.go (70%) create mode 100644 vendor/go.etcd.io/bbolt/unsafe.go delete mode 100644 vendor/golang.org/x/net/.gitattributes delete mode 100644 vendor/golang.org/x/net/.gitignore delete mode 100644 vendor/golang.org/x/net/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/net/README.md delete mode 100644 vendor/golang.org/x/net/bpf/asm.go delete mode 100644 vendor/golang.org/x/net/bpf/constants.go delete mode 100644 vendor/golang.org/x/net/bpf/doc.go delete mode 100644 vendor/golang.org/x/net/bpf/instructions.go delete mode 100644 vendor/golang.org/x/net/bpf/instructions_test.go delete mode 100644 vendor/golang.org/x/net/bpf/setter.go delete mode 100644 vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf delete mode 100644 vendor/golang.org/x/net/bpf/testdata/all_instructions.txt delete mode 100644 vendor/golang.org/x/net/bpf/vm.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_aluop_test.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_bpf_test.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_extension_test.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_instructions.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_jump_test.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_load_test.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_ret_test.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_scratch_test.go delete mode 100644 vendor/golang.org/x/net/bpf/vm_test.go delete mode 100644 vendor/golang.org/x/net/codereview.cfg delete mode 100644 vendor/golang.org/x/net/context/context_test.go delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go delete mode 100644 vendor/golang.org/x/net/context/withtimeout_test.go delete mode 100644 vendor/golang.org/x/net/dict/dict.go delete mode 100644 vendor/golang.org/x/net/dns/dnsmessage/example_test.go delete mode 100644 vendor/golang.org/x/net/dns/dnsmessage/message.go delete mode 100644 vendor/golang.org/x/net/dns/dnsmessage/message_test.go delete mode 100644 vendor/golang.org/x/net/go.mod delete mode 100644 vendor/golang.org/x/net/go.sum delete mode 100644 vendor/golang.org/x/net/html/atom/atom_test.go delete mode 100644 vendor/golang.org/x/net/html/atom/gen.go delete mode 100644 vendor/golang.org/x/net/html/atom/table_test.go delete mode 100644 vendor/golang.org/x/net/html/charset/charset_test.go delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/README delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html delete mode 100644 vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html delete mode 100644 vendor/golang.org/x/net/html/entity_test.go delete mode 100644 vendor/golang.org/x/net/html/escape_test.go delete mode 100644 vendor/golang.org/x/net/html/example_test.go delete mode 100644 vendor/golang.org/x/net/html/node_test.go delete mode 100644 vendor/golang.org/x/net/html/parse_test.go delete mode 100644 vendor/golang.org/x/net/html/render_test.go delete mode 100644 vendor/golang.org/x/net/html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/go/select.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/go/template.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/go1.html delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/README delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/adoption01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/comments01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/doctype01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/entities01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/entities02.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/html5test-com.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/inbody01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/isindex.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/ruby.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/scriptdata01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tables01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/template.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests1.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests10.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests11.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests12.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests14.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests15.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests16.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests17.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests18.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests19.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests2.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests20.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests21.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests22.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests23.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests24.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests25.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests26.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests3.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests4.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests5.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests6.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests7.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests8.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests9.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tricky01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/webkit01.dat delete mode 100644 vendor/golang.org/x/net/html/testdata/webkit/webkit02.dat delete mode 100644 vendor/golang.org/x/net/html/token_test.go delete mode 100644 vendor/golang.org/x/net/http/httpguts/guts.go delete mode 100644 vendor/golang.org/x/net/http/httpguts/httplex.go delete mode 100644 vendor/golang.org/x/net/http/httpguts/httplex_test.go delete mode 100644 vendor/golang.org/x/net/http/httpproxy/export_test.go delete mode 100644 vendor/golang.org/x/net/http/httpproxy/go19_test.go delete mode 100644 vendor/golang.org/x/net/http/httpproxy/proxy.go delete mode 100644 vendor/golang.org/x/net/http/httpproxy/proxy_test.go delete mode 100644 vendor/golang.org/x/net/http2/.gitignore delete mode 100644 vendor/golang.org/x/net/http2/Dockerfile delete mode 100644 vendor/golang.org/x/net/http2/Makefile delete mode 100644 vendor/golang.org/x/net/http2/README delete mode 100644 vendor/golang.org/x/net/http2/ciphers.go delete mode 100644 vendor/golang.org/x/net/http2/ciphers_test.go delete mode 100644 vendor/golang.org/x/net/http2/client_conn_pool.go delete mode 100644 vendor/golang.org/x/net/http2/databuffer.go delete mode 100644 vendor/golang.org/x/net/http2/databuffer_test.go delete mode 100644 vendor/golang.org/x/net/http2/errors.go delete mode 100644 vendor/golang.org/x/net/http2/errors_test.go delete mode 100644 vendor/golang.org/x/net/http2/flow.go delete mode 100644 vendor/golang.org/x/net/http2/flow_test.go delete mode 100644 vendor/golang.org/x/net/http2/frame.go delete mode 100644 vendor/golang.org/x/net/http2/frame_test.go delete mode 100644 vendor/golang.org/x/net/http2/go111.go delete mode 100644 vendor/golang.org/x/net/http2/gotrack.go delete mode 100644 vendor/golang.org/x/net/http2/gotrack_test.go delete mode 100644 vendor/golang.org/x/net/http2/h2c/h2c.go delete mode 100644 vendor/golang.org/x/net/http2/h2c/h2c_test.go delete mode 100644 vendor/golang.org/x/net/http2/h2demo/.gitignore delete mode 100644 vendor/golang.org/x/net/http2/h2demo/Dockerfile delete mode 100644 vendor/golang.org/x/net/http2/h2demo/Makefile delete mode 100644 vendor/golang.org/x/net/http2/h2demo/README delete mode 100644 vendor/golang.org/x/net/http2/h2demo/deployment-prod.yaml delete mode 100644 vendor/golang.org/x/net/http2/h2demo/go.mod delete mode 100644 vendor/golang.org/x/net/http2/h2demo/go.sum delete mode 100644 vendor/golang.org/x/net/http2/h2demo/h2demo.go delete mode 100644 vendor/golang.org/x/net/http2/h2demo/rootCA.key delete mode 100644 vendor/golang.org/x/net/http2/h2demo/rootCA.pem delete mode 100644 vendor/golang.org/x/net/http2/h2demo/rootCA.srl delete mode 100644 vendor/golang.org/x/net/http2/h2demo/server.crt delete mode 100644 vendor/golang.org/x/net/http2/h2demo/server.key delete mode 100644 vendor/golang.org/x/net/http2/h2demo/service.yaml delete mode 100644 vendor/golang.org/x/net/http2/h2demo/tmpl.go delete mode 100644 vendor/golang.org/x/net/http2/h2i/README.md delete mode 100644 vendor/golang.org/x/net/http2/h2i/h2i.go delete mode 100644 vendor/golang.org/x/net/http2/headermap.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/encode.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/encode_test.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/hpack.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/hpack_test.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/huffman.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/tables.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/tables_test.go delete mode 100644 vendor/golang.org/x/net/http2/http2.go delete mode 100644 vendor/golang.org/x/net/http2/http2_test.go delete mode 100644 vendor/golang.org/x/net/http2/not_go111.go delete mode 100644 vendor/golang.org/x/net/http2/pipe.go delete mode 100644 vendor/golang.org/x/net/http2/pipe_test.go delete mode 100644 vendor/golang.org/x/net/http2/server.go delete mode 100644 vendor/golang.org/x/net/http2/server_push_test.go delete mode 100644 vendor/golang.org/x/net/http2/server_test.go delete mode 100644 vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml delete mode 100644 vendor/golang.org/x/net/http2/transport.go delete mode 100644 vendor/golang.org/x/net/http2/transport_test.go delete mode 100644 vendor/golang.org/x/net/http2/write.go delete mode 100644 vendor/golang.org/x/net/http2/writesched.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_priority.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_priority_test.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_random.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_random_test.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_test.go delete mode 100644 vendor/golang.org/x/net/http2/z_spec_test.go delete mode 100644 vendor/golang.org/x/net/icmp/diag_test.go delete mode 100644 vendor/golang.org/x/net/icmp/dstunreach.go delete mode 100644 vendor/golang.org/x/net/icmp/echo.go delete mode 100644 vendor/golang.org/x/net/icmp/endpoint.go delete mode 100644 vendor/golang.org/x/net/icmp/example_test.go delete mode 100644 vendor/golang.org/x/net/icmp/extension.go delete mode 100644 vendor/golang.org/x/net/icmp/extension_test.go delete mode 100644 vendor/golang.org/x/net/icmp/helper_posix.go delete mode 100644 vendor/golang.org/x/net/icmp/interface.go delete mode 100644 vendor/golang.org/x/net/icmp/ipv4.go delete mode 100644 vendor/golang.org/x/net/icmp/ipv4_test.go delete mode 100644 vendor/golang.org/x/net/icmp/ipv6.go delete mode 100644 vendor/golang.org/x/net/icmp/listen_posix.go delete mode 100644 vendor/golang.org/x/net/icmp/listen_stub.go delete mode 100644 vendor/golang.org/x/net/icmp/message.go delete mode 100644 vendor/golang.org/x/net/icmp/message_test.go delete mode 100644 vendor/golang.org/x/net/icmp/messagebody.go delete mode 100644 vendor/golang.org/x/net/icmp/mpls.go delete mode 100644 vendor/golang.org/x/net/icmp/multipart.go delete mode 100644 vendor/golang.org/x/net/icmp/multipart_test.go delete mode 100644 vendor/golang.org/x/net/icmp/packettoobig.go delete mode 100644 vendor/golang.org/x/net/icmp/paramprob.go delete mode 100644 vendor/golang.org/x/net/icmp/sys_freebsd.go delete mode 100644 vendor/golang.org/x/net/icmp/timeexceeded.go delete mode 100644 vendor/golang.org/x/net/idna/example_test.go delete mode 100644 vendor/golang.org/x/net/idna/idna10.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/idna9.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/idna_test.go delete mode 100644 vendor/golang.org/x/net/idna/punycode.go delete mode 100644 vendor/golang.org/x/net/idna/punycode_test.go delete mode 100644 vendor/golang.org/x/net/idna/tables10.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables11.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables9.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/trie.go delete mode 100644 vendor/golang.org/x/net/idna/trieval.go delete mode 100644 vendor/golang.org/x/net/internal/iana/const.go delete mode 100644 vendor/golang.org/x/net/internal/iana/gen.go delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr.go delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_aix.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_darwin.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_dragonfly.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_freebsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_linux.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_netbsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_openbsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/defs_solaris.go delete mode 100644 vendor/golang.org/x/net/internal/socket/empty.s delete mode 100644 vendor/golang.org/x/net/internal/socket/error_unix.go delete mode 100644 vendor/golang.org/x/net/internal/socket/error_windows.go delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_32bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_64bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_stub.go delete mode 100644 vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go delete mode 100644 vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_bsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_linux.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_stub.go delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn.go delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_msg.go delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go delete mode 100644 vendor/golang.org/x/net/internal/socket/socket.go delete mode 100644 vendor/golang.org/x/net/internal/socket/socket_test.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_bsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_bsdvar.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_const_unix.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_darwin.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_go1_11_darwin.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linkname.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_386.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_386.s delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_arm.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mips.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_netbsd.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_posix.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_solaris.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_stub.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_unix.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_windows.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_386.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go delete mode 100644 vendor/golang.org/x/net/internal/socks/client.go delete mode 100644 vendor/golang.org/x/net/internal/socks/dial_test.go delete mode 100644 vendor/golang.org/x/net/internal/socks/socks.go delete mode 100644 vendor/golang.org/x/net/internal/sockstest/server.go delete mode 100644 vendor/golang.org/x/net/internal/sockstest/server_test.go delete mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries.go delete mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/batch.go delete mode 100644 vendor/golang.org/x/net/ipv4/bpf_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/control.go delete mode 100644 vendor/golang.org/x/net/ipv4/control_bsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/control_pktinfo.go delete mode 100644 vendor/golang.org/x/net/ipv4/control_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/control_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/control_unix.go delete mode 100644 vendor/golang.org/x/net/ipv4/control_windows.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_aix.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_darwin.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_dragonfly.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_freebsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_linux.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_netbsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_openbsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/defs_solaris.go delete mode 100644 vendor/golang.org/x/net/ipv4/dgramopt.go delete mode 100644 vendor/golang.org/x/net/ipv4/doc.go delete mode 100644 vendor/golang.org/x/net/ipv4/endpoint.go delete mode 100644 vendor/golang.org/x/net/ipv4/example_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/gen.go delete mode 100644 vendor/golang.org/x/net/ipv4/genericopt.go delete mode 100644 vendor/golang.org/x/net/ipv4/header.go delete mode 100644 vendor/golang.org/x/net/ipv4/header_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/helper.go delete mode 100644 vendor/golang.org/x/net/ipv4/helper_posix_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/helper_stub_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/iana.go delete mode 100644 vendor/golang.org/x/net/ipv4/icmp.go delete mode 100644 vendor/golang.org/x/net/ipv4/icmp_linux.go delete mode 100644 vendor/golang.org/x/net/ipv4/icmp_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/icmp_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/multicast_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/multicastlistener_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/multicastsockopt_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/packet.go delete mode 100644 vendor/golang.org/x/net/ipv4/payload.go delete mode 100644 vendor/golang.org/x/net/ipv4/payload_cmsg.go delete mode 100644 vendor/golang.org/x/net/ipv4/payload_nocmsg.go delete mode 100644 vendor/golang.org/x/net/ipv4/readwrite_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/sockopt.go delete mode 100644 vendor/golang.org/x/net/ipv4/sockopt_posix.go delete mode 100644 vendor/golang.org/x/net/ipv4/sockopt_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_aix.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreq.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreqn.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_bpf.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_bpf_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_bsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_darwin.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_dragonfly.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_freebsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_linux.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_solaris.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_ssmreq.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_stub.go delete mode 100644 vendor/golang.org/x/net/ipv4/sys_windows.go delete mode 100644 vendor/golang.org/x/net/ipv4/unicast_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/unicastsockopt_test.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_darwin.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_dragonfly.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_386.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_arm.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mips.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_netbsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_openbsd.go delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_solaris.go delete mode 100644 vendor/golang.org/x/net/ipv6/batch.go delete mode 100644 vendor/golang.org/x/net/ipv6/bpf_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/control.go delete mode 100644 vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go delete mode 100644 vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go delete mode 100644 vendor/golang.org/x/net/ipv6/control_stub.go delete mode 100644 vendor/golang.org/x/net/ipv6/control_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/control_unix.go delete mode 100644 vendor/golang.org/x/net/ipv6/control_windows.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_aix.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_darwin.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_dragonfly.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_freebsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_linux.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_netbsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_openbsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/defs_solaris.go delete mode 100644 vendor/golang.org/x/net/ipv6/dgramopt.go delete mode 100644 vendor/golang.org/x/net/ipv6/doc.go delete mode 100644 vendor/golang.org/x/net/ipv6/endpoint.go delete mode 100644 vendor/golang.org/x/net/ipv6/example_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/gen.go delete mode 100644 vendor/golang.org/x/net/ipv6/genericopt.go delete mode 100644 vendor/golang.org/x/net/ipv6/header.go delete mode 100644 vendor/golang.org/x/net/ipv6/header_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/helper.go delete mode 100644 vendor/golang.org/x/net/ipv6/helper_posix_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/helper_stub_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/helper_unix_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/helper_windows_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/iana.go delete mode 100644 vendor/golang.org/x/net/ipv6/icmp.go delete mode 100644 vendor/golang.org/x/net/ipv6/icmp_bsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/icmp_linux.go delete mode 100644 vendor/golang.org/x/net/ipv6/icmp_solaris.go delete mode 100644 vendor/golang.org/x/net/ipv6/icmp_stub.go delete mode 100644 vendor/golang.org/x/net/ipv6/icmp_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/icmp_windows.go delete mode 100644 vendor/golang.org/x/net/ipv6/mocktransponder_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/multicast_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/multicastlistener_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/multicastsockopt_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/payload.go delete mode 100644 vendor/golang.org/x/net/ipv6/payload_cmsg.go delete mode 100644 vendor/golang.org/x/net/ipv6/payload_nocmsg.go delete mode 100644 vendor/golang.org/x/net/ipv6/readwrite_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/sockopt.go delete mode 100644 vendor/golang.org/x/net/ipv6/sockopt_posix.go delete mode 100644 vendor/golang.org/x/net/ipv6/sockopt_stub.go delete mode 100644 vendor/golang.org/x/net/ipv6/sockopt_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_aix.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_asmreq.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_bpf.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_bpf_stub.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_bsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_darwin.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_freebsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_linux.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_solaris.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_ssmreq.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_stub.go delete mode 100644 vendor/golang.org/x/net/ipv6/sys_windows.go delete mode 100644 vendor/golang.org/x/net/ipv6/unicast_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/unicastsockopt_test.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_aix_ppc64.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_darwin.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_dragonfly.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_386.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_arm.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_mips.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_riscv64.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_netbsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_openbsd.go delete mode 100644 vendor/golang.org/x/net/ipv6/zsys_solaris.go delete mode 100644 vendor/golang.org/x/net/lif/address.go delete mode 100644 vendor/golang.org/x/net/lif/address_test.go delete mode 100644 vendor/golang.org/x/net/lif/binary.go delete mode 100644 vendor/golang.org/x/net/lif/defs_solaris.go delete mode 100644 vendor/golang.org/x/net/lif/lif.go delete mode 100644 vendor/golang.org/x/net/lif/link.go delete mode 100644 vendor/golang.org/x/net/lif/link_test.go delete mode 100644 vendor/golang.org/x/net/lif/sys.go delete mode 100644 vendor/golang.org/x/net/lif/syscall.go delete mode 100644 vendor/golang.org/x/net/lif/zsys_solaris_amd64.go delete mode 100644 vendor/golang.org/x/net/nettest/conntest.go delete mode 100644 vendor/golang.org/x/net/nettest/conntest_test.go delete mode 100644 vendor/golang.org/x/net/nettest/nettest.go delete mode 100644 vendor/golang.org/x/net/nettest/nettest_stub.go delete mode 100644 vendor/golang.org/x/net/nettest/nettest_unix.go delete mode 100644 vendor/golang.org/x/net/nettest/nettest_windows.go delete mode 100644 vendor/golang.org/x/net/netutil/helper_stub_test.go delete mode 100644 vendor/golang.org/x/net/netutil/helper_unix_test.go delete mode 100644 vendor/golang.org/x/net/netutil/helper_windows_test.go delete mode 100644 vendor/golang.org/x/net/netutil/listen.go delete mode 100644 vendor/golang.org/x/net/netutil/listen_test.go delete mode 100644 vendor/golang.org/x/net/proxy/dial.go delete mode 100644 vendor/golang.org/x/net/proxy/dial_test.go delete mode 100644 vendor/golang.org/x/net/proxy/direct.go delete mode 100644 vendor/golang.org/x/net/proxy/per_host.go delete mode 100644 vendor/golang.org/x/net/proxy/per_host_test.go delete mode 100644 vendor/golang.org/x/net/proxy/proxy.go delete mode 100644 vendor/golang.org/x/net/proxy/proxy_test.go delete mode 100644 vendor/golang.org/x/net/proxy/socks5.go delete mode 100644 vendor/golang.org/x/net/publicsuffix/example_test.go delete mode 100644 vendor/golang.org/x/net/publicsuffix/gen.go delete mode 100644 vendor/golang.org/x/net/publicsuffix/list.go delete mode 100644 vendor/golang.org/x/net/publicsuffix/list_test.go delete mode 100644 vendor/golang.org/x/net/publicsuffix/table.go delete mode 100644 vendor/golang.org/x/net/publicsuffix/table_test.go delete mode 100644 vendor/golang.org/x/net/route/address.go delete mode 100644 vendor/golang.org/x/net/route/address_darwin_test.go delete mode 100644 vendor/golang.org/x/net/route/address_test.go delete mode 100644 vendor/golang.org/x/net/route/binary.go delete mode 100644 vendor/golang.org/x/net/route/defs_darwin.go delete mode 100644 vendor/golang.org/x/net/route/defs_dragonfly.go delete mode 100644 vendor/golang.org/x/net/route/defs_freebsd.go delete mode 100644 vendor/golang.org/x/net/route/defs_netbsd.go delete mode 100644 vendor/golang.org/x/net/route/defs_openbsd.go delete mode 100644 vendor/golang.org/x/net/route/empty.s delete mode 100644 vendor/golang.org/x/net/route/interface.go delete mode 100644 vendor/golang.org/x/net/route/interface_announce.go delete mode 100644 vendor/golang.org/x/net/route/interface_classic.go delete mode 100644 vendor/golang.org/x/net/route/interface_freebsd.go delete mode 100644 vendor/golang.org/x/net/route/interface_multicast.go delete mode 100644 vendor/golang.org/x/net/route/interface_openbsd.go delete mode 100644 vendor/golang.org/x/net/route/message.go delete mode 100644 vendor/golang.org/x/net/route/message_darwin_test.go delete mode 100644 vendor/golang.org/x/net/route/message_freebsd_test.go delete mode 100644 vendor/golang.org/x/net/route/message_test.go delete mode 100644 vendor/golang.org/x/net/route/route.go delete mode 100644 vendor/golang.org/x/net/route/route_classic.go delete mode 100644 vendor/golang.org/x/net/route/route_openbsd.go delete mode 100644 vendor/golang.org/x/net/route/route_test.go delete mode 100644 vendor/golang.org/x/net/route/sys.go delete mode 100644 vendor/golang.org/x/net/route/sys_darwin.go delete mode 100644 vendor/golang.org/x/net/route/sys_dragonfly.go delete mode 100644 vendor/golang.org/x/net/route/sys_freebsd.go delete mode 100644 vendor/golang.org/x/net/route/sys_netbsd.go delete mode 100644 vendor/golang.org/x/net/route/sys_openbsd.go delete mode 100644 vendor/golang.org/x/net/route/syscall.go delete mode 100644 vendor/golang.org/x/net/route/syscall_go1_11_darwin.go delete mode 100644 vendor/golang.org/x/net/route/syscall_go1_12_darwin.go delete mode 100644 vendor/golang.org/x/net/route/zsys_darwin.go delete mode 100644 vendor/golang.org/x/net/route/zsys_dragonfly.go delete mode 100644 vendor/golang.org/x/net/route/zsys_freebsd_386.go delete mode 100644 vendor/golang.org/x/net/route/zsys_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/net/route/zsys_freebsd_arm.go delete mode 100644 vendor/golang.org/x/net/route/zsys_freebsd_arm64.go delete mode 100644 vendor/golang.org/x/net/route/zsys_netbsd.go delete mode 100644 vendor/golang.org/x/net/route/zsys_openbsd.go delete mode 100644 vendor/golang.org/x/net/trace/events.go delete mode 100644 vendor/golang.org/x/net/trace/histogram.go delete mode 100644 vendor/golang.org/x/net/trace/histogram_test.go delete mode 100644 vendor/golang.org/x/net/trace/trace.go delete mode 100644 vendor/golang.org/x/net/trace/trace_test.go delete mode 100644 vendor/golang.org/x/net/webdav/file.go delete mode 100644 vendor/golang.org/x/net/webdav/file_test.go delete mode 100644 vendor/golang.org/x/net/webdav/if.go delete mode 100644 vendor/golang.org/x/net/webdav/if_test.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/README delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/atom_test.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/example_test.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/marshal.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/read.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/read_test.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/xml.go delete mode 100644 vendor/golang.org/x/net/webdav/internal/xml/xml_test.go delete mode 100644 vendor/golang.org/x/net/webdav/litmus_test_server.go delete mode 100644 vendor/golang.org/x/net/webdav/lock.go delete mode 100644 vendor/golang.org/x/net/webdav/lock_test.go delete mode 100644 vendor/golang.org/x/net/webdav/prop.go delete mode 100644 vendor/golang.org/x/net/webdav/prop_test.go delete mode 100644 vendor/golang.org/x/net/webdav/webdav.go delete mode 100644 vendor/golang.org/x/net/webdav/webdav_test.go delete mode 100644 vendor/golang.org/x/net/webdav/xml.go delete mode 100644 vendor/golang.org/x/net/webdav/xml_test.go delete mode 100644 vendor/golang.org/x/net/websocket/client.go delete mode 100644 vendor/golang.org/x/net/websocket/dial.go delete mode 100644 vendor/golang.org/x/net/websocket/dial_test.go delete mode 100644 vendor/golang.org/x/net/websocket/exampledial_test.go delete mode 100644 vendor/golang.org/x/net/websocket/examplehandler_test.go delete mode 100644 vendor/golang.org/x/net/websocket/hybi.go delete mode 100644 vendor/golang.org/x/net/websocket/hybi_test.go delete mode 100644 vendor/golang.org/x/net/websocket/server.go delete mode 100644 vendor/golang.org/x/net/websocket/websocket.go delete mode 100644 vendor/golang.org/x/net/websocket/websocket_test.go delete mode 100644 vendor/golang.org/x/net/xsrftoken/xsrf.go delete mode 100644 vendor/golang.org/x/net/xsrftoken/xsrf_test.go delete mode 100644 vendor/golang.org/x/oauth2/bitbucket/bitbucket.go delete mode 100644 vendor/golang.org/x/oauth2/client_appengine.go delete mode 100644 vendor/golang.org/x/oauth2/clientcredentials/clientcredentials_test.go delete mode 100644 vendor/golang.org/x/oauth2/example_test.go delete mode 100644 vendor/golang.org/x/oauth2/facebook/facebook.go delete mode 100644 vendor/golang.org/x/oauth2/github/github.go delete mode 100644 vendor/golang.org/x/oauth2/google/appengine.go delete mode 100644 vendor/golang.org/x/oauth2/google/appengine_hook.go delete mode 100644 vendor/golang.org/x/oauth2/google/appenginevm_hook.go delete mode 100644 vendor/golang.org/x/oauth2/google/default.go delete mode 100644 vendor/golang.org/x/oauth2/google/example_test.go delete mode 100644 vendor/golang.org/x/oauth2/google/google.go delete mode 100644 vendor/golang.org/x/oauth2/google/google_test.go delete mode 100644 vendor/golang.org/x/oauth2/google/jwt.go delete mode 100644 vendor/golang.org/x/oauth2/google/sdk.go delete mode 100644 vendor/golang.org/x/oauth2/google/sdk_test.go delete mode 100644 vendor/golang.org/x/oauth2/google/testdata/gcloud/credentials delete mode 100644 vendor/golang.org/x/oauth2/google/testdata/gcloud/properties rename vendor/golang.org/x/{sys/cpu/cpu_mipsx.go => oauth2/internal/client_appengine.go} (54%) rename vendor/golang.org/x/{net/internal/socket/sys_dragonfly.go => oauth2/internal/doc.go} (65%) delete mode 100644 vendor/golang.org/x/oauth2/internal/oauth2_test.go delete mode 100644 vendor/golang.org/x/oauth2/internal/token_test.go delete mode 100644 vendor/golang.org/x/oauth2/internal/transport_test.go delete mode 100644 vendor/golang.org/x/oauth2/jws/jws.go delete mode 100644 vendor/golang.org/x/oauth2/jwt/example_test.go delete mode 100644 vendor/golang.org/x/oauth2/jwt/jwt.go delete mode 100644 vendor/golang.org/x/oauth2/jwt/jwt_test.go delete mode 100644 vendor/golang.org/x/oauth2/linkedin/linkedin.go delete mode 100644 vendor/golang.org/x/oauth2/oauth2_test.go delete mode 100644 vendor/golang.org/x/oauth2/odnoklassniki/odnoklassniki.go delete mode 100644 vendor/golang.org/x/oauth2/paypal/paypal.go delete mode 100644 vendor/golang.org/x/oauth2/token_test.go delete mode 100644 vendor/golang.org/x/oauth2/transport_test.go delete mode 100644 vendor/golang.org/x/oauth2/vk/vk.go delete mode 100644 vendor/golang.org/x/sys/.gitattributes delete mode 100644 vendor/golang.org/x/sys/.gitignore delete mode 100644 vendor/golang.org/x/sys/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/sys/README.md delete mode 100644 vendor/golang.org/x/sys/codereview.cfg delete mode 100644 vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s delete mode 100644 vendor/golang.org/x/sys/cpu/byteorder.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_x86.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo.c delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_mips64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.s delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_test.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_wasm.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_x86.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_x86.s delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go delete mode 100644 vendor/golang.org/x/sys/go.mod create mode 100644 vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go delete mode 100644 vendor/golang.org/x/sys/plan9/asm.s delete mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_386.s delete mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s delete mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_arm.s delete mode 100644 vendor/golang.org/x/sys/plan9/const_plan9.go delete mode 100644 vendor/golang.org/x/sys/plan9/dir_plan9.go delete mode 100644 vendor/golang.org/x/sys/plan9/env_plan9.go delete mode 100644 vendor/golang.org/x/sys/plan9/errors_plan9.go delete mode 100755 vendor/golang.org/x/sys/plan9/mkall.sh delete mode 100755 vendor/golang.org/x/sys/plan9/mkerrors.sh delete mode 100644 vendor/golang.org/x/sys/plan9/mksyscall.go delete mode 100755 vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh delete mode 100644 vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go delete mode 100644 vendor/golang.org/x/sys/plan9/pwd_plan9.go delete mode 100644 vendor/golang.org/x/sys/plan9/race.go delete mode 100644 vendor/golang.org/x/sys/plan9/race0.go delete mode 100644 vendor/golang.org/x/sys/plan9/str.go delete mode 100644 vendor/golang.org/x/sys/plan9/syscall.go delete mode 100644 vendor/golang.org/x/sys/plan9/syscall_plan9.go delete mode 100644 vendor/golang.org/x/sys/plan9/syscall_test.go delete mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go delete mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go delete mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go delete mode 100644 vendor/golang.org/x/sys/plan9/zsysnum_plan9.go rename vendor/golang.org/x/sys/unix/{asm_netbsd_386.s => asm_bsd_386.s} (70%) rename vendor/golang.org/x/sys/unix/{asm_netbsd_amd64.s => asm_bsd_amd64.s} (71%) rename vendor/golang.org/x/sys/unix/{asm_darwin_arm.s => asm_bsd_arm.s} (74%) rename vendor/golang.org/x/sys/unix/{asm_darwin_amd64.s => asm_bsd_arm64.s} (73%) delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s rename vendor/golang.org/x/sys/unix/{asm_openbsd_arm64.s => asm_openbsd_mips64.s} (89%) create mode 100644 vendor/golang.org/x/sys/unix/asm_zos_s390x.s delete mode 100644 vendor/golang.org/x/sys/unix/creds_test.go delete mode 100644 vendor/golang.org/x/sys/unix/darwin_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_linux_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_zos.go delete mode 100644 vendor/golang.org/x/sys/unix/dirent_test.go create mode 100644 vendor/golang.org/x/sys/unix/epoll_zos.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/example_exec_test.go delete mode 100644 vendor/golang.org/x/sys/unix/example_flock_test.go delete mode 100644 vendor/golang.org/x/sys/unix/export_test.go create mode 100644 vendor/golang.org/x/sys/unix/fdset.go create mode 100644 vendor/golang.org/x/sys/unix/fstatfs_zos.go delete mode 100644 vendor/golang.org/x/sys/unix/getdirentries_test.go create mode 100644 vendor/golang.org/x/sys/unix/ioctl_linux.go create mode 100644 vendor/golang.org/x/sys/unix/ioctl_zos.go delete mode 100644 vendor/golang.org/x/sys/unix/linux/Dockerfile delete mode 100644 vendor/golang.org/x/sys/unix/linux/mkall.go delete mode 100644 vendor/golang.org/x/sys/unix/linux/mksysnum.go delete mode 100644 vendor/golang.org/x/sys/unix/linux/types.go mode change 100755 => 100644 vendor/golang.org/x/sys/unix/mkall.sh delete mode 100644 vendor/golang.org/x/sys/unix/mkasm_darwin.go mode change 100755 => 100644 vendor/golang.org/x/sys/unix/mkerrors.sh delete mode 100644 vendor/golang.org/x/sys/unix/mkpost.go delete mode 100644 vendor/golang.org/x/sys/unix/mksyscall.go delete mode 100644 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.go delete mode 100644 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/mksyscall_solaris.go delete mode 100644 vendor/golang.org/x/sys/unix/mksysctl_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/mksysnum.go delete mode 100644 vendor/golang.org/x/sys/unix/mmap_unix_test.go delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/ptrace_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/ptrace_ios.go delete mode 100644 vendor/golang.org/x/sys/unix/sendfile_test.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_illumos.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_test.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_zos_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/timestruct_test.go delete mode 100644 vendor/golang.org/x/sys/unix/types_aix.go delete mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go delete mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go delete mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go delete mode 100644 vendor/golang.org/x/sys/unix/xattr_test.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go rename vendor/golang.org/x/sys/unix/{zerrors_darwin_386.go => zerrors_openbsd_mips64.go} (51%) create mode 100644 vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go rename vendor/golang.org/x/sys/unix/{zptracearm_linux.go => zptrace_armnn_linux.go} (90%) create mode 100644 vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go rename vendor/golang.org/x/sys/unix/{zptracemips_linux.go => zptrace_mipsnn_linux.go} (91%) rename vendor/golang.org/x/sys/unix/{zptracemipsle_linux.go => zptrace_mipsnnle_linux.go} (91%) rename vendor/golang.org/x/sys/unix/{zptrace386_linux.go => zptrace_x86_linux.go} (93%) delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go rename vendor/golang.org/x/sys/unix/{zsyscall_darwin_amd64.1_11.go => zsyscall_linux.go} (54%) create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go rename vendor/golang.org/x/sys/unix/{zsyscall_darwin_arm64.1_11.go => zsyscall_openbsd_mips64.go} (85%) create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go delete mode 100644 vendor/golang.org/x/sys/windows/aliases.go delete mode 100644 vendor/golang.org/x/sys/windows/asm_windows_386.s delete mode 100644 vendor/golang.org/x/sys/windows/asm_windows_amd64.s delete mode 100644 vendor/golang.org/x/sys/windows/asm_windows_arm.s delete mode 100644 vendor/golang.org/x/sys/windows/dll_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/env_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/eventlog.go delete mode 100644 vendor/golang.org/x/sys/windows/exec_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/memory_windows.go delete mode 100755 vendor/golang.org/x/sys/windows/mkerrors.bash delete mode 100755 vendor/golang.org/x/sys/windows/mkknownfolderids.bash delete mode 100644 vendor/golang.org/x/sys/windows/mksyscall.go delete mode 100644 vendor/golang.org/x/sys/windows/race.go delete mode 100644 vendor/golang.org/x/sys/windows/race0.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/export_test.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/registry_test.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/security_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/service.go delete mode 100644 vendor/golang.org/x/sys/windows/str.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/eventlog/log_test.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/mgr_test.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/recovery.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/svc_test.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 delete mode 100644 vendor/golang.org/x/sys/windows/svc/sys_arm.s delete mode 100644 vendor/golang.org/x/sys/windows/syscall.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_test.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_windows_test.go delete mode 100644 vendor/golang.org/x/sys/windows/types_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/types_windows_386.go delete mode 100644 vendor/golang.org/x/sys/windows/zerrors_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/zknownfolderids_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/zsyscall_windows.go create mode 100644 vendor/golang.org/x/text/AUTHORS rename vendor/{github.com/gogo/protobuf/GOLANG_CONTRIBUTORS => golang.org/x/text/CONTRIBUTORS} (55%) create mode 100644 vendor/golang.org/x/text/LICENSE create mode 100644 vendor/golang.org/x/text/PATENTS create mode 100644 vendor/golang.org/x/text/encoding/charmap/charmap.go create mode 100644 vendor/golang.org/x/text/encoding/charmap/tables.go create mode 100644 vendor/golang.org/x/text/encoding/encoding.go create mode 100644 vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go create mode 100644 vendor/golang.org/x/text/encoding/htmlindex/map.go create mode 100644 vendor/golang.org/x/text/encoding/htmlindex/tables.go create mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/identifier.go create mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/mib.go create mode 100644 vendor/golang.org/x/text/encoding/internal/internal.go create mode 100644 vendor/golang.org/x/text/encoding/japanese/all.go create mode 100644 vendor/golang.org/x/text/encoding/japanese/eucjp.go create mode 100644 vendor/golang.org/x/text/encoding/japanese/iso2022jp.go create mode 100644 vendor/golang.org/x/text/encoding/japanese/shiftjis.go create mode 100644 vendor/golang.org/x/text/encoding/japanese/tables.go create mode 100644 vendor/golang.org/x/text/encoding/korean/euckr.go create mode 100644 vendor/golang.org/x/text/encoding/korean/tables.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/all.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go create mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/big5.go create mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/tables.go create mode 100644 vendor/golang.org/x/text/encoding/unicode/override.go create mode 100644 vendor/golang.org/x/text/encoding/unicode/unicode.go create mode 100644 vendor/golang.org/x/text/internal/tag/tag.go create mode 100644 vendor/golang.org/x/text/internal/utf8internal/utf8internal.go create mode 100644 vendor/golang.org/x/text/language/Makefile create mode 100644 vendor/golang.org/x/text/language/common.go create mode 100644 vendor/golang.org/x/text/language/coverage.go create mode 100644 vendor/golang.org/x/text/language/doc.go create mode 100644 vendor/golang.org/x/text/language/go1_1.go create mode 100644 vendor/golang.org/x/text/language/go1_2.go create mode 100644 vendor/golang.org/x/text/language/index.go create mode 100644 vendor/golang.org/x/text/language/language.go create mode 100644 vendor/golang.org/x/text/language/lookup.go create mode 100644 vendor/golang.org/x/text/language/match.go create mode 100644 vendor/golang.org/x/text/language/parse.go create mode 100644 vendor/golang.org/x/text/language/tables.go create mode 100644 vendor/golang.org/x/text/language/tags.go create mode 100644 vendor/golang.org/x/text/runes/cond.go create mode 100644 vendor/golang.org/x/text/runes/runes.go create mode 100644 vendor/golang.org/x/text/transform/transform.go delete mode 100644 vendor/google.golang.org/appengine/.travis.yml delete mode 100644 vendor/google.golang.org/appengine/README.md delete mode 100644 vendor/google.golang.org/appengine/aetest/doc.go delete mode 100644 vendor/google.golang.org/appengine/aetest/instance.go delete mode 100644 vendor/google.golang.org/appengine/aetest/instance_classic.go delete mode 100644 vendor/google.golang.org/appengine/aetest/instance_test.go delete mode 100644 vendor/google.golang.org/appengine/aetest/instance_vm.go delete mode 100644 vendor/google.golang.org/appengine/aetest/user.go delete mode 100644 vendor/google.golang.org/appengine/appengine.go delete mode 100644 vendor/google.golang.org/appengine/appengine_test.go delete mode 100644 vendor/google.golang.org/appengine/appengine_vm.go delete mode 100644 vendor/google.golang.org/appengine/blobstore/blobstore.go delete mode 100644 vendor/google.golang.org/appengine/blobstore/blobstore_test.go delete mode 100644 vendor/google.golang.org/appengine/blobstore/read.go delete mode 100644 vendor/google.golang.org/appengine/capability/capability.go delete mode 100644 vendor/google.golang.org/appengine/channel/channel.go delete mode 100644 vendor/google.golang.org/appengine/channel/channel_test.go delete mode 100644 vendor/google.golang.org/appengine/cloudsql/cloudsql.go delete mode 100644 vendor/google.golang.org/appengine/cloudsql/cloudsql_classic.go delete mode 100644 vendor/google.golang.org/appengine/cloudsql/cloudsql_vm.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aebundler/aebundler.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aedeploy/aedeploy.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aefix/ae.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aefix/ae_test.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aefix/fix.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aefix/main.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aefix/main_test.go delete mode 100644 vendor/google.golang.org/appengine/cmd/aefix/typecheck.go delete mode 100644 vendor/google.golang.org/appengine/datastore/datastore.go delete mode 100644 vendor/google.golang.org/appengine/datastore/datastore_test.go delete mode 100644 vendor/google.golang.org/appengine/datastore/doc.go delete mode 100644 vendor/google.golang.org/appengine/datastore/key.go delete mode 100644 vendor/google.golang.org/appengine/datastore/key_test.go delete mode 100644 vendor/google.golang.org/appengine/datastore/load.go delete mode 100644 vendor/google.golang.org/appengine/datastore/load_test.go delete mode 100644 vendor/google.golang.org/appengine/datastore/metadata.go delete mode 100644 vendor/google.golang.org/appengine/datastore/prop.go delete mode 100644 vendor/google.golang.org/appengine/datastore/prop_test.go delete mode 100644 vendor/google.golang.org/appengine/datastore/query.go delete mode 100644 vendor/google.golang.org/appengine/datastore/query_test.go delete mode 100644 vendor/google.golang.org/appengine/datastore/save.go delete mode 100644 vendor/google.golang.org/appengine/datastore/time_test.go delete mode 100644 vendor/google.golang.org/appengine/datastore/transaction.go delete mode 100644 vendor/google.golang.org/appengine/delay/delay.go delete mode 100644 vendor/google.golang.org/appengine/delay/delay_test.go delete mode 100644 vendor/google.golang.org/appengine/demos/guestbook/app.yaml delete mode 100644 vendor/google.golang.org/appengine/demos/guestbook/favicon.ico delete mode 100644 vendor/google.golang.org/appengine/demos/guestbook/guestbook.go delete mode 100644 vendor/google.golang.org/appengine/demos/guestbook/index.yaml delete mode 100644 vendor/google.golang.org/appengine/demos/guestbook/templates/guestbook.html delete mode 100644 vendor/google.golang.org/appengine/demos/helloworld/app.yaml delete mode 100644 vendor/google.golang.org/appengine/demos/helloworld/favicon.ico delete mode 100644 vendor/google.golang.org/appengine/demos/helloworld/helloworld.go delete mode 100644 vendor/google.golang.org/appengine/errors.go delete mode 100644 vendor/google.golang.org/appengine/file/file.go delete mode 100644 vendor/google.golang.org/appengine/identity.go delete mode 100644 vendor/google.golang.org/appengine/image/image.go delete mode 100644 vendor/google.golang.org/appengine/internal/aetesting/fake.go delete mode 100644 vendor/google.golang.org/appengine/internal/api_test.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_id_test.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/blobstore/blobstore_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/blobstore/blobstore_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/capability/capability_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/capability/capability_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/channel/channel_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/channel/channel_service.proto mode change 100755 => 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto rename vendor/google.golang.org/appengine/internal/{api_race_test.go => identity_flex.go} (53%) delete mode 100644 vendor/google.golang.org/appengine/internal/image/images_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/image/images_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/internal_vm_test.go delete mode 100644 vendor/google.golang.org/appengine/internal/mail/mail_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/mail/mail_service.proto create mode 100644 vendor/google.golang.org/appengine/internal/main_common.go delete mode 100644 vendor/google.golang.org/appengine/internal/memcache/memcache_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/memcache/memcache_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/modules/modules_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/net_test.go mode change 100755 => 100644 vendor/google.golang.org/appengine/internal/regen.sh delete mode 100644 vendor/google.golang.org/appengine/internal/search/search.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/search/search.proto delete mode 100644 vendor/google.golang.org/appengine/internal/socket/socket_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/socket/socket_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/system/system_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/system/system_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/taskqueue/taskqueue_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/taskqueue/taskqueue_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/user/user_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/user/user_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/xmpp/xmpp_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/xmpp/xmpp_service.proto delete mode 100644 vendor/google.golang.org/appengine/log/api.go delete mode 100644 vendor/google.golang.org/appengine/log/log.go delete mode 100644 vendor/google.golang.org/appengine/log/log_test.go delete mode 100644 vendor/google.golang.org/appengine/mail/mail.go delete mode 100644 vendor/google.golang.org/appengine/mail/mail_test.go delete mode 100644 vendor/google.golang.org/appengine/memcache/memcache.go delete mode 100644 vendor/google.golang.org/appengine/memcache/memcache_test.go delete mode 100644 vendor/google.golang.org/appengine/module/module.go delete mode 100644 vendor/google.golang.org/appengine/module/module_test.go delete mode 100644 vendor/google.golang.org/appengine/namespace.go delete mode 100644 vendor/google.golang.org/appengine/namespace_test.go delete mode 100644 vendor/google.golang.org/appengine/remote_api/client.go delete mode 100644 vendor/google.golang.org/appengine/remote_api/client_test.go delete mode 100644 vendor/google.golang.org/appengine/remote_api/remote_api.go delete mode 100644 vendor/google.golang.org/appengine/runtime/runtime.go delete mode 100644 vendor/google.golang.org/appengine/runtime/runtime_test.go delete mode 100644 vendor/google.golang.org/appengine/search/doc.go delete mode 100644 vendor/google.golang.org/appengine/search/field.go delete mode 100644 vendor/google.golang.org/appengine/search/search.go delete mode 100644 vendor/google.golang.org/appengine/search/search_test.go delete mode 100644 vendor/google.golang.org/appengine/search/struct.go delete mode 100644 vendor/google.golang.org/appengine/search/struct_test.go delete mode 100644 vendor/google.golang.org/appengine/socket/doc.go delete mode 100644 vendor/google.golang.org/appengine/socket/socket_classic.go delete mode 100644 vendor/google.golang.org/appengine/socket/socket_vm.go delete mode 100644 vendor/google.golang.org/appengine/taskqueue/taskqueue.go delete mode 100644 vendor/google.golang.org/appengine/taskqueue/taskqueue_test.go delete mode 100644 vendor/google.golang.org/appengine/timeout.go delete mode 100644 vendor/google.golang.org/appengine/user/oauth.go delete mode 100644 vendor/google.golang.org/appengine/user/user.go delete mode 100644 vendor/google.golang.org/appengine/user/user_classic.go delete mode 100644 vendor/google.golang.org/appengine/user/user_test.go delete mode 100644 vendor/google.golang.org/appengine/user/user_vm.go delete mode 100644 vendor/google.golang.org/appengine/xmpp/xmpp.go delete mode 100644 vendor/google.golang.org/appengine/xmpp/xmpp_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/_examples/chat1/main.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/_examples/chat2/main.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/_examples/completion/main.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/_examples/curl/main.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/_examples/modular/main.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/_examples/ping/main.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/app_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/args_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/cmd/genvalues/main.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/cmd_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/completions_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/examples_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/flags_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/parser_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/parsers_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/usage_test.go delete mode 100644 vendor/gopkg.in/alecthomas/kingpin.v2/values_test.go create mode 100644 vendor/gopkg.in/fsnotify.v1/.editorconfig create mode 100644 vendor/gopkg.in/fsnotify.v1/.gitignore create mode 100644 vendor/gopkg.in/fsnotify.v1/.travis.yml create mode 100644 vendor/gopkg.in/fsnotify.v1/AUTHORS create mode 100644 vendor/gopkg.in/fsnotify.v1/CHANGELOG.md create mode 100644 vendor/gopkg.in/fsnotify.v1/CONTRIBUTING.md create mode 100644 vendor/gopkg.in/fsnotify.v1/LICENSE create mode 100644 vendor/gopkg.in/fsnotify.v1/README.md create mode 100644 vendor/gopkg.in/fsnotify.v1/fen.go create mode 100644 vendor/gopkg.in/fsnotify.v1/fsnotify.go create mode 100644 vendor/gopkg.in/fsnotify.v1/inotify.go create mode 100644 vendor/gopkg.in/fsnotify.v1/inotify_poller.go create mode 100644 vendor/gopkg.in/fsnotify.v1/kqueue.go create mode 100644 vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go create mode 100644 vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go create mode 100644 vendor/gopkg.in/fsnotify.v1/windows.go create mode 100644 vendor/gopkg.in/tomb.v1/LICENSE create mode 100644 vendor/gopkg.in/tomb.v1/README.md create mode 100644 vendor/gopkg.in/tomb.v1/tomb.go create mode 100644 vendor/gopkg.in/yaml.v2/.travis.yml rename vendor/{code.cloudfoundry.org/lager/lagerflags => gopkg.in/yaml.v2}/LICENSE (89%) rename vendor/{github.com/kelseyhightower/envconfig/LICENSE => gopkg.in/yaml.v2/LICENSE.libyaml} (77%) rename vendor/{github.com/cloudfoundry-incubator/uaago => gopkg.in/yaml.v2}/NOTICE (77%) create mode 100644 vendor/gopkg.in/yaml.v2/README.md create mode 100644 vendor/gopkg.in/yaml.v2/apic.go create mode 100644 vendor/gopkg.in/yaml.v2/decode.go create mode 100644 vendor/gopkg.in/yaml.v2/emitterc.go create mode 100644 vendor/gopkg.in/yaml.v2/encode.go create mode 100644 vendor/gopkg.in/yaml.v2/parserc.go create mode 100644 vendor/gopkg.in/yaml.v2/readerc.go create mode 100644 vendor/gopkg.in/yaml.v2/resolve.go create mode 100644 vendor/gopkg.in/yaml.v2/scannerc.go create mode 100644 vendor/gopkg.in/yaml.v2/sorter.go create mode 100644 vendor/gopkg.in/yaml.v2/writerc.go create mode 100644 vendor/gopkg.in/yaml.v2/yaml.go create mode 100644 vendor/gopkg.in/yaml.v2/yamlh.go create mode 100644 vendor/gopkg.in/yaml.v2/yamlprivateh.go create mode 100644 vendor/modules.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index c4ace6d8..30ac0585 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,15 +2,14 @@ version: 2 # use CircleCI 2.0 jobs: build: docker: - - image: circleci/golang:1.12 + - image: circleci/golang:1.17 working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle steps: # steps that comprise the `build` job - checkout # check out source code to working directory - run: name: Install Dependencies command: | - go get -u -v -t github.com/Masterminds/glide - glide install --strip-vendor + go mod vendor - run: name: Builder command: make build @@ -26,7 +25,7 @@ jobs: deploy-nozzle: docker: - - image: circleci/golang:1.12 + - image: circleci/golang:1.17 working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle steps: # steps that comprise the `deploy` job - attach_workspace: @@ -35,8 +34,7 @@ jobs: - run: name: Install dependencies command: | - go get -u -v -t github.com/Masterminds/glide - glide install --strip-vendor + go mod vendor cp -R /tmp/splunk-firehose-nozzle . - run: name: Deploy nozzle @@ -47,7 +45,7 @@ jobs: tile-builder: docker: - - image: circleci/golang:1.12 + - image: circleci/golang:1.17 working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle steps: - attach_workspace: @@ -66,7 +64,7 @@ jobs: execute_tests: docker: - - image: circleci/golang:1.12 + - image: circleci/golang:1.17 working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle steps: - attach_workspace: @@ -75,8 +73,7 @@ jobs: - run: name: Install dependencies command: | - go get -u -v -t github.com/Masterminds/glide - glide install --strip-vendor + go mod vendor cp -R /tmp/splunk-firehose-nozzle . - run: name: Deploy data-gen diff --git a/Makefile b/Makefile index 37cd13c1..25f837c0 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,17 @@ endif default: installdeps build installdeps: - glide install --strip-vendor + go mod vendor updatedeps: - glide update + go get -u + go mod tidy + go mod vendor initdeps: - glide create + go mod init + go mod tidy + go mod vendor # -gcflags '-N -l' for debug # -ldflags -w for prod diff --git a/README.md b/README.md index 7281c74c..e7e54e8b 100644 --- a/README.md +++ b/README.md @@ -398,10 +398,9 @@ Make sure you have the following installed on your workstation: | Software | Version | --- | --- | -| go | go1.12.x -| glide | 0.12.x +| go | go1.17.x -Then install all dependent packages via [Glide](https://glide.sh/): +Then make sure that all dependent packages are there: ``` $ cd diff --git a/cache/boltdb.go b/cache/boltdb.go index cf610188..2d90db93 100644 --- a/cache/boltdb.go +++ b/cache/boltdb.go @@ -9,9 +9,9 @@ import ( "code.cloudfoundry.org/lager" - "github.com/boltdb/bolt" cfclient "github.com/cloudfoundry-community/go-cfclient" json "github.com/mailru/easyjson" + bolt "go.etcd.io/bbolt" ) const ( diff --git a/glide.lock b/glide.lock deleted file mode 100644 index 007ebedd..00000000 --- a/glide.lock +++ /dev/null @@ -1,123 +0,0 @@ -hash: d7f08c29071249b8d7e8aefbf8edb471ad8dd236599c784787c35c06c9d55747 -updated: 2019-06-24T13:35:17.515998-07:00 -imports: -- name: code.cloudfoundry.org/cfhttp - version: 1d363866d79a7203ee22ee605a9ac6081b56c9a0 - subpackages: - - unix_transport -- name: code.cloudfoundry.org/cflager - version: 3b0406dd8038bb31452dfaf171c4f0efa55393bf -- name: code.cloudfoundry.org/gofileutils - version: 4d0c80011a0f37da1711c184028bc40137cd45af - subpackages: - - fileutils -- name: code.cloudfoundry.org/lager - version: b273f19621a28f627423f658e71e014f114dd53e -- name: github.com/alecthomas/template - version: b867cc6ab45cece8143cfcc6fc9c77cf3f2c23c0 - subpackages: - - parse -- name: github.com/alecthomas/units - version: 6b4e7dc5e3143b85ea77909c72caf89416fc2915 -- name: github.com/boltdb/bolt - version: 4d30731e9122988d2012a9574c43f80f054a0d3b -- name: github.com/cloudfoundry-community/go-cfclient - version: f136f9222381e2fea5099f62e4b751dcb660ff82 -- name: github.com/cloudfoundry-incubator/uaago - version: 8136b7bbe76e26394600a790a95c15eac955f4fc -- name: github.com/cloudfoundry/noaa - version: 5ce49363dfa666c00fc716cb5f8c2f99462b41ef - subpackages: - - consumer - - consumer/internal - - errors -- name: github.com/cloudfoundry/sonde-go - version: 81c3f6be579cf4337477a8b0d03852d0760b5801 - subpackages: - - events -- name: github.com/gogo/protobuf - version: a4cceea7a401a73fefafd1a21fedbd4694124a82 - subpackages: - - gogoproto - - proto - - protoc-gen-gogo/descriptor -- name: github.com/golang/protobuf - version: 98fa357170587e470c5f27d3c3ea0947b71eb455 - subpackages: - - proto -- name: github.com/google/uuid - version: 281f560d28af7174109514e936f94c2ab2cb2823 -- name: github.com/gorilla/websocket - version: a69d25be2fe2923a97c2af6849b2f52426f68fc0 -- name: github.com/kelseyhightower/envconfig - version: 9aca109c9aec4633fced9717c4a09ecab3d33111 -- name: github.com/mailru/easyjson - version: 3d7eb5818bd515e07588ded25d0d501516a0309d - subpackages: - - buffer - - jlexer - - jwriter -- name: github.com/Masterminds/semver - version: 059deebd1619b9ae33232c797f7ab0e8d6c6fd69 -- name: github.com/pkg/errors - version: ba968bfe8b2f7e042a574c888954fccecfa385b4 -- name: github.com/sirupsen/logrus - version: 4b6ea7319e214d98c938f12692336f7ca9348d6b -- name: golang.org/x/net - version: 3b0461eec859c4b73bb64fdc8285971fd33e3938 - subpackages: - - context -- name: golang.org/x/oauth2 - version: 2baa8a1b9338cf13d9eeb27696d761155fa480be - subpackages: - - clientcredentials - - internal -- name: golang.org/x/sys - version: c5567b49c5d04a5f83870795b8c0e2df43a8ce32 - subpackages: - - unix -- name: google.golang.org/appengine - version: 46239ca616842c00f41b8cbc6bbf2bd6ffbfcdad - subpackages: - - internal - - internal/base - - internal/datastore - - internal/log - - internal/remote_api - - internal/urlfetch - - urlfetch -- name: gopkg.in/alecthomas/kingpin.v2 - version: e9044be3ab2a8e11d4e1f418d12f0790d57e8d70 -testImports: -- name: github.com/onsi/ginkgo - version: a8ccd817611666211fdf6e6a752174a0db8374a8 - subpackages: - - config - - internal/codelocation - - internal/containernode - - internal/failer - - internal/leafnodes - - internal/remote - - internal/spec - - internal/specrunner - - internal/suite - - internal/testingtproxy - - internal/writer - - reporters - - reporters/stenographer - - reporters/stenographer/support/go-colorable - - reporters/stenographer/support/go-isatty - - types -- name: github.com/onsi/gomega - version: 4dfabf7db2e4147ec99a86db32b2f2a3484cfee8 - subpackages: - - format - - internal/assertion - - internal/asyncassertion - - internal/testingtsupport - - matchers - - matchers/support/goraph/bipartitegraph - - matchers/support/goraph/edge - - matchers/support/goraph/node - - matchers/support/goraph/util - - types \ No newline at end of file diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index 3d4058d7..00000000 --- a/glide.yaml +++ /dev/null @@ -1,15 +0,0 @@ -package: github.com/cloudfoundry-community/splunk-firehose-nozzle -import: -- package: code.cloudfoundry.org/cfhttp -- package: code.cloudfoundry.org/cflager -- package: code.cloudfoundry.org/lager -- package: github.com/cloudfoundry-incubator/uaago -- package: github.com/cloudfoundry/noaa - subpackages: - - consumer -- package: github.com/cloudfoundry/sonde-go - subpackages: - - events -- package: github.com/kelseyhightower/envconfig -- package: github.com/pkg/errors - version: ~0.8.0 diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..96902580 --- /dev/null +++ b/go.mod @@ -0,0 +1,51 @@ +module github.com/cloudfoundry-community/splunk-firehose-nozzle + +go 1.17 + +require ( + code.cloudfoundry.org/cfhttp v0.0.0-20160823172719-1d363866d79a + code.cloudfoundry.org/cflager v0.0.0-20160705185420-3b0406dd8038 + code.cloudfoundry.org/lager v0.0.0-20161021174446-b273f19621a2 + github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381 + github.com/cloudfoundry/noaa v2.1.1-0.20190110210640-5ce49363dfa6+incompatible + github.com/cloudfoundry/sonde-go v0.0.0-20160804000546-81c3f6be579c + github.com/gogo/protobuf v0.0.0-20160804155430-a4cceea7a401 + github.com/google/uuid v0.0.0-20170728174318-281f560d28af + github.com/gorilla/websocket v1.0.1-0.20160802133203-a69d25be2fe2 + github.com/mailru/easyjson v0.0.0-20160816214844-3d7eb5818bd5 + github.com/onsi/ginkgo v1.6.0 + github.com/onsi/gomega v1.4.3 + github.com/sirupsen/logrus v0.10.0 + go.etcd.io/bbolt v1.3.6 + gopkg.in/alecthomas/kingpin.v2 v2.2.3 +) + +require ( + code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f // indirect + github.com/Masterminds/semver v1.4.3-0.20190429190951-059deebd1619 // indirect + github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 // indirect + github.com/alecthomas/colour v0.1.0 // indirect + github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect + github.com/alecthomas/template v0.0.0-20150530000104-b867cc6ab45c // indirect + github.com/alecthomas/units v0.0.0-20150109002421-6b4e7dc5e314 // indirect + github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/elazarl/goproxy v0.0.0-20210801061803-8e322dfb79c4 // indirect + github.com/elazarl/goproxy/ext v0.0.0-20210801061803-8e322dfb79c4 // indirect + github.com/golang/protobuf v1.2.0 // indirect + github.com/hpcloud/tail v1.0.0 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect + github.com/pkg/errors v0.8.1 // indirect + github.com/sergi/go-diff v1.2.0 // indirect + github.com/stretchr/testify v1.7.0 // indirect + golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect + golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1 // indirect + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect + golang.org/x/text v0.3.0 // indirect + google.golang.org/appengine v1.4.0 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gopkg.in/fsnotify.v1 v1.4.7 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.2.4 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..54b02adc --- /dev/null +++ b/go.sum @@ -0,0 +1,133 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +code.cloudfoundry.org/cfhttp v0.0.0-20160823172719-1d363866d79a h1:wVslvqs3Pky+vIoLTtzySzBCAmdOjDbhCXK+beDkJtk= +code.cloudfoundry.org/cfhttp v0.0.0-20160823172719-1d363866d79a/go.mod h1:kwYQ8kChWl4AuUJG3vKtp1po2B91S7XoUWhoKElabmA= +code.cloudfoundry.org/cflager v0.0.0-20160705185420-3b0406dd8038 h1:WAxsM+7EM1cUdkI0PYA4EMeo5gFv+1aJ9vzDeR4Gt74= +code.cloudfoundry.org/cflager v0.0.0-20160705185420-3b0406dd8038/go.mod h1:Vf3Ncy2M+LXvWLhrI32tHEsEzq2JBL5sGKRBPJqQlg0= +code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= +code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= +code.cloudfoundry.org/lager v0.0.0-20161021174446-b273f19621a2 h1:sdPULWlXm11NfWc6Xd/o/gqcQpbxlCbWV2sskNJgjkA= +code.cloudfoundry.org/lager v0.0.0-20161021174446-b273f19621a2/go.mod h1:O2sS7gKP3HM2iemG+EnwvyNQK7pTSC6Foi4QiMp9sSk= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.4.3-0.20190429190951-059deebd1619 h1:HxroVXcNIHz1mYHosZkHPzBIdiyPc3pKGM3/kj6vUAM= +github.com/Masterminds/semver v1.4.3-0.20190429190951-059deebd1619/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= +github.com/alecthomas/template v0.0.0-20150530000104-b867cc6ab45c h1:WuIar4doi9p1AKcJ3oDihD5JFxEMj2sxLCQsdx4DxGo= +github.com/alecthomas/template v0.0.0-20150530000104-b867cc6ab45c/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20150109002421-6b4e7dc5e314 h1:NWdGjCRUTTqEqDwJRojRLiwXDW1ZJM2DSiyGfBWx874= +github.com/alecthomas/units v0.0.0-20150109002421-6b4e7dc5e314/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 h1:afT88tB6u9JCKQZVAAaa9ICz/uGn5Uw9ekn6P22mYKM= +github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:bXvGk6IkT1Agy7qzJ+DjIw/SJ1AaB3AvAuMDVV+Vkoo= +github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381 h1:rdRS5BT13Iae9ssvcslol66gfOOXjaLYwqerEn/cl9s= +github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381/go.mod h1:e5+USP2j8Le2M0Jo3qKPFnNhuo1wueU4nWHCXBOfQ14= +github.com/cloudfoundry/noaa v2.1.1-0.20190110210640-5ce49363dfa6+incompatible h1:kXzOyUKUpx5VMNXKU5v8I1lGqcdU2DYYCYtBrfILmLI= +github.com/cloudfoundry/noaa v2.1.1-0.20190110210640-5ce49363dfa6+incompatible/go.mod h1:5LmacnptvxzrTvMfL9+EJhgkUfIgcwI61BVSTh47ECo= +github.com/cloudfoundry/sonde-go v0.0.0-20160804000546-81c3f6be579c h1:sjVPfNFbbTGIADZgQMyrb0CTBlxQrmCheFPPWIF1BJA= +github.com/cloudfoundry/sonde-go v0.0.0-20160804000546-81c3f6be579c/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/elazarl/goproxy v0.0.0-20210801061803-8e322dfb79c4 h1:lS3P5Nw3oPO05Lk2gFiYUOL3QPaH+fRoI1wFOc4G1UY= +github.com/elazarl/goproxy v0.0.0-20210801061803-8e322dfb79c4/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= +github.com/elazarl/goproxy/ext v0.0.0-20210801061803-8e322dfb79c4 h1:jLY5dBmGEgdHm34NvYB0jQC+M4D+C0cB1C8/5aRdPcw= +github.com/elazarl/goproxy/ext v0.0.0-20210801061803-8e322dfb79c4/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/gogo/protobuf v0.0.0-20160804155430-a4cceea7a401 h1:RlrAbVQBYph+tYlrLTYKeOaWfRxDhuKC7GsPjdBGMm8= +github.com/gogo/protobuf v0.0.0-20160804155430-a4cceea7a401/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/uuid v0.0.0-20170728174318-281f560d28af h1:QHwdMxb/D6WmZqI+p4nxhvt9thjHg8KcM7bHc1VPzF8= +github.com/google/uuid v0.0.0-20170728174318-281f560d28af/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f h1:FDM3EtwZLyhW48YRiyqjivNlNZjAObv4xt4NnJaU+NQ= +github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.0.1-0.20160802133203-a69d25be2fe2 h1:yIxp1mchDH00JCTdncC1gFGv5Z8B1SVy0Ov2URmttj0= +github.com/gorilla/websocket v1.0.1-0.20160802133203-a69d25be2fe2/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +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/mailru/easyjson v0.0.0-20160816214844-3d7eb5818bd5 h1:6BZZVy8RqpaLSsUxgeKMiNqmLFkhEmSJFIOwQuEKEK8= +github.com/mailru/easyjson v0.0.0-20160816214844-3d7eb5818bd5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11 h1:YFh+sjyJTMQSYjKwM4dFKhJPJC/wfo98tPUc17HdoYw= +github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11/go.mod h1:Ah2dBMoxZEqk118as2T4u4fjfXarE0pPnMJaArZQZsI= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= +github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= +github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso= +github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/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/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v0.10.0 h1:HuiCTW3IFfQLIcxXO+IvYuZViCI9WscalEa0JiuN+7I= +github.com/sirupsen/logrus v0.10.0/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470 h1:R0uuDVEvfDha2O6dfJRr4/5NBHKEbZhMPZmqOWpEkSo= +github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= +github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1 h1:VeAkjQVzKLmu+JnFcK96TPbkuaTIqwGGAzQ9hgwPjVg= +golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +gopkg.in/alecthomas/kingpin.v2 v2.2.3 h1:/L3oK40poPRwke0Ipa6qqf8n+awu60Vl3DMe+3jLDt4= +gopkg.in/alecthomas/kingpin.v2 v2.2.3/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/utils/glide.lock b/utils/glide.lock deleted file mode 100644 index 46e5c473..00000000 --- a/utils/glide.lock +++ /dev/null @@ -1,70 +0,0 @@ -hash: 73ab1d45092553dcb17cd6a1891c2e4535fc8d2b8e7e53bff3fd0697ad747df8 -updated: 2017-08-05T17:34:01.373191084-07:00 -imports: -- name: code.cloudfoundry.org/cfhttp - version: 1d363866d79a7203ee22ee605a9ac6081b56c9a0 -- name: code.cloudfoundry.org/cflager - version: 3b0406dd8038bb31452dfaf171c4f0efa55393bf -- name: code.cloudfoundry.org/lager - version: b273f19621a28f627423f658e71e014f114dd53e -- name: github.com/cloudfoundry-incubator/uaago - version: 1db9cfd27865007e07ffd5914c0fdf5fb7fc09ba -- name: github.com/cloudfoundry/noaa - version: 0ca0d30d65c7422750132450593d402428dd2273 - subpackages: - - consumer -- name: github.com/cloudfoundry/sonde-go - version: 81c3f6be579cf4337477a8b0d03852d0760b5801 - subpackages: - - events -- name: github.com/gogo/protobuf - version: a4cceea7a401a73fefafd1a21fedbd4694124a82 - subpackages: - - gogoproto - - proto - - protoc-gen-gogo/descriptor -- name: github.com/kelseyhightower/envconfig - version: 9aca109c9aec4633fced9717c4a09ecab3d33111 -- name: github.com/pkg/errors - version: bfd5150e4e41705ded2129ec33379de1cb90b513 -- name: golang.org/x/net - version: 7dbad50ab5b31073856416cdcfeb2796d682f844 - subpackages: - - html/charset -testImports: -- name: github.com/onsi/ginkgo - version: a8ccd817611666211fdf6e6a752174a0db8374a8 - subpackages: - - config - - internal/codelocation - - internal/containernode - - internal/failer - - internal/leafnodes - - internal/remote - - internal/spec - - internal/specrunner - - internal/suite - - internal/testingtproxy - - internal/writer - - reporters - - reporters/stenographer - - reporters/stenographer/support/go-colorable - - reporters/stenographer/support/go-isatty - - types -- name: github.com/onsi/gomega - version: 4dfabf7db2e4147ec99a86db32b2f2a3484cfee8 - subpackages: - - format - - internal/assertion - - internal/asyncassertion - - internal/testingtsupport - - matchers - - matchers/support/goraph/bipartitegraph - - matchers/support/goraph/edge - - matchers/support/goraph/node - - matchers/support/goraph/util - - types -- name: golang.org/x/sys - version: 9d4e42a20653790449273b3c85e67d6d8bae6e2e - subpackages: - - unix diff --git a/vendor/code.cloudfoundry.org/cfhttp/cf_http_suite_test.go b/vendor/code.cloudfoundry.org/cfhttp/cf_http_suite_test.go deleted file mode 100644 index 79bb8236..00000000 --- a/vendor/code.cloudfoundry.org/cfhttp/cf_http_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package cfhttp_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestCfHttp(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CfHttp Suite") -} diff --git a/vendor/code.cloudfoundry.org/cfhttp/cf_http_test.go b/vendor/code.cloudfoundry.org/cfhttp/cf_http_test.go deleted file mode 100644 index fd9a6e11..00000000 --- a/vendor/code.cloudfoundry.org/cfhttp/cf_http_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package cfhttp_test - -import ( - "net/http" - "time" - - "code.cloudfoundry.org/cfhttp" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("CfHttp", func() { - var timeout time.Duration - - BeforeEach(func() { - timeout = 1 * time.Second - }) - - JustBeforeEach(func() { - cfhttp.Initialize(timeout) - }) - - Describe("NewClient", func() { - It("returns an http client", func() { - client := cfhttp.NewClient() - Expect(client.Timeout).To(Equal(timeout)) - transport := client.Transport.(*http.Transport) - Expect(transport.Dial).NotTo(BeNil()) - Expect(transport.DisableKeepAlives).To(BeFalse()) - }) - }) - - Describe("NewUnixClient", func() { - It("returns an http client", func() { - client := cfhttp.NewUnixClient("socketPath") - Expect(client.Timeout).To(Equal(timeout)) - transport := client.Transport.(*http.Transport) - Expect(transport.Dial).NotTo(BeNil()) - }) - }) - - Describe("NewCustomTimeoutClient", func() { - It("returns an http client with specified timeout", func() { - client := cfhttp.NewCustomTimeoutClient(5 * time.Second) - Expect(client.Timeout).To(Equal(5 * time.Second)) - transport := client.Transport.(*http.Transport) - Expect(transport.Dial).NotTo(BeNil()) - Expect(transport.DisableKeepAlives).To(BeFalse()) - }) - }) - - Describe("NewStreamingClient", func() { - It("returns an http client", func() { - client := cfhttp.NewStreamingClient() - Expect(client.Timeout).To(BeZero()) - transport := client.Transport.(*http.Transport) - Expect(transport.Dial).NotTo(BeNil()) - Expect(transport.DisableKeepAlives).To(BeFalse()) - }) - }) -}) diff --git a/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers.go b/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers.go deleted file mode 100644 index 696e7f09..00000000 --- a/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers.go +++ /dev/null @@ -1,42 +0,0 @@ -package handlers - -import ( - "encoding/json" - "net/http" - "strconv" -) - -func WriteInvalidJSONResponse(w http.ResponseWriter, err error) { - WriteJSONResponse(w, http.StatusBadRequest, HandlerError{ - Error: err.Error(), - }) -} - -func WriteInternalErrorJSONResponse(w http.ResponseWriter, err error) { - WriteJSONResponse(w, http.StatusInternalServerError, HandlerError{ - Error: err.Error(), - }) -} - -func WriteStatusCreatedResponse(w http.ResponseWriter) { - WriteJSONResponse(w, http.StatusCreated, struct{}{}) -} - -func WriteStatusAcceptedResponse(w http.ResponseWriter) { - WriteJSONResponse(w, http.StatusAccepted, struct{}{}) -} - -func WriteJSONResponse(w http.ResponseWriter, statusCode int, jsonObj interface{}) { - jsonBytes, err := json.Marshal(jsonObj) - if err != nil { - panic("Unable to encode JSON: " + err.Error()) - } - w.Header().Set("Content-Length", strconv.Itoa(len(jsonBytes))) - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(statusCode) - w.Write(jsonBytes) -} - -type HandlerError struct { - Error string `json:"error"` -} diff --git a/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_suite_test.go b/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_suite_test.go deleted file mode 100644 index fd1149ea..00000000 --- a/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package handlers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestCfHttp(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CfHttp Handlers Suite") -} diff --git a/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_test.go b/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_test.go deleted file mode 100644 index f2e884db..00000000 --- a/vendor/code.cloudfoundry.org/cfhttp/handlers/cf_handlers_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package handlers_test - -import ( - "fmt" - "net/http" - "net/http/httptest" - - . "code.cloudfoundry.org/cfhttp/handlers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var w *httptest.ResponseRecorder - -type Response struct { - Key string `json:"key"` -} - -var _ = Describe("cf_http handlers", func() { - BeforeEach(func() { - w = httptest.NewRecorder() - }) - - Context("with valid http response writer", func() { - Context("with valid json structure", func() { - It("should succeed", func() { - var structure Response - structure.Key = "val" - WriteJSONResponse(w, 200, structure) - Expect(w.HeaderMap["Content-Length"]).To(Equal([]string{"13"})) - Expect(w.Body.String()).To(Equal("{\"key\":\"val\"}")) - Expect(w.Code).To(Equal(200)) - }) - }) - Context("with invalid json structure", func() { - It("should fail", func() { - var garbage map[float64]string - defer func() { - r := recover() - Expect(r).NotTo(BeNil()) - }() - WriteJSONResponse(w, 200, garbage) - }) - }) - Context("with accepted response", func() { - It("should succeed", func() { - WriteStatusAcceptedResponse(w) - Expect(w.Body.String()).To(Equal("{}")) - Expect(w.Code).To(Equal(http.StatusAccepted)) - - }) - }) - - Context("with created response", func() { - It("should succeed", func() { - WriteStatusCreatedResponse(w) - Expect(w.Body.String()).To(Equal("{}")) - Expect(w.Code).To(Equal(http.StatusCreated)) - - }) - - }) - Context("with Internal Error response", func() { - It("should succeed", func() { - WriteInternalErrorJSONResponse(w, fmt.Errorf("test error")) - Expect(w.Body.String()).To(Equal("{\"error\":\"test error\"}")) - Expect(w.Code).To(Equal(http.StatusInternalServerError)) - - }) - }) - - Context("with Invalid JSON response", func() { - It("should succeed", func() { - WriteInvalidJSONResponse(w, fmt.Errorf("test error")) - Expect(w.Body.String()).To(Equal("{\"error\":\"test error\"}")) - Expect(w.Code).To(Equal(http.StatusBadRequest)) - - }) - }) - }) - -}) diff --git a/vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_suite_test.go b/vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_suite_test.go deleted file mode 100644 index 2619b137..00000000 --- a/vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package unix_transport - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestUnixTransport(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "UnixTransport Suite") -} diff --git a/vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_test.go b/vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_test.go deleted file mode 100644 index ef1849d3..00000000 --- a/vendor/code.cloudfoundry.org/cfhttp/unix_transport/unix_transport_test.go +++ /dev/null @@ -1,170 +0,0 @@ -package unix_transport - -import ( - "fmt" - "io" - "io/ioutil" - "net" - "net/http" - "net/http/httptest" - "strings" - - "github.com/nu7hatch/gouuid" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/ghttp" -) - -var _ = Describe("Unix transport", func() { - - var ( - socket string - client http.Client - ) - - Context("with server listening", func() { - - var ( - unixSocketListener net.Listener - unixSocketServer *ghttp.Server - resp *http.Response - err error - ) - - BeforeEach(func() { - uuid, err := uuid.NewV4() - Expect(err).NotTo(HaveOccurred()) - - socket = fmt.Sprintf("/tmp/%s.sock", uuid) - unixSocketListener, err = net.Listen("unix", socket) - Expect(err).NotTo(HaveOccurred()) - - unixSocketServer = ghttp.NewUnstartedServer() - - unixSocketServer.HTTPTestServer = &httptest.Server{ - Listener: unixSocketListener, - Config: &http.Server{Handler: unixSocketServer}, - } - unixSocketServer.Start() - - client = http.Client{Transport: New(socket)} - }) - - Context("when a simple GET request is sent", func() { - BeforeEach(func() { - unixSocketServer.AppendHandlers( - ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/_ping"), - ghttp.RespondWith(http.StatusOK, "true"), - ), - ) - - resp, err = client.Get("unix://" + socket + "/_ping") - }) - - It("responds with correct status", func() { - Expect(err).NotTo(HaveOccurred()) - Expect(resp.StatusCode).To(Equal(http.StatusOK)) - - }) - - It("responds with correct body", func() { - bytes, err := ioutil.ReadAll(resp.Body) - Expect(err).NotTo(HaveOccurred()) - Expect(string(bytes)).To(Equal("true")) - }) - }) - - Context("when a POST request is sent", func() { - const ( - ReqBody = `"id":"some-id"` - RespBody = `{"Image" : "ubuntu"}` - ) - - assertBodyEquals := func(body io.ReadCloser, expectedContent string) { - bytes, err := ioutil.ReadAll(body) - Expect(err).NotTo(HaveOccurred()) - Expect(string(bytes)).To(Equal(expectedContent)) - - } - - asserHeaderContains := func(header http.Header, key, value string) { - Expect(header[key]).To(ConsistOf(value)) - } - - BeforeEach(func() { - validateBody := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - assertBodyEquals(req.Body, ReqBody) - }) - - validateQueryParams := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - Expect(req.URL.RawQuery).To(Equal("fromImage=ubunut&tag=latest")) - }) - - handleRequest := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - w.Header().Set("Content-Type", "application/json") - w.Write([]byte(RespBody)) - }) - - unixSocketServer.AppendHandlers( - ghttp.CombineHandlers( - ghttp.VerifyRequest("POST", "/containers/create"), - ghttp.VerifyContentType("application/json"), - validateBody, - validateQueryParams, - handleRequest, - ), - ) - body := strings.NewReader(ReqBody) - req, err := http.NewRequest("POST", "unix://"+socket+"/containers/create?fromImage=ubunut&tag=latest", body) - req.Header.Add("Content-Type", "application/json") - Expect(err).NotTo(HaveOccurred()) - - resp, err = client.Do(req) - Expect(err).NotTo(HaveOccurred()) - - }) - - It("responds with correct status", func() { - Expect(resp.StatusCode).To(Equal(http.StatusOK)) - }) - - It("responds with correct headers", func() { - asserHeaderContains(resp.Header, "Content-Type", "application/json") - }) - - It("responds with correct body", func() { - assertBodyEquals(resp.Body, RespBody) - }) - - }) - - Context("when socket in reques URI is incorrect", func() { - It("errors", func() { - resp, err = client.Get("unix:///fake/socket.sock/_ping") - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("Wrong unix socket")) - }) - }) - - AfterEach(func() { - unixSocketServer.Close() - }) - }) - - Context("with no server listening", func() { - BeforeEach(func() { - socket = "/not/existing.sock" - client = http.Client{Transport: New(socket)} - }) - - It("errors", func() { - _, err := client.Get("unix:///not/existing.sock/_ping") - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(Or( - ContainSubstring(fmt.Sprintf("dial unix %s: connect: no such file or directory", socket)), - ContainSubstring(fmt.Sprintf("dial unix %s: no such file or directory", socket)), - )) - }) - }) -}) diff --git a/vendor/code.cloudfoundry.org/cflager/integration/integration_suite_test.go b/vendor/code.cloudfoundry.org/cflager/integration/integration_suite_test.go deleted file mode 100644 index fbce9398..00000000 --- a/vendor/code.cloudfoundry.org/cflager/integration/integration_suite_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package main_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" - "os/exec" - - "testing" -) - -var testBinary string - -func TestIntegration(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Integration Suite") -} - -var _ = BeforeSuite(func() { - var err error - testBinary, err = gexec.Build("code.cloudfoundry.org/cflager/integration", "-race") - Expect(err).NotTo(HaveOccurred()) -}) - -var _ = AfterSuite(func() { - gexec.CleanupBuildArtifacts() -}) - -var _ = Describe("CF-Lager", func() { - It("provides flags", func() { - session, err := gexec.Start(exec.Command(testBinary, "--help"), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - Expect(session.Err.Contents()).To(ContainSubstring("-logLevel")) - }) - - It("pipes output to stdout", func() { - session, err := gexec.Start(exec.Command(testBinary), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - - Expect(session.Out.Contents()).To(ContainSubstring("info")) - }) - - It("defaults to the info log level", func() { - session, err := gexec.Start(exec.Command(testBinary), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - - Expect(session.Out.Contents()).NotTo(ContainSubstring("debug")) - Expect(session.Out.Contents()).To(ContainSubstring("info")) - Expect(session.Out.Contents()).To(ContainSubstring("error")) - Expect(session.Out.Contents()).To(ContainSubstring("fatal")) - }) - - It("honors the passed-in log level", func() { - session, err := gexec.Start(exec.Command(testBinary, "-logLevel=debug"), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - - Expect(session.Out.Contents()).To(ContainSubstring("debug")) - Expect(session.Out.Contents()).To(ContainSubstring("info")) - Expect(session.Out.Contents()).To(ContainSubstring("error")) - Expect(session.Out.Contents()).To(ContainSubstring("fatal")) - }) -}) diff --git a/vendor/code.cloudfoundry.org/cflager/integration/main.go b/vendor/code.cloudfoundry.org/cflager/integration/main.go deleted file mode 100644 index 714f8d39..00000000 --- a/vendor/code.cloudfoundry.org/cflager/integration/main.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "errors" - "flag" - - "code.cloudfoundry.org/cflager" - "code.cloudfoundry.org/lager" -) - -func main() { - cflager.AddFlags(flag.CommandLine) - flag.Parse() - - logger, _ := cflager.New("cf-lager-integration") - - logger.Debug("component-does-action", lager.Data{"debug-detail": "foo"}) - logger.Info("another-component-action", lager.Data{"info-detail": "bar"}) - logger.Error("component-failed-something", errors.New("error"), lager.Data{"error-detail": "baz"}) - logger.Fatal("component-failed-badly", errors.New("fatal"), lager.Data{"fatal-detail": "quux"}) -} diff --git a/vendor/code.cloudfoundry.org/gofileutils/.travis.yml b/vendor/code.cloudfoundry.org/gofileutils/.travis.yml deleted file mode 100644 index ccb44e7c..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: go - -go: - - 1.6 - -install: - - go get -v github.com/onsi/ginkgo/ginkgo - - go get -v ./... - -script: bin/test diff --git a/vendor/code.cloudfoundry.org/gofileutils/README.md b/vendor/code.cloudfoundry.org/gofileutils/README.md deleted file mode 100644 index 25325972..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/README.md +++ /dev/null @@ -1,6 +0,0 @@ -[![Build Status](https://travis-ci.org/cloudfoundry/gofileutils.png)](https://travis-ci.org/cloudfoundry/gofileutils) - -Go File Utils -============= - -A collection of go packages to simplify working with files. diff --git a/vendor/code.cloudfoundry.org/gofileutils/bin/test b/vendor/code.cloudfoundry.org/gofileutils/bin/test deleted file mode 100755 index 0bcbb839..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/bin/test +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -e -x - -# because go get does not install test deps -go get github.com/onsi/ginkgo/ginkgo -go get github.com/onsi/gomega - -FIRST_GOPATH_DIR=$(echo $GOPATH | cut -d: -f1) -$FIRST_GOPATH_DIR/bin/ginkgo -r diff --git a/vendor/code.cloudfoundry.org/gofileutils/fileutils/file_utils_test.go b/vendor/code.cloudfoundry.org/gofileutils/fileutils/file_utils_test.go deleted file mode 100644 index 572cbbfc..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fileutils/file_utils_test.go +++ /dev/null @@ -1,165 +0,0 @@ -package fileutils_test - -import ( - "io/ioutil" - "os" - "path" - "path/filepath" - - "code.cloudfoundry.org/gofileutils/fileutils" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Fileutils File", func() { - var fixturePath = filepath.Clean("../fixtures/fileutils/supervirus.zsh") - var fixtureBytes []byte - - BeforeEach(func() { - var err error - fixtureBytes, err = ioutil.ReadFile(fixturePath) - Expect(err).NotTo(HaveOccurred()) - }) - - Describe("Open", func() { - It("opens an existing file", func() { - fd, err := fileutils.Open(fixturePath) - Expect(err).NotTo(HaveOccurred()) - - fileBytes, err := ioutil.ReadAll(fd) - Expect(err).NotTo(HaveOccurred()) - fd.Close() - - Expect(fileBytes).To(Equal(fixtureBytes)) - }) - - It("creates a non-existing file and all intermediary directories", func() { - fd, err := ioutil.TempFile("", "open_test") - Expect(err).NotTo(HaveOccurred()) - - _, err = fd.WriteString("Never Gonna Give You Up") - Expect(err).NotTo(HaveOccurred()) - fd.Close() - - fileBytes, err := ioutil.ReadFile(fd.Name()) - Expect(err).NotTo(HaveOccurred()) - Expect(string(fileBytes)).To(Equal("Never Gonna Give You Up")) - }) - }) - - Describe("Create", func() { - It("truncates an existing file", func() { - tmpFile, err := ioutil.TempFile("", "create_test") - Expect(err).NotTo(HaveOccurred()) - _, err = tmpFile.WriteString("Never Gonna Give You Up") - Expect(err).NotTo(HaveOccurred()) - filePath := tmpFile.Name() - tmpFile.Close() - - fd, err := fileutils.Create(filePath) - Expect(err).NotTo(HaveOccurred()) - - fileBytes, err := ioutil.ReadAll(fd) - Expect(err).NotTo(HaveOccurred()) - Expect(len(fileBytes)).To(Equal(0)) - fd.Close() - }) - - It("creates a non-existing file and all intermediary directories", func() { - fd, err := ioutil.TempFile("", "create_test") - Expect(err).NotTo(HaveOccurred()) - - _, err = fd.WriteString("Never Gonna Let You Down") - Expect(err).NotTo(HaveOccurred()) - fd.Close() - - fileBytes, err := ioutil.ReadFile(fd.Name()) - Expect(err).NotTo(HaveOccurred()) - Expect(string(fileBytes)).To(Equal("Never Gonna Let You Down")) - }) - }) - - Describe("CopyPathToPath", func() { - Describe("when the source is a file", func() { - var destPath string - - BeforeEach(func() { - fd, err := ioutil.TempFile("", "copy_test") - Expect(err).NotTo(HaveOccurred()) - fd.Close() - destPath = fd.Name() - }) - - AfterEach(func() { - os.RemoveAll(destPath) - }) - - It("copies the file contents", func() { - err := fileutils.CopyPathToPath(fixturePath, destPath) - Expect(err).NotTo(HaveOccurred()) - fileBytes, err := ioutil.ReadFile(destPath) - Expect(err).NotTo(HaveOccurred()) - - fixtureBytes, err := ioutil.ReadFile(fixturePath) - Expect(err).NotTo(HaveOccurred()) - Expect(fileBytes).To(Equal(fixtureBytes)) - }) - - It("preserves the file mode", func() { - err := fileutils.CopyPathToPath(fixturePath, destPath) - Expect(err).NotTo(HaveOccurred()) - fileInfo, err := os.Stat(destPath) - Expect(err).NotTo(HaveOccurred()) - - expectedFileInfo, err := os.Stat(fixturePath) - Expect(err).NotTo(HaveOccurred()) - - Expect(fileInfo.Mode()).To(Equal(expectedFileInfo.Mode())) - }) - }) - - Describe("when the source is a directory", func() { - var dirPath, destPath string - - BeforeEach(func() { - dirPath = filepath.Join(filepath.Dir(fixturePath), "some-dir") - destPath = filepath.Join(filepath.Dir(fixturePath), "some-other-dir") - }) - - AfterEach(func() { - os.RemoveAll(destPath) - }) - - It("creates a directory at the destination path", func() { - err := fileutils.CopyPathToPath(dirPath, destPath) - Expect(err).NotTo(HaveOccurred()) - - fileInfo, err := os.Stat(destPath) - Expect(err).NotTo(HaveOccurred()) - Expect(fileInfo.IsDir()).To(BeTrue()) - }) - - It("copies all of the files from the src directory", func() { - err := fileutils.CopyPathToPath(dirPath, destPath) - Expect(err).NotTo(HaveOccurred()) - - fileInfo, err := os.Stat(path.Join(destPath, "some-file")) - Expect(err).NotTo(HaveOccurred()) - Expect(fileInfo.IsDir()).To(BeFalse()) - }) - - It("preserves the directory's mode", func() { - err := fileutils.CopyPathToPath(dirPath, destPath) - Expect(err).NotTo(HaveOccurred()) - - fileInfo, err := os.Stat(destPath) - Expect(err).NotTo(HaveOccurred()) - - expectedFileInfo, err := os.Stat(dirPath) - Expect(err).NotTo(HaveOccurred()) - - Expect(fileInfo.Mode()).To(Equal(expectedFileInfo.Mode())) - }) - }) - }) -}) diff --git a/vendor/code.cloudfoundry.org/gofileutils/fileutils/fileutils_suite_test.go b/vendor/code.cloudfoundry.org/gofileutils/fileutils/fileutils_suite_test.go deleted file mode 100644 index 44a928ba..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fileutils/fileutils_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package fileutils_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestApp(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "File Utils Suite") -} diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/some-dir/.gitkeep b/vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/some-dir/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/some-dir/some-file b/vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/some-dir/some-file deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/supervirus.zsh b/vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/supervirus.zsh deleted file mode 100755 index 0ab0fad7..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fixtures/fileutils/supervirus.zsh +++ /dev/null @@ -1 +0,0 @@ -just kidding diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/some.config b/vendor/code.cloudfoundry.org/gofileutils/fixtures/some.config deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stderr.log b/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stderr.log deleted file mode 100644 index 2323b0f6..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stderr.log +++ /dev/null @@ -1 +0,0 @@ -this is app stderr diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stdout.log b/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stdout.log deleted file mode 100644 index dd665cf0..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/app.stdout.log +++ /dev/null @@ -1 +0,0 @@ -this is app stdout diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/more_logs/more.stdout.log b/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/more_logs/more.stdout.log deleted file mode 100644 index 44a9548f..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/more_logs/more.stdout.log +++ /dev/null @@ -1 +0,0 @@ -this is more stdout diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stderr.log b/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stderr.log deleted file mode 100644 index 2f785c1a..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stderr.log +++ /dev/null @@ -1 +0,0 @@ -this is other app stderr diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stdout.log b/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stdout.log deleted file mode 100644 index 8105a5a4..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/other_logs/other_app.stdout.log +++ /dev/null @@ -1 +0,0 @@ -this is other app stdout diff --git a/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep b/vendor/code.cloudfoundry.org/gofileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/code.cloudfoundry.org/gofileutils/glob/README.md b/vendor/code.cloudfoundry.org/gofileutils/glob/README.md deleted file mode 100644 index c2f05fb3..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/glob/README.md +++ /dev/null @@ -1,26 +0,0 @@ -glob.go and glob_test.go forked from doozerd (https://github.com/ha/doozerd) - -LICENCE -======= - - The MIT License - - Copyright (c) 2010 Blake Mizerany, Keith Rarick - - 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/code.cloudfoundry.org/gofileutils/glob/dir.go b/vendor/code.cloudfoundry.org/gofileutils/glob/dir.go deleted file mode 100644 index 45ca14fb..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/glob/dir.go +++ /dev/null @@ -1,86 +0,0 @@ -package glob - -import ( - "errors" - "fmt" - "os" - "path" - "path/filepath" - "strings" -) - -type Dir interface { - Glob(patterns ...string) (filePaths []string, err error) -} - -type dir struct { - path string -} - -func NewDir(path string) (d Dir) { - return dir{path: path} -} - -func (d dir) Glob(patterns ...string) (filePaths []string, err error) { - for _, pattern := range patterns { - var newFiles []string - - newFiles, err = d.glob(pattern) - if err != nil { - err = wrapError(err, "Finding files matching pattern %s", pattern) - return - } - - filePaths = append(filePaths, newFiles...) - } - - return -} - -func (d dir) glob(pattern string) (files []string, err error) { - // unify path so that pattern will match files on Windows - unifiedPath := strings.TrimPrefix(filepath.ToSlash(d.path), filepath.VolumeName(d.path)) - globPattern := path.Join(unifiedPath, pattern) - - glob, err := CompileGlob(globPattern) - if err != nil { - err = wrapError(err, "Compiling glob for pattern %s", pattern) - return - } - - filepath.Walk(d.path, func(path string, info os.FileInfo, inErr error) (err error) { - path = strings.TrimPrefix(filepath.ToSlash(path), filepath.VolumeName(path)) - - if inErr != nil { - err = inErr - return - } - - if glob.Match(path) { - files = append(files, strings.Replace(path, unifiedPath+"/", "", 1)) - } - - return - }) - - // Ruby Dir.glob will include *.log when looking for **/*.log - // Our glob implementation will not do it automatically - if strings.Contains(pattern, "**/*") { - var extraFiles []string - - updatedPattern := strings.Replace(pattern, "**/*", "*", 1) - extraFiles, err = d.glob(updatedPattern) - if err != nil { - err = wrapError(err, "Recursing into pattern %s", updatedPattern) - return - } - - files = append(files, extraFiles...) - } - return -} - -func wrapError(err error, msg string, args ...interface{}) (newErr error) { - msg = fmt.Sprintf(msg, args...) - return errors.New(fmt.Sprintf("%s: %s", msg, err.Error())) -} diff --git a/vendor/code.cloudfoundry.org/gofileutils/glob/dir_test.go b/vendor/code.cloudfoundry.org/gofileutils/glob/dir_test.go deleted file mode 100644 index 2295e3b0..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/glob/dir_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package glob - -import ( - "os" - "path/filepath" - "testing" -) - -func TestDirGlob(t *testing.T) { - fixturesDir := globFixturesDir() - dir := NewDir(fixturesDir) - patterns := []string{"**/*.stdout.log", "*.stderr.log", "../some.config", "some_directory/**/*"} - - filePaths, err := dir.Glob(patterns...) - if err != nil { - t.Fatalf("Expected No Error but got %v", err) - return - } - - // regular files - assertPathIsIncluded(t, filePaths, "app.stdout.log") - assertPathIsIncluded(t, filePaths, "app.stderr.log") - - // file in a directory - assertPathIsIncluded(t, filePaths, "other_logs/other_app.stdout.log") - - // file in a sub directory - assertPathIsIncluded(t, filePaths, "other_logs/more_logs/more.stdout.log") - - // directories - assertPathIsIncluded(t, filePaths, "some_directory/sub_dir") - assertPathIsIncluded(t, filePaths, "some_directory/sub_dir/other_sub_dir") - - // file that is not matching filter - assertPathIsExcluded(t, filePaths, "some_directory") - assertPathIsExcluded(t, filePaths, "other_logs/other_app.stderr.log") - assertPathIsExcluded(t, filePaths, "../some.config") -} - -func globFixturesDir() string { - pwd, _ := os.Getwd() - return filepath.Join(pwd, "..", "fixtures", "test_glob") -} - -func assertPathIsIncluded(t *testing.T, filePaths []string, includedPath string) { - found := findFile(filePaths, includedPath) - - if !found { - t.Errorf("Expected to find file path `%s`", includedPath) - } -} - -func assertPathIsExcluded(t *testing.T, filePaths []string, excludedPath string) { - found := findFile(filePaths, excludedPath) - - if found { - t.Errorf("Expected to NOT find file path `%s`", excludedPath) - } -} - -func findFile(filePaths []string, expectedPath string) bool { - for _, filePath := range filePaths { - if filePath == expectedPath { - return true - } - } - return false -} diff --git a/vendor/code.cloudfoundry.org/gofileutils/glob/glob.go b/vendor/code.cloudfoundry.org/gofileutils/glob/glob.go deleted file mode 100644 index b9fc6f8b..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/glob/glob.go +++ /dev/null @@ -1,100 +0,0 @@ -package glob - -import ( - "regexp" - "strings" -) - -// Glob holds a Unix-style glob pattern in a compiled form for efficient -// matching against paths. -// -// Glob notation: -// - `?` matches a single char in a single path component -// - `*` matches zero or more chars in a single path component -// - `**` matches zero or more chars in zero or more components -// - any other sequence matches itself -type Glob struct { - Pattern string // original glob pattern - s string // translated to regexp pattern - r *regexp.Regexp // compiled regexp -} - -var charPat = "[^/\\[\\]\\(\\)]" -var globRe = mustBuildRe(`(` + charPat + `|[\*\?])`) - -func mustBuildRe(p string) *regexp.Regexp { - return regexp.MustCompile(`^/$|^(/` + p + `+)+$`) -} - -// Supports unix/ruby-style glob patterns: -// - `?` matches a single char in a single path component -// - `*` matches zero or more chars in a single path component -// - `**` matches zero or more chars in zero or more components -func translateGlob(pat string) (string, error) { - if !globRe.MatchString(pat) { - return "", GlobError(pat) - } - - outs := make([]string, len(pat)) - i, double := 0, false - for _, c := range pat { - switch c { - default: - outs[i] = string(c) - double = false - case '.', '+', '-', '^', '$', '[', ']', '(', ')': - outs[i] = `\` + string(c) - double = false - case '?': - outs[i] = `[^/]` - double = false - case '*': - if double { - outs[i-1] = `.*` - } else { - outs[i] = `[^/]*` - } - double = !double - } - i++ - } - outs = outs[0:i] - - return "^" + strings.Join(outs, "") + "$", nil -} - -// CompileGlob translates pat into a form more convenient for -// matching against paths in the store. -func CompileGlob(pat string) (*Glob, error) { - s, err := translateGlob(pat) - if err != nil { - return nil, err - } - - r, err := regexp.Compile(s) - if err != nil { - return nil, err - } - - return &Glob{pat, s, r}, nil -} - -// MustCompileGlob is like CompileGlob, but it panics if an error occurs, -// simplifying safe initialization of global variables holding glob patterns. -func MustCompileGlob(pat string) *Glob { - g, err := CompileGlob(pat) - if err != nil { - panic(err) - } - return g -} - -func (g *Glob) Match(path string) bool { - return g.r.MatchString(path) -} - -type GlobError string - -func (e GlobError) Error() string { - return "invalid glob pattern: " + string(e) -} diff --git a/vendor/code.cloudfoundry.org/gofileutils/glob/glob_test.go b/vendor/code.cloudfoundry.org/gofileutils/glob/glob_test.go deleted file mode 100644 index bd74b09f..00000000 --- a/vendor/code.cloudfoundry.org/gofileutils/glob/glob_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package glob - -import ( - "testing" -) - -var globs = [][]string{ - {"/", `^/$`}, - {"/a", `^/a$`}, - {"/a.b", `^/a\.b$`}, - {"/a-b", `^/a\-b$`}, - {"/a?", `^/a[^/]$`}, - {"/a/b", `^/a/b$`}, - {"/*", `^/[^/]*$`}, - {"/*/a", `^/[^/]*/a$`}, - {"/*a/b", `^/[^/]*a/b$`}, - {"/a*/b", `^/a[^/]*/b$`}, - {"/a*a/b", `^/a[^/]*a/b$`}, - {"/*a*/b", `^/[^/]*a[^/]*/b$`}, - {"/**", `^/.*$`}, - {"/**/a", `^/.*/a$`}, -} - -var matches = [][]string{ - {"/a/b", "/a/b"}, - {"/a?", "/ab", "/ac"}, - {"/a*", "/a", "/ab", "/abc"}, - {"/a**", "/a", "/ab", "/abc", "/a/", "/a/b", "/ab/c"}, -} - -var nonMatches = [][]string{ - {"/a/b", "/a/c", "/a/", "/a/b/", "/a/bc"}, - {"/a?", "/", "/abc", "/a", "/a/"}, - {"/a*", "/", "/a/", "/ba"}, - {"/a**", "/", "/ba"}, -} - -var dontCompile = []string{ - "", - "a", - "a/", - "//", - "/a/", - "/a[b", - "/a]b", - "/a(b", - "/a)b", -} - -func TestGlobTranslateOk(t *testing.T) { - for _, parts := range globs { - pat, exp := parts[0], parts[1] - got, err := translateGlob(pat) - if got != exp { - t.Errorf("expected %q, but got %q from %q", exp, got, pat) - } - if err != nil { - t.Errorf("in %q, unexpected err %v", pat, err) - } - } -} - -func TestGlobTranslateError(t *testing.T) { - for _, pat := range dontCompile { - re, err := translateGlob(pat) - if err == nil { - t.Errorf("pat %q shouldn't translate, but got %q", pat, re) - continue - } - - glob, err := CompileGlob(pat) - if err == nil { - t.Errorf("pat %q shouldn't compile, but got %#v", pat, glob) - } - } -} - -func TestGlobMatches(t *testing.T) { - for _, parts := range matches { - pat, paths := parts[0], parts[1:] - glob, err := CompileGlob(pat) - if err != nil { - t.Fatalf("Expected no error but got %v", err) - return - } - - for _, path := range paths { - if !glob.Match(path) { - t.Errorf("pat %q should match %q", pat, path) - } - } - } -} - -func TestGlobNonMatches(t *testing.T) { - for _, parts := range nonMatches { - pat, paths := parts[0], parts[1:] - glob, err := CompileGlob(pat) - if err != nil { - t.Fatalf("Expected no error but got %v", err) - return - } - - for _, path := range paths { - if glob.Match(path) { - t.Errorf("pat %q should not match %q", pat, path) - } - } - } -} diff --git a/vendor/code.cloudfoundry.org/lager/chug/chug.go b/vendor/code.cloudfoundry.org/lager/chug/chug.go deleted file mode 100644 index 80672fbc..00000000 --- a/vendor/code.cloudfoundry.org/lager/chug/chug.go +++ /dev/null @@ -1,130 +0,0 @@ -package chug - -import ( - "bufio" - "bytes" - "encoding/json" - "errors" - "io" - "strconv" - "strings" - "time" - - "code.cloudfoundry.org/lager" -) - -type Entry struct { - IsLager bool - Raw []byte - Log LogEntry -} - -type LogEntry struct { - Timestamp time.Time - LogLevel lager.LogLevel - - Source string - Message string - Session string - - Error error - Trace string - - Data lager.Data -} - -func Chug(reader io.Reader, out chan<- Entry) { - scanner := bufio.NewReader(reader) - for { - line, err := scanner.ReadBytes('\n') - if line != nil { - out <- entry(bytes.TrimSuffix(line, []byte{'\n'})) - } - if err != nil { - break - } - } - close(out) -} - -func entry(raw []byte) (entry Entry) { - copiedBytes := make([]byte, len(raw)) - copy(copiedBytes, raw) - entry = Entry{ - IsLager: false, - Raw: copiedBytes, - } - - rawString := string(raw) - idx := strings.Index(rawString, "{") - if idx == -1 { - return - } - - var lagerLog lager.LogFormat - decoder := json.NewDecoder(strings.NewReader(rawString[idx:])) - err := decoder.Decode(&lagerLog) - if err != nil { - return - } - - entry.Log, entry.IsLager = convertLagerLog(lagerLog) - - return -} - -func convertLagerLog(lagerLog lager.LogFormat) (LogEntry, bool) { - timestamp, err := strconv.ParseFloat(lagerLog.Timestamp, 64) - - if err != nil { - return LogEntry{}, false - } - - data := lagerLog.Data - - var logErr error - if lagerLog.LogLevel == lager.ERROR || lagerLog.LogLevel == lager.FATAL { - dataErr, ok := lagerLog.Data["error"] - if ok { - errorString, ok := dataErr.(string) - if !ok { - return LogEntry{}, false - } - logErr = errors.New(errorString) - delete(lagerLog.Data, "error") - } - } - - var logTrace string - dataTrace, ok := lagerLog.Data["trace"] - if ok { - logTrace, ok = dataTrace.(string) - if !ok { - return LogEntry{}, false - } - delete(lagerLog.Data, "trace") - } - - var logSession string - dataSession, ok := lagerLog.Data["session"] - if ok { - logSession, ok = dataSession.(string) - if !ok { - return LogEntry{}, false - } - delete(lagerLog.Data, "session") - } - - return LogEntry{ - Timestamp: time.Unix(0, int64(timestamp*1e9)), - LogLevel: lagerLog.LogLevel, - Source: lagerLog.Source, - Message: lagerLog.Message, - Session: logSession, - - Error: logErr, - Trace: logTrace, - - Data: data, - }, true -} diff --git a/vendor/code.cloudfoundry.org/lager/chug/chug_suite_test.go b/vendor/code.cloudfoundry.org/lager/chug/chug_suite_test.go deleted file mode 100644 index 46cc34c2..00000000 --- a/vendor/code.cloudfoundry.org/lager/chug/chug_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package chug_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestChug(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Chug Suite") -} diff --git a/vendor/code.cloudfoundry.org/lager/chug/chug_test.go b/vendor/code.cloudfoundry.org/lager/chug/chug_test.go deleted file mode 100644 index 7c262316..00000000 --- a/vendor/code.cloudfoundry.org/lager/chug/chug_test.go +++ /dev/null @@ -1,247 +0,0 @@ -package chug_test - -import ( - "errors" - "io" - "time" - - "code.cloudfoundry.org/lager" - . "code.cloudfoundry.org/lager/chug" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Chug", func() { - var ( - logger lager.Logger - stream chan Entry - pipeReader *io.PipeReader - pipeWriter *io.PipeWriter - ) - - BeforeEach(func() { - pipeReader, pipeWriter = io.Pipe() - logger = lager.NewLogger("chug-test") - logger.RegisterSink(lager.NewWriterSink(pipeWriter, lager.DEBUG)) - stream = make(chan Entry, 100) - go Chug(pipeReader, stream) - }) - - AfterEach(func() { - pipeWriter.Close() - Eventually(stream).Should(BeClosed()) - }) - - Context("when fed a stream of well-formed lager messages", func() { - It("should return parsed lager messages", func() { - data := lager.Data{"some-float": 3.0, "some-string": "foo"} - logger.Debug("chug", data) - logger.Info("again", data) - - entry := <-stream - Expect(entry.IsLager).To(BeTrue()) - Expect(entry.Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.DEBUG, - Source: "chug-test", - Message: "chug-test.chug", - Data: data, - })) - - entry = <-stream - Expect(entry.IsLager).To(BeTrue()) - Expect(entry.Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.INFO, - Source: "chug-test", - Message: "chug-test.again", - Data: data, - })) - - }) - - It("should parse the timestamp", func() { - logger.Debug("chug") - entry := <-stream - Expect(entry.Log.Timestamp).To(BeTemporally("~", time.Now(), 10*time.Millisecond)) - }) - - Context("when parsing an error message", func() { - It("should include the error", func() { - data := lager.Data{"some-float": 3.0, "some-string": "foo"} - logger.Error("chug", errors.New("some-error"), data) - Expect((<-stream).Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.ERROR, - Source: "chug-test", - Message: "chug-test.chug", - Error: errors.New("some-error"), - Data: lager.Data{"some-float": 3.0, "some-string": "foo"}, - })) - - }) - }) - - Context("when parsing an info message with an error", func() { - It("should not take the error out of the data map", func() { - data := lager.Data{"some-float": 3.0, "some-string": "foo", "error": "some-error"} - logger.Info("chug", data) - Expect((<-stream).Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.INFO, - Source: "chug-test", - Message: "chug-test.chug", - Error: nil, - Data: lager.Data{"some-float": 3.0, "some-string": "foo", "error": "some-error"}, - })) - - }) - }) - - Context("when multiple sessions have been established", func() { - It("should build up the task array appropriately", func() { - firstSession := logger.Session("first-session") - firstSession.Info("encabulate") - nestedSession := firstSession.Session("nested-session-1") - nestedSession.Info("baconize") - firstSession.Info("remodulate") - nestedSession.Info("ergonomize") - nestedSession = firstSession.Session("nested-session-2") - nestedSession.Info("modernify") - - Expect((<-stream).Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.INFO, - Source: "chug-test", - Message: "chug-test.first-session.encabulate", - Session: "1", - Data: lager.Data{}, - })) - - Expect((<-stream).Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.INFO, - Source: "chug-test", - Message: "chug-test.first-session.nested-session-1.baconize", - Session: "1.1", - Data: lager.Data{}, - })) - - Expect((<-stream).Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.INFO, - Source: "chug-test", - Message: "chug-test.first-session.remodulate", - Session: "1", - Data: lager.Data{}, - })) - - Expect((<-stream).Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.INFO, - Source: "chug-test", - Message: "chug-test.first-session.nested-session-1.ergonomize", - Session: "1.1", - Data: lager.Data{}, - })) - - Expect((<-stream).Log).To(MatchLogEntry(LogEntry{ - LogLevel: lager.INFO, - Source: "chug-test", - Message: "chug-test.first-session.nested-session-2.modernify", - Session: "1.2", - Data: lager.Data{}, - })) - - }) - }) - }) - - Context("handling lager JSON that is surrounded by non-JSON", func() { - var input []byte - var entry Entry - - BeforeEach(func() { - input = []byte(`[some-component][e]{"timestamp":"1407102779.028711081","source":"chug-test","message":"chug-test.chug","log_level":0,"data":{"some-float":3,"some-string":"foo"}}...some trailing stuff`) - pipeWriter.Write(input) - pipeWriter.Write([]byte("\n")) - - Eventually(stream).Should(Receive(&entry)) - }) - - It("should be a lager message", func() { - Expect(entry.IsLager).To(BeTrue()) - }) - - It("should contain all the data in Raw", func() { - Expect(entry.Raw).To(Equal(input)) - }) - - It("should succesfully parse the lager message", func() { - Expect(entry.Log.Source).To(Equal("chug-test")) - }) - }) - - Context("handling malformed/non-lager data", func() { - var input []byte - var entry Entry - - JustBeforeEach(func() { - pipeWriter.Write(input) - pipeWriter.Write([]byte("\n")) - - Eventually(stream).Should(Receive(&entry)) - }) - - itReturnsRawData := func() { - It("returns raw data", func() { - Expect(entry.IsLager).To(BeFalse()) - Expect(entry.Log).To(BeZero()) - Expect(entry.Raw).To(Equal(input)) - }) - } - - Context("when fed a stream of malformed lager messages", func() { - Context("when the timestamp is invalid", func() { - BeforeEach(func() { - input = []byte(`{"timestamp":"tomorrow","source":"chug-test","message":"chug-test.chug","log_level":3,"data":{"some-float":3,"some-string":"foo","error":7}}`) - }) - - itReturnsRawData() - }) - - Context("when the error does not parse", func() { - BeforeEach(func() { - input = []byte(`{"timestamp":"1407102779.028711081","source":"chug-test","message":"chug-test.chug","log_level":3,"data":{"some-float":3,"some-string":"foo","error":7}}`) - }) - - itReturnsRawData() - }) - - Context("when the trace does not parse", func() { - BeforeEach(func() { - input = []byte(`{"timestamp":"1407102779.028711081","source":"chug-test","message":"chug-test.chug","log_level":3,"data":{"some-float":3,"some-string":"foo","trace":7}}`) - }) - - itReturnsRawData() - }) - - Context("when the session does not parse", func() { - BeforeEach(func() { - input = []byte(`{"timestamp":"1407102779.028711081","source":"chug-test","message":"chug-test.chug","log_level":3,"data":{"some-float":3,"some-string":"foo","session":7}}`) - }) - - itReturnsRawData() - }) - }) - - Context("When fed JSON that is not a lager message at all", func() { - BeforeEach(func() { - input = []byte(`{"source":"chattanooga"}`) - }) - - itReturnsRawData() - }) - - Context("When fed none-JSON that is not a lager message at all", func() { - BeforeEach(func() { - input = []byte(`ß`) - }) - - itReturnsRawData() - }) - }) -}) diff --git a/vendor/code.cloudfoundry.org/lager/chug/match_log_entry_test.go b/vendor/code.cloudfoundry.org/lager/chug/match_log_entry_test.go deleted file mode 100644 index 03d6c77b..00000000 --- a/vendor/code.cloudfoundry.org/lager/chug/match_log_entry_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package chug_test - -import ( - "fmt" - "reflect" - - "code.cloudfoundry.org/lager/chug" - "github.com/onsi/gomega/format" - "github.com/onsi/gomega/types" -) - -func MatchLogEntry(entry chug.LogEntry) types.GomegaMatcher { - return &logEntryMatcher{entry} -} - -type logEntryMatcher struct { - entry chug.LogEntry -} - -func (m *logEntryMatcher) Match(actual interface{}) (success bool, err error) { - actualEntry, ok := actual.(chug.LogEntry) - if !ok { - return false, fmt.Errorf("MatchLogEntry must be passed a chug.LogEntry. Got:\n%s", format.Object(actual, 1)) - } - - return m.entry.LogLevel == actualEntry.LogLevel && - m.entry.Source == actualEntry.Source && - m.entry.Message == actualEntry.Message && - m.entry.Session == actualEntry.Session && - reflect.DeepEqual(m.entry.Error, actualEntry.Error) && - m.entry.Trace == actualEntry.Trace && - reflect.DeepEqual(m.entry.Data, actualEntry.Data), nil -} - -func (m *logEntryMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to equal", m.entry) -} - -func (m *logEntryMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to equal", m.entry) -} diff --git a/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgo_reporter.go b/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgo_reporter.go deleted file mode 100644 index 00b7b8f1..00000000 --- a/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgo_reporter.go +++ /dev/null @@ -1,155 +0,0 @@ -package ginkgoreporter - -import ( - "fmt" - "io" - "time" - - "code.cloudfoundry.org/lager" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" -) - -type SuiteStartSummary struct { - RandomSeed int64 `json:"random_seed"` - SuiteDescription string `json:"description"` - NumberOfSpecsThatWillBeRun int `json:"num_specs"` -} - -type SuiteEndSummary struct { - SuiteDescription string `json:"description"` - Passed bool - NumberOfSpecsThatWillBeRun int `json:"num_specs"` - NumberOfPassedSpecs int `json:"num_passed"` - NumberOfFailedSpecs int `json:"num_failed"` -} - -type SpecSummary struct { - Name []string `json:"name"` - Location string `json:"location"` - State string `json:"state"` - Passed bool `json:"passed"` - RunTime time.Duration `json:"run_time"` - - StackTrace string `json:"stack_trace,omitempty"` -} - -type SetupSummary struct { - Name string `json:"name"` - State string `json:"state"` - Passed bool `json:"passed"` - RunTime time.Duration `json:"run_time,omitempty"` - - StackTrace string `json:"stack_trace,omitempty"` -} - -func New(writer io.Writer) *GinkgoReporter { - logger := lager.NewLogger("ginkgo") - logger.RegisterSink(lager.NewWriterSink(writer, lager.DEBUG)) - return &GinkgoReporter{ - writer: writer, - logger: logger, - } -} - -type GinkgoReporter struct { - logger lager.Logger - writer io.Writer - session lager.Logger -} - -func (g *GinkgoReporter) wrappedWithNewlines(f func()) { - g.writer.Write([]byte("\n")) - f() - g.writer.Write([]byte("\n")) -} - -func (g *GinkgoReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) { - if config.ParallelTotal > 1 { - var session = g.logger - for i := 0; i < config.ParallelNode; i++ { - session = g.logger.Session(fmt.Sprintf("node-%d", i+1)) - } - g.logger = session - } -} - -func (g *GinkgoReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { -} - -func (g *GinkgoReporter) SpecWillRun(specSummary *types.SpecSummary) { - g.wrappedWithNewlines(func() { - g.session = g.logger.Session("spec") - g.session.Info("start", lager.Data{ - "summary": SpecSummary{ - Name: specSummary.ComponentTexts, - Location: specSummary.ComponentCodeLocations[len(specSummary.ComponentTexts)-1].String(), - }, - }) - }) -} - -func (g *GinkgoReporter) SpecDidComplete(specSummary *types.SpecSummary) { - g.wrappedWithNewlines(func() { - if g.session == nil { - return - } - summary := SpecSummary{ - Name: specSummary.ComponentTexts, - Location: specSummary.ComponentCodeLocations[len(specSummary.ComponentTexts)-1].String(), - State: stateAsString(specSummary.State), - Passed: passed(specSummary.State), - RunTime: specSummary.RunTime, - } - - if passed(specSummary.State) { - g.session.Info("end", lager.Data{ - "summary": summary, - }) - } else { - summary.StackTrace = specSummary.Failure.Location.FullStackTrace - g.session.Error("end", errorForFailure(specSummary.Failure), lager.Data{ - "summary": summary, - }) - } - g.session = nil - }) -} - -func (g *GinkgoReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) { -} - -func (g *GinkgoReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { -} - -func stateAsString(state types.SpecState) string { - switch state { - case types.SpecStatePending: - return "PENDING" - case types.SpecStateSkipped: - return "SKIPPED" - case types.SpecStatePassed: - return "PASSED" - case types.SpecStateFailed: - return "FAILED" - case types.SpecStatePanicked: - return "PANICKED" - case types.SpecStateTimedOut: - return "TIMED OUT" - default: - return "INVALID" - } -} - -func passed(state types.SpecState) bool { - return !(state == types.SpecStateFailed || state == types.SpecStatePanicked || state == types.SpecStateTimedOut) -} - -func errorForFailure(failure types.SpecFailure) error { - message := failure.Message - if failure.ForwardedPanic != "" { - message += fmt.Sprintf("%s", failure.ForwardedPanic) - } - - return fmt.Errorf("%s\n%s", message, failure.Location.String()) -} diff --git a/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_suite_test.go b/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_suite_test.go deleted file mode 100644 index fa079140..00000000 --- a/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package ginkgoreporter_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestGinkgoReporter(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "GinkgoReporter Suite") -} diff --git a/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_test.go b/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_test.go deleted file mode 100644 index 49cde073..00000000 --- a/vendor/code.cloudfoundry.org/lager/ginkgoreporter/ginkgoreporter_test.go +++ /dev/null @@ -1,185 +0,0 @@ -package ginkgoreporter_test - -import ( - "bytes" - "encoding/json" - "time" - - "code.cloudfoundry.org/lager" - "code.cloudfoundry.org/lager/chug" - . "code.cloudfoundry.org/lager/ginkgoreporter" - - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" -) - -var _ = Describe("Ginkgoreporter", func() { - var ( - reporter reporters.Reporter - buffer *bytes.Buffer - ) - - BeforeEach(func() { - buffer = &bytes.Buffer{} - reporter = New(buffer) - }) - - fetchLogs := func() []chug.LogEntry { - out := make(chan chug.Entry, 1000) - chug.Chug(buffer, out) - logs := []chug.LogEntry{} - for entry := range out { - if entry.IsLager { - logs = append(logs, entry.Log) - } - } - return logs - } - - jsonRoundTrip := func(object interface{}) interface{} { - jsonEncoded, err := json.Marshal(object) - Expect(err).NotTo(HaveOccurred()) - var out interface{} - err = json.Unmarshal(jsonEncoded, &out) - Expect(err).NotTo(HaveOccurred()) - return out - } - - Describe("Announcing specs", func() { - var summary *types.SpecSummary - BeforeEach(func() { - summary = &types.SpecSummary{ - ComponentTexts: []string{"A", "B"}, - ComponentCodeLocations: []types.CodeLocation{ - { - FileName: "file/a", - LineNumber: 3, - FullStackTrace: "some-stack-trace", - }, - { - FileName: "file/b", - LineNumber: 4, - FullStackTrace: "some-stack-trace", - }, - }, - RunTime: time.Minute, - State: types.SpecStatePassed, - } - }) - - Context("when running in parallel", func() { - It("should include the node # in the session and message", func() { - configType := config.GinkgoConfigType{ - ParallelTotal: 3, - ParallelNode: 2, - } - suiteSummary := &types.SuiteSummary{} - reporter.SpecSuiteWillBegin(configType, suiteSummary) - - reporter.SpecWillRun(summary) - reporter.SpecDidComplete(summary) - reporter.SpecWillRun(summary) - reporter.SpecDidComplete(summary) - - logs := fetchLogs() - Expect(logs[0].Session).To(Equal("2.1")) - Expect(logs[0].Message).To(Equal("ginkgo.node-2.spec.start")) - Expect(logs[1].Session).To(Equal("2.1")) - Expect(logs[1].Message).To(Equal("ginkgo.node-2.spec.end")) - Expect(logs[2].Session).To(Equal("2.2")) - Expect(logs[0].Message).To(Equal("ginkgo.node-2.spec.start")) - Expect(logs[3].Session).To(Equal("2.2")) - Expect(logs[1].Message).To(Equal("ginkgo.node-2.spec.end")) - }) - }) - - Describe("incrementing sessions", func() { - It("should increment the session counter as specs run", func() { - reporter.SpecWillRun(summary) - reporter.SpecDidComplete(summary) - reporter.SpecWillRun(summary) - reporter.SpecDidComplete(summary) - - logs := fetchLogs() - Expect(logs[0].Session).To(Equal("1")) - Expect(logs[1].Session).To(Equal("1")) - Expect(logs[2].Session).To(Equal("2")) - Expect(logs[3].Session).To(Equal("2")) - }) - }) - - Context("when a spec starts", func() { - BeforeEach(func() { - reporter.SpecWillRun(summary) - }) - - It("should log about the spec starting", func() { - log := fetchLogs()[0] - Expect(log.LogLevel).To(Equal(lager.INFO)) - Expect(log.Source).To(Equal("ginkgo")) - Expect(log.Message).To(Equal("ginkgo.spec.start")) - Expect(log.Session).To(Equal("1")) - Expect(log.Data["summary"]).To(Equal(jsonRoundTrip(SpecSummary{ - Name: []string{"A", "B"}, - Location: "file/b:4", - }))) - - }) - - Context("when the spec succeeds", func() { - It("should info", func() { - reporter.SpecDidComplete(summary) - log := fetchLogs()[1] - Expect(log.LogLevel).To(Equal(lager.INFO)) - Expect(log.Source).To(Equal("ginkgo")) - Expect(log.Message).To(Equal("ginkgo.spec.end")) - Expect(log.Session).To(Equal("1")) - Expect(log.Data["summary"]).To(Equal(jsonRoundTrip(SpecSummary{ - Name: []string{"A", "B"}, - Location: "file/b:4", - State: "PASSED", - Passed: true, - RunTime: time.Minute, - }))) - - }) - }) - - Context("when the spec fails", func() { - BeforeEach(func() { - summary.State = types.SpecStateFailed - summary.Failure = types.SpecFailure{ - Message: "something failed!", - Location: types.CodeLocation{ - FileName: "some/file", - LineNumber: 3, - FullStackTrace: "some-stack-trace", - }, - } - }) - - It("should error", func() { - reporter.SpecDidComplete(summary) - log := fetchLogs()[1] - Expect(log.LogLevel).To(Equal(lager.ERROR)) - Expect(log.Source).To(Equal("ginkgo")) - Expect(log.Message).To(Equal("ginkgo.spec.end")) - Expect(log.Session).To(Equal("1")) - Expect(log.Error.Error()).To(Equal("something failed!\nsome/file:3")) - Expect(log.Data["summary"]).To(Equal(jsonRoundTrip(SpecSummary{ - Name: []string{"A", "B"}, - Location: "file/b:4", - State: "FAILED", - Passed: false, - RunTime: time.Minute, - StackTrace: "some-stack-trace", - }))) - - }) - }) - }) - }) -}) diff --git a/vendor/code.cloudfoundry.org/lager/lager_suite_test.go b/vendor/code.cloudfoundry.org/lager/lager_suite_test.go deleted file mode 100644 index b7670a7f..00000000 --- a/vendor/code.cloudfoundry.org/lager/lager_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package lager_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestLager(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Lager Suite") -} diff --git a/vendor/code.cloudfoundry.org/lager/lagerflags/NOTICE b/vendor/code.cloudfoundry.org/lager/lagerflags/NOTICE deleted file mode 100644 index b85f83fc..00000000 --- a/vendor/code.cloudfoundry.org/lager/lagerflags/NOTICE +++ /dev/null @@ -1,15 +0,0 @@ -CF Lager - -Copyright (c) 2014-Present CloudFoundry.org Foundation, Inc. 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. diff --git a/vendor/code.cloudfoundry.org/lager/lagerflags/README.md b/vendor/code.cloudfoundry.org/lager/lagerflags/README.md deleted file mode 100644 index cc081ba2..00000000 --- a/vendor/code.cloudfoundry.org/lager/lagerflags/README.md +++ /dev/null @@ -1,56 +0,0 @@ -lagerflags -======== - -**Note**: This repository should be imported as `code.cloudfoundry.org/lager/lagerflags`. - -This library provides a flag called `logLevel`. The logger returned by -`lagerflags.New()` will use the value of that flag to determine the log level. - -To use, simply import this package in your `main.go` and call `lagerflags.New(COMPONENT_NAME)` to get a logger. - -For example: - -```golang -package main - -import ( - "flag" - "fmt" - - "github.com/cloudfoundry/lager/lagerflags" - "github.com/cloudfoundry/lager" -) - -func main() { - lagerflags.AddFlags(flag.CommandLine) - - flag.Parse() - - logger, reconfigurableSink := lagerflags.New("my-component") - logger.Info("starting") - - // Display the current minimum log level - fmt.Printf("Current log level is ") - switch reconfigurableSink.GetMinLevel() { - case lager.DEBUG: - fmt.Println("debug") - case lager.INFO: - fmt.Println("info") - case lager.ERROR: - fmt.Println("error") - case lager.FATAL: - fmt.Println("fatal") - } - - // Change the minimum log level dynamically - reconfigurableSink.SetMinLevel(lager.ERROR) - logger.Debug("will-not-log") -} -``` - -Running the program above as `go run main.go --logLevel debug` will generate the following output: - -``` -{"timestamp":"1464388983.540486336","source":"my-component","message":"my-component.starting","log_level":1,"data":{}} -Current log level is debug -``` diff --git a/vendor/code.cloudfoundry.org/lager/lagerflags/integration/integration_suite_test.go b/vendor/code.cloudfoundry.org/lager/lagerflags/integration/integration_suite_test.go deleted file mode 100644 index bc28aeb3..00000000 --- a/vendor/code.cloudfoundry.org/lager/lagerflags/integration/integration_suite_test.go +++ /dev/null @@ -1,67 +0,0 @@ -package main_test - -import ( - "os/exec" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" - - "testing" -) - -var testBinary string - -func TestIntegration(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Integration Suite") -} - -var _ = BeforeSuite(func() { - var err error - testBinary, err = gexec.Build("code.cloudfoundry.org/lager/lagerflags/integration", "-race") - Expect(err).NotTo(HaveOccurred()) -}) - -var _ = AfterSuite(func() { - gexec.CleanupBuildArtifacts() -}) - -var _ = Describe("CF-Lager", func() { - It("provides flags", func() { - session, err := gexec.Start(exec.Command(testBinary, "--help"), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - Expect(session.Err.Contents()).To(ContainSubstring("-logLevel")) - }) - - It("pipes output to stdout", func() { - session, err := gexec.Start(exec.Command(testBinary), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - - Expect(session.Out.Contents()).To(ContainSubstring("info")) - }) - - It("defaults to the info log level", func() { - session, err := gexec.Start(exec.Command(testBinary), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - - Expect(session.Out.Contents()).NotTo(ContainSubstring("debug")) - Expect(session.Out.Contents()).To(ContainSubstring("info")) - Expect(session.Out.Contents()).To(ContainSubstring("error")) - Expect(session.Out.Contents()).To(ContainSubstring("fatal")) - }) - - It("honors the passed-in log level", func() { - session, err := gexec.Start(exec.Command(testBinary, "-logLevel=debug"), GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait() - - Expect(session.Out.Contents()).To(ContainSubstring("debug")) - Expect(session.Out.Contents()).To(ContainSubstring("info")) - Expect(session.Out.Contents()).To(ContainSubstring("error")) - Expect(session.Out.Contents()).To(ContainSubstring("fatal")) - }) -}) diff --git a/vendor/code.cloudfoundry.org/lager/lagerflags/integration/main.go b/vendor/code.cloudfoundry.org/lager/lagerflags/integration/main.go deleted file mode 100644 index 22896ec4..00000000 --- a/vendor/code.cloudfoundry.org/lager/lagerflags/integration/main.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "errors" - "flag" - - "code.cloudfoundry.org/lager" - "code.cloudfoundry.org/lager/lagerflags" -) - -func main() { - lagerflags.AddFlags(flag.CommandLine) - flag.Parse() - - logger, _ := lagerflags.New("cf-lager-integration") - - logger.Debug("component-does-action", lager.Data{"debug-detail": "foo"}) - logger.Info("another-component-action", lager.Data{"info-detail": "bar"}) - logger.Error("component-failed-something", errors.New("error"), lager.Data{"error-detail": "baz"}) - logger.Fatal("component-failed-badly", errors.New("fatal"), lager.Data{"fatal-detail": "quux"}) -} diff --git a/vendor/code.cloudfoundry.org/lager/lagerflags/lagerflags.go b/vendor/code.cloudfoundry.org/lager/lagerflags/lagerflags.go deleted file mode 100644 index 292bb2be..00000000 --- a/vendor/code.cloudfoundry.org/lager/lagerflags/lagerflags.go +++ /dev/null @@ -1,50 +0,0 @@ -package lagerflags - -import ( - "flag" - "fmt" - "os" - - "code.cloudfoundry.org/lager" -) - -const ( - DEBUG = "debug" - INFO = "info" - ERROR = "error" - FATAL = "fatal" -) - -var minLogLevel string - -func AddFlags(flagSet *flag.FlagSet) { - flagSet.StringVar( - &minLogLevel, - "logLevel", - string(INFO), - "log level: debug, info, error or fatal", - ) -} - -func New(component string) (lager.Logger, *lager.ReconfigurableSink) { - var minLagerLogLevel lager.LogLevel - switch minLogLevel { - case DEBUG: - minLagerLogLevel = lager.DEBUG - case INFO: - minLagerLogLevel = lager.INFO - case ERROR: - minLagerLogLevel = lager.ERROR - case FATAL: - minLagerLogLevel = lager.FATAL - default: - panic(fmt.Errorf("unknown log level: %s", minLogLevel)) - } - - logger := lager.NewLogger(component) - - sink := lager.NewReconfigurableSink(lager.NewWriterSink(os.Stdout, lager.DEBUG), minLagerLogLevel) - logger.RegisterSink(sink) - - return logger, sink -} diff --git a/vendor/code.cloudfoundry.org/lager/lagertest/test_sink.go b/vendor/code.cloudfoundry.org/lager/lagertest/test_sink.go deleted file mode 100644 index 79782ab0..00000000 --- a/vendor/code.cloudfoundry.org/lager/lagertest/test_sink.go +++ /dev/null @@ -1,71 +0,0 @@ -package lagertest - -import ( - "bytes" - "encoding/json" - "io" - - "github.com/onsi/ginkgo" - "github.com/onsi/gomega/gbytes" - - "code.cloudfoundry.org/lager" -) - -type TestLogger struct { - lager.Logger - *TestSink -} - -type TestSink struct { - lager.Sink - buffer *gbytes.Buffer -} - -func NewTestLogger(component string) *TestLogger { - logger := lager.NewLogger(component) - - testSink := NewTestSink() - logger.RegisterSink(testSink) - logger.RegisterSink(lager.NewWriterSink(ginkgo.GinkgoWriter, lager.DEBUG)) - - return &TestLogger{logger, testSink} -} - -func NewTestSink() *TestSink { - buffer := gbytes.NewBuffer() - - return &TestSink{ - Sink: lager.NewWriterSink(buffer, lager.DEBUG), - buffer: buffer, - } -} - -func (s *TestSink) Buffer() *gbytes.Buffer { - return s.buffer -} - -func (s *TestSink) Logs() []lager.LogFormat { - logs := []lager.LogFormat{} - - decoder := json.NewDecoder(bytes.NewBuffer(s.buffer.Contents())) - for { - var log lager.LogFormat - if err := decoder.Decode(&log); err == io.EOF { - return logs - } else if err != nil { - panic(err) - } - logs = append(logs, log) - } - - return logs -} - -func (s *TestSink) LogMessages() []string { - logs := s.Logs() - messages := make([]string, 0, len(logs)) - for _, log := range logs { - messages = append(messages, log.Message) - } - return messages -} diff --git a/vendor/code.cloudfoundry.org/lager/logger_test.go b/vendor/code.cloudfoundry.org/lager/logger_test.go deleted file mode 100644 index 1d7e173a..00000000 --- a/vendor/code.cloudfoundry.org/lager/logger_test.go +++ /dev/null @@ -1,358 +0,0 @@ -package lager_test - -import ( - "errors" - "fmt" - "strconv" - "time" - - "code.cloudfoundry.org/lager" - "code.cloudfoundry.org/lager/lagertest" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Logger", func() { - var logger lager.Logger - var testSink *lagertest.TestSink - - var component = "my-component" - var action = "my-action" - var logData = lager.Data{ - "foo": "bar", - "a-number": 7, - } - var anotherLogData = lager.Data{ - "baz": "quux", - "b-number": 43, - } - - BeforeEach(func() { - logger = lager.NewLogger(component) - testSink = lagertest.NewTestSink() - logger.RegisterSink(testSink) - }) - - var TestCommonLogFeatures = func(level lager.LogLevel) { - var log lager.LogFormat - - BeforeEach(func() { - log = testSink.Logs()[0] - }) - - It("writes a log to the sink", func() { - Expect(testSink.Logs()).To(HaveLen(1)) - }) - - It("records the source component", func() { - Expect(log.Source).To(Equal(component)) - }) - - It("outputs a properly-formatted message", func() { - Expect(log.Message).To(Equal(fmt.Sprintf("%s.%s", component, action))) - }) - - It("has a timestamp", func() { - expectedTime := float64(time.Now().UnixNano()) / 1e9 - parsedTimestamp, err := strconv.ParseFloat(log.Timestamp, 64) - Expect(err).NotTo(HaveOccurred()) - Expect(parsedTimestamp).To(BeNumerically("~", expectedTime, 1.0)) - }) - - It("sets the proper output level", func() { - Expect(log.LogLevel).To(Equal(level)) - }) - } - - var TestLogData = func() { - var log lager.LogFormat - - BeforeEach(func() { - log = testSink.Logs()[0] - }) - - It("data contains custom user data", func() { - Expect(log.Data["foo"]).To(Equal("bar")) - Expect(log.Data["a-number"]).To(BeNumerically("==", 7)) - Expect(log.Data["baz"]).To(Equal("quux")) - Expect(log.Data["b-number"]).To(BeNumerically("==", 43)) - }) - } - - Describe("Session", func() { - var session lager.Logger - - BeforeEach(func() { - session = logger.Session("sub-action") - }) - - Describe("the returned logger", func() { - JustBeforeEach(func() { - session.Debug("some-debug-action", lager.Data{"level": "debug"}) - session.Info("some-info-action", lager.Data{"level": "info"}) - session.Error("some-error-action", errors.New("oh no!"), lager.Data{"level": "error"}) - - defer func() { - recover() - }() - - session.Fatal("some-fatal-action", errors.New("oh no!"), lager.Data{"level": "fatal"}) - }) - - It("logs with a shared session id in the data", func() { - Expect(testSink.Logs()[0].Data["session"]).To(Equal("1")) - Expect(testSink.Logs()[1].Data["session"]).To(Equal("1")) - Expect(testSink.Logs()[2].Data["session"]).To(Equal("1")) - Expect(testSink.Logs()[3].Data["session"]).To(Equal("1")) - }) - - It("logs with the task added to the message", func() { - Expect(testSink.Logs()[0].Message).To(Equal("my-component.sub-action.some-debug-action")) - Expect(testSink.Logs()[1].Message).To(Equal("my-component.sub-action.some-info-action")) - Expect(testSink.Logs()[2].Message).To(Equal("my-component.sub-action.some-error-action")) - Expect(testSink.Logs()[3].Message).To(Equal("my-component.sub-action.some-fatal-action")) - }) - - It("logs with the original data", func() { - Expect(testSink.Logs()[0].Data["level"]).To(Equal("debug")) - Expect(testSink.Logs()[1].Data["level"]).To(Equal("info")) - Expect(testSink.Logs()[2].Data["level"]).To(Equal("error")) - Expect(testSink.Logs()[3].Data["level"]).To(Equal("fatal")) - }) - - Context("with data", func() { - BeforeEach(func() { - session = logger.Session("sub-action", lager.Data{"foo": "bar"}) - }) - - It("logs with the data added to the message", func() { - Expect(testSink.Logs()[0].Data["foo"]).To(Equal("bar")) - Expect(testSink.Logs()[1].Data["foo"]).To(Equal("bar")) - Expect(testSink.Logs()[2].Data["foo"]).To(Equal("bar")) - Expect(testSink.Logs()[3].Data["foo"]).To(Equal("bar")) - }) - - It("keeps the original data", func() { - Expect(testSink.Logs()[0].Data["level"]).To(Equal("debug")) - Expect(testSink.Logs()[1].Data["level"]).To(Equal("info")) - Expect(testSink.Logs()[2].Data["level"]).To(Equal("error")) - Expect(testSink.Logs()[3].Data["level"]).To(Equal("fatal")) - }) - }) - - Context("with another session", func() { - BeforeEach(func() { - session = logger.Session("next-sub-action") - }) - - It("logs with a shared session id in the data", func() { - Expect(testSink.Logs()[0].Data["session"]).To(Equal("2")) - Expect(testSink.Logs()[1].Data["session"]).To(Equal("2")) - Expect(testSink.Logs()[2].Data["session"]).To(Equal("2")) - Expect(testSink.Logs()[3].Data["session"]).To(Equal("2")) - }) - - It("logs with the task added to the message", func() { - Expect(testSink.Logs()[0].Message).To(Equal("my-component.next-sub-action.some-debug-action")) - Expect(testSink.Logs()[1].Message).To(Equal("my-component.next-sub-action.some-info-action")) - Expect(testSink.Logs()[2].Message).To(Equal("my-component.next-sub-action.some-error-action")) - Expect(testSink.Logs()[3].Message).To(Equal("my-component.next-sub-action.some-fatal-action")) - }) - }) - - Describe("WithData", func() { - BeforeEach(func() { - session = logger.WithData(lager.Data{"foo": "bar"}) - }) - - It("returns a new logger with the given data", func() { - Expect(testSink.Logs()[0].Data["foo"]).To(Equal("bar")) - Expect(testSink.Logs()[1].Data["foo"]).To(Equal("bar")) - Expect(testSink.Logs()[2].Data["foo"]).To(Equal("bar")) - Expect(testSink.Logs()[3].Data["foo"]).To(Equal("bar")) - }) - - It("does not append to the logger's task", func() { - Expect(testSink.Logs()[0].Message).To(Equal("my-component.some-debug-action")) - }) - }) - - Context("with a nested session", func() { - BeforeEach(func() { - session = session.Session("sub-sub-action") - }) - - It("logs with a shared session id in the data", func() { - Expect(testSink.Logs()[0].Data["session"]).To(Equal("1.1")) - Expect(testSink.Logs()[1].Data["session"]).To(Equal("1.1")) - Expect(testSink.Logs()[2].Data["session"]).To(Equal("1.1")) - Expect(testSink.Logs()[3].Data["session"]).To(Equal("1.1")) - }) - - It("logs with the task added to the message", func() { - Expect(testSink.Logs()[0].Message).To(Equal("my-component.sub-action.sub-sub-action.some-debug-action")) - Expect(testSink.Logs()[1].Message).To(Equal("my-component.sub-action.sub-sub-action.some-info-action")) - Expect(testSink.Logs()[2].Message).To(Equal("my-component.sub-action.sub-sub-action.some-error-action")) - Expect(testSink.Logs()[3].Message).To(Equal("my-component.sub-action.sub-sub-action.some-fatal-action")) - }) - }) - }) - }) - - Describe("Debug", func() { - Context("with log data", func() { - BeforeEach(func() { - logger.Debug(action, logData, anotherLogData) - }) - - TestCommonLogFeatures(lager.DEBUG) - TestLogData() - }) - - Context("with no log data", func() { - BeforeEach(func() { - logger.Debug(action) - }) - - TestCommonLogFeatures(lager.DEBUG) - }) - }) - - Describe("Info", func() { - Context("with log data", func() { - BeforeEach(func() { - logger.Info(action, logData, anotherLogData) - }) - - TestCommonLogFeatures(lager.INFO) - TestLogData() - }) - - Context("with no log data", func() { - BeforeEach(func() { - logger.Info(action) - }) - - TestCommonLogFeatures(lager.INFO) - }) - }) - - Describe("Error", func() { - var err = errors.New("oh noes!") - Context("with log data", func() { - BeforeEach(func() { - logger.Error(action, err, logData, anotherLogData) - }) - - TestCommonLogFeatures(lager.ERROR) - TestLogData() - - It("data contains error message", func() { - Expect(testSink.Logs()[0].Data["error"]).To(Equal(err.Error())) - }) - }) - - Context("with no log data", func() { - BeforeEach(func() { - logger.Error(action, err) - }) - - TestCommonLogFeatures(lager.ERROR) - - It("data contains error message", func() { - Expect(testSink.Logs()[0].Data["error"]).To(Equal(err.Error())) - }) - }) - - Context("with no error", func() { - BeforeEach(func() { - logger.Error(action, nil) - }) - - TestCommonLogFeatures(lager.ERROR) - - It("does not contain the error message", func() { - Expect(testSink.Logs()[0].Data).NotTo(HaveKey("error")) - }) - }) - }) - - Describe("Fatal", func() { - var err = errors.New("oh noes!") - var fatalErr interface{} - - Context("with log data", func() { - BeforeEach(func() { - defer func() { - fatalErr = recover() - }() - - logger.Fatal(action, err, logData, anotherLogData) - }) - - TestCommonLogFeatures(lager.FATAL) - TestLogData() - - It("data contains error message", func() { - Expect(testSink.Logs()[0].Data["error"]).To(Equal(err.Error())) - }) - - It("data contains stack trace", func() { - Expect(testSink.Logs()[0].Data["trace"]).NotTo(BeEmpty()) - }) - - It("panics with the provided error", func() { - Expect(fatalErr).To(Equal(err)) - }) - }) - - Context("with no log data", func() { - BeforeEach(func() { - defer func() { - fatalErr = recover() - }() - - logger.Fatal(action, err) - }) - - TestCommonLogFeatures(lager.FATAL) - - It("data contains error message", func() { - Expect(testSink.Logs()[0].Data["error"]).To(Equal(err.Error())) - }) - - It("data contains stack trace", func() { - Expect(testSink.Logs()[0].Data["trace"]).NotTo(BeEmpty()) - }) - - It("panics with the provided error", func() { - Expect(fatalErr).To(Equal(err)) - }) - }) - - Context("with no error", func() { - BeforeEach(func() { - defer func() { - fatalErr = recover() - }() - - logger.Fatal(action, nil) - }) - - TestCommonLogFeatures(lager.FATAL) - - It("does not contain the error message", func() { - Expect(testSink.Logs()[0].Data).NotTo(HaveKey("error")) - }) - - It("data contains stack trace", func() { - Expect(testSink.Logs()[0].Data["trace"]).NotTo(BeEmpty()) - }) - - It("panics with the provided error (i.e. nil)", func() { - Expect(fatalErr).To(BeNil()) - }) - }) - }) -}) diff --git a/vendor/code.cloudfoundry.org/lager/reconfigurable_sink_test.go b/vendor/code.cloudfoundry.org/lager/reconfigurable_sink_test.go deleted file mode 100644 index 466b7370..00000000 --- a/vendor/code.cloudfoundry.org/lager/reconfigurable_sink_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package lager_test - -import ( - "code.cloudfoundry.org/lager" - "code.cloudfoundry.org/lager/lagertest" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("ReconfigurableSink", func() { - var ( - testSink *lagertest.TestSink - - sink *lager.ReconfigurableSink - ) - - BeforeEach(func() { - testSink = lagertest.NewTestSink() - - sink = lager.NewReconfigurableSink(testSink, lager.INFO) - }) - - It("returns the current level", func() { - Expect(sink.GetMinLevel()).To(Equal(lager.INFO)) - }) - - Context("when logging above the minimum log level", func() { - var log lager.LogFormat - - BeforeEach(func() { - log = lager.LogFormat{LogLevel: lager.INFO, Message: "hello world"} - sink.Log(log) - }) - - It("writes to the given sink", func() { - Expect(testSink.Buffer().Contents()).To(MatchJSON(log.ToJSON())) - }) - }) - - Context("when logging below the minimum log level", func() { - BeforeEach(func() { - sink.Log(lager.LogFormat{LogLevel: lager.DEBUG, Message: "hello world"}) - }) - - It("does not write to the given writer", func() { - Expect(testSink.Buffer().Contents()).To(BeEmpty()) - }) - }) - - Context("when reconfigured to a new log level", func() { - BeforeEach(func() { - sink.SetMinLevel(lager.DEBUG) - }) - - It("writes logs above the new log level", func() { - log := lager.LogFormat{LogLevel: lager.DEBUG, Message: "hello world"} - sink.Log(log) - Expect(testSink.Buffer().Contents()).To(MatchJSON(log.ToJSON())) - }) - - It("returns the newly updated level", func() { - Expect(sink.GetMinLevel()).To(Equal(lager.DEBUG)) - }) - }) -}) diff --git a/vendor/code.cloudfoundry.org/lager/writer_sink_test.go b/vendor/code.cloudfoundry.org/lager/writer_sink_test.go deleted file mode 100644 index ca9ba0b3..00000000 --- a/vendor/code.cloudfoundry.org/lager/writer_sink_test.go +++ /dev/null @@ -1,107 +0,0 @@ -package lager_test - -import ( - "fmt" - "runtime" - "strings" - "sync" - - "code.cloudfoundry.org/lager" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("WriterSink", func() { - const MaxThreads = 100 - - var sink lager.Sink - var writer *copyWriter - - BeforeSuite(func() { - runtime.GOMAXPROCS(MaxThreads) - }) - - BeforeEach(func() { - writer = NewCopyWriter() - sink = lager.NewWriterSink(writer, lager.INFO) - }) - - Context("when logging above the minimum log level", func() { - BeforeEach(func() { - sink.Log(lager.LogFormat{LogLevel: lager.INFO, Message: "hello world"}) - }) - - It("writes to the given writer", func() { - Expect(writer.Copy()).To(MatchJSON(`{"message":"hello world","log_level":1,"timestamp":"","source":"","data":null}`)) - }) - }) - - Context("when logging below the minimum log level", func() { - BeforeEach(func() { - sink.Log(lager.LogFormat{LogLevel: lager.DEBUG, Message: "hello world"}) - }) - - It("does not write to the given writer", func() { - Expect(writer.Copy()).To(Equal([]byte{})) - }) - }) - - Context("when logging from multiple threads", func() { - var content = "abcdefg " - - BeforeEach(func() { - wg := new(sync.WaitGroup) - for i := 0; i < MaxThreads; i++ { - wg.Add(1) - go func() { - sink.Log(lager.LogFormat{LogLevel: lager.INFO, Message: content}) - wg.Done() - }() - } - wg.Wait() - }) - - It("writes to the given writer", func() { - lines := strings.Split(string(writer.Copy()), "\n") - for _, line := range lines { - if line == "" { - continue - } - Expect(line).To(MatchJSON(fmt.Sprintf(`{"message":"%s","log_level":1,"timestamp":"","source":"","data":null}`, content))) - } - }) - }) -}) - -// copyWriter is an INTENTIONALLY UNSAFE writer. Use it to test code that -// should be handling thread safety. -type copyWriter struct { - contents []byte - lock *sync.RWMutex -} - -func NewCopyWriter() *copyWriter { - return ©Writer{ - contents: []byte{}, - lock: new(sync.RWMutex), - } -} - -// no, we really mean RLock on write. -func (writer *copyWriter) Write(p []byte) (n int, err error) { - writer.lock.RLock() - defer writer.lock.RUnlock() - - writer.contents = append(writer.contents, p...) - return len(p), nil -} - -func (writer *copyWriter) Copy() []byte { - writer.lock.Lock() - defer writer.lock.Unlock() - - contents := make([]byte, len(writer.contents)) - copy(contents, writer.contents) - return contents -} diff --git a/vendor/github.com/Masterminds/semver/benchmark_test.go b/vendor/github.com/Masterminds/semver/benchmark_test.go deleted file mode 100644 index 58a5c289..00000000 --- a/vendor/github.com/Masterminds/semver/benchmark_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package semver_test - -import ( - "testing" - - "github.com/Masterminds/semver" -) - -/* Constraint creation benchmarks */ - -func benchNewConstraint(c string, b *testing.B) { - for i := 0; i < b.N; i++ { - semver.NewConstraint(c) - } -} - -func BenchmarkNewConstraintUnary(b *testing.B) { - benchNewConstraint("=2.0", b) -} - -func BenchmarkNewConstraintTilde(b *testing.B) { - benchNewConstraint("~2.0.0", b) -} - -func BenchmarkNewConstraintCaret(b *testing.B) { - benchNewConstraint("^2.0.0", b) -} - -func BenchmarkNewConstraintWildcard(b *testing.B) { - benchNewConstraint("1.x", b) -} - -func BenchmarkNewConstraintRange(b *testing.B) { - benchNewConstraint(">=2.1.x, <3.1.0", b) -} - -func BenchmarkNewConstraintUnion(b *testing.B) { - benchNewConstraint("~2.0.0 || =3.1.0", b) -} - -/* Check benchmarks */ - -func benchCheckVersion(c, v string, b *testing.B) { - version, _ := semver.NewVersion(v) - constraint, _ := semver.NewConstraint(c) - - for i := 0; i < b.N; i++ { - constraint.Check(version) - } -} - -func BenchmarkCheckVersionUnary(b *testing.B) { - benchCheckVersion("=2.0", "2.0.0", b) -} - -func BenchmarkCheckVersionTilde(b *testing.B) { - benchCheckVersion("~2.0.0", "2.0.5", b) -} - -func BenchmarkCheckVersionCaret(b *testing.B) { - benchCheckVersion("^2.0.0", "2.1.0", b) -} - -func BenchmarkCheckVersionWildcard(b *testing.B) { - benchCheckVersion("1.x", "1.4.0", b) -} - -func BenchmarkCheckVersionRange(b *testing.B) { - benchCheckVersion(">=2.1.x, <3.1.0", "2.4.5", b) -} - -func BenchmarkCheckVersionUnion(b *testing.B) { - benchCheckVersion("~2.0.0 || =3.1.0", "3.1.0", b) -} - -func benchValidateVersion(c, v string, b *testing.B) { - version, _ := semver.NewVersion(v) - constraint, _ := semver.NewConstraint(c) - - for i := 0; i < b.N; i++ { - constraint.Validate(version) - } -} - -/* Validate benchmarks, including fails */ - -func BenchmarkValidateVersionUnary(b *testing.B) { - benchValidateVersion("=2.0", "2.0.0", b) -} - -func BenchmarkValidateVersionUnaryFail(b *testing.B) { - benchValidateVersion("=2.0", "2.0.1", b) -} - -func BenchmarkValidateVersionTilde(b *testing.B) { - benchValidateVersion("~2.0.0", "2.0.5", b) -} - -func BenchmarkValidateVersionTildeFail(b *testing.B) { - benchValidateVersion("~2.0.0", "1.0.5", b) -} - -func BenchmarkValidateVersionCaret(b *testing.B) { - benchValidateVersion("^2.0.0", "2.1.0", b) -} - -func BenchmarkValidateVersionCaretFail(b *testing.B) { - benchValidateVersion("^2.0.0", "4.1.0", b) -} - -func BenchmarkValidateVersionWildcard(b *testing.B) { - benchValidateVersion("1.x", "1.4.0", b) -} - -func BenchmarkValidateVersionWildcardFail(b *testing.B) { - benchValidateVersion("1.x", "2.4.0", b) -} - -func BenchmarkValidateVersionRange(b *testing.B) { - benchValidateVersion(">=2.1.x, <3.1.0", "2.4.5", b) -} - -func BenchmarkValidateVersionRangeFail(b *testing.B) { - benchValidateVersion(">=2.1.x, <3.1.0", "1.4.5", b) -} - -func BenchmarkValidateVersionUnion(b *testing.B) { - benchValidateVersion("~2.0.0 || =3.1.0", "3.1.0", b) -} - -func BenchmarkValidateVersionUnionFail(b *testing.B) { - benchValidateVersion("~2.0.0 || =3.1.0", "3.1.1", b) -} - -/* Version creation benchmarks */ - -func benchNewVersion(v string, b *testing.B) { - for i := 0; i < b.N; i++ { - semver.NewVersion(v) - } -} - -func BenchmarkNewVersionSimple(b *testing.B) { - benchNewVersion("1.0.0", b) -} - -func BenchmarkNewVersionPre(b *testing.B) { - benchNewVersion("1.0.0-alpha", b) -} - -func BenchmarkNewVersionMeta(b *testing.B) { - benchNewVersion("1.0.0+metadata", b) -} - -func BenchmarkNewVersionMetaDash(b *testing.B) { - benchNewVersion("1.0.0+metadata-dash", b) -} diff --git a/vendor/github.com/Masterminds/semver/collection_test.go b/vendor/github.com/Masterminds/semver/collection_test.go deleted file mode 100644 index 71b909c4..00000000 --- a/vendor/github.com/Masterminds/semver/collection_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package semver - -import ( - "reflect" - "sort" - "testing" -) - -func TestCollection(t *testing.T) { - raw := []string{ - "1.2.3", - "1.0", - "1.3", - "2", - "0.4.2", - } - - vs := make([]*Version, len(raw)) - for i, r := range raw { - v, err := NewVersion(r) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - vs[i] = v - } - - sort.Sort(Collection(vs)) - - e := []string{ - "0.4.2", - "1.0.0", - "1.2.3", - "1.3.0", - "2.0.0", - } - - a := make([]string, len(vs)) - for i, v := range vs { - a[i] = v.String() - } - - if !reflect.DeepEqual(a, e) { - t.Error("Sorting Collection failed") - } -} diff --git a/vendor/github.com/Masterminds/semver/constraints_test.go b/vendor/github.com/Masterminds/semver/constraints_test.go deleted file mode 100644 index ab78d636..00000000 --- a/vendor/github.com/Masterminds/semver/constraints_test.go +++ /dev/null @@ -1,477 +0,0 @@ -package semver - -import ( - "reflect" - "testing" -) - -func TestParseConstraint(t *testing.T) { - tests := []struct { - in string - f cfunc - v string - err bool - }{ - {">= 1.2", constraintGreaterThanEqual, "1.2.0", false}, - {"1.0", constraintTildeOrEqual, "1.0.0", false}, - {"foo", nil, "", true}, - {"<= 1.2", constraintLessThanEqual, "1.2.0", false}, - {"=< 1.2", constraintLessThanEqual, "1.2.0", false}, - {"=> 1.2", constraintGreaterThanEqual, "1.2.0", false}, - {"v1.2", constraintTildeOrEqual, "1.2.0", false}, - {"=1.5", constraintTildeOrEqual, "1.5.0", false}, - {"> 1.3", constraintGreaterThan, "1.3.0", false}, - {"< 1.4.1", constraintLessThan, "1.4.1", false}, - } - - for _, tc := range tests { - c, err := parseConstraint(tc.in) - if tc.err && err == nil { - t.Errorf("Expected error for %s didn't occur", tc.in) - } else if !tc.err && err != nil { - t.Errorf("Unexpected error for %s", tc.in) - } - - // If an error was expected continue the loop and don't try the other - // tests as they will cause errors. - if tc.err { - continue - } - - if tc.v != c.con.String() { - t.Errorf("Incorrect version found on %s", tc.in) - } - - f1 := reflect.ValueOf(tc.f) - f2 := reflect.ValueOf(c.function) - if f1 != f2 { - t.Errorf("Wrong constraint found for %s", tc.in) - } - } -} - -func TestConstraintCheck(t *testing.T) { - tests := []struct { - constraint string - version string - check bool - }{ - {"= 2.0", "1.2.3", false}, - {"= 2.0", "2.0.0", true}, - {"4.1", "4.1.0", true}, - {"!=4.1", "4.1.0", false}, - {"!=4.1", "5.1.0", true}, - {">1.1", "4.1.0", true}, - {">1.1", "1.1.0", false}, - {"<1.1", "0.1.0", true}, - {"<1.1", "1.1.0", false}, - {"<1.1", "1.1.1", false}, - {">=1.1", "4.1.0", true}, - {">=1.1", "1.1.0", true}, - {">=1.1", "0.0.9", false}, - {"<=1.1", "0.1.0", true}, - {"<=1.1", "1.1.0", true}, - {"<=1.1", "1.1.1", false}, - {">0", "0", false}, - {">0", "0.0.1-alpha", false}, - {">0.0", "0.0.1-alpha", false}, - {">0-0", "0.0.1-alpha", true}, - {">0.0-0", "0.0.1-alpha", true}, - {">0", "0.0.0-alpha", false}, - {">0-0", "0.0.0-alpha", true}, - {">=0", "0.0.1-alpha", false}, - {">=0.0", "0.0.1-alpha", false}, - {">=0-0", "0.0.1-alpha", true}, - {">=0.0-0", "0.0.1-alpha", true}, - {">=0", "0.0.0-alpha", false}, - {">=0-0", "0.0.0-alpha", true}, - {"<0", "0.0.0-alpha", false}, - {"<0-z", "0.0.0-alpha", true}, - {">=0", "0", true}, - {"=0", "1", false}, - } - - for _, tc := range tests { - c, err := parseConstraint(tc.constraint) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - v, err := NewVersion(tc.version) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - a := c.check(v) - if a != tc.check { - t.Errorf("Constraint %q failing with %q", tc.constraint, tc.version) - } - } -} - -func TestNewConstraint(t *testing.T) { - tests := []struct { - input string - ors int - count int - err bool - }{ - {">= 1.1", 1, 1, false}, - {"2.0", 1, 1, false}, - {"v2.3.5-20161202202307-sha.e8fc5e5", 1, 1, false}, - {">= bar", 0, 0, true}, - {">= 1.2.3, < 2.0", 1, 2, false}, - {">= 1.2.3, < 2.0 || => 3.0, < 4", 2, 2, false}, - - // The 3 - 4 should be broken into 2 by the range rewriting - {"3 - 4 || => 3.0, < 4", 2, 2, false}, - } - - for _, tc := range tests { - v, err := NewConstraint(tc.input) - if tc.err && err == nil { - t.Errorf("expected but did not get error for: %s", tc.input) - continue - } else if !tc.err && err != nil { - t.Errorf("unexpectederror for input %s: %s", tc.input, err) - continue - } - if tc.err { - continue - } - - l := len(v.constraints) - if tc.ors != l { - t.Errorf("Expected %s to have %d ORs but got %d", - tc.input, tc.ors, l) - } - - l = len(v.constraints[0]) - if tc.count != l { - t.Errorf("Expected %s to have %d constraints but got %d", - tc.input, tc.count, l) - } - } -} - -func TestConstraintsCheck(t *testing.T) { - tests := []struct { - constraint string - version string - check bool - }{ - {"*", "1.2.3", true}, - {"~0.0.0", "1.2.3", true}, - {"0.x.x", "1.2.3", false}, - {"0.0.x", "1.2.3", false}, - {"0.0.0", "1.2.3", false}, - {"*", "1.2.3", true}, - {"^0.0.0", "1.2.3", false}, - {"= 2.0", "1.2.3", false}, - {"= 2.0", "2.0.0", true}, - {"4.1", "4.1.0", true}, - {"4.1.x", "4.1.3", true}, - {"1.x", "1.4", true}, - {"!=4.1", "4.1.0", false}, - {"!=4.1-alpha", "4.1.0-alpha", false}, - {"!=4.1-alpha", "4.1.0", true}, - {"!=4.1", "5.1.0", true}, - {"!=4.x", "5.1.0", true}, - {"!=4.x", "4.1.0", false}, - {"!=4.1.x", "4.2.0", true}, - {"!=4.2.x", "4.2.3", false}, - {">1.1", "4.1.0", true}, - {">1.1", "1.1.0", false}, - {"<1.1", "0.1.0", true}, - {"<1.1", "1.1.0", false}, - {"<1.1", "1.1.1", false}, - {"<1.x", "1.1.1", true}, - {"<1.x", "2.0.0", false}, - {"<1.1.x", "1.2.1", false}, - {"<1.1.x", "1.1.500", true}, - {"<1.2.x", "1.1.1", true}, - {">=1.1", "4.1.0", true}, - {">=1.1", "4.1.0-beta", false}, - {">=1.1", "1.1.0", true}, - {">=1.1", "0.0.9", false}, - {"<=1.1", "0.1.0", true}, - {"<=1.1", "0.1.0-alpha", false}, - {"<=1.1-a", "0.1.0-alpha", true}, - {"<=1.1", "1.1.0", true}, - {"<=1.x", "1.1.0", true}, - {"<=2.x", "3.0.0", false}, - {"<=1.1", "1.1.1", false}, - {"<=1.1.x", "1.2.500", false}, - {">1.1, <2", "1.1.1", true}, - {">1.1, <3", "4.3.2", false}, - {">=1.1, <2, !=1.2.3", "1.2.3", false}, - {">=1.1, <2, !=1.2.3 || > 3", "3.1.2", true}, - {">=1.1, <2, !=1.2.3 || >= 3", "3.0.0", true}, - {">=1.1, <2, !=1.2.3 || > 3", "3.0.0", false}, - {">=1.1, <2, !=1.2.3 || > 3", "1.2.3", false}, - {"1.1 - 2", "1.1.1", true}, - {"1.1-3", "4.3.2", false}, - {"^1.1", "1.1.1", true}, - {"^1.1", "4.3.2", false}, - {"^1.x", "1.1.1", true}, - {"^2.x", "1.1.1", false}, - {"^1.x", "2.1.1", false}, - {"^1.x", "1.1.1-beta1", false}, - {"^1.1.2-alpha", "1.2.1-beta1", true}, - {"^1.2.x-alpha", "1.1.1-beta1", false}, - {"~*", "2.1.1", true}, - {"~1", "2.1.1", false}, - {"~1", "1.3.5", true}, - {"~1", "1.4", true}, - {"~1.x", "2.1.1", false}, - {"~1.x", "1.3.5", true}, - {"~1.x", "1.4", true}, - {"~1.1", "1.1.1", true}, - {"~1.1", "1.1.1-alpha", false}, - {"~1.1-alpha", "1.1.1-beta", true}, - {"~1.1.1-beta", "1.1.1-alpha", false}, - {"~1.1.1-beta", "1.1.1", true}, - {"~1.2.3", "1.2.5", true}, - {"~1.2.3", "1.2.2", false}, - {"~1.2.3", "1.3.2", false}, - {"~1.1", "1.2.3", false}, - {"~1.3", "2.4.5", false}, - } - - for _, tc := range tests { - c, err := NewConstraint(tc.constraint) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - v, err := NewVersion(tc.version) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - a := c.Check(v) - if a != tc.check { - t.Errorf("Constraint '%s' failing with '%s'", tc.constraint, tc.version) - } - } -} - -func TestRewriteRange(t *testing.T) { - tests := []struct { - c string - nc string - }{ - {"2 - 3", ">= 2, <= 3"}, - {"2 - 3, 2 - 3", ">= 2, <= 3,>= 2, <= 3"}, - {"2 - 3, 4.0.0 - 5.1", ">= 2, <= 3,>= 4.0.0, <= 5.1"}, - } - - for _, tc := range tests { - o := rewriteRange(tc.c) - - if o != tc.nc { - t.Errorf("Range %s rewritten incorrectly as '%s'", tc.c, o) - } - } -} - -func TestIsX(t *testing.T) { - tests := []struct { - t string - c bool - }{ - {"A", false}, - {"%", false}, - {"X", true}, - {"x", true}, - {"*", true}, - } - - for _, tc := range tests { - a := isX(tc.t) - if a != tc.c { - t.Errorf("Function isX error on %s", tc.t) - } - } -} - -func TestConstraintsValidate(t *testing.T) { - tests := []struct { - constraint string - version string - check bool - }{ - {"*", "1.2.3", true}, - {"~0.0.0", "1.2.3", true}, - {"= 2.0", "1.2.3", false}, - {"= 2.0", "2.0.0", true}, - {"4.1", "4.1.0", true}, - {"4.1.x", "4.1.3", true}, - {"1.x", "1.4", true}, - {"!=4.1", "4.1.0", false}, - {"!=4.1", "5.1.0", true}, - {"!=4.x", "5.1.0", true}, - {"!=4.x", "4.1.0", false}, - {"!=4.1.x", "4.2.0", true}, - {"!=4.2.x", "4.2.3", false}, - {">1.1", "4.1.0", true}, - {">1.1", "1.1.0", false}, - {"<1.1", "0.1.0", true}, - {"<1.1", "1.1.0", false}, - {"<1.1", "1.1.1", false}, - {"<1.x", "1.1.1", true}, - {"<1.x", "2.1.1", false}, - {"<1.1.x", "1.2.1", false}, - {"<1.1.x", "1.1.500", true}, - {"<1.2.x", "1.1.1", true}, - {">=1.1", "4.1.0", true}, - {">=1.1", "1.1.0", true}, - {">=1.1", "0.0.9", false}, - {"<=1.1", "0.1.0", true}, - {"<=1.1", "1.1.0", true}, - {"<=1.x", "1.1.0", true}, - {"<=2.x", "3.1.0", false}, - {"<=1.1", "1.1.1", false}, - {"<=1.1.x", "1.2.500", false}, - {">1.1, <2", "1.1.1", true}, - {">1.1, <3", "4.3.2", false}, - {">=1.1, <2, !=1.2.3", "1.2.3", false}, - {">=1.1, <2, !=1.2.3 || > 3", "3.1.2", true}, - {">=1.1, <2, !=1.2.3 || >= 3", "3.0.0", true}, - {">=1.1, <2, !=1.2.3 || > 3", "3.0.0", false}, - {">=1.1, <2, !=1.2.3 || > 3", "1.2.3", false}, - {"1.1 - 2", "1.1.1", true}, - {"1.1-3", "4.3.2", false}, - {"^1.1", "1.1.1", true}, - {"^1.1", "1.1.1-alpha", false}, - {"^1.1.1-alpha", "1.1.1-beta", true}, - {"^1.1.1-beta", "1.1.1-alpha", false}, - {"^1.1", "4.3.2", false}, - {"^1.x", "1.1.1", true}, - {"^2.x", "1.1.1", false}, - {"^1.x", "2.1.1", false}, - {"~*", "2.1.1", true}, - {"~1", "2.1.1", false}, - {"~1", "1.3.5", true}, - {"~1", "1.3.5-beta", false}, - {"~1.x", "2.1.1", false}, - {"~1.x", "1.3.5", true}, - {"~1.x", "1.3.5-beta", false}, - {"~1.3.6-alpha", "1.3.5-beta", false}, - {"~1.3.5-alpha", "1.3.5-beta", true}, - {"~1.3.5-beta", "1.3.5-alpha", false}, - {"~1.x", "1.4", true}, - {"~1.1", "1.1.1", true}, - {"~1.2.3", "1.2.5", true}, - {"~1.2.3", "1.2.2", false}, - {"~1.2.3", "1.3.2", false}, - {"~1.1", "1.2.3", false}, - {"~1.3", "2.4.5", false}, - } - - for _, tc := range tests { - c, err := NewConstraint(tc.constraint) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - v, err := NewVersion(tc.version) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - a, msgs := c.Validate(v) - if a != tc.check { - t.Errorf("Constraint '%s' failing with '%s'", tc.constraint, tc.version) - } else if !a && len(msgs) == 0 { - t.Errorf("%q failed with %q but no errors returned", tc.constraint, tc.version) - } - - // if a == false { - // for _, m := range msgs { - // t.Errorf("%s", m) - // } - // } - } - - v, err := NewVersion("1.2.3") - if err != nil { - t.Errorf("err: %s", err) - } - - c, err := NewConstraint("!= 1.2.5, ^2, <= 1.1.x") - if err != nil { - t.Errorf("err: %s", err) - } - - _, msgs := c.Validate(v) - if len(msgs) != 2 { - t.Error("Invalid number of validations found") - } - e := msgs[0].Error() - if e != "1.2.3 does not have same major version as 2" { - t.Error("Did not get expected message: 1.2.3 does not have same major version as 2") - } - e = msgs[1].Error() - if e != "1.2.3 is greater than 1.1.x" { - t.Error("Did not get expected message: 1.2.3 is greater than 1.1.x") - } - - tests2 := []struct { - constraint, version, msg string - }{ - {"= 2.0", "1.2.3", "1.2.3 is not equal to 2.0"}, - {"!=4.1", "4.1.0", "4.1.0 is equal to 4.1"}, - {"!=4.x", "4.1.0", "4.1.0 is equal to 4.x"}, - {"!=4.2.x", "4.2.3", "4.2.3 is equal to 4.2.x"}, - {">1.1", "1.1.0", "1.1.0 is less than or equal to 1.1"}, - {"<1.1", "1.1.0", "1.1.0 is greater than or equal to 1.1"}, - {"<1.1", "1.1.1", "1.1.1 is greater than or equal to 1.1"}, - {"<1.x", "2.1.1", "2.1.1 is greater than or equal to 1.x"}, - {"<1.1.x", "1.2.1", "1.2.1 is greater than or equal to 1.1.x"}, - {">=1.1", "0.0.9", "0.0.9 is less than 1.1"}, - {"<=2.x", "3.1.0", "3.1.0 is greater than 2.x"}, - {"<=1.1", "1.1.1", "1.1.1 is greater than 1.1"}, - {"<=1.1.x", "1.2.500", "1.2.500 is greater than 1.1.x"}, - {">1.1, <3", "4.3.2", "4.3.2 is greater than or equal to 3"}, - {">=1.1, <2, !=1.2.3", "1.2.3", "1.2.3 is equal to 1.2.3"}, - {">=1.1, <2, !=1.2.3 || > 3", "3.0.0", "3.0.0 is greater than or equal to 2"}, - {">=1.1, <2, !=1.2.3 || > 3", "1.2.3", "1.2.3 is equal to 1.2.3"}, - {"1.1 - 3", "4.3.2", "4.3.2 is greater than 3"}, - {"^1.1", "4.3.2", "4.3.2 does not have same major version as 1.1"}, - {"^2.x", "1.1.1", "1.1.1 does not have same major version as 2.x"}, - {"^1.x", "2.1.1", "2.1.1 does not have same major version as 1.x"}, - {"~1", "2.1.2", "2.1.2 does not have same major and minor version as 1"}, - {"~1.x", "2.1.1", "2.1.1 does not have same major and minor version as 1.x"}, - {"~1.2.3", "1.2.2", "1.2.2 does not have same major and minor version as 1.2.3"}, - {"~1.2.3", "1.3.2", "1.3.2 does not have same major and minor version as 1.2.3"}, - {"~1.1", "1.2.3", "1.2.3 does not have same major and minor version as 1.1"}, - {"~1.3", "2.4.5", "2.4.5 does not have same major and minor version as 1.3"}, - } - - for _, tc := range tests2 { - c, err := NewConstraint(tc.constraint) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - v, err := NewVersion(tc.version) - if err != nil { - t.Errorf("err: %s", err) - continue - } - - _, msgs := c.Validate(v) - e := msgs[0].Error() - if e != tc.msg { - t.Errorf("Did not get expected message %q: %s", tc.msg, e) - } - } -} diff --git a/vendor/github.com/Masterminds/semver/version_test.go b/vendor/github.com/Masterminds/semver/version_test.go deleted file mode 100644 index ff5d644a..00000000 --- a/vendor/github.com/Masterminds/semver/version_test.go +++ /dev/null @@ -1,490 +0,0 @@ -package semver - -import ( - "encoding/json" - "fmt" - "testing" -) - -func TestNewVersion(t *testing.T) { - tests := []struct { - version string - err bool - }{ - {"1.2.3", false}, - {"v1.2.3", false}, - {"1.0", false}, - {"v1.0", false}, - {"1", false}, - {"v1", false}, - {"1.2.beta", true}, - {"v1.2.beta", true}, - {"foo", true}, - {"1.2-5", false}, - {"v1.2-5", false}, - {"1.2-beta.5", false}, - {"v1.2-beta.5", false}, - {"\n1.2", true}, - {"\nv1.2", true}, - {"1.2.0-x.Y.0+metadata", false}, - {"v1.2.0-x.Y.0+metadata", false}, - {"1.2.0-x.Y.0+metadata-width-hypen", false}, - {"v1.2.0-x.Y.0+metadata-width-hypen", false}, - {"1.2.3-rc1-with-hypen", false}, - {"v1.2.3-rc1-with-hypen", false}, - {"1.2.3.4", true}, - {"v1.2.3.4", true}, - {"1.2.2147483648", false}, - {"1.2147483648.3", false}, - {"2147483648.3.0", false}, - } - - for _, tc := range tests { - _, err := NewVersion(tc.version) - if tc.err && err == nil { - t.Fatalf("expected error for version: %s", tc.version) - } else if !tc.err && err != nil { - t.Fatalf("error for version %s: %s", tc.version, err) - } - } -} - -func TestOriginal(t *testing.T) { - tests := []string{ - "1.2.3", - "v1.2.3", - "1.0", - "v1.0", - "1", - "v1", - "1.2-5", - "v1.2-5", - "1.2-beta.5", - "v1.2-beta.5", - "1.2.0-x.Y.0+metadata", - "v1.2.0-x.Y.0+metadata", - "1.2.0-x.Y.0+metadata-width-hypen", - "v1.2.0-x.Y.0+metadata-width-hypen", - "1.2.3-rc1-with-hypen", - "v1.2.3-rc1-with-hypen", - } - - for _, tc := range tests { - v, err := NewVersion(tc) - if err != nil { - t.Errorf("Error parsing version %s", tc) - } - - o := v.Original() - if o != tc { - t.Errorf("Error retrieving originl. Expected '%s' but got '%s'", tc, v) - } - } -} - -func TestParts(t *testing.T) { - v, err := NewVersion("1.2.3-beta.1+build.123") - if err != nil { - t.Error("Error parsing version 1.2.3-beta.1+build.123") - } - - if v.Major() != 1 { - t.Error("Major() returning wrong value") - } - if v.Minor() != 2 { - t.Error("Minor() returning wrong value") - } - if v.Patch() != 3 { - t.Error("Patch() returning wrong value") - } - if v.Prerelease() != "beta.1" { - t.Error("Prerelease() returning wrong value") - } - if v.Metadata() != "build.123" { - t.Error("Metadata() returning wrong value") - } -} - -func TestString(t *testing.T) { - tests := []struct { - version string - expected string - }{ - {"1.2.3", "1.2.3"}, - {"v1.2.3", "1.2.3"}, - {"1.0", "1.0.0"}, - {"v1.0", "1.0.0"}, - {"1", "1.0.0"}, - {"v1", "1.0.0"}, - {"1.2-5", "1.2.0-5"}, - {"v1.2-5", "1.2.0-5"}, - {"1.2-beta.5", "1.2.0-beta.5"}, - {"v1.2-beta.5", "1.2.0-beta.5"}, - {"1.2.0-x.Y.0+metadata", "1.2.0-x.Y.0+metadata"}, - {"v1.2.0-x.Y.0+metadata", "1.2.0-x.Y.0+metadata"}, - {"1.2.0-x.Y.0+metadata-width-hypen", "1.2.0-x.Y.0+metadata-width-hypen"}, - {"v1.2.0-x.Y.0+metadata-width-hypen", "1.2.0-x.Y.0+metadata-width-hypen"}, - {"1.2.3-rc1-with-hypen", "1.2.3-rc1-with-hypen"}, - {"v1.2.3-rc1-with-hypen", "1.2.3-rc1-with-hypen"}, - } - - for _, tc := range tests { - v, err := NewVersion(tc.version) - if err != nil { - t.Errorf("Error parsing version %s", tc) - } - - s := v.String() - if s != tc.expected { - t.Errorf("Error generating string. Expected '%s' but got '%s'", tc.expected, s) - } - } -} - -func TestCompare(t *testing.T) { - tests := []struct { - v1 string - v2 string - expected int - }{ - {"1.2.3", "1.5.1", -1}, - {"2.2.3", "1.5.1", 1}, - {"2.2.3", "2.2.2", 1}, - {"3.2-beta", "3.2-beta", 0}, - {"1.3", "1.1.4", 1}, - {"4.2", "4.2-beta", 1}, - {"4.2-beta", "4.2", -1}, - {"4.2-alpha", "4.2-beta", -1}, - {"4.2-alpha", "4.2-alpha", 0}, - {"4.2-beta.2", "4.2-beta.1", 1}, - {"4.2-beta2", "4.2-beta1", 1}, - {"4.2-beta", "4.2-beta.2", -1}, - {"4.2-beta", "4.2-beta.foo", -1}, - {"4.2-beta.2", "4.2-beta", 1}, - {"4.2-beta.foo", "4.2-beta", 1}, - {"1.2+bar", "1.2+baz", 0}, - } - - for _, tc := range tests { - v1, err := NewVersion(tc.v1) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - v2, err := NewVersion(tc.v2) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - a := v1.Compare(v2) - e := tc.expected - if a != e { - t.Errorf( - "Comparison of '%s' and '%s' failed. Expected '%d', got '%d'", - tc.v1, tc.v2, e, a, - ) - } - } -} - -func TestLessThan(t *testing.T) { - tests := []struct { - v1 string - v2 string - expected bool - }{ - {"1.2.3", "1.5.1", true}, - {"2.2.3", "1.5.1", false}, - {"3.2-beta", "3.2-beta", false}, - } - - for _, tc := range tests { - v1, err := NewVersion(tc.v1) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - v2, err := NewVersion(tc.v2) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - a := v1.LessThan(v2) - e := tc.expected - if a != e { - t.Errorf( - "Comparison of '%s' and '%s' failed. Expected '%t', got '%t'", - tc.v1, tc.v2, e, a, - ) - } - } -} - -func TestGreaterThan(t *testing.T) { - tests := []struct { - v1 string - v2 string - expected bool - }{ - {"1.2.3", "1.5.1", false}, - {"2.2.3", "1.5.1", true}, - {"3.2-beta", "3.2-beta", false}, - {"3.2.0-beta.1", "3.2.0-beta.5", false}, - {"3.2-beta.4", "3.2-beta.2", true}, - {"7.43.0-SNAPSHOT.99", "7.43.0-SNAPSHOT.103", false}, - {"7.43.0-SNAPSHOT.FOO", "7.43.0-SNAPSHOT.103", true}, - {"7.43.0-SNAPSHOT.99", "7.43.0-SNAPSHOT.BAR", false}, - } - - for _, tc := range tests { - v1, err := NewVersion(tc.v1) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - v2, err := NewVersion(tc.v2) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - a := v1.GreaterThan(v2) - e := tc.expected - if a != e { - t.Errorf( - "Comparison of '%s' and '%s' failed. Expected '%t', got '%t'", - tc.v1, tc.v2, e, a, - ) - } - } -} - -func TestEqual(t *testing.T) { - tests := []struct { - v1 string - v2 string - expected bool - }{ - {"1.2.3", "1.5.1", false}, - {"2.2.3", "1.5.1", false}, - {"3.2-beta", "3.2-beta", true}, - {"3.2-beta+foo", "3.2-beta+bar", true}, - } - - for _, tc := range tests { - v1, err := NewVersion(tc.v1) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - v2, err := NewVersion(tc.v2) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - a := v1.Equal(v2) - e := tc.expected - if a != e { - t.Errorf( - "Comparison of '%s' and '%s' failed. Expected '%t', got '%t'", - tc.v1, tc.v2, e, a, - ) - } - } -} - -func TestInc(t *testing.T) { - tests := []struct { - v1 string - expected string - how string - expectedOriginal string - }{ - {"1.2.3", "1.2.4", "patch", "1.2.4"}, - {"v1.2.4", "1.2.5", "patch", "v1.2.5"}, - {"1.2.3", "1.3.0", "minor", "1.3.0"}, - {"v1.2.4", "1.3.0", "minor", "v1.3.0"}, - {"1.2.3", "2.0.0", "major", "2.0.0"}, - {"v1.2.4", "2.0.0", "major", "v2.0.0"}, - {"1.2.3+meta", "1.2.4", "patch", "1.2.4"}, - {"1.2.3-beta+meta", "1.2.3", "patch", "1.2.3"}, - {"v1.2.4-beta+meta", "1.2.4", "patch", "v1.2.4"}, - {"1.2.3-beta+meta", "1.3.0", "minor", "1.3.0"}, - {"v1.2.4-beta+meta", "1.3.0", "minor", "v1.3.0"}, - {"1.2.3-beta+meta", "2.0.0", "major", "2.0.0"}, - {"v1.2.4-beta+meta", "2.0.0", "major", "v2.0.0"}, - } - - for _, tc := range tests { - v1, err := NewVersion(tc.v1) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - var v2 Version - switch tc.how { - case "patch": - v2 = v1.IncPatch() - case "minor": - v2 = v1.IncMinor() - case "major": - v2 = v1.IncMajor() - } - - a := v2.String() - e := tc.expected - if a != e { - t.Errorf( - "Inc %q failed. Expected %q got %q", - tc.how, e, a, - ) - } - - a = v2.Original() - e = tc.expectedOriginal - if a != e { - t.Errorf( - "Inc %q failed. Expected original %q got %q", - tc.how, e, a, - ) - } - } -} - -func TestSetPrerelease(t *testing.T) { - tests := []struct { - v1 string - prerelease string - expectedVersion string - expectedPrerelease string - expectedOriginal string - expectedErr error - }{ - {"1.2.3", "**", "1.2.3", "", "1.2.3", ErrInvalidPrerelease}, - {"1.2.3", "beta", "1.2.3-beta", "beta", "1.2.3-beta", nil}, - {"v1.2.4", "beta", "1.2.4-beta", "beta", "v1.2.4-beta", nil}, - } - - for _, tc := range tests { - v1, err := NewVersion(tc.v1) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - v2, err := v1.SetPrerelease(tc.prerelease) - if err != tc.expectedErr { - t.Errorf("Expected to get err=%s, but got err=%s", tc.expectedErr, err) - } - - a := v2.Prerelease() - e := tc.expectedPrerelease - if a != e { - t.Errorf("Expected prerelease value=%q, but got %q", e, a) - } - - a = v2.String() - e = tc.expectedVersion - if a != e { - t.Errorf("Expected version string=%q, but got %q", e, a) - } - - a = v2.Original() - e = tc.expectedOriginal - if a != e { - t.Errorf("Expected version original=%q, but got %q", e, a) - } - } -} - -func TestSetMetadata(t *testing.T) { - tests := []struct { - v1 string - metadata string - expectedVersion string - expectedMetadata string - expectedOriginal string - expectedErr error - }{ - {"1.2.3", "**", "1.2.3", "", "1.2.3", ErrInvalidMetadata}, - {"1.2.3", "meta", "1.2.3+meta", "meta", "1.2.3+meta", nil}, - {"v1.2.4", "meta", "1.2.4+meta", "meta", "v1.2.4+meta", nil}, - } - - for _, tc := range tests { - v1, err := NewVersion(tc.v1) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - v2, err := v1.SetMetadata(tc.metadata) - if err != tc.expectedErr { - t.Errorf("Expected to get err=%s, but got err=%s", tc.expectedErr, err) - } - - a := v2.Metadata() - e := tc.expectedMetadata - if a != e { - t.Errorf("Expected metadata value=%q, but got %q", e, a) - } - - a = v2.String() - e = tc.expectedVersion - if e != a { - t.Errorf("Expected version string=%q, but got %q", e, a) - } - - a = v2.Original() - e = tc.expectedOriginal - if a != e { - t.Errorf("Expected version original=%q, but got %q", e, a) - } - } -} - -func TestOriginalVPrefix(t *testing.T) { - tests := []struct { - version string - vprefix string - }{ - {"1.2.3", ""}, - {"v1.2.4", "v"}, - } - - for _, tc := range tests { - v1, _ := NewVersion(tc.version) - a := v1.originalVPrefix() - e := tc.vprefix - if a != e { - t.Errorf("Expected vprefix=%q, but got %q", e, a) - } - } -} - -func TestJsonMarshal(t *testing.T) { - sVer := "1.1.1" - x, err := NewVersion(sVer) - if err != nil { - t.Errorf("Error creating version: %s", err) - } - out, err2 := json.Marshal(x) - if err2 != nil { - t.Errorf("Error marshaling version: %s", err2) - } - got := string(out) - want := fmt.Sprintf("%q", sVer) - if got != want { - t.Errorf("Error marshaling unexpected marshaled content: got=%q want=%q", got, want) - } -} - -func TestJsonUnmarshal(t *testing.T) { - sVer := "1.1.1" - ver := &Version{} - err := json.Unmarshal([]byte(fmt.Sprintf("%q", sVer)), ver) - if err != nil { - t.Errorf("Error unmarshaling version: %s", err) - } - got := ver.String() - want := sVer - if got != want { - t.Errorf("Error unmarshaling unexpected object content: got=%q want=%q", got, want) - } -} diff --git a/vendor/github.com/Sirupsen/logrus/entry_test.go b/vendor/github.com/Sirupsen/logrus/entry_test.go deleted file mode 100644 index 99c3b41d..00000000 --- a/vendor/github.com/Sirupsen/logrus/entry_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestEntryWithError(t *testing.T) { - - assert := assert.New(t) - - defer func() { - ErrorKey = "error" - }() - - err := fmt.Errorf("kaboom at layer %d", 4711) - - assert.Equal(err, WithError(err).Data["error"]) - - logger := New() - logger.Out = &bytes.Buffer{} - entry := NewEntry(logger) - - assert.Equal(err, entry.WithError(err).Data["error"]) - - ErrorKey = "err" - - assert.Equal(err, entry.WithError(err).Data["err"]) - -} - -func TestEntryPanicln(t *testing.T) { - errBoom := fmt.Errorf("boom time") - - defer func() { - p := recover() - assert.NotNil(t, p) - - switch pVal := p.(type) { - case *Entry: - assert.Equal(t, "kaboom", pVal.Message) - assert.Equal(t, errBoom, pVal.Data["err"]) - default: - t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) - } - }() - - logger := New() - logger.Out = &bytes.Buffer{} - entry := NewEntry(logger) - entry.WithField("err", errBoom).Panicln("kaboom") -} - -func TestEntryPanicf(t *testing.T) { - errBoom := fmt.Errorf("boom again") - - defer func() { - p := recover() - assert.NotNil(t, p) - - switch pVal := p.(type) { - case *Entry: - assert.Equal(t, "kaboom true", pVal.Message) - assert.Equal(t, errBoom, pVal.Data["err"]) - default: - t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) - } - }() - - logger := New() - logger.Out = &bytes.Buffer{} - entry := NewEntry(logger) - entry.WithField("err", errBoom).Panicf("kaboom %v", true) -} diff --git a/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go b/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go deleted file mode 100644 index a1623ec0..00000000 --- a/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go +++ /dev/null @@ -1,50 +0,0 @@ -package main - -import ( - "github.com/Sirupsen/logrus" -) - -var log = logrus.New() - -func init() { - log.Formatter = new(logrus.JSONFormatter) - log.Formatter = new(logrus.TextFormatter) // default - log.Level = logrus.DebugLevel -} - -func main() { - defer func() { - err := recover() - if err != nil { - log.WithFields(logrus.Fields{ - "omg": true, - "err": err, - "number": 100, - }).Fatal("The ice breaks!") - } - }() - - log.WithFields(logrus.Fields{ - "animal": "walrus", - "number": 8, - }).Debug("Started observing beach") - - log.WithFields(logrus.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") - - log.WithFields(logrus.Fields{ - "omg": true, - "number": 122, - }).Warn("The group's number increased tremendously!") - - log.WithFields(logrus.Fields{ - "temperature": -4, - }).Debug("Temperature changes") - - log.WithFields(logrus.Fields{ - "animal": "orca", - "size": 9009, - }).Panic("It's over 9000!") -} diff --git a/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go b/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go deleted file mode 100644 index 3187f6d3..00000000 --- a/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "github.com/Sirupsen/logrus" - "gopkg.in/gemnasium/logrus-airbrake-hook.v2" -) - -var log = logrus.New() - -func init() { - log.Formatter = new(logrus.TextFormatter) // default - log.Hooks.Add(airbrake.NewHook(123, "xyz", "development")) -} - -func main() { - log.WithFields(logrus.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") - - log.WithFields(logrus.Fields{ - "omg": true, - "number": 122, - }).Warn("The group's number increased tremendously!") - - log.WithFields(logrus.Fields{ - "omg": true, - "number": 100, - }).Fatal("The ice breaks!") -} diff --git a/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go b/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go deleted file mode 100644 index c6d290c7..00000000 --- a/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package logrus - -import ( - "fmt" - "testing" - "time" -) - -// smallFields is a small size data set for benchmarking -var smallFields = Fields{ - "foo": "bar", - "baz": "qux", - "one": "two", - "three": "four", -} - -// largeFields is a large size data set for benchmarking -var largeFields = Fields{ - "foo": "bar", - "baz": "qux", - "one": "two", - "three": "four", - "five": "six", - "seven": "eight", - "nine": "ten", - "eleven": "twelve", - "thirteen": "fourteen", - "fifteen": "sixteen", - "seventeen": "eighteen", - "nineteen": "twenty", - "a": "b", - "c": "d", - "e": "f", - "g": "h", - "i": "j", - "k": "l", - "m": "n", - "o": "p", - "q": "r", - "s": "t", - "u": "v", - "w": "x", - "y": "z", - "this": "will", - "make": "thirty", - "entries": "yeah", -} - -var errorFields = Fields{ - "foo": fmt.Errorf("bar"), - "baz": fmt.Errorf("qux"), -} - -func BenchmarkErrorTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{DisableColors: true}, errorFields) -} - -func BenchmarkSmallTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{DisableColors: true}, smallFields) -} - -func BenchmarkLargeTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{DisableColors: true}, largeFields) -} - -func BenchmarkSmallColoredTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{ForceColors: true}, smallFields) -} - -func BenchmarkLargeColoredTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{ForceColors: true}, largeFields) -} - -func BenchmarkSmallJSONFormatter(b *testing.B) { - doBenchmark(b, &JSONFormatter{}, smallFields) -} - -func BenchmarkLargeJSONFormatter(b *testing.B) { - doBenchmark(b, &JSONFormatter{}, largeFields) -} - -func doBenchmark(b *testing.B, formatter Formatter, fields Fields) { - entry := &Entry{ - Time: time.Time{}, - Level: InfoLevel, - Message: "message", - Data: fields, - } - var d []byte - var err error - for i := 0; i < b.N; i++ { - d, err = formatter.Format(entry) - if err != nil { - b.Fatal(err) - } - b.SetBytes(int64(len(d))) - } -} diff --git a/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go b/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go deleted file mode 100644 index aad646ab..00000000 --- a/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go +++ /dev/null @@ -1,61 +0,0 @@ -package logstash - -import ( - "encoding/json" - "fmt" - - "github.com/Sirupsen/logrus" -) - -// Formatter generates json in logstash format. -// Logstash site: http://logstash.net/ -type LogstashFormatter struct { - Type string // if not empty use for logstash type field. - - // TimestampFormat sets the format used for timestamps. - TimestampFormat string -} - -func (f *LogstashFormatter) Format(entry *logrus.Entry) ([]byte, error) { - fields := make(logrus.Fields) - for k, v := range entry.Data { - fields[k] = v - } - - fields["@version"] = 1 - - if f.TimestampFormat == "" { - f.TimestampFormat = logrus.DefaultTimestampFormat - } - - fields["@timestamp"] = entry.Time.Format(f.TimestampFormat) - - // set message field - v, ok := entry.Data["message"] - if ok { - fields["fields.message"] = v - } - fields["message"] = entry.Message - - // set level field - v, ok = entry.Data["level"] - if ok { - fields["fields.level"] = v - } - fields["level"] = entry.Level.String() - - // set type field - if f.Type != "" { - v, ok = entry.Data["type"] - if ok { - fields["fields.type"] = v - } - fields["type"] = f.Type - } - - serialized, err := json.Marshal(fields) - 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/formatters/logstash/logstash_test.go b/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go deleted file mode 100644 index d8814a0e..00000000 --- a/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package logstash - -import ( - "bytes" - "encoding/json" - "github.com/Sirupsen/logrus" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestLogstashFormatter(t *testing.T) { - assert := assert.New(t) - - lf := LogstashFormatter{Type: "abc"} - - fields := logrus.Fields{ - "message": "def", - "level": "ijk", - "type": "lmn", - "one": 1, - "pi": 3.14, - "bool": true, - } - - entry := logrus.WithFields(fields) - entry.Message = "msg" - entry.Level = logrus.InfoLevel - - b, _ := lf.Format(entry) - - var data map[string]interface{} - dec := json.NewDecoder(bytes.NewReader(b)) - dec.UseNumber() - dec.Decode(&data) - - // base fields - assert.Equal(json.Number("1"), data["@version"]) - assert.NotEmpty(data["@timestamp"]) - assert.Equal("abc", data["type"]) - assert.Equal("msg", data["message"]) - assert.Equal("info", data["level"]) - - // substituted fields - assert.Equal("def", data["fields.message"]) - assert.Equal("ijk", data["fields.level"]) - assert.Equal("lmn", data["fields.type"]) - - // formats - assert.Equal(json.Number("1"), data["one"]) - assert.Equal(json.Number("3.14"), data["pi"]) - assert.Equal(true, data["bool"]) -} diff --git a/vendor/github.com/Sirupsen/logrus/hook_test.go b/vendor/github.com/Sirupsen/logrus/hook_test.go deleted file mode 100644 index 13f34cb6..00000000 --- a/vendor/github.com/Sirupsen/logrus/hook_test.go +++ /dev/null @@ -1,122 +0,0 @@ -package logrus - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -type TestHook struct { - Fired bool -} - -func (hook *TestHook) Fire(entry *Entry) error { - hook.Fired = true - return nil -} - -func (hook *TestHook) Levels() []Level { - return []Level{ - DebugLevel, - InfoLevel, - WarnLevel, - ErrorLevel, - FatalLevel, - PanicLevel, - } -} - -func TestHookFires(t *testing.T) { - hook := new(TestHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - assert.Equal(t, hook.Fired, false) - - log.Print("test") - }, func(fields Fields) { - assert.Equal(t, hook.Fired, true) - }) -} - -type ModifyHook struct { -} - -func (hook *ModifyHook) Fire(entry *Entry) error { - entry.Data["wow"] = "whale" - return nil -} - -func (hook *ModifyHook) Levels() []Level { - return []Level{ - DebugLevel, - InfoLevel, - WarnLevel, - ErrorLevel, - FatalLevel, - PanicLevel, - } -} - -func TestHookCanModifyEntry(t *testing.T) { - hook := new(ModifyHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - log.WithField("wow", "elephant").Print("test") - }, func(fields Fields) { - assert.Equal(t, fields["wow"], "whale") - }) -} - -func TestCanFireMultipleHooks(t *testing.T) { - hook1 := new(ModifyHook) - hook2 := new(TestHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook1) - log.Hooks.Add(hook2) - - log.WithField("wow", "elephant").Print("test") - }, func(fields Fields) { - assert.Equal(t, fields["wow"], "whale") - assert.Equal(t, hook2.Fired, true) - }) -} - -type ErrorHook struct { - Fired bool -} - -func (hook *ErrorHook) Fire(entry *Entry) error { - hook.Fired = true - return nil -} - -func (hook *ErrorHook) Levels() []Level { - return []Level{ - ErrorLevel, - } -} - -func TestErrorHookShouldntFireOnInfo(t *testing.T) { - hook := new(ErrorHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - log.Info("test") - }, func(fields Fields) { - assert.Equal(t, hook.Fired, false) - }) -} - -func TestErrorHookShouldFireOnError(t *testing.T) { - hook := new(ErrorHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - log.Error("test") - }, func(fields Fields) { - assert.Equal(t, hook.Fired, true) - }) -} diff --git a/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md b/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md deleted file mode 100644 index 066704b3..00000000 --- a/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Syslog Hooks for Logrus :walrus: - -## Usage - -```go -import ( - "log/syslog" - "github.com/Sirupsen/logrus" - logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" -) - -func main() { - log := logrus.New() - hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") - - if err == nil { - log.Hooks.Add(hook) - } -} -``` - -If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following. - -```go -import ( - "log/syslog" - "github.com/Sirupsen/logrus" - logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" -) - -func main() { - log := logrus.New() - hook, err := logrus_syslog.NewSyslogHook("", "", syslog.LOG_INFO, "") - - if err == nil { - log.Hooks.Add(hook) - } -} -``` \ No newline at end of file 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 a36e2003..00000000 --- a/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go +++ /dev/null @@ -1,54 +0,0 @@ -// +build !windows,!nacl,!plan9 - -package logrus_syslog - -import ( - "fmt" - "github.com/Sirupsen/logrus" - "log/syslog" - "os" -) - -// 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/syslog/syslog_test.go b/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go deleted file mode 100644 index 42762dc1..00000000 --- a/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package logrus_syslog - -import ( - "github.com/Sirupsen/logrus" - "log/syslog" - "testing" -) - -func TestLocalhostAddAndPrint(t *testing.T) { - log := logrus.New() - hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") - - if err != nil { - t.Errorf("Unable to connect to local syslog.") - } - - log.Hooks.Add(hook) - - for _, level := range hook.Levels() { - if len(log.Hooks[level]) != 1 { - t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) - } - } - - log.Info("Congratulations!") -} 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 06881253..00000000 --- a/vendor/github.com/Sirupsen/logrus/hooks/test/test.go +++ /dev/null @@ -1,67 +0,0 @@ -package test - -import ( - "io/ioutil" - - "github.com/Sirupsen/logrus" -) - -// test.Hook is a hook designed for dealing with logs in test scenarios. -type Hook struct { - Entries []*logrus.Entry -} - -// Installs a test hook for the global logger. -func NewGlobal() *Hook { - - hook := new(Hook) - logrus.AddHook(hook) - - return hook - -} - -// Installs a test hook for a given local logger. -func NewLocal(logger *logrus.Logger) *Hook { - - hook := new(Hook) - logger.Hooks.Add(hook) - - return hook - -} - -// 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.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() (l *logrus.Entry) { - - if i := len(t.Entries) - 1; i < 0 { - return nil - } else { - return t.Entries[i] - } - -} - -// Reset removes all Entries from this test hook. -func (t *Hook) Reset() { - t.Entries = make([]*logrus.Entry, 0) -} diff --git a/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go b/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go deleted file mode 100644 index d69455ba..00000000 --- a/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package test - -import ( - "testing" - - "github.com/Sirupsen/logrus" - "github.com/stretchr/testify/assert" -) - -func TestAllHooks(t *testing.T) { - - assert := assert.New(t) - - logger, hook := NewNullLogger() - assert.Nil(hook.LastEntry()) - assert.Equal(0, len(hook.Entries)) - - logger.Error("Hello error") - assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) - assert.Equal("Hello error", hook.LastEntry().Message) - assert.Equal(1, len(hook.Entries)) - - logger.Warn("Hello warning") - assert.Equal(logrus.WarnLevel, hook.LastEntry().Level) - assert.Equal("Hello warning", hook.LastEntry().Message) - assert.Equal(2, len(hook.Entries)) - - hook.Reset() - assert.Nil(hook.LastEntry()) - assert.Equal(0, len(hook.Entries)) - - hook = NewGlobal() - - logrus.Error("Hello error") - assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) - assert.Equal("Hello error", hook.LastEntry().Message) - assert.Equal(1, len(hook.Entries)) - -} diff --git a/vendor/github.com/Sirupsen/logrus/json_formatter_test.go b/vendor/github.com/Sirupsen/logrus/json_formatter_test.go deleted file mode 100644 index 1d708732..00000000 --- a/vendor/github.com/Sirupsen/logrus/json_formatter_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package logrus - -import ( - "encoding/json" - "errors" - - "testing" -) - -func TestErrorNotLost(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("error", errors.New("wild walrus"))) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["error"] != "wild walrus" { - t.Fatal("Error field not set") - } -} - -func TestErrorNotLostOnFieldNotNamedError(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("omg", errors.New("wild walrus"))) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["omg"] != "wild walrus" { - t.Fatal("Error field not set") - } -} - -func TestFieldClashWithTime(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("time", "right now!")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["fields.time"] != "right now!" { - t.Fatal("fields.time not set to original time field") - } - - if entry["time"] != "0001-01-01T00:00:00Z" { - t.Fatal("time field not set to current time, was: ", entry["time"]) - } -} - -func TestFieldClashWithMsg(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("msg", "something")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["fields.msg"] != "something" { - t.Fatal("fields.msg not set to original msg field") - } -} - -func TestFieldClashWithLevel(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("level", "something")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["fields.level"] != "something" { - t.Fatal("fields.level not set to original level field") - } -} - -func TestJSONEntryEndsWithNewline(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("level", "something")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - if b[len(b)-1] != '\n' { - t.Fatal("Expected JSON log entry to end with a newline") - } -} diff --git a/vendor/github.com/Sirupsen/logrus/logrus_test.go b/vendor/github.com/Sirupsen/logrus/logrus_test.go deleted file mode 100644 index bfc47805..00000000 --- a/vendor/github.com/Sirupsen/logrus/logrus_test.go +++ /dev/null @@ -1,361 +0,0 @@ -package logrus - -import ( - "bytes" - "encoding/json" - "strconv" - "strings" - "sync" - "testing" - - "github.com/stretchr/testify/assert" -) - -func LogAndAssertJSON(t *testing.T, log func(*Logger), assertions func(fields Fields)) { - var buffer bytes.Buffer - var fields Fields - - logger := New() - logger.Out = &buffer - logger.Formatter = new(JSONFormatter) - - log(logger) - - err := json.Unmarshal(buffer.Bytes(), &fields) - assert.Nil(t, err) - - assertions(fields) -} - -func LogAndAssertText(t *testing.T, log func(*Logger), assertions func(fields map[string]string)) { - var buffer bytes.Buffer - - logger := New() - logger.Out = &buffer - logger.Formatter = &TextFormatter{ - DisableColors: true, - } - - log(logger) - - fields := make(map[string]string) - for _, kv := range strings.Split(buffer.String(), " ") { - if !strings.Contains(kv, "=") { - continue - } - kvArr := strings.Split(kv, "=") - key := strings.TrimSpace(kvArr[0]) - val := kvArr[1] - if kvArr[1][0] == '"' { - var err error - val, err = strconv.Unquote(val) - assert.NoError(t, err) - } - fields[key] = val - } - assertions(fields) -} - -func TestPrint(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Print("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["level"], "info") - }) -} - -func TestInfo(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["level"], "info") - }) -} - -func TestWarn(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Warn("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["level"], "warning") - }) -} - -func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln("test", "test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test test") - }) -} - -func TestInfolnShouldAddSpacesBetweenStringAndNonstring(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln("test", 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test 10") - }) -} - -func TestInfolnShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln(10, 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "10 10") - }) -} - -func TestInfoShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln(10, 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "10 10") - }) -} - -func TestInfoShouldNotAddSpacesBetweenStringAndNonstring(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Info("test", 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test10") - }) -} - -func TestInfoShouldNotAddSpacesBetweenStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Info("test", "test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "testtest") - }) -} - -func TestWithFieldsShouldAllowAssignments(t *testing.T) { - var buffer bytes.Buffer - var fields Fields - - logger := New() - logger.Out = &buffer - logger.Formatter = new(JSONFormatter) - - localLog := logger.WithFields(Fields{ - "key1": "value1", - }) - - localLog.WithField("key2", "value2").Info("test") - err := json.Unmarshal(buffer.Bytes(), &fields) - assert.Nil(t, err) - - assert.Equal(t, "value2", fields["key2"]) - assert.Equal(t, "value1", fields["key1"]) - - buffer = bytes.Buffer{} - fields = Fields{} - localLog.Info("test") - err = json.Unmarshal(buffer.Bytes(), &fields) - assert.Nil(t, err) - - _, ok := fields["key2"] - assert.Equal(t, false, ok) - assert.Equal(t, "value1", fields["key1"]) -} - -func TestUserSuppliedFieldDoesNotOverwriteDefaults(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("msg", "hello").Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - }) -} - -func TestUserSuppliedMsgFieldHasPrefix(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("msg", "hello").Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["fields.msg"], "hello") - }) -} - -func TestUserSuppliedTimeFieldHasPrefix(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("time", "hello").Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["fields.time"], "hello") - }) -} - -func TestUserSuppliedLevelFieldHasPrefix(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("level", 1).Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["level"], "info") - assert.Equal(t, fields["fields.level"], 1.0) // JSON has floats only - }) -} - -func TestDefaultFieldsAreNotPrefixed(t *testing.T) { - LogAndAssertText(t, func(log *Logger) { - ll := log.WithField("herp", "derp") - ll.Info("hello") - ll.Info("bye") - }, func(fields map[string]string) { - for _, fieldName := range []string{"fields.level", "fields.time", "fields.msg"} { - if _, ok := fields[fieldName]; ok { - t.Fatalf("should not have prefixed %q: %v", fieldName, fields) - } - } - }) -} - -func TestDoubleLoggingDoesntPrefixPreviousFields(t *testing.T) { - - var buffer bytes.Buffer - var fields Fields - - logger := New() - logger.Out = &buffer - logger.Formatter = new(JSONFormatter) - - llog := logger.WithField("context", "eating raw fish") - - llog.Info("looks delicious") - - err := json.Unmarshal(buffer.Bytes(), &fields) - assert.NoError(t, err, "should have decoded first message") - assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") - assert.Equal(t, fields["msg"], "looks delicious") - assert.Equal(t, fields["context"], "eating raw fish") - - buffer.Reset() - - llog.Warn("omg it is!") - - err = json.Unmarshal(buffer.Bytes(), &fields) - assert.NoError(t, err, "should have decoded second message") - assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") - assert.Equal(t, fields["msg"], "omg it is!") - assert.Equal(t, fields["context"], "eating raw fish") - assert.Nil(t, fields["fields.msg"], "should not have prefixed previous `msg` entry") - -} - -func TestConvertLevelToString(t *testing.T) { - assert.Equal(t, "debug", DebugLevel.String()) - assert.Equal(t, "info", InfoLevel.String()) - assert.Equal(t, "warning", WarnLevel.String()) - assert.Equal(t, "error", ErrorLevel.String()) - assert.Equal(t, "fatal", FatalLevel.String()) - assert.Equal(t, "panic", PanicLevel.String()) -} - -func TestParseLevel(t *testing.T) { - l, err := ParseLevel("panic") - assert.Nil(t, err) - assert.Equal(t, PanicLevel, l) - - l, err = ParseLevel("PANIC") - assert.Nil(t, err) - assert.Equal(t, PanicLevel, l) - - l, err = ParseLevel("fatal") - assert.Nil(t, err) - assert.Equal(t, FatalLevel, l) - - l, err = ParseLevel("FATAL") - assert.Nil(t, err) - assert.Equal(t, FatalLevel, l) - - l, err = ParseLevel("error") - assert.Nil(t, err) - assert.Equal(t, ErrorLevel, l) - - l, err = ParseLevel("ERROR") - assert.Nil(t, err) - assert.Equal(t, ErrorLevel, l) - - l, err = ParseLevel("warn") - assert.Nil(t, err) - assert.Equal(t, WarnLevel, l) - - l, err = ParseLevel("WARN") - assert.Nil(t, err) - assert.Equal(t, WarnLevel, l) - - l, err = ParseLevel("warning") - assert.Nil(t, err) - assert.Equal(t, WarnLevel, l) - - l, err = ParseLevel("WARNING") - assert.Nil(t, err) - assert.Equal(t, WarnLevel, l) - - l, err = ParseLevel("info") - assert.Nil(t, err) - assert.Equal(t, InfoLevel, l) - - l, err = ParseLevel("INFO") - assert.Nil(t, err) - assert.Equal(t, InfoLevel, l) - - l, err = ParseLevel("debug") - assert.Nil(t, err) - assert.Equal(t, DebugLevel, l) - - l, err = ParseLevel("DEBUG") - assert.Nil(t, err) - assert.Equal(t, DebugLevel, l) - - l, err = ParseLevel("invalid") - assert.Equal(t, "not a valid logrus Level: \"invalid\"", err.Error()) -} - -func TestGetSetLevelRace(t *testing.T) { - wg := sync.WaitGroup{} - for i := 0; i < 100; i++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - if i%2 == 0 { - SetLevel(InfoLevel) - } else { - GetLevel() - } - }(i) - - } - wg.Wait() -} - -func TestLoggingRace(t *testing.T) { - logger := New() - - var wg sync.WaitGroup - wg.Add(100) - - for i := 0; i < 100; i++ { - go func() { - logger.Info("info") - wg.Done() - }() - } - wg.Wait() -} - -// Compile test -func TestLogrusInterface(t *testing.T) { - var buffer bytes.Buffer - fn := func(l FieldLogger) { - b := l.WithField("key", "value") - b.Debug("Test") - } - // test logger - logger := New() - logger.Out = &buffer - fn(logger) - - // test Entry - e := logger.WithField("another", "value") - fn(e) -} diff --git a/vendor/github.com/Sirupsen/logrus/text_formatter_test.go b/vendor/github.com/Sirupsen/logrus/text_formatter_test.go deleted file mode 100644 index e25a44f6..00000000 --- a/vendor/github.com/Sirupsen/logrus/text_formatter_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package logrus - -import ( - "bytes" - "errors" - "testing" - "time" -) - -func TestQuoting(t *testing.T) { - tf := &TextFormatter{DisableColors: true} - - checkQuoting := func(q bool, value interface{}) { - b, _ := tf.Format(WithField("test", value)) - idx := bytes.Index(b, ([]byte)("test=")) - cont := bytes.Contains(b[idx+5:], []byte{'"'}) - if cont != q { - if q { - t.Errorf("quoting expected for: %#v", value) - } else { - t.Errorf("quoting not expected for: %#v", value) - } - } - } - - checkQuoting(false, "abcd") - checkQuoting(false, "v1.0") - checkQuoting(false, "1234567890") - checkQuoting(true, "/foobar") - checkQuoting(true, "x y") - checkQuoting(true, "x,y") - checkQuoting(false, errors.New("invalid")) - checkQuoting(true, errors.New("invalid argument")) -} - -func TestTimestampFormat(t *testing.T) { - checkTimeStr := func(format string) { - customFormatter := &TextFormatter{DisableColors: true, TimestampFormat: format} - customStr, _ := customFormatter.Format(WithField("test", "test")) - timeStart := bytes.Index(customStr, ([]byte)("time=")) - timeEnd := bytes.Index(customStr, ([]byte)("level=")) - timeStr := customStr[timeStart+5 : timeEnd-1] - if timeStr[0] == '"' && timeStr[len(timeStr)-1] == '"' { - timeStr = timeStr[1 : len(timeStr)-1] - } - if format == "" { - format = time.RFC3339 - } - _, e := time.Parse(format, (string)(timeStr)) - if e != nil { - t.Errorf("time string \"%s\" did not match provided time format \"%s\": %s", timeStr, format, e) - } - } - - checkTimeStr("2006-01-02T15:04:05.000000000Z07:00") - checkTimeStr("Mon Jan _2 15:04:05 2006") - checkTimeStr("") -} - -// TODO add tests for sorting etc., this requires a parser for the text -// formatter output. diff --git a/vendor/github.com/alecthomas/template/example_test.go b/vendor/github.com/alecthomas/template/example_test.go deleted file mode 100644 index ad646442..00000000 --- a/vendor/github.com/alecthomas/template/example_test.go +++ /dev/null @@ -1,71 +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 template_test - -import ( - "log" - "os" - "github.com/alecthomas/template" -) - -func ExampleTemplate() { - // Define a template. - const letter = ` -Dear {{.Name}}, -{{if .Attended}} -It was a pleasure to see you at the wedding.{{else}} -It is a shame you couldn't make it to the wedding.{{end}} -{{with .Gift}}Thank you for the lovely {{.}}. -{{end}} -Best wishes, -Josie -` - - // Prepare some data to insert into the template. - type Recipient struct { - Name, Gift string - Attended bool - } - var recipients = []Recipient{ - {"Aunt Mildred", "bone china tea set", true}, - {"Uncle John", "moleskin pants", false}, - {"Cousin Rodney", "", false}, - } - - // Create a new template and parse the letter into it. - t := template.Must(template.New("letter").Parse(letter)) - - // Execute the template for each recipient. - for _, r := range recipients { - err := t.Execute(os.Stdout, r) - if err != nil { - log.Println("executing template:", err) - } - } - - // Output: - // Dear Aunt Mildred, - // - // It was a pleasure to see you at the wedding. - // Thank you for the lovely bone china tea set. - // - // Best wishes, - // Josie - // - // Dear Uncle John, - // - // It is a shame you couldn't make it to the wedding. - // Thank you for the lovely moleskin pants. - // - // Best wishes, - // Josie - // - // Dear Cousin Rodney, - // - // It is a shame you couldn't make it to the wedding. - // - // Best wishes, - // Josie -} diff --git a/vendor/github.com/alecthomas/template/examplefiles_test.go b/vendor/github.com/alecthomas/template/examplefiles_test.go deleted file mode 100644 index c6747740..00000000 --- a/vendor/github.com/alecthomas/template/examplefiles_test.go +++ /dev/null @@ -1,182 +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 template_test - -import ( - "io" - "io/ioutil" - "log" - "os" - "path/filepath" - "github.com/alecthomas/template" -) - -// templateFile defines the contents of a template to be stored in a file, for testing. -type templateFile struct { - name string - contents string -} - -func createTestDir(files []templateFile) string { - dir, err := ioutil.TempDir("", "template") - if err != nil { - log.Fatal(err) - } - for _, file := range files { - f, err := os.Create(filepath.Join(dir, file.name)) - if err != nil { - log.Fatal(err) - } - defer f.Close() - _, err = io.WriteString(f, file.contents) - if err != nil { - log.Fatal(err) - } - } - return dir -} - -// Here we demonstrate loading a set of templates from a directory. -func ExampleTemplate_glob() { - // Here we create a temporary directory and populate it with our sample - // template definition files; usually the template files would already - // exist in some location known to the program. - dir := createTestDir([]templateFile{ - // T0.tmpl is a plain template file that just invokes T1. - {"T0.tmpl", `T0 invokes T1: ({{template "T1"}})`}, - // T1.tmpl defines a template, T1 that invokes T2. - {"T1.tmpl", `{{define "T1"}}T1 invokes T2: ({{template "T2"}}){{end}}`}, - // T2.tmpl defines a template T2. - {"T2.tmpl", `{{define "T2"}}This is T2{{end}}`}, - }) - // Clean up after the test; another quirk of running as an example. - defer os.RemoveAll(dir) - - // pattern is the glob pattern used to find all the template files. - pattern := filepath.Join(dir, "*.tmpl") - - // Here starts the example proper. - // T0.tmpl is the first name matched, so it becomes the starting template, - // the value returned by ParseGlob. - tmpl := template.Must(template.ParseGlob(pattern)) - - err := tmpl.Execute(os.Stdout, nil) - if err != nil { - log.Fatalf("template execution: %s", err) - } - // Output: - // T0 invokes T1: (T1 invokes T2: (This is T2)) -} - -// This example demonstrates one way to share some templates -// and use them in different contexts. In this variant we add multiple driver -// templates by hand to an existing bundle of templates. -func ExampleTemplate_helpers() { - // Here we create a temporary directory and populate it with our sample - // template definition files; usually the template files would already - // exist in some location known to the program. - dir := createTestDir([]templateFile{ - // T1.tmpl defines a template, T1 that invokes T2. - {"T1.tmpl", `{{define "T1"}}T1 invokes T2: ({{template "T2"}}){{end}}`}, - // T2.tmpl defines a template T2. - {"T2.tmpl", `{{define "T2"}}This is T2{{end}}`}, - }) - // Clean up after the test; another quirk of running as an example. - defer os.RemoveAll(dir) - - // pattern is the glob pattern used to find all the template files. - pattern := filepath.Join(dir, "*.tmpl") - - // Here starts the example proper. - // Load the helpers. - templates := template.Must(template.ParseGlob(pattern)) - // Add one driver template to the bunch; we do this with an explicit template definition. - _, err := templates.Parse("{{define `driver1`}}Driver 1 calls T1: ({{template `T1`}})\n{{end}}") - if err != nil { - log.Fatal("parsing driver1: ", err) - } - // Add another driver template. - _, err = templates.Parse("{{define `driver2`}}Driver 2 calls T2: ({{template `T2`}})\n{{end}}") - if err != nil { - log.Fatal("parsing driver2: ", err) - } - // We load all the templates before execution. This package does not require - // that behavior but html/template's escaping does, so it's a good habit. - err = templates.ExecuteTemplate(os.Stdout, "driver1", nil) - if err != nil { - log.Fatalf("driver1 execution: %s", err) - } - err = templates.ExecuteTemplate(os.Stdout, "driver2", nil) - if err != nil { - log.Fatalf("driver2 execution: %s", err) - } - // Output: - // Driver 1 calls T1: (T1 invokes T2: (This is T2)) - // Driver 2 calls T2: (This is T2) -} - -// This example demonstrates how to use one group of driver -// templates with distinct sets of helper templates. -func ExampleTemplate_share() { - // Here we create a temporary directory and populate it with our sample - // template definition files; usually the template files would already - // exist in some location known to the program. - dir := createTestDir([]templateFile{ - // T0.tmpl is a plain template file that just invokes T1. - {"T0.tmpl", "T0 ({{.}} version) invokes T1: ({{template `T1`}})\n"}, - // T1.tmpl defines a template, T1 that invokes T2. Note T2 is not defined - {"T1.tmpl", `{{define "T1"}}T1 invokes T2: ({{template "T2"}}){{end}}`}, - }) - // Clean up after the test; another quirk of running as an example. - defer os.RemoveAll(dir) - - // pattern is the glob pattern used to find all the template files. - pattern := filepath.Join(dir, "*.tmpl") - - // Here starts the example proper. - // Load the drivers. - drivers := template.Must(template.ParseGlob(pattern)) - - // We must define an implementation of the T2 template. First we clone - // the drivers, then add a definition of T2 to the template name space. - - // 1. Clone the helper set to create a new name space from which to run them. - first, err := drivers.Clone() - if err != nil { - log.Fatal("cloning helpers: ", err) - } - // 2. Define T2, version A, and parse it. - _, err = first.Parse("{{define `T2`}}T2, version A{{end}}") - if err != nil { - log.Fatal("parsing T2: ", err) - } - - // Now repeat the whole thing, using a different version of T2. - // 1. Clone the drivers. - second, err := drivers.Clone() - if err != nil { - log.Fatal("cloning drivers: ", err) - } - // 2. Define T2, version B, and parse it. - _, err = second.Parse("{{define `T2`}}T2, version B{{end}}") - if err != nil { - log.Fatal("parsing T2: ", err) - } - - // Execute the templates in the reverse order to verify the - // first is unaffected by the second. - err = second.ExecuteTemplate(os.Stdout, "T0.tmpl", "second") - if err != nil { - log.Fatalf("second execution: %s", err) - } - err = first.ExecuteTemplate(os.Stdout, "T0.tmpl", "first") - if err != nil { - log.Fatalf("first: execution: %s", err) - } - - // Output: - // T0 (second version) invokes T1: (T1 invokes T2: (T2, version B)) - // T0 (first version) invokes T1: (T1 invokes T2: (T2, version A)) -} diff --git a/vendor/github.com/alecthomas/template/examplefunc_test.go b/vendor/github.com/alecthomas/template/examplefunc_test.go deleted file mode 100644 index 98043ba5..00000000 --- a/vendor/github.com/alecthomas/template/examplefunc_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package template_test - -import ( - "log" - "os" - "strings" - "github.com/alecthomas/template" -) - -// This example demonstrates a custom function to process template text. -// It installs the strings.Title function and uses it to -// Make Title Text Look Good In Our Template's Output. -func ExampleTemplate_func() { - // First we create a FuncMap with which to register the function. - funcMap := template.FuncMap{ - // The name "title" is what the function will be called in the template text. - "title": strings.Title, - } - - // A simple template definition to test our function. - // We print the input text several ways: - // - the original - // - title-cased - // - title-cased and then printed with %q - // - printed with %q and then title-cased. - const templateText = ` -Input: {{printf "%q" .}} -Output 0: {{title .}} -Output 1: {{title . | printf "%q"}} -Output 2: {{printf "%q" . | title}} -` - - // Create a template, add the function map, and parse the text. - tmpl, err := template.New("titleTest").Funcs(funcMap).Parse(templateText) - if err != nil { - log.Fatalf("parsing: %s", err) - } - - // Run the template to verify the output. - err = tmpl.Execute(os.Stdout, "the go programming language") - if err != nil { - log.Fatalf("execution: %s", err) - } - - // Output: - // Input: "the go programming language" - // Output 0: The Go Programming Language - // Output 1: "The Go Programming Language" - // Output 2: "The Go Programming Language" -} diff --git a/vendor/github.com/alecthomas/template/exec_test.go b/vendor/github.com/alecthomas/template/exec_test.go deleted file mode 100644 index 69c213ed..00000000 --- a/vendor/github.com/alecthomas/template/exec_test.go +++ /dev/null @@ -1,1044 +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 template - -import ( - "bytes" - "errors" - "flag" - "fmt" - "reflect" - "strings" - "testing" -) - -var debug = flag.Bool("debug", false, "show the errors produced by the tests") - -// T has lots of interesting pieces to use to test execution. -type T struct { - // Basics - True bool - I int - U16 uint16 - X string - FloatZero float64 - ComplexZero complex128 - // Nested structs. - U *U - // Struct with String method. - V0 V - V1, V2 *V - // Struct with Error method. - W0 W - W1, W2 *W - // Slices - SI []int - SIEmpty []int - SB []bool - // Maps - MSI map[string]int - MSIone map[string]int // one element, for deterministic output - MSIEmpty map[string]int - MXI map[interface{}]int - MII map[int]int - SMSI []map[string]int - // Empty interfaces; used to see if we can dig inside one. - Empty0 interface{} // nil - Empty1 interface{} - Empty2 interface{} - Empty3 interface{} - Empty4 interface{} - // Non-empty interface. - NonEmptyInterface I - // Stringer. - Str fmt.Stringer - Err error - // Pointers - PI *int - PS *string - PSI *[]int - NIL *int - // Function (not method) - BinaryFunc func(string, string) string - VariadicFunc func(...string) string - VariadicFuncInt func(int, ...string) string - NilOKFunc func(*int) bool - ErrFunc func() (string, error) - // Template to test evaluation of templates. - Tmpl *Template - // Unexported field; cannot be accessed by template. - unexported int -} - -type U struct { - V string -} - -type V struct { - j int -} - -func (v *V) String() string { - if v == nil { - return "nilV" - } - return fmt.Sprintf("<%d>", v.j) -} - -type W struct { - k int -} - -func (w *W) Error() string { - if w == nil { - return "nilW" - } - return fmt.Sprintf("[%d]", w.k) -} - -var tVal = &T{ - True: true, - I: 17, - U16: 16, - X: "x", - U: &U{"v"}, - V0: V{6666}, - V1: &V{7777}, // leave V2 as nil - W0: W{888}, - W1: &W{999}, // leave W2 as nil - SI: []int{3, 4, 5}, - SB: []bool{true, false}, - MSI: map[string]int{"one": 1, "two": 2, "three": 3}, - MSIone: map[string]int{"one": 1}, - MXI: map[interface{}]int{"one": 1}, - MII: map[int]int{1: 1}, - SMSI: []map[string]int{ - {"one": 1, "two": 2}, - {"eleven": 11, "twelve": 12}, - }, - Empty1: 3, - Empty2: "empty2", - Empty3: []int{7, 8}, - Empty4: &U{"UinEmpty"}, - NonEmptyInterface: new(T), - Str: bytes.NewBuffer([]byte("foozle")), - Err: errors.New("erroozle"), - PI: newInt(23), - PS: newString("a string"), - PSI: newIntSlice(21, 22, 23), - BinaryFunc: func(a, b string) string { return fmt.Sprintf("[%s=%s]", a, b) }, - VariadicFunc: func(s ...string) string { return fmt.Sprint("<", strings.Join(s, "+"), ">") }, - VariadicFuncInt: func(a int, s ...string) string { return fmt.Sprint(a, "=<", strings.Join(s, "+"), ">") }, - NilOKFunc: func(s *int) bool { return s == nil }, - ErrFunc: func() (string, error) { return "bla", nil }, - Tmpl: Must(New("x").Parse("test template")), // "x" is the value of .X -} - -// A non-empty interface. -type I interface { - Method0() string -} - -var iVal I = tVal - -// Helpers for creation. -func newInt(n int) *int { - return &n -} - -func newString(s string) *string { - return &s -} - -func newIntSlice(n ...int) *[]int { - p := new([]int) - *p = make([]int, len(n)) - copy(*p, n) - return p -} - -// Simple methods with and without arguments. -func (t *T) Method0() string { - return "M0" -} - -func (t *T) Method1(a int) int { - return a -} - -func (t *T) Method2(a uint16, b string) string { - return fmt.Sprintf("Method2: %d %s", a, b) -} - -func (t *T) Method3(v interface{}) string { - return fmt.Sprintf("Method3: %v", v) -} - -func (t *T) Copy() *T { - n := new(T) - *n = *t - return n -} - -func (t *T) MAdd(a int, b []int) []int { - v := make([]int, len(b)) - for i, x := range b { - v[i] = x + a - } - return v -} - -var myError = errors.New("my error") - -// MyError returns a value and an error according to its argument. -func (t *T) MyError(error bool) (bool, error) { - if error { - return true, myError - } - return false, nil -} - -// A few methods to test chaining. -func (t *T) GetU() *U { - return t.U -} - -func (u *U) TrueFalse(b bool) string { - if b { - return "true" - } - return "" -} - -func typeOf(arg interface{}) string { - return fmt.Sprintf("%T", arg) -} - -type execTest struct { - name string - input string - output string - data interface{} - ok bool -} - -// bigInt and bigUint are hex string representing numbers either side -// of the max int boundary. -// We do it this way so the test doesn't depend on ints being 32 bits. -var ( - bigInt = fmt.Sprintf("0x%x", int(1<", tVal, true}, - {"map .one interface", "{{.MXI.one}}", "1", tVal, true}, - {"map .WRONG args", "{{.MSI.one 1}}", "", tVal, false}, - {"map .WRONG type", "{{.MII.one}}", "", tVal, false}, - - // Dots of all kinds to test basic evaluation. - {"dot int", "<{{.}}>", "<13>", 13, true}, - {"dot uint", "<{{.}}>", "<14>", uint(14), true}, - {"dot float", "<{{.}}>", "<15.1>", 15.1, true}, - {"dot bool", "<{{.}}>", "", true, true}, - {"dot complex", "<{{.}}>", "<(16.2-17i)>", 16.2 - 17i, true}, - {"dot string", "<{{.}}>", "", "hello", true}, - {"dot slice", "<{{.}}>", "<[-1 -2 -3]>", []int{-1, -2, -3}, true}, - {"dot map", "<{{.}}>", "", map[string]int{"two": 22}, true}, - {"dot struct", "<{{.}}>", "<{7 seven}>", struct { - a int - b string - }{7, "seven"}, true}, - - // Variables. - {"$ int", "{{$}}", "123", 123, true}, - {"$.I", "{{$.I}}", "17", tVal, true}, - {"$.U.V", "{{$.U.V}}", "v", tVal, true}, - {"declare in action", "{{$x := $.U.V}}{{$x}}", "v", tVal, true}, - - // Type with String method. - {"V{6666}.String()", "-{{.V0}}-", "-<6666>-", tVal, true}, - {"&V{7777}.String()", "-{{.V1}}-", "-<7777>-", tVal, true}, - {"(*V)(nil).String()", "-{{.V2}}-", "-nilV-", tVal, true}, - - // Type with Error method. - {"W{888}.Error()", "-{{.W0}}-", "-[888]-", tVal, true}, - {"&W{999}.Error()", "-{{.W1}}-", "-[999]-", tVal, true}, - {"(*W)(nil).Error()", "-{{.W2}}-", "-nilW-", tVal, true}, - - // Pointers. - {"*int", "{{.PI}}", "23", tVal, true}, - {"*string", "{{.PS}}", "a string", tVal, true}, - {"*[]int", "{{.PSI}}", "[21 22 23]", tVal, true}, - {"*[]int[1]", "{{index .PSI 1}}", "22", tVal, true}, - {"NIL", "{{.NIL}}", "", tVal, true}, - - // Empty interfaces holding values. - {"empty nil", "{{.Empty0}}", "", tVal, true}, - {"empty with int", "{{.Empty1}}", "3", tVal, true}, - {"empty with string", "{{.Empty2}}", "empty2", tVal, true}, - {"empty with slice", "{{.Empty3}}", "[7 8]", tVal, true}, - {"empty with struct", "{{.Empty4}}", "{UinEmpty}", tVal, true}, - {"empty with struct, field", "{{.Empty4.V}}", "UinEmpty", tVal, true}, - - // Method calls. - {".Method0", "-{{.Method0}}-", "-M0-", tVal, true}, - {".Method1(1234)", "-{{.Method1 1234}}-", "-1234-", tVal, true}, - {".Method1(.I)", "-{{.Method1 .I}}-", "-17-", tVal, true}, - {".Method2(3, .X)", "-{{.Method2 3 .X}}-", "-Method2: 3 x-", tVal, true}, - {".Method2(.U16, `str`)", "-{{.Method2 .U16 `str`}}-", "-Method2: 16 str-", tVal, true}, - {".Method2(.U16, $x)", "{{if $x := .X}}-{{.Method2 .U16 $x}}{{end}}-", "-Method2: 16 x-", tVal, true}, - {".Method3(nil constant)", "-{{.Method3 nil}}-", "-Method3: -", tVal, true}, - {".Method3(nil value)", "-{{.Method3 .MXI.unset}}-", "-Method3: -", tVal, true}, - {"method on var", "{{if $x := .}}-{{$x.Method2 .U16 $x.X}}{{end}}-", "-Method2: 16 x-", tVal, true}, - {"method on chained var", - "{{range .MSIone}}{{if $.U.TrueFalse $.True}}{{$.U.TrueFalse $.True}}{{else}}WRONG{{end}}{{end}}", - "true", tVal, true}, - {"chained method", - "{{range .MSIone}}{{if $.GetU.TrueFalse $.True}}{{$.U.TrueFalse $.True}}{{else}}WRONG{{end}}{{end}}", - "true", tVal, true}, - {"chained method on variable", - "{{with $x := .}}{{with .SI}}{{$.GetU.TrueFalse $.True}}{{end}}{{end}}", - "true", tVal, true}, - {".NilOKFunc not nil", "{{call .NilOKFunc .PI}}", "false", tVal, true}, - {".NilOKFunc nil", "{{call .NilOKFunc nil}}", "true", tVal, true}, - - // Function call builtin. - {".BinaryFunc", "{{call .BinaryFunc `1` `2`}}", "[1=2]", tVal, true}, - {".VariadicFunc0", "{{call .VariadicFunc}}", "<>", tVal, true}, - {".VariadicFunc2", "{{call .VariadicFunc `he` `llo`}}", "", tVal, true}, - {".VariadicFuncInt", "{{call .VariadicFuncInt 33 `he` `llo`}}", "33=", tVal, true}, - {"if .BinaryFunc call", "{{ if .BinaryFunc}}{{call .BinaryFunc `1` `2`}}{{end}}", "[1=2]", tVal, true}, - {"if not .BinaryFunc call", "{{ if not .BinaryFunc}}{{call .BinaryFunc `1` `2`}}{{else}}No{{end}}", "No", tVal, true}, - {"Interface Call", `{{stringer .S}}`, "foozle", map[string]interface{}{"S": bytes.NewBufferString("foozle")}, true}, - {".ErrFunc", "{{call .ErrFunc}}", "bla", tVal, true}, - - // Erroneous function calls (check args). - {".BinaryFuncTooFew", "{{call .BinaryFunc `1`}}", "", tVal, false}, - {".BinaryFuncTooMany", "{{call .BinaryFunc `1` `2` `3`}}", "", tVal, false}, - {".BinaryFuncBad0", "{{call .BinaryFunc 1 3}}", "", tVal, false}, - {".BinaryFuncBad1", "{{call .BinaryFunc `1` 3}}", "", tVal, false}, - {".VariadicFuncBad0", "{{call .VariadicFunc 3}}", "", tVal, false}, - {".VariadicFuncIntBad0", "{{call .VariadicFuncInt}}", "", tVal, false}, - {".VariadicFuncIntBad`", "{{call .VariadicFuncInt `x`}}", "", tVal, false}, - {".VariadicFuncNilBad", "{{call .VariadicFunc nil}}", "", tVal, false}, - - // Pipelines. - {"pipeline", "-{{.Method0 | .Method2 .U16}}-", "-Method2: 16 M0-", tVal, true}, - {"pipeline func", "-{{call .VariadicFunc `llo` | call .VariadicFunc `he` }}-", "->-", tVal, true}, - - // Parenthesized expressions - {"parens in pipeline", "{{printf `%d %d %d` (1) (2 | add 3) (add 4 (add 5 6))}}", "1 5 15", tVal, true}, - - // Parenthesized expressions with field accesses - {"parens: $ in paren", "{{($).X}}", "x", tVal, true}, - {"parens: $.GetU in paren", "{{($.GetU).V}}", "v", tVal, true}, - {"parens: $ in paren in pipe", "{{($ | echo).X}}", "x", tVal, true}, - {"parens: spaces and args", `{{(makemap "up" "down" "left" "right").left}}`, "right", tVal, true}, - - // If. - {"if true", "{{if true}}TRUE{{end}}", "TRUE", tVal, true}, - {"if false", "{{if false}}TRUE{{else}}FALSE{{end}}", "FALSE", tVal, true}, - {"if nil", "{{if nil}}TRUE{{end}}", "", tVal, false}, - {"if 1", "{{if 1}}NON-ZERO{{else}}ZERO{{end}}", "NON-ZERO", tVal, true}, - {"if 0", "{{if 0}}NON-ZERO{{else}}ZERO{{end}}", "ZERO", tVal, true}, - {"if 1.5", "{{if 1.5}}NON-ZERO{{else}}ZERO{{end}}", "NON-ZERO", tVal, true}, - {"if 0.0", "{{if .FloatZero}}NON-ZERO{{else}}ZERO{{end}}", "ZERO", tVal, true}, - {"if 1.5i", "{{if 1.5i}}NON-ZERO{{else}}ZERO{{end}}", "NON-ZERO", tVal, true}, - {"if 0.0i", "{{if .ComplexZero}}NON-ZERO{{else}}ZERO{{end}}", "ZERO", tVal, true}, - {"if emptystring", "{{if ``}}NON-EMPTY{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"if string", "{{if `notempty`}}NON-EMPTY{{else}}EMPTY{{end}}", "NON-EMPTY", tVal, true}, - {"if emptyslice", "{{if .SIEmpty}}NON-EMPTY{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"if slice", "{{if .SI}}NON-EMPTY{{else}}EMPTY{{end}}", "NON-EMPTY", tVal, true}, - {"if emptymap", "{{if .MSIEmpty}}NON-EMPTY{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"if map", "{{if .MSI}}NON-EMPTY{{else}}EMPTY{{end}}", "NON-EMPTY", tVal, true}, - {"if map unset", "{{if .MXI.none}}NON-ZERO{{else}}ZERO{{end}}", "ZERO", tVal, true}, - {"if map not unset", "{{if not .MXI.none}}ZERO{{else}}NON-ZERO{{end}}", "ZERO", tVal, true}, - {"if $x with $y int", "{{if $x := true}}{{with $y := .I}}{{$x}},{{$y}}{{end}}{{end}}", "true,17", tVal, true}, - {"if $x with $x int", "{{if $x := true}}{{with $x := .I}}{{$x}},{{end}}{{$x}}{{end}}", "17,true", tVal, true}, - {"if else if", "{{if false}}FALSE{{else if true}}TRUE{{end}}", "TRUE", tVal, true}, - {"if else chain", "{{if eq 1 3}}1{{else if eq 2 3}}2{{else if eq 3 3}}3{{end}}", "3", tVal, true}, - - // Print etc. - {"print", `{{print "hello, print"}}`, "hello, print", tVal, true}, - {"print 123", `{{print 1 2 3}}`, "1 2 3", tVal, true}, - {"print nil", `{{print nil}}`, "", tVal, true}, - {"println", `{{println 1 2 3}}`, "1 2 3\n", tVal, true}, - {"printf int", `{{printf "%04x" 127}}`, "007f", tVal, true}, - {"printf float", `{{printf "%g" 3.5}}`, "3.5", tVal, true}, - {"printf complex", `{{printf "%g" 1+7i}}`, "(1+7i)", tVal, true}, - {"printf string", `{{printf "%s" "hello"}}`, "hello", tVal, true}, - {"printf function", `{{printf "%#q" zeroArgs}}`, "`zeroArgs`", tVal, true}, - {"printf field", `{{printf "%s" .U.V}}`, "v", tVal, true}, - {"printf method", `{{printf "%s" .Method0}}`, "M0", tVal, true}, - {"printf dot", `{{with .I}}{{printf "%d" .}}{{end}}`, "17", tVal, true}, - {"printf var", `{{with $x := .I}}{{printf "%d" $x}}{{end}}`, "17", tVal, true}, - {"printf lots", `{{printf "%d %s %g %s" 127 "hello" 7-3i .Method0}}`, "127 hello (7-3i) M0", tVal, true}, - - // HTML. - {"html", `{{html ""}}`, - "<script>alert("XSS");</script>", nil, true}, - {"html pipeline", `{{printf "" | html}}`, - "<script>alert("XSS");</script>", nil, true}, - {"html", `{{html .PS}}`, "a string", tVal, true}, - - // JavaScript. - {"js", `{{js .}}`, `It\'d be nice.`, `It'd be nice.`, true}, - - // URL query. - {"urlquery", `{{"http://www.example.org/"|urlquery}}`, "http%3A%2F%2Fwww.example.org%2F", nil, true}, - - // Booleans - {"not", "{{not true}} {{not false}}", "false true", nil, true}, - {"and", "{{and false 0}} {{and 1 0}} {{and 0 true}} {{and 1 1}}", "false 0 0 1", nil, true}, - {"or", "{{or 0 0}} {{or 1 0}} {{or 0 true}} {{or 1 1}}", "0 1 true 1", nil, true}, - {"boolean if", "{{if and true 1 `hi`}}TRUE{{else}}FALSE{{end}}", "TRUE", tVal, true}, - {"boolean if not", "{{if and true 1 `hi` | not}}TRUE{{else}}FALSE{{end}}", "FALSE", nil, true}, - - // Indexing. - {"slice[0]", "{{index .SI 0}}", "3", tVal, true}, - {"slice[1]", "{{index .SI 1}}", "4", tVal, true}, - {"slice[HUGE]", "{{index .SI 10}}", "", tVal, false}, - {"slice[WRONG]", "{{index .SI `hello`}}", "", tVal, false}, - {"map[one]", "{{index .MSI `one`}}", "1", tVal, true}, - {"map[two]", "{{index .MSI `two`}}", "2", tVal, true}, - {"map[NO]", "{{index .MSI `XXX`}}", "0", tVal, true}, - {"map[nil]", "{{index .MSI nil}}", "0", tVal, true}, - {"map[WRONG]", "{{index .MSI 10}}", "", tVal, false}, - {"double index", "{{index .SMSI 1 `eleven`}}", "11", tVal, true}, - - // Len. - {"slice", "{{len .SI}}", "3", tVal, true}, - {"map", "{{len .MSI }}", "3", tVal, true}, - {"len of int", "{{len 3}}", "", tVal, false}, - {"len of nothing", "{{len .Empty0}}", "", tVal, false}, - - // With. - {"with true", "{{with true}}{{.}}{{end}}", "true", tVal, true}, - {"with false", "{{with false}}{{.}}{{else}}FALSE{{end}}", "FALSE", tVal, true}, - {"with 1", "{{with 1}}{{.}}{{else}}ZERO{{end}}", "1", tVal, true}, - {"with 0", "{{with 0}}{{.}}{{else}}ZERO{{end}}", "ZERO", tVal, true}, - {"with 1.5", "{{with 1.5}}{{.}}{{else}}ZERO{{end}}", "1.5", tVal, true}, - {"with 0.0", "{{with .FloatZero}}{{.}}{{else}}ZERO{{end}}", "ZERO", tVal, true}, - {"with 1.5i", "{{with 1.5i}}{{.}}{{else}}ZERO{{end}}", "(0+1.5i)", tVal, true}, - {"with 0.0i", "{{with .ComplexZero}}{{.}}{{else}}ZERO{{end}}", "ZERO", tVal, true}, - {"with emptystring", "{{with ``}}{{.}}{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"with string", "{{with `notempty`}}{{.}}{{else}}EMPTY{{end}}", "notempty", tVal, true}, - {"with emptyslice", "{{with .SIEmpty}}{{.}}{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"with slice", "{{with .SI}}{{.}}{{else}}EMPTY{{end}}", "[3 4 5]", tVal, true}, - {"with emptymap", "{{with .MSIEmpty}}{{.}}{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"with map", "{{with .MSIone}}{{.}}{{else}}EMPTY{{end}}", "map[one:1]", tVal, true}, - {"with empty interface, struct field", "{{with .Empty4}}{{.V}}{{end}}", "UinEmpty", tVal, true}, - {"with $x int", "{{with $x := .I}}{{$x}}{{end}}", "17", tVal, true}, - {"with $x struct.U.V", "{{with $x := $}}{{$x.U.V}}{{end}}", "v", tVal, true}, - {"with variable and action", "{{with $x := $}}{{$y := $.U.V}}{{$y}}{{end}}", "v", tVal, true}, - - // Range. - {"range []int", "{{range .SI}}-{{.}}-{{end}}", "-3--4--5-", tVal, true}, - {"range empty no else", "{{range .SIEmpty}}-{{.}}-{{end}}", "", tVal, true}, - {"range []int else", "{{range .SI}}-{{.}}-{{else}}EMPTY{{end}}", "-3--4--5-", tVal, true}, - {"range empty else", "{{range .SIEmpty}}-{{.}}-{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"range []bool", "{{range .SB}}-{{.}}-{{end}}", "-true--false-", tVal, true}, - {"range []int method", "{{range .SI | .MAdd .I}}-{{.}}-{{end}}", "-20--21--22-", tVal, true}, - {"range map", "{{range .MSI}}-{{.}}-{{end}}", "-1--3--2-", tVal, true}, - {"range empty map no else", "{{range .MSIEmpty}}-{{.}}-{{end}}", "", tVal, true}, - {"range map else", "{{range .MSI}}-{{.}}-{{else}}EMPTY{{end}}", "-1--3--2-", tVal, true}, - {"range empty map else", "{{range .MSIEmpty}}-{{.}}-{{else}}EMPTY{{end}}", "EMPTY", tVal, true}, - {"range empty interface", "{{range .Empty3}}-{{.}}-{{else}}EMPTY{{end}}", "-7--8-", tVal, true}, - {"range empty nil", "{{range .Empty0}}-{{.}}-{{end}}", "", tVal, true}, - {"range $x SI", "{{range $x := .SI}}<{{$x}}>{{end}}", "<3><4><5>", tVal, true}, - {"range $x $y SI", "{{range $x, $y := .SI}}<{{$x}}={{$y}}>{{end}}", "<0=3><1=4><2=5>", tVal, true}, - {"range $x MSIone", "{{range $x := .MSIone}}<{{$x}}>{{end}}", "<1>", tVal, true}, - {"range $x $y MSIone", "{{range $x, $y := .MSIone}}<{{$x}}={{$y}}>{{end}}", "", tVal, true}, - {"range $x PSI", "{{range $x := .PSI}}<{{$x}}>{{end}}", "<21><22><23>", tVal, true}, - {"declare in range", "{{range $x := .PSI}}<{{$foo:=$x}}{{$x}}>{{end}}", "<21><22><23>", tVal, true}, - {"range count", `{{range $i, $x := count 5}}[{{$i}}]{{$x}}{{end}}`, "[0]a[1]b[2]c[3]d[4]e", tVal, true}, - {"range nil count", `{{range $i, $x := count 0}}{{else}}empty{{end}}`, "empty", tVal, true}, - - // Cute examples. - {"or as if true", `{{or .SI "slice is empty"}}`, "[3 4 5]", tVal, true}, - {"or as if false", `{{or .SIEmpty "slice is empty"}}`, "slice is empty", tVal, true}, - - // Error handling. - {"error method, error", "{{.MyError true}}", "", tVal, false}, - {"error method, no error", "{{.MyError false}}", "false", tVal, true}, - - // Fixed bugs. - // Must separate dot and receiver; otherwise args are evaluated with dot set to variable. - {"bug0", "{{range .MSIone}}{{if $.Method1 .}}X{{end}}{{end}}", "X", tVal, true}, - // Do not loop endlessly in indirect for non-empty interfaces. - // The bug appears with *interface only; looped forever. - {"bug1", "{{.Method0}}", "M0", &iVal, true}, - // Was taking address of interface field, so method set was empty. - {"bug2", "{{$.NonEmptyInterface.Method0}}", "M0", tVal, true}, - // Struct values were not legal in with - mere oversight. - {"bug3", "{{with $}}{{.Method0}}{{end}}", "M0", tVal, true}, - // Nil interface values in if. - {"bug4", "{{if .Empty0}}non-nil{{else}}nil{{end}}", "nil", tVal, true}, - // Stringer. - {"bug5", "{{.Str}}", "foozle", tVal, true}, - {"bug5a", "{{.Err}}", "erroozle", tVal, true}, - // Args need to be indirected and dereferenced sometimes. - {"bug6a", "{{vfunc .V0 .V1}}", "vfunc", tVal, true}, - {"bug6b", "{{vfunc .V0 .V0}}", "vfunc", tVal, true}, - {"bug6c", "{{vfunc .V1 .V0}}", "vfunc", tVal, true}, - {"bug6d", "{{vfunc .V1 .V1}}", "vfunc", tVal, true}, - // Legal parse but illegal execution: non-function should have no arguments. - {"bug7a", "{{3 2}}", "", tVal, false}, - {"bug7b", "{{$x := 1}}{{$x 2}}", "", tVal, false}, - {"bug7c", "{{$x := 1}}{{3 | $x}}", "", tVal, false}, - // Pipelined arg was not being type-checked. - {"bug8a", "{{3|oneArg}}", "", tVal, false}, - {"bug8b", "{{4|dddArg 3}}", "", tVal, false}, - // A bug was introduced that broke map lookups for lower-case names. - {"bug9", "{{.cause}}", "neglect", map[string]string{"cause": "neglect"}, true}, - // Field chain starting with function did not work. - {"bug10", "{{mapOfThree.three}}-{{(mapOfThree).three}}", "3-3", 0, true}, - // Dereferencing nil pointer while evaluating function arguments should not panic. Issue 7333. - {"bug11", "{{valueString .PS}}", "", T{}, false}, - // 0xef gave constant type float64. Issue 8622. - {"bug12xe", "{{printf `%T` 0xef}}", "int", T{}, true}, - {"bug12xE", "{{printf `%T` 0xEE}}", "int", T{}, true}, - {"bug12Xe", "{{printf `%T` 0Xef}}", "int", T{}, true}, - {"bug12XE", "{{printf `%T` 0XEE}}", "int", T{}, true}, - // Chained nodes did not work as arguments. Issue 8473. - {"bug13", "{{print (.Copy).I}}", "17", tVal, true}, -} - -func zeroArgs() string { - return "zeroArgs" -} - -func oneArg(a string) string { - return "oneArg=" + a -} - -func dddArg(a int, b ...string) string { - return fmt.Sprintln(a, b) -} - -// count returns a channel that will deliver n sequential 1-letter strings starting at "a" -func count(n int) chan string { - if n == 0 { - return nil - } - c := make(chan string) - go func() { - for i := 0; i < n; i++ { - c <- "abcdefghijklmnop"[i : i+1] - } - close(c) - }() - return c -} - -// vfunc takes a *V and a V -func vfunc(V, *V) string { - return "vfunc" -} - -// valueString takes a string, not a pointer. -func valueString(v string) string { - return "value is ignored" -} - -func add(args ...int) int { - sum := 0 - for _, x := range args { - sum += x - } - return sum -} - -func echo(arg interface{}) interface{} { - return arg -} - -func makemap(arg ...string) map[string]string { - if len(arg)%2 != 0 { - panic("bad makemap") - } - m := make(map[string]string) - for i := 0; i < len(arg); i += 2 { - m[arg[i]] = arg[i+1] - } - return m -} - -func stringer(s fmt.Stringer) string { - return s.String() -} - -func mapOfThree() interface{} { - return map[string]int{"three": 3} -} - -func testExecute(execTests []execTest, template *Template, t *testing.T) { - b := new(bytes.Buffer) - funcs := FuncMap{ - "add": add, - "count": count, - "dddArg": dddArg, - "echo": echo, - "makemap": makemap, - "mapOfThree": mapOfThree, - "oneArg": oneArg, - "stringer": stringer, - "typeOf": typeOf, - "valueString": valueString, - "vfunc": vfunc, - "zeroArgs": zeroArgs, - } - for _, test := range execTests { - var tmpl *Template - var err error - if template == nil { - tmpl, err = New(test.name).Funcs(funcs).Parse(test.input) - } else { - tmpl, err = template.New(test.name).Funcs(funcs).Parse(test.input) - } - if err != nil { - t.Errorf("%s: parse error: %s", test.name, err) - continue - } - b.Reset() - err = tmpl.Execute(b, test.data) - switch { - case !test.ok && err == nil: - t.Errorf("%s: expected error; got none", test.name) - continue - case test.ok && err != nil: - t.Errorf("%s: unexpected execute error: %s", test.name, err) - continue - case !test.ok && err != nil: - // expected error, got one - if *debug { - fmt.Printf("%s: %s\n\t%s\n", test.name, test.input, err) - } - } - result := b.String() - if result != test.output { - t.Errorf("%s: expected\n\t%q\ngot\n\t%q", test.name, test.output, result) - } - } -} - -func TestExecute(t *testing.T) { - testExecute(execTests, nil, t) -} - -var delimPairs = []string{ - "", "", // default - "{{", "}}", // same as default - "<<", ">>", // distinct - "|", "|", // same - "(日)", "(本)", // peculiar -} - -func TestDelims(t *testing.T) { - const hello = "Hello, world" - var value = struct{ Str string }{hello} - for i := 0; i < len(delimPairs); i += 2 { - text := ".Str" - left := delimPairs[i+0] - trueLeft := left - right := delimPairs[i+1] - trueRight := right - if left == "" { // default case - trueLeft = "{{" - } - if right == "" { // default case - trueRight = "}}" - } - text = trueLeft + text + trueRight - // Now add a comment - text += trueLeft + "/*comment*/" + trueRight - // Now add an action containing a string. - text += trueLeft + `"` + trueLeft + `"` + trueRight - // At this point text looks like `{{.Str}}{{/*comment*/}}{{"{{"}}`. - tmpl, err := New("delims").Delims(left, right).Parse(text) - if err != nil { - t.Fatalf("delim %q text %q parse err %s", left, text, err) - } - var b = new(bytes.Buffer) - err = tmpl.Execute(b, value) - if err != nil { - t.Fatalf("delim %q exec err %s", left, err) - } - if b.String() != hello+trueLeft { - t.Errorf("expected %q got %q", hello+trueLeft, b.String()) - } - } -} - -// Check that an error from a method flows back to the top. -func TestExecuteError(t *testing.T) { - b := new(bytes.Buffer) - tmpl := New("error") - _, err := tmpl.Parse("{{.MyError true}}") - if err != nil { - t.Fatalf("parse error: %s", err) - } - err = tmpl.Execute(b, tVal) - if err == nil { - t.Errorf("expected error; got none") - } else if !strings.Contains(err.Error(), myError.Error()) { - if *debug { - fmt.Printf("test execute error: %s\n", err) - } - t.Errorf("expected myError; got %s", err) - } -} - -const execErrorText = `line 1 -line 2 -line 3 -{{template "one" .}} -{{define "one"}}{{template "two" .}}{{end}} -{{define "two"}}{{template "three" .}}{{end}} -{{define "three"}}{{index "hi" $}}{{end}}` - -// Check that an error from a nested template contains all the relevant information. -func TestExecError(t *testing.T) { - tmpl, err := New("top").Parse(execErrorText) - if err != nil { - t.Fatal("parse error:", err) - } - var b bytes.Buffer - err = tmpl.Execute(&b, 5) // 5 is out of range indexing "hi" - if err == nil { - t.Fatal("expected error") - } - const want = `template: top:7:20: executing "three" at : error calling index: index out of range: 5` - got := err.Error() - if got != want { - t.Errorf("expected\n%q\ngot\n%q", want, got) - } -} - -func TestJSEscaping(t *testing.T) { - testCases := []struct { - in, exp string - }{ - {`a`, `a`}, - {`'foo`, `\'foo`}, - {`Go "jump" \`, `Go \"jump\" \\`}, - {`Yukihiro says "今日は世界"`, `Yukihiro says \"今日は世界\"`}, - {"unprintable \uFDFF", `unprintable \uFDFF`}, - {``, `\x3Chtml\x3E`}, - } - for _, tc := range testCases { - s := JSEscapeString(tc.in) - if s != tc.exp { - t.Errorf("JS escaping [%s] got [%s] want [%s]", tc.in, s, tc.exp) - } - } -} - -// A nice example: walk a binary tree. - -type Tree struct { - Val int - Left, Right *Tree -} - -// Use different delimiters to test Set.Delims. -const treeTemplate = ` - (define "tree") - [ - (.Val) - (with .Left) - (template "tree" .) - (end) - (with .Right) - (template "tree" .) - (end) - ] - (end) -` - -func TestTree(t *testing.T) { - var tree = &Tree{ - 1, - &Tree{ - 2, &Tree{ - 3, - &Tree{ - 4, nil, nil, - }, - nil, - }, - &Tree{ - 5, - &Tree{ - 6, nil, nil, - }, - nil, - }, - }, - &Tree{ - 7, - &Tree{ - 8, - &Tree{ - 9, nil, nil, - }, - nil, - }, - &Tree{ - 10, - &Tree{ - 11, nil, nil, - }, - nil, - }, - }, - } - tmpl, err := New("root").Delims("(", ")").Parse(treeTemplate) - if err != nil { - t.Fatal("parse error:", err) - } - var b bytes.Buffer - stripSpace := func(r rune) rune { - if r == '\t' || r == '\n' { - return -1 - } - return r - } - const expect = "[1[2[3[4]][5[6]]][7[8[9]][10[11]]]]" - // First by looking up the template. - err = tmpl.Lookup("tree").Execute(&b, tree) - if err != nil { - t.Fatal("exec error:", err) - } - result := strings.Map(stripSpace, b.String()) - if result != expect { - t.Errorf("expected %q got %q", expect, result) - } - // Then direct to execution. - b.Reset() - err = tmpl.ExecuteTemplate(&b, "tree", tree) - if err != nil { - t.Fatal("exec error:", err) - } - result = strings.Map(stripSpace, b.String()) - if result != expect { - t.Errorf("expected %q got %q", expect, result) - } -} - -func TestExecuteOnNewTemplate(t *testing.T) { - // This is issue 3872. - _ = New("Name").Templates() -} - -const testTemplates = `{{define "one"}}one{{end}}{{define "two"}}two{{end}}` - -func TestMessageForExecuteEmpty(t *testing.T) { - // Test a truly empty template. - tmpl := New("empty") - var b bytes.Buffer - err := tmpl.Execute(&b, 0) - if err == nil { - t.Fatal("expected initial error") - } - got := err.Error() - want := `template: empty: "empty" is an incomplete or empty template` - if got != want { - t.Errorf("expected error %s got %s", want, got) - } - // Add a non-empty template to check that the error is helpful. - tests, err := New("").Parse(testTemplates) - if err != nil { - t.Fatal(err) - } - tmpl.AddParseTree("secondary", tests.Tree) - err = tmpl.Execute(&b, 0) - if err == nil { - t.Fatal("expected second error") - } - got = err.Error() - want = `template: empty: "empty" is an incomplete or empty template; defined templates are: "secondary"` - if got != want { - t.Errorf("expected error %s got %s", want, got) - } - // Make sure we can execute the secondary. - err = tmpl.ExecuteTemplate(&b, "secondary", 0) - if err != nil { - t.Fatal(err) - } -} - -func TestFinalForPrintf(t *testing.T) { - tmpl, err := New("").Parse(`{{"x" | printf}}`) - if err != nil { - t.Fatal(err) - } - var b bytes.Buffer - err = tmpl.Execute(&b, 0) - if err != nil { - t.Fatal(err) - } -} - -type cmpTest struct { - expr string - truth string - ok bool -} - -var cmpTests = []cmpTest{ - {"eq true true", "true", true}, - {"eq true false", "false", true}, - {"eq 1+2i 1+2i", "true", true}, - {"eq 1+2i 1+3i", "false", true}, - {"eq 1.5 1.5", "true", true}, - {"eq 1.5 2.5", "false", true}, - {"eq 1 1", "true", true}, - {"eq 1 2", "false", true}, - {"eq `xy` `xy`", "true", true}, - {"eq `xy` `xyz`", "false", true}, - {"eq .Uthree .Uthree", "true", true}, - {"eq .Uthree .Ufour", "false", true}, - {"eq 3 4 5 6 3", "true", true}, - {"eq 3 4 5 6 7", "false", true}, - {"ne true true", "false", true}, - {"ne true false", "true", true}, - {"ne 1+2i 1+2i", "false", true}, - {"ne 1+2i 1+3i", "true", true}, - {"ne 1.5 1.5", "false", true}, - {"ne 1.5 2.5", "true", true}, - {"ne 1 1", "false", true}, - {"ne 1 2", "true", true}, - {"ne `xy` `xy`", "false", true}, - {"ne `xy` `xyz`", "true", true}, - {"ne .Uthree .Uthree", "false", true}, - {"ne .Uthree .Ufour", "true", true}, - {"lt 1.5 1.5", "false", true}, - {"lt 1.5 2.5", "true", true}, - {"lt 1 1", "false", true}, - {"lt 1 2", "true", true}, - {"lt `xy` `xy`", "false", true}, - {"lt `xy` `xyz`", "true", true}, - {"lt .Uthree .Uthree", "false", true}, - {"lt .Uthree .Ufour", "true", true}, - {"le 1.5 1.5", "true", true}, - {"le 1.5 2.5", "true", true}, - {"le 2.5 1.5", "false", true}, - {"le 1 1", "true", true}, - {"le 1 2", "true", true}, - {"le 2 1", "false", true}, - {"le `xy` `xy`", "true", true}, - {"le `xy` `xyz`", "true", true}, - {"le `xyz` `xy`", "false", true}, - {"le .Uthree .Uthree", "true", true}, - {"le .Uthree .Ufour", "true", true}, - {"le .Ufour .Uthree", "false", true}, - {"gt 1.5 1.5", "false", true}, - {"gt 1.5 2.5", "false", true}, - {"gt 1 1", "false", true}, - {"gt 2 1", "true", true}, - {"gt 1 2", "false", true}, - {"gt `xy` `xy`", "false", true}, - {"gt `xy` `xyz`", "false", true}, - {"gt .Uthree .Uthree", "false", true}, - {"gt .Uthree .Ufour", "false", true}, - {"gt .Ufour .Uthree", "true", true}, - {"ge 1.5 1.5", "true", true}, - {"ge 1.5 2.5", "false", true}, - {"ge 2.5 1.5", "true", true}, - {"ge 1 1", "true", true}, - {"ge 1 2", "false", true}, - {"ge 2 1", "true", true}, - {"ge `xy` `xy`", "true", true}, - {"ge `xy` `xyz`", "false", true}, - {"ge `xyz` `xy`", "true", true}, - {"ge .Uthree .Uthree", "true", true}, - {"ge .Uthree .Ufour", "false", true}, - {"ge .Ufour .Uthree", "true", true}, - // Mixing signed and unsigned integers. - {"eq .Uthree .Three", "true", true}, - {"eq .Three .Uthree", "true", true}, - {"le .Uthree .Three", "true", true}, - {"le .Three .Uthree", "true", true}, - {"ge .Uthree .Three", "true", true}, - {"ge .Three .Uthree", "true", true}, - {"lt .Uthree .Three", "false", true}, - {"lt .Three .Uthree", "false", true}, - {"gt .Uthree .Three", "false", true}, - {"gt .Three .Uthree", "false", true}, - {"eq .Ufour .Three", "false", true}, - {"lt .Ufour .Three", "false", true}, - {"gt .Ufour .Three", "true", true}, - {"eq .NegOne .Uthree", "false", true}, - {"eq .Uthree .NegOne", "false", true}, - {"ne .NegOne .Uthree", "true", true}, - {"ne .Uthree .NegOne", "true", true}, - {"lt .NegOne .Uthree", "true", true}, - {"lt .Uthree .NegOne", "false", true}, - {"le .NegOne .Uthree", "true", true}, - {"le .Uthree .NegOne", "false", true}, - {"gt .NegOne .Uthree", "false", true}, - {"gt .Uthree .NegOne", "true", true}, - {"ge .NegOne .Uthree", "false", true}, - {"ge .Uthree .NegOne", "true", true}, - {"eq (index `x` 0) 'x'", "true", true}, // The example that triggered this rule. - {"eq (index `x` 0) 'y'", "false", true}, - // Errors - {"eq `xy` 1", "", false}, // Different types. - {"eq 2 2.0", "", false}, // Different types. - {"lt true true", "", false}, // Unordered types. - {"lt 1+0i 1+0i", "", false}, // Unordered types. -} - -func TestComparison(t *testing.T) { - b := new(bytes.Buffer) - var cmpStruct = struct { - Uthree, Ufour uint - NegOne, Three int - }{3, 4, -1, 3} - for _, test := range cmpTests { - text := fmt.Sprintf("{{if %s}}true{{else}}false{{end}}", test.expr) - tmpl, err := New("empty").Parse(text) - if err != nil { - t.Fatalf("%q: %s", test.expr, err) - } - b.Reset() - err = tmpl.Execute(b, &cmpStruct) - if test.ok && err != nil { - t.Errorf("%s errored incorrectly: %s", test.expr, err) - continue - } - if !test.ok && err == nil { - t.Errorf("%s did not error", test.expr) - continue - } - if b.String() != test.truth { - t.Errorf("%s: want %s; got %s", test.expr, test.truth, b.String()) - } - } -} diff --git a/vendor/github.com/alecthomas/template/multi_test.go b/vendor/github.com/alecthomas/template/multi_test.go deleted file mode 100644 index ba4d5deb..00000000 --- a/vendor/github.com/alecthomas/template/multi_test.go +++ /dev/null @@ -1,292 +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 template - -// Tests for mulitple-template parsing and execution. - -import ( - "bytes" - "fmt" - "strings" - "testing" - "github.com/alecthomas/template/parse" -) - -const ( - noError = true - hasError = false -) - -type multiParseTest struct { - name string - input string - ok bool - names []string - results []string -} - -var multiParseTests = []multiParseTest{ - {"empty", "", noError, - nil, - nil}, - {"one", `{{define "foo"}} FOO {{end}}`, noError, - []string{"foo"}, - []string{" FOO "}}, - {"two", `{{define "foo"}} FOO {{end}}{{define "bar"}} BAR {{end}}`, noError, - []string{"foo", "bar"}, - []string{" FOO ", " BAR "}}, - // errors - {"missing end", `{{define "foo"}} FOO `, hasError, - nil, - nil}, - {"malformed name", `{{define "foo}} FOO `, hasError, - nil, - nil}, -} - -func TestMultiParse(t *testing.T) { - for _, test := range multiParseTests { - template, err := New("root").Parse(test.input) - switch { - case err == nil && !test.ok: - t.Errorf("%q: expected error; got none", test.name) - continue - case err != nil && test.ok: - t.Errorf("%q: unexpected error: %v", test.name, err) - continue - case err != nil && !test.ok: - // expected error, got one - if *debug { - fmt.Printf("%s: %s\n\t%s\n", test.name, test.input, err) - } - continue - } - if template == nil { - continue - } - if len(template.tmpl) != len(test.names)+1 { // +1 for root - t.Errorf("%s: wrong number of templates; wanted %d got %d", test.name, len(test.names), len(template.tmpl)) - continue - } - for i, name := range test.names { - tmpl, ok := template.tmpl[name] - if !ok { - t.Errorf("%s: can't find template %q", test.name, name) - continue - } - result := tmpl.Root.String() - if result != test.results[i] { - t.Errorf("%s=(%q): got\n\t%v\nexpected\n\t%v", test.name, test.input, result, test.results[i]) - } - } - } -} - -var multiExecTests = []execTest{ - {"empty", "", "", nil, true}, - {"text", "some text", "some text", nil, true}, - {"invoke x", `{{template "x" .SI}}`, "TEXT", tVal, true}, - {"invoke x no args", `{{template "x"}}`, "TEXT", tVal, true}, - {"invoke dot int", `{{template "dot" .I}}`, "17", tVal, true}, - {"invoke dot []int", `{{template "dot" .SI}}`, "[3 4 5]", tVal, true}, - {"invoke dotV", `{{template "dotV" .U}}`, "v", tVal, true}, - {"invoke nested int", `{{template "nested" .I}}`, "17", tVal, true}, - {"variable declared by template", `{{template "nested" $x:=.SI}},{{index $x 1}}`, "[3 4 5],4", tVal, true}, - - // User-defined function: test argument evaluator. - {"testFunc literal", `{{oneArg "joe"}}`, "oneArg=joe", tVal, true}, - {"testFunc .", `{{oneArg .}}`, "oneArg=joe", "joe", true}, -} - -// These strings are also in testdata/*. -const multiText1 = ` - {{define "x"}}TEXT{{end}} - {{define "dotV"}}{{.V}}{{end}} -` - -const multiText2 = ` - {{define "dot"}}{{.}}{{end}} - {{define "nested"}}{{template "dot" .}}{{end}} -` - -func TestMultiExecute(t *testing.T) { - // Declare a couple of templates first. - template, err := New("root").Parse(multiText1) - if err != nil { - t.Fatalf("parse error for 1: %s", err) - } - _, err = template.Parse(multiText2) - if err != nil { - t.Fatalf("parse error for 2: %s", err) - } - testExecute(multiExecTests, template, t) -} - -func TestParseFiles(t *testing.T) { - _, err := ParseFiles("DOES NOT EXIST") - if err == nil { - t.Error("expected error for non-existent file; got none") - } - template := New("root") - _, err = template.ParseFiles("testdata/file1.tmpl", "testdata/file2.tmpl") - if err != nil { - t.Fatalf("error parsing files: %v", err) - } - testExecute(multiExecTests, template, t) -} - -func TestParseGlob(t *testing.T) { - _, err := ParseGlob("DOES NOT EXIST") - if err == nil { - t.Error("expected error for non-existent file; got none") - } - _, err = New("error").ParseGlob("[x") - if err == nil { - t.Error("expected error for bad pattern; got none") - } - template := New("root") - _, err = template.ParseGlob("testdata/file*.tmpl") - if err != nil { - t.Fatalf("error parsing files: %v", err) - } - testExecute(multiExecTests, template, t) -} - -// In these tests, actual content (not just template definitions) comes from the parsed files. - -var templateFileExecTests = []execTest{ - {"test", `{{template "tmpl1.tmpl"}}{{template "tmpl2.tmpl"}}`, "template1\n\ny\ntemplate2\n\nx\n", 0, true}, -} - -func TestParseFilesWithData(t *testing.T) { - template, err := New("root").ParseFiles("testdata/tmpl1.tmpl", "testdata/tmpl2.tmpl") - if err != nil { - t.Fatalf("error parsing files: %v", err) - } - testExecute(templateFileExecTests, template, t) -} - -func TestParseGlobWithData(t *testing.T) { - template, err := New("root").ParseGlob("testdata/tmpl*.tmpl") - if err != nil { - t.Fatalf("error parsing files: %v", err) - } - testExecute(templateFileExecTests, template, t) -} - -const ( - cloneText1 = `{{define "a"}}{{template "b"}}{{template "c"}}{{end}}` - cloneText2 = `{{define "b"}}b{{end}}` - cloneText3 = `{{define "c"}}root{{end}}` - cloneText4 = `{{define "c"}}clone{{end}}` -) - -func TestClone(t *testing.T) { - // Create some templates and clone the root. - root, err := New("root").Parse(cloneText1) - if err != nil { - t.Fatal(err) - } - _, err = root.Parse(cloneText2) - if err != nil { - t.Fatal(err) - } - clone := Must(root.Clone()) - // Add variants to both. - _, err = root.Parse(cloneText3) - if err != nil { - t.Fatal(err) - } - _, err = clone.Parse(cloneText4) - if err != nil { - t.Fatal(err) - } - // Verify that the clone is self-consistent. - for k, v := range clone.tmpl { - if k == clone.name && v.tmpl[k] != clone { - t.Error("clone does not contain root") - } - if v != v.tmpl[v.name] { - t.Errorf("clone does not contain self for %q", k) - } - } - // Execute root. - var b bytes.Buffer - err = root.ExecuteTemplate(&b, "a", 0) - if err != nil { - t.Fatal(err) - } - if b.String() != "broot" { - t.Errorf("expected %q got %q", "broot", b.String()) - } - // Execute copy. - b.Reset() - err = clone.ExecuteTemplate(&b, "a", 0) - if err != nil { - t.Fatal(err) - } - if b.String() != "bclone" { - t.Errorf("expected %q got %q", "bclone", b.String()) - } -} - -func TestAddParseTree(t *testing.T) { - // Create some templates. - root, err := New("root").Parse(cloneText1) - if err != nil { - t.Fatal(err) - } - _, err = root.Parse(cloneText2) - if err != nil { - t.Fatal(err) - } - // Add a new parse tree. - tree, err := parse.Parse("cloneText3", cloneText3, "", "", nil, builtins) - if err != nil { - t.Fatal(err) - } - added, err := root.AddParseTree("c", tree["c"]) - // Execute. - var b bytes.Buffer - err = added.ExecuteTemplate(&b, "a", 0) - if err != nil { - t.Fatal(err) - } - if b.String() != "broot" { - t.Errorf("expected %q got %q", "broot", b.String()) - } -} - -// Issue 7032 -func TestAddParseTreeToUnparsedTemplate(t *testing.T) { - master := "{{define \"master\"}}{{end}}" - tmpl := New("master") - tree, err := parse.Parse("master", master, "", "", nil) - if err != nil { - t.Fatalf("unexpected parse err: %v", err) - } - masterTree := tree["master"] - tmpl.AddParseTree("master", masterTree) // used to panic -} - -func TestRedefinition(t *testing.T) { - var tmpl *Template - var err error - if tmpl, err = New("tmpl1").Parse(`{{define "test"}}foo{{end}}`); err != nil { - t.Fatalf("parse 1: %v", err) - } - if _, err = tmpl.Parse(`{{define "test"}}bar{{end}}`); err == nil { - t.Fatal("expected error") - } - if !strings.Contains(err.Error(), "redefinition") { - t.Fatalf("expected redefinition error; got %v", err) - } - if _, err = tmpl.New("tmpl2").Parse(`{{define "test"}}bar{{end}}`); err == nil { - t.Fatal("expected error") - } - if !strings.Contains(err.Error(), "redefinition") { - t.Fatalf("expected redefinition error; got %v", err) - } -} diff --git a/vendor/github.com/alecthomas/template/parse/lex_test.go b/vendor/github.com/alecthomas/template/parse/lex_test.go deleted file mode 100644 index 3b921076..00000000 --- a/vendor/github.com/alecthomas/template/parse/lex_test.go +++ /dev/null @@ -1,468 +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 parse - -import ( - "fmt" - "testing" -) - -// Make the types prettyprint. -var itemName = map[itemType]string{ - itemError: "error", - itemBool: "bool", - itemChar: "char", - itemCharConstant: "charconst", - itemComplex: "complex", - itemColonEquals: ":=", - itemEOF: "EOF", - itemField: "field", - itemIdentifier: "identifier", - itemLeftDelim: "left delim", - itemLeftParen: "(", - itemNumber: "number", - itemPipe: "pipe", - itemRawString: "raw string", - itemRightDelim: "right delim", - itemElideNewline: "elide newline", - itemRightParen: ")", - itemSpace: "space", - itemString: "string", - itemVariable: "variable", - - // keywords - itemDot: ".", - itemDefine: "define", - itemElse: "else", - itemIf: "if", - itemEnd: "end", - itemNil: "nil", - itemRange: "range", - itemTemplate: "template", - itemWith: "with", -} - -func (i itemType) String() string { - s := itemName[i] - if s == "" { - return fmt.Sprintf("item%d", int(i)) - } - return s -} - -type lexTest struct { - name string - input string - items []item -} - -var ( - tEOF = item{itemEOF, 0, ""} - tFor = item{itemIdentifier, 0, "for"} - tLeft = item{itemLeftDelim, 0, "{{"} - tLpar = item{itemLeftParen, 0, "("} - tPipe = item{itemPipe, 0, "|"} - tQuote = item{itemString, 0, `"abc \n\t\" "`} - tRange = item{itemRange, 0, "range"} - tRight = item{itemRightDelim, 0, "}}"} - tElideNewline = item{itemElideNewline, 0, "\\"} - tRpar = item{itemRightParen, 0, ")"} - tSpace = item{itemSpace, 0, " "} - raw = "`" + `abc\n\t\" ` + "`" - tRawQuote = item{itemRawString, 0, raw} -) - -var lexTests = []lexTest{ - {"empty", "", []item{tEOF}}, - {"spaces", " \t\n", []item{{itemText, 0, " \t\n"}, tEOF}}, - {"text", `now is the time`, []item{{itemText, 0, "now is the time"}, tEOF}}, - {"elide newline", "{{}}\\", []item{tLeft, tRight, tElideNewline, tEOF}}, - {"text with comment", "hello-{{/* this is a comment */}}-world", []item{ - {itemText, 0, "hello-"}, - {itemText, 0, "-world"}, - tEOF, - }}, - {"punctuation", "{{,@% }}", []item{ - tLeft, - {itemChar, 0, ","}, - {itemChar, 0, "@"}, - {itemChar, 0, "%"}, - tSpace, - tRight, - tEOF, - }}, - {"parens", "{{((3))}}", []item{ - tLeft, - tLpar, - tLpar, - {itemNumber, 0, "3"}, - tRpar, - tRpar, - tRight, - tEOF, - }}, - {"empty action", `{{}}`, []item{tLeft, tRight, tEOF}}, - {"for", `{{for}}`, []item{tLeft, tFor, tRight, tEOF}}, - {"quote", `{{"abc \n\t\" "}}`, []item{tLeft, tQuote, tRight, tEOF}}, - {"raw quote", "{{" + raw + "}}", []item{tLeft, tRawQuote, tRight, tEOF}}, - {"numbers", "{{1 02 0x14 -7.2i 1e3 +1.2e-4 4.2i 1+2i}}", []item{ - tLeft, - {itemNumber, 0, "1"}, - tSpace, - {itemNumber, 0, "02"}, - tSpace, - {itemNumber, 0, "0x14"}, - tSpace, - {itemNumber, 0, "-7.2i"}, - tSpace, - {itemNumber, 0, "1e3"}, - tSpace, - {itemNumber, 0, "+1.2e-4"}, - tSpace, - {itemNumber, 0, "4.2i"}, - tSpace, - {itemComplex, 0, "1+2i"}, - tRight, - tEOF, - }}, - {"characters", `{{'a' '\n' '\'' '\\' '\u00FF' '\xFF' '本'}}`, []item{ - tLeft, - {itemCharConstant, 0, `'a'`}, - tSpace, - {itemCharConstant, 0, `'\n'`}, - tSpace, - {itemCharConstant, 0, `'\''`}, - tSpace, - {itemCharConstant, 0, `'\\'`}, - tSpace, - {itemCharConstant, 0, `'\u00FF'`}, - tSpace, - {itemCharConstant, 0, `'\xFF'`}, - tSpace, - {itemCharConstant, 0, `'本'`}, - tRight, - tEOF, - }}, - {"bools", "{{true false}}", []item{ - tLeft, - {itemBool, 0, "true"}, - tSpace, - {itemBool, 0, "false"}, - tRight, - tEOF, - }}, - {"dot", "{{.}}", []item{ - tLeft, - {itemDot, 0, "."}, - tRight, - tEOF, - }}, - {"nil", "{{nil}}", []item{ - tLeft, - {itemNil, 0, "nil"}, - tRight, - tEOF, - }}, - {"dots", "{{.x . .2 .x.y.z}}", []item{ - tLeft, - {itemField, 0, ".x"}, - tSpace, - {itemDot, 0, "."}, - tSpace, - {itemNumber, 0, ".2"}, - tSpace, - {itemField, 0, ".x"}, - {itemField, 0, ".y"}, - {itemField, 0, ".z"}, - tRight, - tEOF, - }}, - {"keywords", "{{range if else end with}}", []item{ - tLeft, - {itemRange, 0, "range"}, - tSpace, - {itemIf, 0, "if"}, - tSpace, - {itemElse, 0, "else"}, - tSpace, - {itemEnd, 0, "end"}, - tSpace, - {itemWith, 0, "with"}, - tRight, - tEOF, - }}, - {"variables", "{{$c := printf $ $hello $23 $ $var.Field .Method}}", []item{ - tLeft, - {itemVariable, 0, "$c"}, - tSpace, - {itemColonEquals, 0, ":="}, - tSpace, - {itemIdentifier, 0, "printf"}, - tSpace, - {itemVariable, 0, "$"}, - tSpace, - {itemVariable, 0, "$hello"}, - tSpace, - {itemVariable, 0, "$23"}, - tSpace, - {itemVariable, 0, "$"}, - tSpace, - {itemVariable, 0, "$var"}, - {itemField, 0, ".Field"}, - tSpace, - {itemField, 0, ".Method"}, - tRight, - tEOF, - }}, - {"variable invocation", "{{$x 23}}", []item{ - tLeft, - {itemVariable, 0, "$x"}, - tSpace, - {itemNumber, 0, "23"}, - tRight, - tEOF, - }}, - {"pipeline", `intro {{echo hi 1.2 |noargs|args 1 "hi"}} outro`, []item{ - {itemText, 0, "intro "}, - tLeft, - {itemIdentifier, 0, "echo"}, - tSpace, - {itemIdentifier, 0, "hi"}, - tSpace, - {itemNumber, 0, "1.2"}, - tSpace, - tPipe, - {itemIdentifier, 0, "noargs"}, - tPipe, - {itemIdentifier, 0, "args"}, - tSpace, - {itemNumber, 0, "1"}, - tSpace, - {itemString, 0, `"hi"`}, - tRight, - {itemText, 0, " outro"}, - tEOF, - }}, - {"declaration", "{{$v := 3}}", []item{ - tLeft, - {itemVariable, 0, "$v"}, - tSpace, - {itemColonEquals, 0, ":="}, - tSpace, - {itemNumber, 0, "3"}, - tRight, - tEOF, - }}, - {"2 declarations", "{{$v , $w := 3}}", []item{ - tLeft, - {itemVariable, 0, "$v"}, - tSpace, - {itemChar, 0, ","}, - tSpace, - {itemVariable, 0, "$w"}, - tSpace, - {itemColonEquals, 0, ":="}, - tSpace, - {itemNumber, 0, "3"}, - tRight, - tEOF, - }}, - {"field of parenthesized expression", "{{(.X).Y}}", []item{ - tLeft, - tLpar, - {itemField, 0, ".X"}, - tRpar, - {itemField, 0, ".Y"}, - tRight, - tEOF, - }}, - // errors - {"badchar", "#{{\x01}}", []item{ - {itemText, 0, "#"}, - tLeft, - {itemError, 0, "unrecognized character in action: U+0001"}, - }}, - {"unclosed action", "{{\n}}", []item{ - tLeft, - {itemError, 0, "unclosed action"}, - }}, - {"EOF in action", "{{range", []item{ - tLeft, - tRange, - {itemError, 0, "unclosed action"}, - }}, - {"unclosed quote", "{{\"\n\"}}", []item{ - tLeft, - {itemError, 0, "unterminated quoted string"}, - }}, - {"unclosed raw quote", "{{`xx\n`}}", []item{ - tLeft, - {itemError, 0, "unterminated raw quoted string"}, - }}, - {"unclosed char constant", "{{'\n}}", []item{ - tLeft, - {itemError, 0, "unterminated character constant"}, - }}, - {"bad number", "{{3k}}", []item{ - tLeft, - {itemError, 0, `bad number syntax: "3k"`}, - }}, - {"unclosed paren", "{{(3}}", []item{ - tLeft, - tLpar, - {itemNumber, 0, "3"}, - {itemError, 0, `unclosed left paren`}, - }}, - {"extra right paren", "{{3)}}", []item{ - tLeft, - {itemNumber, 0, "3"}, - tRpar, - {itemError, 0, `unexpected right paren U+0029 ')'`}, - }}, - - // Fixed bugs - // Many elements in an action blew the lookahead until - // we made lexInsideAction not loop. - {"long pipeline deadlock", "{{|||||}}", []item{ - tLeft, - tPipe, - tPipe, - tPipe, - tPipe, - tPipe, - tRight, - tEOF, - }}, - {"text with bad comment", "hello-{{/*/}}-world", []item{ - {itemText, 0, "hello-"}, - {itemError, 0, `unclosed comment`}, - }}, - {"text with comment close separted from delim", "hello-{{/* */ }}-world", []item{ - {itemText, 0, "hello-"}, - {itemError, 0, `comment ends before closing delimiter`}, - }}, - // This one is an error that we can't catch because it breaks templates with - // minimized JavaScript. Should have fixed it before Go 1.1. - {"unmatched right delimiter", "hello-{.}}-world", []item{ - {itemText, 0, "hello-{.}}-world"}, - tEOF, - }}, -} - -// collect gathers the emitted items into a slice. -func collect(t *lexTest, left, right string) (items []item) { - l := lex(t.name, t.input, left, right) - for { - item := l.nextItem() - items = append(items, item) - if item.typ == itemEOF || item.typ == itemError { - break - } - } - return -} - -func equal(i1, i2 []item, checkPos bool) bool { - if len(i1) != len(i2) { - return false - } - for k := range i1 { - if i1[k].typ != i2[k].typ { - return false - } - if i1[k].val != i2[k].val { - return false - } - if checkPos && i1[k].pos != i2[k].pos { - return false - } - } - return true -} - -func TestLex(t *testing.T) { - for _, test := range lexTests { - items := collect(&test, "", "") - if !equal(items, test.items, false) { - t.Errorf("%s: got\n\t%+v\nexpected\n\t%v", test.name, items, test.items) - } - } -} - -// Some easy cases from above, but with delimiters $$ and @@ -var lexDelimTests = []lexTest{ - {"punctuation", "$$,@%{{}}@@", []item{ - tLeftDelim, - {itemChar, 0, ","}, - {itemChar, 0, "@"}, - {itemChar, 0, "%"}, - {itemChar, 0, "{"}, - {itemChar, 0, "{"}, - {itemChar, 0, "}"}, - {itemChar, 0, "}"}, - tRightDelim, - tEOF, - }}, - {"empty action", `$$@@`, []item{tLeftDelim, tRightDelim, tEOF}}, - {"for", `$$for@@`, []item{tLeftDelim, tFor, tRightDelim, tEOF}}, - {"quote", `$$"abc \n\t\" "@@`, []item{tLeftDelim, tQuote, tRightDelim, tEOF}}, - {"raw quote", "$$" + raw + "@@", []item{tLeftDelim, tRawQuote, tRightDelim, tEOF}}, -} - -var ( - tLeftDelim = item{itemLeftDelim, 0, "$$"} - tRightDelim = item{itemRightDelim, 0, "@@"} -) - -func TestDelims(t *testing.T) { - for _, test := range lexDelimTests { - items := collect(&test, "$$", "@@") - if !equal(items, test.items, false) { - t.Errorf("%s: got\n\t%v\nexpected\n\t%v", test.name, items, test.items) - } - } -} - -var lexPosTests = []lexTest{ - {"empty", "", []item{tEOF}}, - {"punctuation", "{{,@%#}}", []item{ - {itemLeftDelim, 0, "{{"}, - {itemChar, 2, ","}, - {itemChar, 3, "@"}, - {itemChar, 4, "%"}, - {itemChar, 5, "#"}, - {itemRightDelim, 6, "}}"}, - {itemEOF, 8, ""}, - }}, - {"sample", "0123{{hello}}xyz", []item{ - {itemText, 0, "0123"}, - {itemLeftDelim, 4, "{{"}, - {itemIdentifier, 6, "hello"}, - {itemRightDelim, 11, "}}"}, - {itemText, 13, "xyz"}, - {itemEOF, 16, ""}, - }}, -} - -// The other tests don't check position, to make the test cases easier to construct. -// This one does. -func TestPos(t *testing.T) { - for _, test := range lexPosTests { - items := collect(&test, "", "") - if !equal(items, test.items, true) { - t.Errorf("%s: got\n\t%v\nexpected\n\t%v", test.name, items, test.items) - if len(items) == len(test.items) { - // Detailed print; avoid item.String() to expose the position value. - for i := range items { - if !equal(items[i:i+1], test.items[i:i+1], true) { - i1 := items[i] - i2 := test.items[i] - t.Errorf("\t#%d: got {%v %d %q} expected {%v %d %q}", i, i1.typ, i1.pos, i1.val, i2.typ, i2.pos, i2.val) - } - } - } - } - } -} diff --git a/vendor/github.com/alecthomas/template/parse/parse_test.go b/vendor/github.com/alecthomas/template/parse/parse_test.go deleted file mode 100644 index c73640fb..00000000 --- a/vendor/github.com/alecthomas/template/parse/parse_test.go +++ /dev/null @@ -1,426 +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 parse - -import ( - "flag" - "fmt" - "strings" - "testing" -) - -var debug = flag.Bool("debug", false, "show the errors produced by the main tests") - -type numberTest struct { - text string - isInt bool - isUint bool - isFloat bool - isComplex bool - int64 - uint64 - float64 - complex128 -} - -var numberTests = []numberTest{ - // basics - {"0", true, true, true, false, 0, 0, 0, 0}, - {"-0", true, true, true, false, 0, 0, 0, 0}, // check that -0 is a uint. - {"73", true, true, true, false, 73, 73, 73, 0}, - {"073", true, true, true, false, 073, 073, 073, 0}, - {"0x73", true, true, true, false, 0x73, 0x73, 0x73, 0}, - {"-73", true, false, true, false, -73, 0, -73, 0}, - {"+73", true, false, true, false, 73, 0, 73, 0}, - {"100", true, true, true, false, 100, 100, 100, 0}, - {"1e9", true, true, true, false, 1e9, 1e9, 1e9, 0}, - {"-1e9", true, false, true, false, -1e9, 0, -1e9, 0}, - {"-1.2", false, false, true, false, 0, 0, -1.2, 0}, - {"1e19", false, true, true, false, 0, 1e19, 1e19, 0}, - {"-1e19", false, false, true, false, 0, 0, -1e19, 0}, - {"4i", false, false, false, true, 0, 0, 0, 4i}, - {"-1.2+4.2i", false, false, false, true, 0, 0, 0, -1.2 + 4.2i}, - {"073i", false, false, false, true, 0, 0, 0, 73i}, // not octal! - // complex with 0 imaginary are float (and maybe integer) - {"0i", true, true, true, true, 0, 0, 0, 0}, - {"-1.2+0i", false, false, true, true, 0, 0, -1.2, -1.2}, - {"-12+0i", true, false, true, true, -12, 0, -12, -12}, - {"13+0i", true, true, true, true, 13, 13, 13, 13}, - // funny bases - {"0123", true, true, true, false, 0123, 0123, 0123, 0}, - {"-0x0", true, true, true, false, 0, 0, 0, 0}, - {"0xdeadbeef", true, true, true, false, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0}, - // character constants - {`'a'`, true, true, true, false, 'a', 'a', 'a', 0}, - {`'\n'`, true, true, true, false, '\n', '\n', '\n', 0}, - {`'\\'`, true, true, true, false, '\\', '\\', '\\', 0}, - {`'\''`, true, true, true, false, '\'', '\'', '\'', 0}, - {`'\xFF'`, true, true, true, false, 0xFF, 0xFF, 0xFF, 0}, - {`'パ'`, true, true, true, false, 0x30d1, 0x30d1, 0x30d1, 0}, - {`'\u30d1'`, true, true, true, false, 0x30d1, 0x30d1, 0x30d1, 0}, - {`'\U000030d1'`, true, true, true, false, 0x30d1, 0x30d1, 0x30d1, 0}, - // some broken syntax - {text: "+-2"}, - {text: "0x123."}, - {text: "1e."}, - {text: "0xi."}, - {text: "1+2."}, - {text: "'x"}, - {text: "'xx'"}, - // Issue 8622 - 0xe parsed as floating point. Very embarrassing. - {"0xef", true, true, true, false, 0xef, 0xef, 0xef, 0}, -} - -func TestNumberParse(t *testing.T) { - for _, test := range numberTests { - // If fmt.Sscan thinks it's complex, it's complex. We can't trust the output - // because imaginary comes out as a number. - var c complex128 - typ := itemNumber - var tree *Tree - if test.text[0] == '\'' { - typ = itemCharConstant - } else { - _, err := fmt.Sscan(test.text, &c) - if err == nil { - typ = itemComplex - } - } - n, err := tree.newNumber(0, test.text, typ) - ok := test.isInt || test.isUint || test.isFloat || test.isComplex - if ok && err != nil { - t.Errorf("unexpected error for %q: %s", test.text, err) - continue - } - if !ok && err == nil { - t.Errorf("expected error for %q", test.text) - continue - } - if !ok { - if *debug { - fmt.Printf("%s\n\t%s\n", test.text, err) - } - continue - } - if n.IsComplex != test.isComplex { - t.Errorf("complex incorrect for %q; should be %t", test.text, test.isComplex) - } - if test.isInt { - if !n.IsInt { - t.Errorf("expected integer for %q", test.text) - } - if n.Int64 != test.int64 { - t.Errorf("int64 for %q should be %d Is %d", test.text, test.int64, n.Int64) - } - } else if n.IsInt { - t.Errorf("did not expect integer for %q", test.text) - } - if test.isUint { - if !n.IsUint { - t.Errorf("expected unsigned integer for %q", test.text) - } - if n.Uint64 != test.uint64 { - t.Errorf("uint64 for %q should be %d Is %d", test.text, test.uint64, n.Uint64) - } - } else if n.IsUint { - t.Errorf("did not expect unsigned integer for %q", test.text) - } - if test.isFloat { - if !n.IsFloat { - t.Errorf("expected float for %q", test.text) - } - if n.Float64 != test.float64 { - t.Errorf("float64 for %q should be %g Is %g", test.text, test.float64, n.Float64) - } - } else if n.IsFloat { - t.Errorf("did not expect float for %q", test.text) - } - if test.isComplex { - if !n.IsComplex { - t.Errorf("expected complex for %q", test.text) - } - if n.Complex128 != test.complex128 { - t.Errorf("complex128 for %q should be %g Is %g", test.text, test.complex128, n.Complex128) - } - } else if n.IsComplex { - t.Errorf("did not expect complex for %q", test.text) - } - } -} - -type parseTest struct { - name string - input string - ok bool - result string // what the user would see in an error message. -} - -const ( - noError = true - hasError = false -) - -var parseTests = []parseTest{ - {"empty", "", noError, - ``}, - {"comment", "{{/*\n\n\n*/}}", noError, - ``}, - {"spaces", " \t\n", noError, - `" \t\n"`}, - {"text", "some text", noError, - `"some text"`}, - {"emptyAction", "{{}}", hasError, - `{{}}`}, - {"field", "{{.X}}", noError, - `{{.X}}`}, - {"simple command", "{{printf}}", noError, - `{{printf}}`}, - {"$ invocation", "{{$}}", noError, - "{{$}}"}, - {"variable invocation", "{{with $x := 3}}{{$x 23}}{{end}}", noError, - "{{with $x := 3}}{{$x 23}}{{end}}"}, - {"variable with fields", "{{$.I}}", noError, - "{{$.I}}"}, - {"multi-word command", "{{printf `%d` 23}}", noError, - "{{printf `%d` 23}}"}, - {"pipeline", "{{.X|.Y}}", noError, - `{{.X | .Y}}`}, - {"pipeline with decl", "{{$x := .X|.Y}}", noError, - `{{$x := .X | .Y}}`}, - {"nested pipeline", "{{.X (.Y .Z) (.A | .B .C) (.E)}}", noError, - `{{.X (.Y .Z) (.A | .B .C) (.E)}}`}, - {"field applied to parentheses", "{{(.Y .Z).Field}}", noError, - `{{(.Y .Z).Field}}`}, - {"simple if", "{{if .X}}hello{{end}}", noError, - `{{if .X}}"hello"{{end}}`}, - {"if with else", "{{if .X}}true{{else}}false{{end}}", noError, - `{{if .X}}"true"{{else}}"false"{{end}}`}, - {"if with else if", "{{if .X}}true{{else if .Y}}false{{end}}", noError, - `{{if .X}}"true"{{else}}{{if .Y}}"false"{{end}}{{end}}`}, - {"if else chain", "+{{if .X}}X{{else if .Y}}Y{{else if .Z}}Z{{end}}+", noError, - `"+"{{if .X}}"X"{{else}}{{if .Y}}"Y"{{else}}{{if .Z}}"Z"{{end}}{{end}}{{end}}"+"`}, - {"simple range", "{{range .X}}hello{{end}}", noError, - `{{range .X}}"hello"{{end}}`}, - {"chained field range", "{{range .X.Y.Z}}hello{{end}}", noError, - `{{range .X.Y.Z}}"hello"{{end}}`}, - {"nested range", "{{range .X}}hello{{range .Y}}goodbye{{end}}{{end}}", noError, - `{{range .X}}"hello"{{range .Y}}"goodbye"{{end}}{{end}}`}, - {"range with else", "{{range .X}}true{{else}}false{{end}}", noError, - `{{range .X}}"true"{{else}}"false"{{end}}`}, - {"range over pipeline", "{{range .X|.M}}true{{else}}false{{end}}", noError, - `{{range .X | .M}}"true"{{else}}"false"{{end}}`}, - {"range []int", "{{range .SI}}{{.}}{{end}}", noError, - `{{range .SI}}{{.}}{{end}}`}, - {"range 1 var", "{{range $x := .SI}}{{.}}{{end}}", noError, - `{{range $x := .SI}}{{.}}{{end}}`}, - {"range 2 vars", "{{range $x, $y := .SI}}{{.}}{{end}}", noError, - `{{range $x, $y := .SI}}{{.}}{{end}}`}, - {"constants", "{{range .SI 1 -3.2i true false 'a' nil}}{{end}}", noError, - `{{range .SI 1 -3.2i true false 'a' nil}}{{end}}`}, - {"template", "{{template `x`}}", noError, - `{{template "x"}}`}, - {"template with arg", "{{template `x` .Y}}", noError, - `{{template "x" .Y}}`}, - {"with", "{{with .X}}hello{{end}}", noError, - `{{with .X}}"hello"{{end}}`}, - {"with with else", "{{with .X}}hello{{else}}goodbye{{end}}", noError, - `{{with .X}}"hello"{{else}}"goodbye"{{end}}`}, - {"elide newline", "{{true}}\\\n ", noError, - `{{true}}" "`}, - // Errors. - {"unclosed action", "hello{{range", hasError, ""}, - {"unmatched end", "{{end}}", hasError, ""}, - {"missing end", "hello{{range .x}}", hasError, ""}, - {"missing end after else", "hello{{range .x}}{{else}}", hasError, ""}, - {"undefined function", "hello{{undefined}}", hasError, ""}, - {"undefined variable", "{{$x}}", hasError, ""}, - {"variable undefined after end", "{{with $x := 4}}{{end}}{{$x}}", hasError, ""}, - {"variable undefined in template", "{{template $v}}", hasError, ""}, - {"declare with field", "{{with $x.Y := 4}}{{end}}", hasError, ""}, - {"template with field ref", "{{template .X}}", hasError, ""}, - {"template with var", "{{template $v}}", hasError, ""}, - {"invalid punctuation", "{{printf 3, 4}}", hasError, ""}, - {"multidecl outside range", "{{with $v, $u := 3}}{{end}}", hasError, ""}, - {"too many decls in range", "{{range $u, $v, $w := 3}}{{end}}", hasError, ""}, - {"dot applied to parentheses", "{{printf (printf .).}}", hasError, ""}, - {"adjacent args", "{{printf 3`x`}}", hasError, ""}, - {"adjacent args with .", "{{printf `x`.}}", hasError, ""}, - {"extra end after if", "{{if .X}}a{{else if .Y}}b{{end}}{{end}}", hasError, ""}, - {"invalid newline elision", "{{true}}\\{{true}}", hasError, ""}, - // Equals (and other chars) do not assignments make (yet). - {"bug0a", "{{$x := 0}}{{$x}}", noError, "{{$x := 0}}{{$x}}"}, - {"bug0b", "{{$x = 1}}{{$x}}", hasError, ""}, - {"bug0c", "{{$x ! 2}}{{$x}}", hasError, ""}, - {"bug0d", "{{$x % 3}}{{$x}}", hasError, ""}, - // Check the parse fails for := rather than comma. - {"bug0e", "{{range $x := $y := 3}}{{end}}", hasError, ""}, - // Another bug: variable read must ignore following punctuation. - {"bug1a", "{{$x:=.}}{{$x!2}}", hasError, ""}, // ! is just illegal here. - {"bug1b", "{{$x:=.}}{{$x+2}}", hasError, ""}, // $x+2 should not parse as ($x) (+2). - {"bug1c", "{{$x:=.}}{{$x +2}}", noError, "{{$x := .}}{{$x +2}}"}, // It's OK with a space. -} - -var builtins = map[string]interface{}{ - "printf": fmt.Sprintf, -} - -func testParse(doCopy bool, t *testing.T) { - textFormat = "%q" - defer func() { textFormat = "%s" }() - for _, test := range parseTests { - tmpl, err := New(test.name).Parse(test.input, "", "", make(map[string]*Tree), builtins) - switch { - case err == nil && !test.ok: - t.Errorf("%q: expected error; got none", test.name) - continue - case err != nil && test.ok: - t.Errorf("%q: unexpected error: %v", test.name, err) - continue - case err != nil && !test.ok: - // expected error, got one - if *debug { - fmt.Printf("%s: %s\n\t%s\n", test.name, test.input, err) - } - continue - } - var result string - if doCopy { - result = tmpl.Root.Copy().String() - } else { - result = tmpl.Root.String() - } - if result != test.result { - t.Errorf("%s=(%q): got\n\t%v\nexpected\n\t%v", test.name, test.input, result, test.result) - } - } -} - -func TestParse(t *testing.T) { - testParse(false, t) -} - -// Same as TestParse, but we copy the node first -func TestParseCopy(t *testing.T) { - testParse(true, t) -} - -type isEmptyTest struct { - name string - input string - empty bool -} - -var isEmptyTests = []isEmptyTest{ - {"empty", ``, true}, - {"nonempty", `hello`, false}, - {"spaces only", " \t\n \t\n", true}, - {"definition", `{{define "x"}}something{{end}}`, true}, - {"definitions and space", "{{define `x`}}something{{end}}\n\n{{define `y`}}something{{end}}\n\n", true}, - {"definitions and text", "{{define `x`}}something{{end}}\nx\n{{define `y`}}something{{end}}\ny\n", false}, - {"definition and action", "{{define `x`}}something{{end}}{{if 3}}foo{{end}}", false}, -} - -func TestIsEmpty(t *testing.T) { - if !IsEmptyTree(nil) { - t.Errorf("nil tree is not empty") - } - for _, test := range isEmptyTests { - tree, err := New("root").Parse(test.input, "", "", make(map[string]*Tree), nil) - if err != nil { - t.Errorf("%q: unexpected error: %v", test.name, err) - continue - } - if empty := IsEmptyTree(tree.Root); empty != test.empty { - t.Errorf("%q: expected %t got %t", test.name, test.empty, empty) - } - } -} - -func TestErrorContextWithTreeCopy(t *testing.T) { - tree, err := New("root").Parse("{{if true}}{{end}}", "", "", make(map[string]*Tree), nil) - if err != nil { - t.Fatalf("unexpected tree parse failure: %v", err) - } - treeCopy := tree.Copy() - wantLocation, wantContext := tree.ErrorContext(tree.Root.Nodes[0]) - gotLocation, gotContext := treeCopy.ErrorContext(treeCopy.Root.Nodes[0]) - if wantLocation != gotLocation { - t.Errorf("wrong error location want %q got %q", wantLocation, gotLocation) - } - if wantContext != gotContext { - t.Errorf("wrong error location want %q got %q", wantContext, gotContext) - } -} - -// All failures, and the result is a string that must appear in the error message. -var errorTests = []parseTest{ - // Check line numbers are accurate. - {"unclosed1", - "line1\n{{", - hasError, `unclosed1:2: unexpected unclosed action in command`}, - {"unclosed2", - "line1\n{{define `x`}}line2\n{{", - hasError, `unclosed2:3: unexpected unclosed action in command`}, - // Specific errors. - {"function", - "{{foo}}", - hasError, `function "foo" not defined`}, - {"comment", - "{{/*}}", - hasError, `unclosed comment`}, - {"lparen", - "{{.X (1 2 3}}", - hasError, `unclosed left paren`}, - {"rparen", - "{{.X 1 2 3)}}", - hasError, `unexpected ")"`}, - {"space", - "{{`x`3}}", - hasError, `missing space?`}, - {"idchar", - "{{a#}}", - hasError, `'#'`}, - {"charconst", - "{{'a}}", - hasError, `unterminated character constant`}, - {"stringconst", - `{{"a}}`, - hasError, `unterminated quoted string`}, - {"rawstringconst", - "{{`a}}", - hasError, `unterminated raw quoted string`}, - {"number", - "{{0xi}}", - hasError, `number syntax`}, - {"multidefine", - "{{define `a`}}a{{end}}{{define `a`}}b{{end}}", - hasError, `multiple definition of template`}, - {"eof", - "{{range .X}}", - hasError, `unexpected EOF`}, - {"variable", - // Declare $x so it's defined, to avoid that error, and then check we don't parse a declaration. - "{{$x := 23}}{{with $x.y := 3}}{{$x 23}}{{end}}", - hasError, `unexpected ":="`}, - {"multidecl", - "{{$a,$b,$c := 23}}", - hasError, `too many declarations`}, - {"undefvar", - "{{$a}}", - hasError, `undefined variable`}, -} - -func TestErrors(t *testing.T) { - for _, test := range errorTests { - _, err := New(test.name).Parse(test.input, "", "", make(map[string]*Tree)) - if err == nil { - t.Errorf("%q: expected error", test.name) - continue - } - if !strings.Contains(err.Error(), test.result) { - t.Errorf("%q: error %q does not contain %q", test.name, err, test.result) - } - } -} diff --git a/vendor/github.com/alecthomas/template/testdata/file1.tmpl b/vendor/github.com/alecthomas/template/testdata/file1.tmpl deleted file mode 100644 index febf9d9f..00000000 --- a/vendor/github.com/alecthomas/template/testdata/file1.tmpl +++ /dev/null @@ -1,2 +0,0 @@ -{{define "x"}}TEXT{{end}} -{{define "dotV"}}{{.V}}{{end}} diff --git a/vendor/github.com/alecthomas/template/testdata/file2.tmpl b/vendor/github.com/alecthomas/template/testdata/file2.tmpl deleted file mode 100644 index 39bf6fb9..00000000 --- a/vendor/github.com/alecthomas/template/testdata/file2.tmpl +++ /dev/null @@ -1,2 +0,0 @@ -{{define "dot"}}{{.}}{{end}} -{{define "nested"}}{{template "dot" .}}{{end}} diff --git a/vendor/github.com/alecthomas/template/testdata/tmpl1.tmpl b/vendor/github.com/alecthomas/template/testdata/tmpl1.tmpl deleted file mode 100644 index b72b3a34..00000000 --- a/vendor/github.com/alecthomas/template/testdata/tmpl1.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -template1 -{{define "x"}}x{{end}} -{{template "y"}} diff --git a/vendor/github.com/alecthomas/template/testdata/tmpl2.tmpl b/vendor/github.com/alecthomas/template/testdata/tmpl2.tmpl deleted file mode 100644 index 16beba6e..00000000 --- a/vendor/github.com/alecthomas/template/testdata/tmpl2.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -template2 -{{define "y"}}y{{end}} -{{template "x"}} diff --git a/vendor/github.com/alecthomas/units/bytes_test.go b/vendor/github.com/alecthomas/units/bytes_test.go deleted file mode 100644 index d4317aa5..00000000 --- a/vendor/github.com/alecthomas/units/bytes_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package units - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestBase2BytesString(t *testing.T) { - assert.Equal(t, Base2Bytes(0).String(), "0B") - assert.Equal(t, Base2Bytes(1025).String(), "1KiB1B") - assert.Equal(t, Base2Bytes(1048577).String(), "1MiB1B") -} - -func TestParseBase2Bytes(t *testing.T) { - n, err := ParseBase2Bytes("0B") - assert.NoError(t, err) - assert.Equal(t, 0, n) - n, err = ParseBase2Bytes("1KB") - assert.NoError(t, err) - assert.Equal(t, 1024, n) - n, err = ParseBase2Bytes("1MB1KB25B") - assert.NoError(t, err) - assert.Equal(t, 1049625, n) - n, err = ParseBase2Bytes("1.5MB") - assert.NoError(t, err) - assert.Equal(t, 1572864, n) -} - -func TestMetricBytesString(t *testing.T) { - assert.Equal(t, MetricBytes(0).String(), "0B") - assert.Equal(t, MetricBytes(1001).String(), "1KB1B") - assert.Equal(t, MetricBytes(1001025).String(), "1MB1KB25B") -} - -func TestParseMetricBytes(t *testing.T) { - n, err := ParseMetricBytes("0B") - assert.NoError(t, err) - assert.Equal(t, 0, n) - n, err = ParseMetricBytes("1KB1B") - assert.NoError(t, err) - assert.Equal(t, 1001, n) - n, err = ParseMetricBytes("1MB1KB25B") - assert.NoError(t, err) - assert.Equal(t, 1001025, n) - n, err = ParseMetricBytes("1.5MB") - assert.NoError(t, err) - assert.Equal(t, 1500000, n) -} diff --git a/vendor/github.com/boltdb/bolt/.gitignore b/vendor/github.com/boltdb/bolt/.gitignore deleted file mode 100644 index b2bb382b..00000000 --- a/vendor/github.com/boltdb/bolt/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.prof -*.test -/bin/ diff --git a/vendor/github.com/boltdb/bolt/Makefile b/vendor/github.com/boltdb/bolt/Makefile deleted file mode 100644 index cfbed514..00000000 --- a/vendor/github.com/boltdb/bolt/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -TEST=. -BENCH=. -COVERPROFILE=/tmp/c.out -BRANCH=`git rev-parse --abbrev-ref HEAD` -COMMIT=`git rev-parse --short HEAD` -GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" - -default: build - -bench: - go test -v -test.run=NOTHINCONTAINSTHIS -test.bench=$(BENCH) - -# http://cloc.sourceforge.net/ -cloc: - @cloc --not-match-f='Makefile|_test.go' . - -cover: fmt - go test -coverprofile=$(COVERPROFILE) -test.run=$(TEST) $(COVERFLAG) . - go tool cover -html=$(COVERPROFILE) - rm $(COVERPROFILE) - -cpuprofile: fmt - @go test -c - @./bolt.test -test.v -test.run=$(TEST) -test.cpuprofile cpu.prof - -# go get github.com/kisielk/errcheck -errcheck: - @echo "=== errcheck ===" - @errcheck github.com/boltdb/bolt - -fmt: - @go fmt ./... - -get: - @go get -d ./... - -build: get - @mkdir -p bin - @go build -ldflags=$(GOLDFLAGS) -a -o bin/bolt ./cmd/bolt - -test: fmt - @go get github.com/stretchr/testify/assert - @echo "=== TESTS ===" - @go test -v -cover -test.run=$(TEST) - @echo "" - @echo "" - @echo "=== CLI ===" - @go test -v -test.run=$(TEST) ./cmd/bolt - @echo "" - @echo "" - @echo "=== RACE DETECTOR ===" - @go test -v -race -test.run="TestSimulate_(100op|1000op)" - -.PHONY: bench cloc cover cpuprofile fmt memprofile test diff --git a/vendor/github.com/boltdb/bolt/README.md b/vendor/github.com/boltdb/bolt/README.md deleted file mode 100644 index 8cc9f3c5..00000000 --- a/vendor/github.com/boltdb/bolt/README.md +++ /dev/null @@ -1,573 +0,0 @@ -Bolt [![Build Status](https://drone.io/github.com/boltdb/bolt/status.png)](https://drone.io/github.com/boltdb/bolt/latest) [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.png?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.png)](https://godoc.org/github.com/boltdb/bolt) ![Version](http://img.shields.io/badge/version-1.0-green.png) -==== - -Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] and -the [LMDB project][lmdb]. The goal of the project is to provide a simple, -fast, and reliable database for projects that don't require a full database -server such as Postgres or MySQL. - -Since Bolt is meant to be used as such a low-level piece of functionality, -simplicity is key. The API will be small and only focus on getting values -and setting values. That's it. - -[hyc_symas]: https://twitter.com/hyc_symas -[lmdb]: http://symas.com/mdb/ - - -## Project Status - -Bolt is stable and the API is fixed. Full unit test coverage and randomized -black box testing are used to ensure database consistency and thread safety. -Bolt is currently in high-load production environments serving databases as -large as 1TB. Many companies such as Shopify and Heroku use Bolt-backed -services every day. - - -## Getting Started - -### Installing - -To start using Bolt, install Go and run `go get`: - -```sh -$ go get github.com/boltdb/bolt/... -``` - -This will retrieve the library and install the `bolt` command line utility into -your `$GOBIN` path. - - -### Opening a database - -The top-level object in Bolt is a `DB`. It is represented as a single file on -your disk and represents a consistent snapshot of your data. - -To open your database, simply use the `bolt.Open()` function: - -```go -package main - -import ( - "log" - - "github.com/boltdb/bolt" -) - -func main() { - // Open the my.db data file in your current directory. - // It will be created if it doesn't exist. - db, err := bolt.Open("my.db", 0600, nil) - if err != nil { - log.Fatal(err) - } - defer db.Close() - - ... -} -``` - -Please note that Bolt obtains a file lock on the data file so multiple processes -cannot open the same database at the same time. Opening an already open Bolt -database will cause it to hang until the other process closes it. To prevent -an indefinite wait you can pass a timeout option to the `Open()` function: - -```go -db, err := bolt.Open("my.db", 0600, &bolt.Options{Timeout: 1 * time.Second}) -``` - - -### Transactions - -Bolt allows only one read-write transaction at a time but allows as many -read-only transactions as you want at a time. Each transaction has a consistent -view of the data as it existed when the transaction started. - -Individual transactions and all objects created from them (e.g. buckets, keys) -are not thread safe. To work with data in multiple goroutines you must start -a transaction for each one or use locking to ensure only one goroutine accesses -a transaction at a time. Creating transaction from the `DB` is thread safe. - - -#### Read-write transactions - -To start a read-write transaction, you can use the `DB.Update()` function: - -```go -err := db.Update(func(tx *bolt.Tx) error { - ... - return nil -}) -``` - -Inside the closure, you have a consistent view of the database. You commit the -transaction by returning `nil` at the end. You can also rollback the transaction -at any point by returning an error. All database operations are allowed inside -a read-write transaction. - -Always check the return error as it will report any disk failures that can cause -your transaction to not complete. If you return an error within your closure -it will be passed through. - - -#### Read-only transactions - -To start a read-only transaction, you can use the `DB.View()` function: - -```go -err := db.View(func(tx *bolt.Tx) error { - ... - return nil -}) -``` - -You also get a consistent view of the database within this closure, however, -no mutating operations are allowed within a read-only transaction. You can only -retrieve buckets, retrieve values, and copy the database within a read-only -transaction. - - -#### Batch read-write transactions - -Each `DB.Update()` waits for disk to commit the writes. This overhead -can be minimized by combining multiple updates with the `DB.Batch()` -function: - -```go -err := db.Batch(func(tx *bolt.Tx) error { - ... - return nil -}) -``` - -Concurrent Batch calls are opportunistically combined into larger -transactions. Batch is only useful when there are multiple goroutines -calling it. - -The trade-off is that `Batch` can call the given -function multiple times, if parts of the transaction fail. The -function must be idempotent and side effects must take effect only -after a successful return from `DB.Batch()`. - -For example: don't display messages from inside the function, instead -set variables in the enclosing scope: - -```go -var id uint64 -err := db.Batch(func(tx *bolt.Tx) error { - // Find last key in bucket, decode as bigendian uint64, increment - // by one, encode back to []byte, and add new key. - ... - id = newValue - return nil -}) -if err != nil { - return ... -} -fmt.Println("Allocated ID %d", id) -``` - - -#### Managing transactions manually - -The `DB.View()` and `DB.Update()` functions are wrappers around the `DB.Begin()` -function. These helper functions will start the transaction, execute a function, -and then safely close your transaction if an error is returned. This is the -recommended way to use Bolt transactions. - -However, sometimes you may want to manually start and end your transactions. -You can use the `Tx.Begin()` function directly but _please_ be sure to close the -transaction. - -```go -// Start a writable transaction. -tx, err := db.Begin(true) -if err != nil { - return err -} -defer tx.Rollback() - -// Use the transaction... -_, err := tx.CreateBucket([]byte("MyBucket")) -if err != nil { - return err -} - -// Commit the transaction and check for error. -if err := tx.Commit(); err != nil { - return err -} -``` - -The first argument to `DB.Begin()` is a boolean stating if the transaction -should be writable. - - -### Using buckets - -Buckets are collections of key/value pairs within the database. All keys in a -bucket must be unique. You can create a bucket using the `DB.CreateBucket()` -function: - -```go -db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("MyBucket")) - if err != nil { - return fmt.Errorf("create bucket: %s", err) - } - return nil -}) -``` - -You can also create a bucket only if it doesn't exist by using the -`Tx.CreateBucketIfNotExists()` function. It's a common pattern to call this -function for all your top-level buckets after you open your database so you can -guarantee that they exist for future transactions. - -To delete a bucket, simply call the `Tx.DeleteBucket()` function. - - -### Using key/value pairs - -To save a key/value pair to a bucket, use the `Bucket.Put()` function: - -```go -db.Update(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("MyBucket")) - err := b.Put([]byte("answer"), []byte("42")) - return err -}) -``` - -This will set the value of the `"answer"` key to `"42"` in the `MyBucket` -bucket. To retrieve this value, we can use the `Bucket.Get()` function: - -```go -db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("MyBucket")) - v := b.Get([]byte("answer")) - fmt.Printf("The answer is: %s\n", v) - return nil -}) -``` - -The `Get()` function does not return an error because its operation is -guarenteed to work (unless there is some kind of system failure). If the key -exists then it will return its byte slice value. If it doesn't exist then it -will return `nil`. It's important to note that you can have a zero-length value -set to a key which is different than the key not existing. - -Use the `Bucket.Delete()` function to delete a key from the bucket. - - -### Iterating over keys - -Bolt stores its keys in byte-sorted order within a bucket. This makes sequential -iteration over these keys extremely fast. To iterate over keys we'll use a -`Cursor`: - -```go -db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("MyBucket")) - c := b.Cursor() - - for k, v := c.First(); k != nil; k, v = c.Next() { - fmt.Printf("key=%s, value=%s\n", k, v) - } - - return nil -}) -``` - -The cursor allows you to move to a specific point in the list of keys and move -forward or backward through the keys one at a time. - -The following functions are available on the cursor: - -``` -First() Move to the first key. -Last() Move to the last key. -Seek() Move to a specific key. -Next() Move to the next key. -Prev() Move to the previous key. -``` - -When you have iterated to the end of the cursor then `Next()` will return `nil`. -You must seek to a position using `First()`, `Last()`, or `Seek()` before -calling `Next()` or `Prev()`. If you do not seek to a position then these -functions will return `nil`. - - -#### Prefix scans - -To iterate over a key prefix, you can combine `Seek()` and `bytes.HasPrefix()`: - -```go -db.View(func(tx *bolt.Tx) error { - c := tx.Bucket([]byte("MyBucket")).Cursor() - - prefix := []byte("1234") - for k, v := c.Seek(prefix); bytes.HasPrefix(k, prefix); k, v = c.Next() { - fmt.Printf("key=%s, value=%s\n", k, v) - } - - return nil -}) -``` - -#### Range scans - -Another common use case is scanning over a range such as a time range. If you -use a sortable time encoding such as RFC3339 then you can query a specific -date range like this: - -```go -db.View(func(tx *bolt.Tx) error { - // Assume our events bucket has RFC3339 encoded time keys. - c := tx.Bucket([]byte("Events")).Cursor() - - // Our time range spans the 90's decade. - min := []byte("1990-01-01T00:00:00Z") - max := []byte("2000-01-01T00:00:00Z") - - // Iterate over the 90's. - for k, v := c.Seek(min); k != nil && bytes.Compare(k, max) <= 0; k, v = c.Next() { - fmt.Printf("%s: %s\n", k, v) - } - - return nil -}) -``` - - -#### ForEach() - -You can also use the function `ForEach()` if you know you'll be iterating over -all the keys in a bucket: - -```go -db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("MyBucket")) - b.ForEach(func(k, v []byte) error { - fmt.Printf("key=%s, value=%s\n", k, v) - return nil - }) - return nil -}) -``` - - -### Nested buckets - -You can also store a bucket in a key to create nested buckets. The API is the -same as the bucket management API on the `DB` object: - -```go -func (*Bucket) CreateBucket(key []byte) (*Bucket, error) -func (*Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) -func (*Bucket) DeleteBucket(key []byte) error -``` - - -### Database backups - -Bolt is a single file so it's easy to backup. You can use the `Tx.Copy()` -function to write a consistent view of the database to a writer. If you call -this from a read-only transaction, it will perform a hot backup and not block -your other database reads and writes. It will also use `O_DIRECT` when available -to prevent page cache trashing. - -One common use case is to backup over HTTP so you can use tools like `cURL` to -do database backups: - -```go -func BackupHandleFunc(w http.ResponseWriter, req *http.Request) { - err := db.View(func(tx bolt.Tx) error { - w.Header().Set("Content-Type", "application/octet-stream") - w.Header().Set("Content-Disposition", `attachment; filename="my.db"`) - w.Header().Set("Content-Length", strconv.Itoa(int(tx.Size()))) - return tx.Copy(w) - }) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } -} -``` - -Then you can backup using this command: - -```sh -$ curl http://localhost/backup > my.db -``` - -Or you can open your browser to `http://localhost/backup` and it will download -automatically. - -If you want to backup to another file you can use the `Tx.CopyFile()` helper -function. - - -### Statistics - -The database keeps a running count of many of the internal operations it -performs so you can better understand what's going on. By grabbing a snapshot -of these stats at two points in time we can see what operations were performed -in that time range. - -For example, we could start a goroutine to log stats every 10 seconds: - -```go -go func() { - // Grab the initial stats. - prev := db.Stats() - - for { - // Wait for 10s. - time.Sleep(10 * time.Second) - - // Grab the current stats and diff them. - stats := db.Stats() - diff := stats.Sub(&prev) - - // Encode stats to JSON and print to STDERR. - json.NewEncoder(os.Stderr).Encode(diff) - - // Save stats for the next loop. - prev = stats - } -}() -``` - -It's also useful to pipe these stats to a service such as statsd for monitoring -or to provide an HTTP endpoint that will perform a fixed-length sample. - - -## Resources - -For more information on getting started with Bolt, check out the following articles: - -* [Intro to BoltDB: Painless Performant Persistence](http://npf.io/2014/07/intro-to-boltdb-painless-performant-persistence/) by [Nate Finch](https://github.com/natefinch). -* [Bolt -- an embedded key/value database for Go](https://www.progville.com/go/bolt-embedded-db-golang/) by Progville - - -## Comparison with other databases - -### Postgres, MySQL, & other relational databases - -Relational databases structure data into rows and are only accessible through -the use of SQL. This approach provides flexibility in how you store and query -your data but also incurs overhead in parsing and planning SQL statements. Bolt -accesses all data by a byte slice key. This makes Bolt fast to read and write -data by key but provides no built-in support for joining values together. - -Most relational databases (with the exception of SQLite) are standalone servers -that run separately from your application. This gives your systems -flexibility to connect multiple application servers to a single database -server but also adds overhead in serializing and transporting data over the -network. Bolt runs as a library included in your application so all data access -has to go through your application's process. This brings data closer to your -application but limits multi-process access to the data. - - -### LevelDB, RocksDB - -LevelDB and its derivatives (RocksDB, HyperLevelDB) are similar to Bolt in that -they are libraries bundled into the application, however, their underlying -structure is a log-structured merge-tree (LSM tree). An LSM tree optimizes -random writes by using a write ahead log and multi-tiered, sorted files called -SSTables. Bolt uses a B+tree internally and only a single file. Both approaches -have trade offs. - -If you require a high random write throughput (>10,000 w/sec) or you need to use -spinning disks then LevelDB could be a good choice. If your application is -read-heavy or does a lot of range scans then Bolt could be a good choice. - -One other important consideration is that LevelDB does not have transactions. -It supports batch writing of key/values pairs and it supports read snapshots -but it will not give you the ability to do a compare-and-swap operation safely. -Bolt supports fully serializable ACID transactions. - - -### LMDB - -Bolt was originally a port of LMDB so it is architecturally similar. Both use -a B+tree, have ACID semantics with fully serializable transactions, and support -lock-free MVCC using a single writer and multiple readers. - -The two projects have somewhat diverged. LMDB heavily focuses on raw performance -while Bolt has focused on simplicity and ease of use. For example, LMDB allows -several unsafe actions such as direct writes for the sake of performance. Bolt -opts to disallow actions which can leave the database in a corrupted state. The -only exception to this in Bolt is `DB.NoSync`. - -There are also a few differences in API. LMDB requires a maximum mmap size when -opening an `mdb_env` whereas Bolt will handle incremental mmap resizing -automatically. LMDB overloads the getter and setter functions with multiple -flags whereas Bolt splits these specialized cases into their own functions. - - -## Caveats & Limitations - -It's important to pick the right tool for the job and Bolt is no exception. -Here are a few things to note when evaluating and using Bolt: - -* Bolt is good for read intensive workloads. Sequential write performance is - also fast but random writes can be slow. You can add a write-ahead log or - [transaction coalescer](https://github.com/boltdb/coalescer) in front of Bolt - to mitigate this issue. - -* Bolt uses a B+tree internally so there can be a lot of random page access. - SSDs provide a significant performance boost over spinning disks. - -* Try to avoid long running read transactions. Bolt uses copy-on-write so - old pages cannot be reclaimed while an old transaction is using them. - -* Byte slices returned from Bolt are only valid during a transaction. Once the - transaction has been committed or rolled back then the memory they point to - can be reused by a new page or can be unmapped from virtual memory and you'll - see an `unexpected fault address` panic when accessing it. - -* Be careful when using `Bucket.FillPercent`. Setting a high fill percent for - buckets that have random inserts will cause your database to have very poor - page utilization. - -* Use larger buckets in general. Smaller buckets causes poor page utilization - once they become larger than the page size (typically 4KB). - -* Bulk loading a lot of random writes into a new bucket can be slow as the - page will not split until the transaction is committed. Randomly inserting - more than 100,000 key/value pairs into a single new bucket in a single - transaction is not advised. - -* Bolt uses a memory-mapped file so the underlying operating system handles the - caching of the data. Typically, the OS will cache as much of the file as it - can in memory and will release memory as needed to other processes. This means - that Bolt can show very high memory usage when working with large databases. - However, this is expected and the OS will release memory as needed. Bolt can - handle databases much larger than the available physical RAM. - - -## Other Projects Using Bolt - -Below is a list of public, open source projects that use Bolt: - -* [Operation Go: A Routine Mission](http://gocode.io) - An online programming game for Golang using Bolt for user accounts and a leaderboard. -* [Bazil](https://github.com/bazillion/bazil) - A file system that lets your data reside where it is most convenient for it to reside. -* [DVID](https://github.com/janelia-flyem/dvid) - Added Bolt as optional storage engine and testing it against Basho-tuned leveldb. -* [Skybox Analytics](https://github.com/skybox/skybox) - A standalone funnel analysis tool for web analytics. -* [Scuttlebutt](https://github.com/benbjohnson/scuttlebutt) - Uses Bolt to store and process all Twitter mentions of GitHub projects. -* [Wiki](https://github.com/peterhellberg/wiki) - A tiny wiki using Goji, BoltDB and Blackfriday. -* [ChainStore](https://github.com/nulayer/chainstore) - Simple key-value interface to a variety of storage engines organized as a chain of operations. -* [MetricBase](https://github.com/msiebuhr/MetricBase) - Single-binary version of Graphite. -* [Gitchain](https://github.com/gitchain/gitchain) - Decentralized, peer-to-peer Git repositories aka "Git meets Bitcoin". -* [event-shuttle](https://github.com/sclasen/event-shuttle) - A Unix system service to collect and reliably deliver messages to Kafka. -* [ipxed](https://github.com/kelseyhightower/ipxed) - Web interface and api for ipxed. -* [BoltStore](https://github.com/yosssi/boltstore) - Session store using Bolt. -* [photosite/session](http://godoc.org/bitbucket.org/kardianos/photosite/session) - Sessions for a photo viewing site. -* [LedisDB](https://github.com/siddontang/ledisdb) - A high performance NoSQL, using Bolt as optional storage. -* [ipLocator](https://github.com/AndreasBriese/ipLocator) - A fast ip-geo-location-server using bolt with bloom filters. -* [cayley](https://github.com/google/cayley) - Cayley is an open-source graph database using Bolt as optional backend. -* [bleve](http://www.blevesearch.com/) - A pure Go search engine similar to ElasticSearch that uses Bolt as the default storage backend. -* [tentacool](https://github.com/optiflows/tentacool) - REST api server to manage system stuff (IP, DNS, Gateway...) on a linux server. -* [SkyDB](https://github.com/skydb/sky) - Behavioral analytics database. - -If you are using Bolt in a project please send a pull request to add it to the list. diff --git a/vendor/github.com/boltdb/bolt/batch.go b/vendor/github.com/boltdb/bolt/batch.go deleted file mode 100644 index bef1f4aa..00000000 --- a/vendor/github.com/boltdb/bolt/batch.go +++ /dev/null @@ -1,135 +0,0 @@ -package bolt - -import ( - "errors" - "fmt" - "sync" - "time" -) - -// Batch calls fn as part of a batch. It behaves similar to Update, -// except: -// -// 1. concurrent Batch calls can be combined into a single Bolt -// transaction. -// -// 2. the function passed to Batch may be called multiple times, -// regardless of whether it returns error or not. -// -// This means that Batch function side effects must be idempotent and -// take permanent effect only after a successful return is seen in -// caller. -// -// Batch is only useful when there are multiple goroutines calling it. -func (db *DB) Batch(fn func(*Tx) error) error { - errCh := make(chan error, 1) - - db.batchMu.Lock() - if (db.batch == nil) || (db.batch != nil && len(db.batch.calls) >= db.MaxBatchSize) { - // There is no existing batch, or the existing batch is full; start a new one. - db.batch = &batch{ - db: db, - } - db.batch.timer = time.AfterFunc(db.MaxBatchDelay, db.batch.trigger) - } - db.batch.calls = append(db.batch.calls, call{fn: fn, err: errCh}) - if len(db.batch.calls) >= db.MaxBatchSize { - // wake up batch, it's ready to run - go db.batch.trigger() - } - db.batchMu.Unlock() - - err := <-errCh - if err == trySolo { - err = db.Update(fn) - } - return err -} - -type call struct { - fn func(*Tx) error - err chan<- error -} - -type batch struct { - db *DB - timer *time.Timer - start sync.Once - calls []call -} - -// trigger runs the batch if it hasn't already been run. -func (b *batch) trigger() { - b.start.Do(b.run) -} - -// run performs the transactions in the batch and communicates results -// back to DB.Batch. -func (b *batch) run() { - b.db.batchMu.Lock() - b.timer.Stop() - // Make sure no new work is added to this batch, but don't break - // other batches. - if b.db.batch == b { - b.db.batch = nil - } - b.db.batchMu.Unlock() - -retry: - for len(b.calls) > 0 { - var failIdx = -1 - err := b.db.Update(func(tx *Tx) error { - for i, c := range b.calls { - if err := safelyCall(c.fn, tx); err != nil { - failIdx = i - return err - } - } - return nil - }) - - if failIdx >= 0 { - // take the failing transaction out of the batch. it's - // safe to shorten b.calls here because db.batch no longer - // points to us, and we hold the mutex anyway. - c := b.calls[failIdx] - b.calls[failIdx], b.calls = b.calls[len(b.calls)-1], b.calls[:len(b.calls)-1] - // tell the submitter re-run it solo, continue with the rest of the batch - c.err <- trySolo - continue retry - } - - // pass success, or bolt internal errors, to all callers - for _, c := range b.calls { - if c.err != nil { - c.err <- err - } - } - break retry - } -} - -// trySolo is a special sentinel error value used for signaling that a -// transaction function should be re-run. It should never be seen by -// callers. -var trySolo = errors.New("batch function returned an error and should be re-run solo") - -type panicked struct { - reason interface{} -} - -func (p panicked) Error() string { - if err, ok := p.reason.(error); ok { - return err.Error() - } - return fmt.Sprintf("panic: %v", p.reason) -} - -func safelyCall(fn func(*Tx) error, tx *Tx) (err error) { - defer func() { - if p := recover(); p != nil { - err = panicked{p} - } - }() - return fn(tx) -} diff --git a/vendor/github.com/boltdb/bolt/batch_benchmark_test.go b/vendor/github.com/boltdb/bolt/batch_benchmark_test.go deleted file mode 100644 index b745a371..00000000 --- a/vendor/github.com/boltdb/bolt/batch_benchmark_test.go +++ /dev/null @@ -1,170 +0,0 @@ -package bolt_test - -import ( - "bytes" - "encoding/binary" - "errors" - "hash/fnv" - "sync" - "testing" - - "github.com/boltdb/bolt" -) - -func validateBatchBench(b *testing.B, db *TestDB) { - var rollback = errors.New("sentinel error to cause rollback") - validate := func(tx *bolt.Tx) error { - bucket := tx.Bucket([]byte("bench")) - h := fnv.New32a() - buf := make([]byte, 4) - for id := uint32(0); id < 1000; id++ { - binary.LittleEndian.PutUint32(buf, id) - h.Reset() - h.Write(buf[:]) - k := h.Sum(nil) - v := bucket.Get(k) - if v == nil { - b.Errorf("not found id=%d key=%x", id, k) - continue - } - if g, e := v, []byte("filler"); !bytes.Equal(g, e) { - b.Errorf("bad value for id=%d key=%x: %s != %q", id, k, g, e) - } - if err := bucket.Delete(k); err != nil { - return err - } - } - // should be empty now - c := bucket.Cursor() - for k, v := c.First(); k != nil; k, v = c.Next() { - b.Errorf("unexpected key: %x = %q", k, v) - } - return rollback - } - if err := db.Update(validate); err != nil && err != rollback { - b.Error(err) - } -} - -func BenchmarkDBBatchAutomatic(b *testing.B) { - db := NewTestDB() - defer db.Close() - db.MustCreateBucket([]byte("bench")) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - start := make(chan struct{}) - var wg sync.WaitGroup - - for round := 0; round < 1000; round++ { - wg.Add(1) - - go func(id uint32) { - defer wg.Done() - <-start - - h := fnv.New32a() - buf := make([]byte, 4) - binary.LittleEndian.PutUint32(buf, id) - h.Write(buf[:]) - k := h.Sum(nil) - insert := func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("bench")) - return b.Put(k, []byte("filler")) - } - if err := db.Batch(insert); err != nil { - b.Error(err) - return - } - }(uint32(round)) - } - close(start) - wg.Wait() - } - - b.StopTimer() - validateBatchBench(b, db) -} - -func BenchmarkDBBatchSingle(b *testing.B) { - db := NewTestDB() - defer db.Close() - db.MustCreateBucket([]byte("bench")) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - start := make(chan struct{}) - var wg sync.WaitGroup - - for round := 0; round < 1000; round++ { - wg.Add(1) - go func(id uint32) { - defer wg.Done() - <-start - - h := fnv.New32a() - buf := make([]byte, 4) - binary.LittleEndian.PutUint32(buf, id) - h.Write(buf[:]) - k := h.Sum(nil) - insert := func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("bench")) - return b.Put(k, []byte("filler")) - } - if err := db.Update(insert); err != nil { - b.Error(err) - return - } - }(uint32(round)) - } - close(start) - wg.Wait() - } - - b.StopTimer() - validateBatchBench(b, db) -} - -func BenchmarkDBBatchManual10x100(b *testing.B) { - db := NewTestDB() - defer db.Close() - db.MustCreateBucket([]byte("bench")) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - start := make(chan struct{}) - var wg sync.WaitGroup - - for major := 0; major < 10; major++ { - wg.Add(1) - go func(id uint32) { - defer wg.Done() - <-start - - insert100 := func(tx *bolt.Tx) error { - h := fnv.New32a() - buf := make([]byte, 4) - for minor := uint32(0); minor < 100; minor++ { - binary.LittleEndian.PutUint32(buf, uint32(id*100+minor)) - h.Reset() - h.Write(buf[:]) - k := h.Sum(nil) - b := tx.Bucket([]byte("bench")) - if err := b.Put(k, []byte("filler")); err != nil { - return err - } - } - return nil - } - if err := db.Update(insert100); err != nil { - b.Fatal(err) - } - }(uint32(major)) - } - close(start) - wg.Wait() - } - - b.StopTimer() - validateBatchBench(b, db) -} diff --git a/vendor/github.com/boltdb/bolt/batch_example_test.go b/vendor/github.com/boltdb/bolt/batch_example_test.go deleted file mode 100644 index 74eff8af..00000000 --- a/vendor/github.com/boltdb/bolt/batch_example_test.go +++ /dev/null @@ -1,148 +0,0 @@ -package bolt_test - -import ( - "encoding/binary" - "fmt" - "io/ioutil" - "log" - "math/rand" - "net/http" - "net/http/httptest" - "os" - - "github.com/boltdb/bolt" -) - -// Set this to see how the counts are actually updated. -const verbose = false - -// Counter updates a counter in Bolt for every URL path requested. -type counter struct { - db *bolt.DB -} - -func (c counter) ServeHTTP(rw http.ResponseWriter, req *http.Request) { - // Communicates the new count from a successful database - // transaction. - var result uint64 - - increment := func(tx *bolt.Tx) error { - b, err := tx.CreateBucketIfNotExists([]byte("hits")) - if err != nil { - return err - } - key := []byte(req.URL.String()) - // Decode handles key not found for us. - count := decode(b.Get(key)) + 1 - b.Put(key, encode(count)) - // All good, communicate new count. - result = count - return nil - } - if err := c.db.Batch(increment); err != nil { - http.Error(rw, err.Error(), 500) - return - } - - if verbose { - log.Printf("server: %s: %d", req.URL.String(), result) - } - - rw.Header().Set("Content-Type", "application/octet-stream") - fmt.Fprintf(rw, "%d\n", result) -} - -func client(id int, base string, paths []string) error { - // Process paths in random order. - rng := rand.New(rand.NewSource(int64(id))) - permutation := rng.Perm(len(paths)) - - for i := range paths { - path := paths[permutation[i]] - resp, err := http.Get(base + path) - if err != nil { - return err - } - defer resp.Body.Close() - buf, err := ioutil.ReadAll(resp.Body) - if err != nil { - return err - } - if verbose { - log.Printf("client: %s: %s", path, buf) - } - } - return nil -} - -func ExampleDB_Batch() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Start our web server - count := counter{db} - srv := httptest.NewServer(count) - defer srv.Close() - - // Decrease the batch size to make things more interesting. - db.MaxBatchSize = 3 - - // Get every path multiple times concurrently. - const clients = 10 - paths := []string{ - "/foo", - "/bar", - "/baz", - "/quux", - "/thud", - "/xyzzy", - } - errors := make(chan error, clients) - for i := 0; i < clients; i++ { - go func(id int) { - errors <- client(id, srv.URL, paths) - }(i) - } - // Check all responses to make sure there's no error. - for i := 0; i < clients; i++ { - if err := <-errors; err != nil { - fmt.Printf("client error: %v", err) - return - } - } - - // Check the final result - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("hits")) - c := b.Cursor() - for k, v := c.First(); k != nil; k, v = c.Next() { - fmt.Printf("hits to %s: %d\n", k, decode(v)) - } - return nil - }) - - // Output: - // hits to /bar: 10 - // hits to /baz: 10 - // hits to /foo: 10 - // hits to /quux: 10 - // hits to /thud: 10 - // hits to /xyzzy: 10 -} - -// encode marshals a counter. -func encode(n uint64) []byte { - buf := make([]byte, 8) - binary.BigEndian.PutUint64(buf, n) - return buf -} - -// decode unmarshals a counter. Nil buffers are decoded as 0. -func decode(buf []byte) uint64 { - if buf == nil { - return 0 - } - return binary.BigEndian.Uint64(buf) -} diff --git a/vendor/github.com/boltdb/bolt/batch_test.go b/vendor/github.com/boltdb/bolt/batch_test.go deleted file mode 100644 index 0b5075fd..00000000 --- a/vendor/github.com/boltdb/bolt/batch_test.go +++ /dev/null @@ -1,167 +0,0 @@ -package bolt_test - -import ( - "testing" - "time" - - "github.com/boltdb/bolt" -) - -// Ensure two functions can perform updates in a single batch. -func TestDB_Batch(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.MustCreateBucket([]byte("widgets")) - - // Iterate over multiple updates in separate goroutines. - n := 2 - ch := make(chan error) - for i := 0; i < n; i++ { - go func(i int) { - ch <- db.Batch(func(tx *bolt.Tx) error { - return tx.Bucket([]byte("widgets")).Put(u64tob(uint64(i)), []byte{}) - }) - }(i) - } - - // Check all responses to make sure there's no error. - for i := 0; i < n; i++ { - if err := <-ch; err != nil { - t.Fatal(err) - } - } - - // Ensure data is correct. - db.MustView(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - for i := 0; i < n; i++ { - if v := b.Get(u64tob(uint64(i))); v == nil { - t.Errorf("key not found: %d", i) - } - } - return nil - }) -} - -func TestDB_Batch_Panic(t *testing.T) { - db := NewTestDB() - defer db.Close() - - var sentinel int - var bork = &sentinel - var problem interface{} - var err error - - // Execute a function inside a batch that panics. - func() { - defer func() { - if p := recover(); p != nil { - problem = p - } - }() - err = db.Batch(func(tx *bolt.Tx) error { - panic(bork) - }) - }() - - // Verify there is no error. - if g, e := err, error(nil); g != e { - t.Fatalf("wrong error: %v != %v", g, e) - } - // Verify the panic was captured. - if g, e := problem, bork; g != e { - t.Fatalf("wrong error: %v != %v", g, e) - } -} - -func TestDB_BatchFull(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.MustCreateBucket([]byte("widgets")) - - const size = 3 - // buffered so we never leak goroutines - ch := make(chan error, size) - put := func(i int) { - ch <- db.Batch(func(tx *bolt.Tx) error { - return tx.Bucket([]byte("widgets")).Put(u64tob(uint64(i)), []byte{}) - }) - } - - db.MaxBatchSize = size - // high enough to never trigger here - db.MaxBatchDelay = 1 * time.Hour - - go put(1) - go put(2) - - // Give the batch a chance to exhibit bugs. - time.Sleep(10 * time.Millisecond) - - // not triggered yet - select { - case <-ch: - t.Fatalf("batch triggered too early") - default: - } - - go put(3) - - // Check all responses to make sure there's no error. - for i := 0; i < size; i++ { - if err := <-ch; err != nil { - t.Fatal(err) - } - } - - // Ensure data is correct. - db.MustView(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - for i := 1; i <= size; i++ { - if v := b.Get(u64tob(uint64(i))); v == nil { - t.Errorf("key not found: %d", i) - } - } - return nil - }) -} - -func TestDB_BatchTime(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.MustCreateBucket([]byte("widgets")) - - const size = 1 - // buffered so we never leak goroutines - ch := make(chan error, size) - put := func(i int) { - ch <- db.Batch(func(tx *bolt.Tx) error { - return tx.Bucket([]byte("widgets")).Put(u64tob(uint64(i)), []byte{}) - }) - } - - db.MaxBatchSize = 1000 - db.MaxBatchDelay = 0 - - go put(1) - - // Batch must trigger by time alone. - - // Check all responses to make sure there's no error. - for i := 0; i < size; i++ { - if err := <-ch; err != nil { - t.Fatal(err) - } - } - - // Ensure data is correct. - db.MustView(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - for i := 1; i <= size; i++ { - if v := b.Get(u64tob(uint64(i))); v == nil { - t.Errorf("key not found: %d", i) - } - } - return nil - }) -} diff --git a/vendor/github.com/boltdb/bolt/bolt_test.go b/vendor/github.com/boltdb/bolt/bolt_test.go deleted file mode 100644 index b7bea1fc..00000000 --- a/vendor/github.com/boltdb/bolt/bolt_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package bolt_test - -import ( - "fmt" - "path/filepath" - "reflect" - "runtime" - "testing" -) - -// assert fails the test if the condition is false. -func assert(tb testing.TB, condition bool, msg string, v ...interface{}) { - if !condition { - _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: "+msg+"\033[39m\n\n", append([]interface{}{filepath.Base(file), line}, v...)...) - tb.FailNow() - } -} - -// ok fails the test if an err is not nil. -func ok(tb testing.TB, err error) { - if err != nil { - _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: unexpected error: %s\033[39m\n\n", filepath.Base(file), line, err.Error()) - tb.FailNow() - } -} - -// equals fails the test if exp is not equal to act. -func equals(tb testing.TB, exp, act interface{}) { - if !reflect.DeepEqual(exp, act) { - _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\033[39m\n\n", filepath.Base(file), line, exp, act) - tb.FailNow() - } -} diff --git a/vendor/github.com/boltdb/bolt/bolt_unix.go b/vendor/github.com/boltdb/bolt/bolt_unix.go deleted file mode 100644 index e222cfdc..00000000 --- a/vendor/github.com/boltdb/bolt/bolt_unix.go +++ /dev/null @@ -1,80 +0,0 @@ -// +build !windows,!plan9 - -package bolt - -import ( - "fmt" - "os" - "syscall" - "time" - "unsafe" -) - -// flock acquires an advisory lock on a file descriptor. -func flock(f *os.File, timeout time.Duration) error { - var t time.Time - for { - // If we're beyond our timeout then return an error. - // This can only occur after we've attempted a flock once. - if t.IsZero() { - t = time.Now() - } else if timeout > 0 && time.Since(t) > timeout { - return ErrTimeout - } - - // Otherwise attempt to obtain an exclusive lock. - err := syscall.Flock(int(f.Fd()), syscall.LOCK_EX|syscall.LOCK_NB) - if err == nil { - return nil - } else if err != syscall.EWOULDBLOCK { - return err - } - - // Wait for a bit and try again. - time.Sleep(50 * time.Millisecond) - } -} - -// funlock releases an advisory lock on a file descriptor. -func funlock(f *os.File) error { - return syscall.Flock(int(f.Fd()), syscall.LOCK_UN) -} - -// mmap memory maps a DB's data file. -func mmap(db *DB, sz int) error { - // Truncate and fsync to ensure file size metadata is flushed. - // https://github.com/boltdb/bolt/issues/284 - if err := db.file.Truncate(int64(sz)); err != nil { - return fmt.Errorf("file resize error: %s", err) - } - if err := db.file.Sync(); err != nil { - return fmt.Errorf("file sync error: %s", err) - } - - // Map the data file to memory. - b, err := syscall.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED) - if err != nil { - return err - } - - // Save the original byte slice and convert to a byte array pointer. - db.dataref = b - db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) - db.datasz = sz - return nil -} - -// munmap unmaps a DB's data file from memory. -func munmap(db *DB) error { - // Ignore the unmap if we have no mapped data. - if db.dataref == nil { - return nil - } - - // Unmap using the original byte slice. - err := syscall.Munmap(db.dataref) - db.dataref = nil - db.data = nil - db.datasz = 0 - return err -} diff --git a/vendor/github.com/boltdb/bolt/bolt_windows.go b/vendor/github.com/boltdb/bolt/bolt_windows.go deleted file mode 100644 index c8539d40..00000000 --- a/vendor/github.com/boltdb/bolt/bolt_windows.go +++ /dev/null @@ -1,74 +0,0 @@ -package bolt - -import ( - "fmt" - "os" - "syscall" - "time" - "unsafe" -) - -var odirect int - -// fdatasync flushes written data to a file descriptor. -func fdatasync(db *DB) error { - return db.file.Sync() -} - -// flock acquires an advisory lock on a file descriptor. -func flock(f *os.File, _ time.Duration) error { - return nil -} - -// funlock releases an advisory lock on a file descriptor. -func funlock(f *os.File) error { - return nil -} - -// mmap memory maps a DB's data file. -// Based on: https://github.com/edsrzf/mmap-go -func mmap(db *DB, sz int) error { - // Truncate the database to the size of the mmap. - if err := db.file.Truncate(int64(sz)); err != nil { - return fmt.Errorf("truncate: %s", err) - } - - // Open a file mapping handle. - sizelo := uint32(sz >> 32) - sizehi := uint32(sz) & 0xffffffff - h, errno := syscall.CreateFileMapping(syscall.Handle(db.file.Fd()), nil, syscall.PAGE_READONLY, sizelo, sizehi, nil) - if h == 0 { - return os.NewSyscallError("CreateFileMapping", errno) - } - - // Create the memory map. - addr, errno := syscall.MapViewOfFile(h, syscall.FILE_MAP_READ, 0, 0, uintptr(sz)) - if addr == 0 { - return os.NewSyscallError("MapViewOfFile", errno) - } - - // Close mapping handle. - if err := syscall.CloseHandle(syscall.Handle(h)); err != nil { - return os.NewSyscallError("CloseHandle", err) - } - - // Convert to a byte array. - db.data = ((*[maxMapSize]byte)(unsafe.Pointer(addr))) - db.datasz = sz - - return nil -} - -// munmap unmaps a pointer from a file. -// Based on: https://github.com/edsrzf/mmap-go -func munmap(db *DB) error { - if db.data == nil { - return nil - } - - addr := (uintptr)(unsafe.Pointer(&db.data[0])) - if err := syscall.UnmapViewOfFile(addr); err != nil { - return os.NewSyscallError("UnmapViewOfFile", err) - } - return nil -} diff --git a/vendor/github.com/boltdb/bolt/bucket_test.go b/vendor/github.com/boltdb/bolt/bucket_test.go deleted file mode 100644 index 883fa035..00000000 --- a/vendor/github.com/boltdb/bolt/bucket_test.go +++ /dev/null @@ -1,1153 +0,0 @@ -package bolt_test - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "math/rand" - "os" - "strconv" - "strings" - "testing" - "testing/quick" - - "github.com/boltdb/bolt" -) - -// Ensure that a bucket that gets a non-existent key returns nil. -func TestBucket_Get_NonExistent(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - assert(t, value == nil, "") - return nil - }) -} - -// Ensure that a bucket can read a value that is not flushed yet. -func TestBucket_Get_FromNode(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - b.Put([]byte("foo"), []byte("bar")) - value := b.Get([]byte("foo")) - equals(t, []byte("bar"), value) - return nil - }) -} - -// Ensure that a bucket retrieved via Get() returns a nil. -func TestBucket_Get_IncompatibleValue(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - _, err := tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")) - ok(t, err) - assert(t, tx.Bucket([]byte("widgets")).Get([]byte("foo")) == nil, "") - return nil - }) -} - -// Ensure that a bucket can write a key/value. -func TestBucket_Put(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - err := tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - ok(t, err) - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - equals(t, value, []byte("bar")) - return nil - }) -} - -// Ensure that a bucket can rewrite a key in the same transaction. -func TestBucket_Put_Repeat(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - ok(t, b.Put([]byte("foo"), []byte("bar"))) - ok(t, b.Put([]byte("foo"), []byte("baz"))) - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - equals(t, value, []byte("baz")) - return nil - }) -} - -// Ensure that a bucket can write a bunch of large values. -func TestBucket_Put_Large(t *testing.T) { - db := NewTestDB() - defer db.Close() - - count, factor := 100, 200 - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - for i := 1; i < count; i++ { - ok(t, b.Put([]byte(strings.Repeat("0", i*factor)), []byte(strings.Repeat("X", (count-i)*factor)))) - } - return nil - }) - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - for i := 1; i < count; i++ { - value := b.Get([]byte(strings.Repeat("0", i*factor))) - equals(t, []byte(strings.Repeat("X", (count-i)*factor)), value) - } - return nil - }) -} - -// Ensure that a database can perform multiple large appends safely. -func TestDB_Put_VeryLarge(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } - - n, batchN := 400000, 200000 - ksize, vsize := 8, 500 - - db := NewTestDB() - defer db.Close() - - for i := 0; i < n; i += batchN { - err := db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucketIfNotExists([]byte("widgets")) - for j := 0; j < batchN; j++ { - k, v := make([]byte, ksize), make([]byte, vsize) - binary.BigEndian.PutUint32(k, uint32(i+j)) - ok(t, b.Put(k, v)) - } - return nil - }) - ok(t, err) - } -} - -// Ensure that a setting a value on a key with a bucket value returns an error. -func TestBucket_Put_IncompatibleValue(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - _, err := tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")) - ok(t, err) - equals(t, bolt.ErrIncompatibleValue, tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar"))) - return nil - }) -} - -// Ensure that a setting a value while the transaction is closed returns an error. -func TestBucket_Put_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - tx.Rollback() - equals(t, bolt.ErrTxClosed, b.Put([]byte("foo"), []byte("bar"))) -} - -// Ensure that setting a value on a read-only bucket returns an error. -func TestBucket_Put_ReadOnly(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - return nil - }) - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - err := b.Put([]byte("foo"), []byte("bar")) - equals(t, err, bolt.ErrTxNotWritable) - return nil - }) -} - -// Ensure that a bucket can delete an existing key. -func TestBucket_Delete(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - err := tx.Bucket([]byte("widgets")).Delete([]byte("foo")) - ok(t, err) - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - assert(t, value == nil, "") - return nil - }) -} - -// Ensure that deleting a large set of keys will work correctly. -func TestBucket_Delete_Large(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - var b, _ = tx.CreateBucket([]byte("widgets")) - for i := 0; i < 100; i++ { - ok(t, b.Put([]byte(strconv.Itoa(i)), []byte(strings.Repeat("*", 1024)))) - } - return nil - }) - db.Update(func(tx *bolt.Tx) error { - var b = tx.Bucket([]byte("widgets")) - for i := 0; i < 100; i++ { - ok(t, b.Delete([]byte(strconv.Itoa(i)))) - } - return nil - }) - db.View(func(tx *bolt.Tx) error { - var b = tx.Bucket([]byte("widgets")) - for i := 0; i < 100; i++ { - assert(t, b.Get([]byte(strconv.Itoa(i))) == nil, "") - } - return nil - }) -} - -// Deleting a very large list of keys will cause the freelist to use overflow. -func TestBucket_Delete_FreelistOverflow(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } - - db := NewTestDB() - defer db.Close() - k := make([]byte, 16) - for i := uint64(0); i < 10000; i++ { - err := db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucketIfNotExists([]byte("0")) - if err != nil { - t.Fatalf("bucket error: %s", err) - } - - for j := uint64(0); j < 1000; j++ { - binary.BigEndian.PutUint64(k[:8], i) - binary.BigEndian.PutUint64(k[8:], j) - if err := b.Put(k, nil); err != nil { - t.Fatalf("put error: %s", err) - } - } - - return nil - }) - - if err != nil { - t.Fatalf("update error: %s", err) - } - } - - // Delete all of them in one large transaction - err := db.Update(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("0")) - c := b.Cursor() - for k, _ := c.First(); k != nil; k, _ = c.Next() { - b.Delete(k) - } - return nil - }) - - // Check that a freelist overflow occurred. - ok(t, err) -} - -// Ensure that accessing and updating nested buckets is ok across transactions. -func TestBucket_Nested(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - // Create a widgets bucket. - b, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - - // Create a widgets/foo bucket. - _, err = b.CreateBucket([]byte("foo")) - ok(t, err) - - // Create a widgets/bar key. - ok(t, b.Put([]byte("bar"), []byte("0000"))) - - return nil - }) - db.MustCheck() - - // Update widgets/bar. - db.Update(func(tx *bolt.Tx) error { - var b = tx.Bucket([]byte("widgets")) - ok(t, b.Put([]byte("bar"), []byte("xxxx"))) - return nil - }) - db.MustCheck() - - // Cause a split. - db.Update(func(tx *bolt.Tx) error { - var b = tx.Bucket([]byte("widgets")) - for i := 0; i < 10000; i++ { - ok(t, b.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i)))) - } - return nil - }) - db.MustCheck() - - // Insert into widgets/foo/baz. - db.Update(func(tx *bolt.Tx) error { - var b = tx.Bucket([]byte("widgets")) - ok(t, b.Bucket([]byte("foo")).Put([]byte("baz"), []byte("yyyy"))) - return nil - }) - db.MustCheck() - - // Verify. - db.View(func(tx *bolt.Tx) error { - var b = tx.Bucket([]byte("widgets")) - equals(t, []byte("yyyy"), b.Bucket([]byte("foo")).Get([]byte("baz"))) - equals(t, []byte("xxxx"), b.Get([]byte("bar"))) - for i := 0; i < 10000; i++ { - equals(t, []byte(strconv.Itoa(i)), b.Get([]byte(strconv.Itoa(i)))) - } - return nil - }) -} - -// Ensure that deleting a bucket using Delete() returns an error. -func TestBucket_Delete_Bucket(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - _, err := b.CreateBucket([]byte("foo")) - ok(t, err) - equals(t, bolt.ErrIncompatibleValue, b.Delete([]byte("foo"))) - return nil - }) -} - -// Ensure that deleting a key on a read-only bucket returns an error. -func TestBucket_Delete_ReadOnly(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - return nil - }) - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - err := b.Delete([]byte("foo")) - equals(t, err, bolt.ErrTxNotWritable) - return nil - }) -} - -// Ensure that a deleting value while the transaction is closed returns an error. -func TestBucket_Delete_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - tx.Rollback() - equals(t, bolt.ErrTxClosed, b.Delete([]byte("foo"))) -} - -// Ensure that deleting a bucket causes nested buckets to be deleted. -func TestBucket_DeleteBucket_Nested(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - _, err := tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")) - ok(t, err) - _, err = tx.Bucket([]byte("widgets")).Bucket([]byte("foo")).CreateBucket([]byte("bar")) - ok(t, err) - ok(t, tx.Bucket([]byte("widgets")).Bucket([]byte("foo")).Bucket([]byte("bar")).Put([]byte("baz"), []byte("bat"))) - ok(t, tx.Bucket([]byte("widgets")).DeleteBucket([]byte("foo"))) - return nil - }) -} - -// Ensure that deleting a bucket causes nested buckets to be deleted after they have been committed. -func TestBucket_DeleteBucket_Nested2(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - _, err := tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")) - ok(t, err) - _, err = tx.Bucket([]byte("widgets")).Bucket([]byte("foo")).CreateBucket([]byte("bar")) - ok(t, err) - ok(t, tx.Bucket([]byte("widgets")).Bucket([]byte("foo")).Bucket([]byte("bar")).Put([]byte("baz"), []byte("bat"))) - return nil - }) - db.Update(func(tx *bolt.Tx) error { - assert(t, tx.Bucket([]byte("widgets")) != nil, "") - assert(t, tx.Bucket([]byte("widgets")).Bucket([]byte("foo")) != nil, "") - assert(t, tx.Bucket([]byte("widgets")).Bucket([]byte("foo")).Bucket([]byte("bar")) != nil, "") - equals(t, []byte("bat"), tx.Bucket([]byte("widgets")).Bucket([]byte("foo")).Bucket([]byte("bar")).Get([]byte("baz"))) - ok(t, tx.DeleteBucket([]byte("widgets"))) - return nil - }) - db.View(func(tx *bolt.Tx) error { - assert(t, tx.Bucket([]byte("widgets")) == nil, "") - return nil - }) -} - -// Ensure that deleting a child bucket with multiple pages causes all pages to get collected. -func TestBucket_DeleteBucket_Large(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - _, err = tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")) - ok(t, err) - b := tx.Bucket([]byte("widgets")).Bucket([]byte("foo")) - for i := 0; i < 1000; i++ { - ok(t, b.Put([]byte(fmt.Sprintf("%d", i)), []byte(fmt.Sprintf("%0100d", i)))) - } - return nil - }) - db.Update(func(tx *bolt.Tx) error { - ok(t, tx.DeleteBucket([]byte("widgets"))) - return nil - }) - - // NOTE: Consistency check in TestDB.Close() will panic if pages not freed properly. -} - -// Ensure that a simple value retrieved via Bucket() returns a nil. -func TestBucket_Bucket_IncompatibleValue(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - ok(t, tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar"))) - assert(t, tx.Bucket([]byte("widgets")).Bucket([]byte("foo")) == nil, "") - return nil - }) -} - -// Ensure that creating a bucket on an existing non-bucket key returns an error. -func TestBucket_CreateBucket_IncompatibleValue(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - ok(t, tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar"))) - _, err = tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")) - equals(t, bolt.ErrIncompatibleValue, err) - return nil - }) -} - -// Ensure that deleting a bucket on an existing non-bucket key returns an error. -func TestBucket_DeleteBucket_IncompatibleValue(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - ok(t, tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar"))) - equals(t, bolt.ErrIncompatibleValue, tx.Bucket([]byte("widgets")).DeleteBucket([]byte("foo"))) - return nil - }) -} - -// Ensure that a bucket can return an autoincrementing sequence. -func TestBucket_NextSequence(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.CreateBucket([]byte("woojits")) - - // Make sure sequence increments. - seq, err := tx.Bucket([]byte("widgets")).NextSequence() - ok(t, err) - equals(t, seq, uint64(1)) - seq, err = tx.Bucket([]byte("widgets")).NextSequence() - ok(t, err) - equals(t, seq, uint64(2)) - - // Buckets should be separate. - seq, err = tx.Bucket([]byte("woojits")).NextSequence() - ok(t, err) - equals(t, seq, uint64(1)) - return nil - }) -} - -// Ensure that a bucket will persist an autoincrementing sequence even if its -// the only thing updated on the bucket. -// https://github.com/boltdb/bolt/issues/296 -func TestBucket_NextSequence_Persist(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, _ = tx.CreateBucket([]byte("widgets")) - return nil - }) - - db.Update(func(tx *bolt.Tx) error { - _, _ = tx.Bucket([]byte("widgets")).NextSequence() - return nil - }) - - db.Update(func(tx *bolt.Tx) error { - seq, err := tx.Bucket([]byte("widgets")).NextSequence() - if err != nil { - t.Fatalf("unexpected error: %s", err) - } else if seq != 2 { - t.Fatalf("unexpected sequence: %d", seq) - } - return nil - }) -} - -// Ensure that retrieving the next sequence on a read-only bucket returns an error. -func TestBucket_NextSequence_ReadOnly(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - return nil - }) - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - i, err := b.NextSequence() - equals(t, i, uint64(0)) - equals(t, err, bolt.ErrTxNotWritable) - return nil - }) -} - -// Ensure that retrieving the next sequence for a bucket on a closed database return an error. -func TestBucket_NextSequence_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - tx.Rollback() - _, err := b.NextSequence() - equals(t, bolt.ErrTxClosed, err) -} - -// Ensure a user can loop over all key/value pairs in a bucket. -func TestBucket_ForEach(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("0000")) - tx.Bucket([]byte("widgets")).Put([]byte("baz"), []byte("0001")) - tx.Bucket([]byte("widgets")).Put([]byte("bar"), []byte("0002")) - - var index int - err := tx.Bucket([]byte("widgets")).ForEach(func(k, v []byte) error { - switch index { - case 0: - equals(t, k, []byte("bar")) - equals(t, v, []byte("0002")) - case 1: - equals(t, k, []byte("baz")) - equals(t, v, []byte("0001")) - case 2: - equals(t, k, []byte("foo")) - equals(t, v, []byte("0000")) - } - index++ - return nil - }) - ok(t, err) - equals(t, index, 3) - return nil - }) -} - -// Ensure a database can stop iteration early. -func TestBucket_ForEach_ShortCircuit(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("bar"), []byte("0000")) - tx.Bucket([]byte("widgets")).Put([]byte("baz"), []byte("0000")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("0000")) - - var index int - err := tx.Bucket([]byte("widgets")).ForEach(func(k, v []byte) error { - index++ - if bytes.Equal(k, []byte("baz")) { - return errors.New("marker") - } - return nil - }) - equals(t, errors.New("marker"), err) - equals(t, 2, index) - return nil - }) -} - -// Ensure that looping over a bucket on a closed database returns an error. -func TestBucket_ForEach_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - tx.Rollback() - err := b.ForEach(func(k, v []byte) error { return nil }) - equals(t, bolt.ErrTxClosed, err) -} - -// Ensure that an error is returned when inserting with an empty key. -func TestBucket_Put_EmptyKey(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - err := tx.Bucket([]byte("widgets")).Put([]byte(""), []byte("bar")) - equals(t, err, bolt.ErrKeyRequired) - err = tx.Bucket([]byte("widgets")).Put(nil, []byte("bar")) - equals(t, err, bolt.ErrKeyRequired) - return nil - }) -} - -// Ensure that an error is returned when inserting with a key that's too large. -func TestBucket_Put_KeyTooLarge(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - err := tx.Bucket([]byte("widgets")).Put(make([]byte, 32769), []byte("bar")) - equals(t, err, bolt.ErrKeyTooLarge) - return nil - }) -} - -// Ensure a bucket can calculate stats. -func TestBucket_Stats(t *testing.T) { - db := NewTestDB() - defer db.Close() - - // Add bucket with fewer keys but one big value. - big_key := []byte("really-big-value") - for i := 0; i < 500; i++ { - db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucketIfNotExists([]byte("woojits")) - return b.Put([]byte(fmt.Sprintf("%03d", i)), []byte(strconv.Itoa(i))) - }) - } - db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucketIfNotExists([]byte("woojits")) - return b.Put(big_key, []byte(strings.Repeat("*", 10000))) - }) - - db.MustCheck() - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("woojits")) - stats := b.Stats() - equals(t, 1, stats.BranchPageN) - equals(t, 0, stats.BranchOverflowN) - equals(t, 7, stats.LeafPageN) - equals(t, 2, stats.LeafOverflowN) - equals(t, 501, stats.KeyN) - equals(t, 2, stats.Depth) - - branchInuse := 16 // branch page header - branchInuse += 7 * 16 // branch elements - branchInuse += 7 * 3 // branch keys (6 3-byte keys) - equals(t, branchInuse, stats.BranchInuse) - - leafInuse := 7 * 16 // leaf page header - leafInuse += 501 * 16 // leaf elements - leafInuse += 500*3 + len(big_key) // leaf keys - leafInuse += 1*10 + 2*90 + 3*400 + 10000 // leaf values - equals(t, leafInuse, stats.LeafInuse) - - if os.Getpagesize() == 4096 { - // Incompatible page size - equals(t, 4096, stats.BranchAlloc) - equals(t, 36864, stats.LeafAlloc) - } - - equals(t, 1, stats.BucketN) - equals(t, 0, stats.InlineBucketN) - equals(t, 0, stats.InlineBucketInuse) - return nil - }) -} - -// Ensure a bucket with random insertion utilizes fill percentage correctly. -func TestBucket_Stats_RandomFill(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } else if os.Getpagesize() != 4096 { - t.Skip("invalid page size for test") - } - - db := NewTestDB() - defer db.Close() - - // Add a set of values in random order. It will be the same random - // order so we can maintain consistency between test runs. - var count int - r := rand.New(rand.NewSource(42)) - for _, i := range r.Perm(1000) { - db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucketIfNotExists([]byte("woojits")) - b.FillPercent = 0.9 - for _, j := range r.Perm(100) { - index := (j * 10000) + i - b.Put([]byte(fmt.Sprintf("%d000000000000000", index)), []byte("0000000000")) - count++ - } - return nil - }) - } - db.MustCheck() - - db.View(func(tx *bolt.Tx) error { - s := tx.Bucket([]byte("woojits")).Stats() - equals(t, 100000, s.KeyN) - - equals(t, 98, s.BranchPageN) - equals(t, 0, s.BranchOverflowN) - equals(t, 130984, s.BranchInuse) - equals(t, 401408, s.BranchAlloc) - - equals(t, 3412, s.LeafPageN) - equals(t, 0, s.LeafOverflowN) - equals(t, 4742482, s.LeafInuse) - equals(t, 13975552, s.LeafAlloc) - return nil - }) -} - -// Ensure a bucket can calculate stats. -func TestBucket_Stats_Small(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - // Add a bucket that fits on a single root leaf. - b, err := tx.CreateBucket([]byte("whozawhats")) - ok(t, err) - b.Put([]byte("foo"), []byte("bar")) - - return nil - }) - db.MustCheck() - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("whozawhats")) - stats := b.Stats() - equals(t, 0, stats.BranchPageN) - equals(t, 0, stats.BranchOverflowN) - equals(t, 0, stats.LeafPageN) - equals(t, 0, stats.LeafOverflowN) - equals(t, 1, stats.KeyN) - equals(t, 1, stats.Depth) - equals(t, 0, stats.BranchInuse) - equals(t, 0, stats.LeafInuse) - if os.Getpagesize() == 4096 { - // Incompatible page size - equals(t, 0, stats.BranchAlloc) - equals(t, 0, stats.LeafAlloc) - } - equals(t, 1, stats.BucketN) - equals(t, 1, stats.InlineBucketN) - equals(t, 16+16+6, stats.InlineBucketInuse) - return nil - }) -} - -func TestBucket_Stats_EmptyBucket(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - // Add a bucket that fits on a single root leaf. - _, err := tx.CreateBucket([]byte("whozawhats")) - ok(t, err) - return nil - }) - db.MustCheck() - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("whozawhats")) - stats := b.Stats() - equals(t, 0, stats.BranchPageN) - equals(t, 0, stats.BranchOverflowN) - equals(t, 0, stats.LeafPageN) - equals(t, 0, stats.LeafOverflowN) - equals(t, 0, stats.KeyN) - equals(t, 1, stats.Depth) - equals(t, 0, stats.BranchInuse) - equals(t, 0, stats.LeafInuse) - if os.Getpagesize() == 4096 { - // Incompatible page size - equals(t, 0, stats.BranchAlloc) - equals(t, 0, stats.LeafAlloc) - } - equals(t, 1, stats.BucketN) - equals(t, 1, stats.InlineBucketN) - equals(t, 16, stats.InlineBucketInuse) - return nil - }) -} - -// Ensure a bucket can calculate stats. -func TestBucket_Stats_Nested(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("foo")) - ok(t, err) - for i := 0; i < 100; i++ { - b.Put([]byte(fmt.Sprintf("%02d", i)), []byte(fmt.Sprintf("%02d", i))) - } - bar, err := b.CreateBucket([]byte("bar")) - ok(t, err) - for i := 0; i < 10; i++ { - bar.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))) - } - baz, err := bar.CreateBucket([]byte("baz")) - ok(t, err) - for i := 0; i < 10; i++ { - baz.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))) - } - return nil - }) - - db.MustCheck() - - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("foo")) - stats := b.Stats() - equals(t, 0, stats.BranchPageN) - equals(t, 0, stats.BranchOverflowN) - equals(t, 2, stats.LeafPageN) - equals(t, 0, stats.LeafOverflowN) - equals(t, 122, stats.KeyN) - equals(t, 3, stats.Depth) - equals(t, 0, stats.BranchInuse) - - foo := 16 // foo (pghdr) - foo += 101 * 16 // foo leaf elements - foo += 100*2 + 100*2 // foo leaf key/values - foo += 3 + 16 // foo -> bar key/value - - bar := 16 // bar (pghdr) - bar += 11 * 16 // bar leaf elements - bar += 10 + 10 // bar leaf key/values - bar += 3 + 16 // bar -> baz key/value - - baz := 16 // baz (inline) (pghdr) - baz += 10 * 16 // baz leaf elements - baz += 10 + 10 // baz leaf key/values - - equals(t, foo+bar+baz, stats.LeafInuse) - if os.Getpagesize() == 4096 { - // Incompatible page size - equals(t, 0, stats.BranchAlloc) - equals(t, 8192, stats.LeafAlloc) - } - equals(t, 3, stats.BucketN) - equals(t, 1, stats.InlineBucketN) - equals(t, baz, stats.InlineBucketInuse) - return nil - }) -} - -// Ensure a large bucket can calculate stats. -func TestBucket_Stats_Large(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } - - db := NewTestDB() - defer db.Close() - - var index int - for i := 0; i < 100; i++ { - db.Update(func(tx *bolt.Tx) error { - // Add bucket with lots of keys. - b, _ := tx.CreateBucketIfNotExists([]byte("widgets")) - for i := 0; i < 1000; i++ { - b.Put([]byte(strconv.Itoa(index)), []byte(strconv.Itoa(index))) - index++ - } - return nil - }) - } - db.MustCheck() - - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - stats := b.Stats() - equals(t, 13, stats.BranchPageN) - equals(t, 0, stats.BranchOverflowN) - equals(t, 1196, stats.LeafPageN) - equals(t, 0, stats.LeafOverflowN) - equals(t, 100000, stats.KeyN) - equals(t, 3, stats.Depth) - equals(t, 25257, stats.BranchInuse) - equals(t, 2596916, stats.LeafInuse) - if os.Getpagesize() == 4096 { - // Incompatible page size - equals(t, 53248, stats.BranchAlloc) - equals(t, 4898816, stats.LeafAlloc) - } - equals(t, 1, stats.BucketN) - equals(t, 0, stats.InlineBucketN) - equals(t, 0, stats.InlineBucketInuse) - return nil - }) -} - -// Ensure that a bucket can write random keys and values across multiple transactions. -func TestBucket_Put_Single(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } - - index := 0 - f := func(items testdata) bool { - db := NewTestDB() - defer db.Close() - - m := make(map[string][]byte) - - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - for _, item := range items { - db.Update(func(tx *bolt.Tx) error { - if err := tx.Bucket([]byte("widgets")).Put(item.Key, item.Value); err != nil { - panic("put error: " + err.Error()) - } - m[string(item.Key)] = item.Value - return nil - }) - - // Verify all key/values so far. - db.View(func(tx *bolt.Tx) error { - i := 0 - for k, v := range m { - value := tx.Bucket([]byte("widgets")).Get([]byte(k)) - if !bytes.Equal(value, v) { - t.Logf("value mismatch [run %d] (%d of %d):\nkey: %x\ngot: %x\nexp: %x", index, i, len(m), []byte(k), value, v) - db.CopyTempFile() - t.FailNow() - } - i++ - } - return nil - }) - } - - index++ - return true - } - if err := quick.Check(f, qconfig()); err != nil { - t.Error(err) - } -} - -// Ensure that a transaction can insert multiple key/value pairs at once. -func TestBucket_Put_Multiple(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } - - f := func(items testdata) bool { - db := NewTestDB() - defer db.Close() - // Bulk insert all values. - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - err := db.Update(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - for _, item := range items { - ok(t, b.Put(item.Key, item.Value)) - } - return nil - }) - ok(t, err) - - // Verify all items exist. - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - for _, item := range items { - value := b.Get(item.Key) - if !bytes.Equal(item.Value, value) { - db.CopyTempFile() - t.Fatalf("exp=%x; got=%x", item.Value, value) - } - } - return nil - }) - return true - } - if err := quick.Check(f, qconfig()); err != nil { - t.Error(err) - } -} - -// Ensure that a transaction can delete all key/value pairs and return to a single leaf page. -func TestBucket_Delete_Quick(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } - - f := func(items testdata) bool { - db := NewTestDB() - defer db.Close() - // Bulk insert all values. - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - err := db.Update(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - for _, item := range items { - ok(t, b.Put(item.Key, item.Value)) - } - return nil - }) - ok(t, err) - - // Remove items one at a time and check consistency. - for _, item := range items { - err := db.Update(func(tx *bolt.Tx) error { - return tx.Bucket([]byte("widgets")).Delete(item.Key) - }) - ok(t, err) - } - - // Anything before our deletion index should be nil. - db.View(func(tx *bolt.Tx) error { - tx.Bucket([]byte("widgets")).ForEach(func(k, v []byte) error { - t.Fatalf("bucket should be empty; found: %06x", trunc(k, 3)) - return nil - }) - return nil - }) - return true - } - if err := quick.Check(f, qconfig()); err != nil { - t.Error(err) - } -} - -func ExampleBucket_Put() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Start a write transaction. - db.Update(func(tx *bolt.Tx) error { - // Create a bucket. - tx.CreateBucket([]byte("widgets")) - - // Set the value "bar" for the key "foo". - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - return nil - }) - - // Read value back in a different read-only transaction. - db.View(func(tx *bolt.Tx) error { - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - fmt.Printf("The value of 'foo' is: %s\n", value) - return nil - }) - - // Output: - // The value of 'foo' is: bar -} - -func ExampleBucket_Delete() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Start a write transaction. - db.Update(func(tx *bolt.Tx) error { - // Create a bucket. - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - - // Set the value "bar" for the key "foo". - b.Put([]byte("foo"), []byte("bar")) - - // Retrieve the key back from the database and verify it. - value := b.Get([]byte("foo")) - fmt.Printf("The value of 'foo' was: %s\n", value) - return nil - }) - - // Delete the key in a different write transaction. - db.Update(func(tx *bolt.Tx) error { - return tx.Bucket([]byte("widgets")).Delete([]byte("foo")) - }) - - // Retrieve the key again. - db.View(func(tx *bolt.Tx) error { - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - if value == nil { - fmt.Printf("The value of 'foo' is now: nil\n") - } - return nil - }) - - // Output: - // The value of 'foo' was: bar - // The value of 'foo' is now: nil -} - -func ExampleBucket_ForEach() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Insert data into a bucket. - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("animals")) - b := tx.Bucket([]byte("animals")) - b.Put([]byte("dog"), []byte("fun")) - b.Put([]byte("cat"), []byte("lame")) - b.Put([]byte("liger"), []byte("awesome")) - - // Iterate over items in sorted key order. - b.ForEach(func(k, v []byte) error { - fmt.Printf("A %s is %s.\n", k, v) - return nil - }) - return nil - }) - - // Output: - // A cat is lame. - // A dog is fun. - // A liger is awesome. -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/bench.go b/vendor/github.com/boltdb/bolt/cmd/bolt/bench.go deleted file mode 100644 index 91af9602..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/bench.go +++ /dev/null @@ -1,421 +0,0 @@ -package main - -import ( - "encoding/binary" - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "math/rand" - "os" - "runtime" - "runtime/pprof" - "time" - - "github.com/boltdb/bolt" -) - -// File handlers for the various profiles. -var cpuprofile, memprofile, blockprofile *os.File - -var benchBucketName = []byte("bench") - -// Bench executes a customizable, synthetic benchmark against Bolt. -func Bench(options *BenchOptions) { - var results BenchResults - - // Validate options. - if options.BatchSize == 0 { - options.BatchSize = options.Iterations - } else if options.Iterations%options.BatchSize != 0 { - fatal("number of iterations must be divisible by the batch size") - } - - // Find temporary location. - path := tempfile() - - if options.Clean { - defer os.Remove(path) - } else { - println("work:", path) - } - - // Create database. - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - db.NoSync = options.NoSync - defer db.Close() - - // Enable streaming stats. - if options.StatsInterval > 0 { - go printStats(db, options.StatsInterval) - } - - // Start profiling for writes. - if options.ProfileMode == "rw" || options.ProfileMode == "w" { - benchStartProfiling(options) - } - - // Write to the database. - if err := benchWrite(db, options, &results); err != nil { - fatal("bench: write: ", err) - } - - // Stop profiling for writes only. - if options.ProfileMode == "w" { - benchStopProfiling() - } - - // Start profiling for reads. - if options.ProfileMode == "r" { - benchStartProfiling(options) - } - - // Read from the database. - if err := benchRead(db, options, &results); err != nil { - fatal("bench: read: ", err) - } - - // Stop profiling for writes only. - if options.ProfileMode == "rw" || options.ProfileMode == "r" { - benchStopProfiling() - } - - // Print results. - fmt.Fprintf(os.Stderr, "# Write\t%v\t(%v/op)\t(%v op/sec)\n", results.WriteDuration, results.WriteOpDuration(), results.WriteOpsPerSecond()) - fmt.Fprintf(os.Stderr, "# Read\t%v\t(%v/op)\t(%v op/sec)\n", results.ReadDuration, results.ReadOpDuration(), results.ReadOpsPerSecond()) - fmt.Fprintln(os.Stderr, "") -} - -// Writes to the database. -func benchWrite(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - var err error - var t = time.Now() - - switch options.WriteMode { - case "seq": - err = benchWriteSequential(db, options, results) - case "rnd": - err = benchWriteRandom(db, options, results) - case "seq-nest": - err = benchWriteSequentialNested(db, options, results) - case "rnd-nest": - err = benchWriteRandomNested(db, options, results) - default: - return fmt.Errorf("invalid write mode: %s", options.WriteMode) - } - - results.WriteDuration = time.Since(t) - - return err -} - -func benchWriteSequential(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - var i = uint32(0) - return benchWriteWithSource(db, options, results, func() uint32 { i++; return i }) -} - -func benchWriteRandom(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - return benchWriteWithSource(db, options, results, func() uint32 { return r.Uint32() }) -} - -func benchWriteSequentialNested(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - var i = uint32(0) - return benchWriteNestedWithSource(db, options, results, func() uint32 { i++; return i }) -} - -func benchWriteRandomNested(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - return benchWriteNestedWithSource(db, options, results, func() uint32 { return r.Uint32() }) -} - -func benchWriteWithSource(db *bolt.DB, options *BenchOptions, results *BenchResults, keySource func() uint32) error { - results.WriteOps = options.Iterations - - for i := 0; i < options.Iterations; i += options.BatchSize { - err := db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucketIfNotExists(benchBucketName) - b.FillPercent = options.FillPercent - - for j := 0; j < options.BatchSize; j++ { - var key = make([]byte, options.KeySize) - var value = make([]byte, options.ValueSize) - binary.BigEndian.PutUint32(key, keySource()) - if err := b.Put(key, value); err != nil { - return err - } - } - - return nil - }) - if err != nil { - return err - } - } - return nil -} - -func benchWriteNestedWithSource(db *bolt.DB, options *BenchOptions, results *BenchResults, keySource func() uint32) error { - results.WriteOps = options.Iterations - - for i := 0; i < options.Iterations; i += options.BatchSize { - err := db.Update(func(tx *bolt.Tx) error { - top, _ := tx.CreateBucketIfNotExists(benchBucketName) - top.FillPercent = options.FillPercent - - var name = make([]byte, options.KeySize) - binary.BigEndian.PutUint32(name, keySource()) - b, _ := top.CreateBucketIfNotExists(name) - b.FillPercent = options.FillPercent - - for j := 0; j < options.BatchSize; j++ { - var key = make([]byte, options.KeySize) - var value = make([]byte, options.ValueSize) - binary.BigEndian.PutUint32(key, keySource()) - if err := b.Put(key, value); err != nil { - return err - } - } - - return nil - }) - if err != nil { - return err - } - } - return nil -} - -// Reads from the database. -func benchRead(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - var err error - var t = time.Now() - - switch options.ReadMode { - case "seq": - if options.WriteMode == "seq-nest" || options.WriteMode == "rnd-nest" { - err = benchReadSequentialNested(db, options, results) - } else { - err = benchReadSequential(db, options, results) - } - default: - return fmt.Errorf("invalid read mode: %s", options.ReadMode) - } - - results.ReadDuration = time.Since(t) - - return err -} - -func benchReadSequential(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - return db.View(func(tx *bolt.Tx) error { - var t = time.Now() - - for { - c := tx.Bucket(benchBucketName).Cursor() - var count int - for k, v := c.First(); k != nil; k, v = c.Next() { - if v == nil { - return errors.New("invalid value") - } - count++ - } - - if options.WriteMode == "seq" && count != options.Iterations { - return fmt.Errorf("read seq: iter mismatch: expected %d, got %d", options.Iterations, count) - } - - results.ReadOps += count - - // Make sure we do this for at least a second. - if time.Since(t) >= time.Second { - break - } - } - - return nil - }) -} - -func benchReadSequentialNested(db *bolt.DB, options *BenchOptions, results *BenchResults) error { - return db.View(func(tx *bolt.Tx) error { - var t = time.Now() - - for { - var count int - var top = tx.Bucket(benchBucketName) - top.ForEach(func(name, _ []byte) error { - c := top.Bucket(name).Cursor() - for k, v := c.First(); k != nil; k, v = c.Next() { - if v == nil { - return errors.New("invalid value") - } - count++ - } - return nil - }) - - if options.WriteMode == "seq-nest" && count != options.Iterations { - return fmt.Errorf("read seq-nest: iter mismatch: expected %d, got %d", options.Iterations, count) - } - - results.ReadOps += count - - // Make sure we do this for at least a second. - if time.Since(t) >= time.Second { - break - } - } - - return nil - }) -} - -// Starts all profiles set on the options. -func benchStartProfiling(options *BenchOptions) { - var err error - - // Start CPU profiling. - if options.CPUProfile != "" { - cpuprofile, err = os.Create(options.CPUProfile) - if err != nil { - fatalf("bench: could not create cpu profile %q: %v", options.CPUProfile, err) - } - pprof.StartCPUProfile(cpuprofile) - } - - // Start memory profiling. - if options.MemProfile != "" { - memprofile, err = os.Create(options.MemProfile) - if err != nil { - fatalf("bench: could not create memory profile %q: %v", options.MemProfile, err) - } - runtime.MemProfileRate = 4096 - } - - // Start fatal profiling. - if options.BlockProfile != "" { - blockprofile, err = os.Create(options.BlockProfile) - if err != nil { - fatalf("bench: could not create block profile %q: %v", options.BlockProfile, err) - } - runtime.SetBlockProfileRate(1) - } -} - -// Stops all profiles. -func benchStopProfiling() { - if cpuprofile != nil { - pprof.StopCPUProfile() - cpuprofile.Close() - cpuprofile = nil - } - - if memprofile != nil { - pprof.Lookup("heap").WriteTo(memprofile, 0) - memprofile.Close() - memprofile = nil - } - - if blockprofile != nil { - pprof.Lookup("block").WriteTo(blockprofile, 0) - blockprofile.Close() - blockprofile = nil - runtime.SetBlockProfileRate(0) - } -} - -// Continuously prints stats on the database at given intervals. -func printStats(db *bolt.DB, interval time.Duration) { - var prevStats = db.Stats() - var encoder = json.NewEncoder(os.Stdout) - - for { - // Wait for the stats interval. - time.Sleep(interval) - - // Retrieve new stats and find difference from previous iteration. - var stats = db.Stats() - var diff = stats.Sub(&prevStats) - - // Print as JSON to STDOUT. - if err := encoder.Encode(diff); err != nil { - fatal(err) - } - - // Save stats for next iteration. - prevStats = stats - } -} - -// BenchOptions represents the set of options that can be passed to Bench(). -type BenchOptions struct { - ProfileMode string - WriteMode string - ReadMode string - Iterations int - BatchSize int - KeySize int - ValueSize int - CPUProfile string - MemProfile string - BlockProfile string - StatsInterval time.Duration - FillPercent float64 - NoSync bool - Clean bool -} - -// BenchResults represents the performance results of the benchmark. -type BenchResults struct { - WriteOps int - WriteDuration time.Duration - ReadOps int - ReadDuration time.Duration -} - -// Returns the duration for a single write operation. -func (r *BenchResults) WriteOpDuration() time.Duration { - if r.WriteOps == 0 { - return 0 - } - return r.WriteDuration / time.Duration(r.WriteOps) -} - -// Returns average number of write operations that can be performed per second. -func (r *BenchResults) WriteOpsPerSecond() int { - var op = r.WriteOpDuration() - if op == 0 { - return 0 - } - return int(time.Second) / int(op) -} - -// Returns the duration for a single read operation. -func (r *BenchResults) ReadOpDuration() time.Duration { - if r.ReadOps == 0 { - return 0 - } - return r.ReadDuration / time.Duration(r.ReadOps) -} - -// Returns average number of read operations that can be performed per second. -func (r *BenchResults) ReadOpsPerSecond() int { - var op = r.ReadOpDuration() - if op == 0 { - return 0 - } - return int(time.Second) / int(op) -} - -// tempfile returns a temporary file path. -func tempfile() string { - f, _ := ioutil.TempFile("", "bolt-bench-") - f.Close() - os.Remove(f.Name()) - return f.Name() -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/buckets.go b/vendor/github.com/boltdb/bolt/cmd/bolt/buckets.go deleted file mode 100644 index 68e7dde9..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/buckets.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "os" - - "github.com/boltdb/bolt" -) - -// Buckets prints a list of all buckets. -func Buckets(path string) { - if _, err := os.Stat(path); os.IsNotExist(err) { - fatal(err) - return - } - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - defer db.Close() - - err = db.View(func(tx *bolt.Tx) error { - return tx.ForEach(func(name []byte, _ *bolt.Bucket) error { - println(string(name)) - return nil - }) - }) - if err != nil { - fatal(err) - return - } -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/buckets_test.go b/vendor/github.com/boltdb/bolt/cmd/bolt/buckets_test.go deleted file mode 100644 index d5050fde..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/buckets_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package main_test - -import ( - "testing" - - "github.com/boltdb/bolt" - . "github.com/boltdb/bolt/cmd/bolt" -) - -// Ensure that a list of buckets can be retrieved. -func TestBuckets(t *testing.T) { - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("woojits")) - tx.CreateBucket([]byte("widgets")) - tx.CreateBucket([]byte("whatchits")) - return nil - }) - db.Close() - output := run("buckets", path) - equals(t, "whatchits\nwidgets\nwoojits", output) - }) -} - -// Ensure that an error is reported if the database is not found. -func TestBucketsDBNotFound(t *testing.T) { - SetTestMode(true) - output := run("buckets", "no/such/db") - equals(t, "stat no/such/db: no such file or directory", output) -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/check.go b/vendor/github.com/boltdb/bolt/cmd/bolt/check.go deleted file mode 100644 index 125f2b85..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/check.go +++ /dev/null @@ -1,47 +0,0 @@ -package main - -import ( - "os" - - "github.com/boltdb/bolt" -) - -// Check performs a consistency check on the database and prints any errors found. -func Check(path string) { - if _, err := os.Stat(path); os.IsNotExist(err) { - fatal(err) - return - } - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - defer db.Close() - - // Perform consistency check. - _ = db.View(func(tx *bolt.Tx) error { - var count int - ch := tx.Check() - loop: - for { - select { - case err, ok := <-ch: - if !ok { - break loop - } - println(err) - count++ - } - } - - // Print summary of errors. - if count > 0 { - fatalf("%d errors found", count) - } else { - println("OK") - } - return nil - }) -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/get.go b/vendor/github.com/boltdb/bolt/cmd/bolt/get.go deleted file mode 100644 index 90e0c1dc..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/get.go +++ /dev/null @@ -1,45 +0,0 @@ -package main - -import ( - "os" - - "github.com/boltdb/bolt" -) - -// Get retrieves the value for a given bucket/key. -func Get(path, name, key string) { - if _, err := os.Stat(path); os.IsNotExist(err) { - fatal(err) - return - } - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - defer db.Close() - - err = db.View(func(tx *bolt.Tx) error { - // Find bucket. - b := tx.Bucket([]byte(name)) - if b == nil { - fatalf("bucket not found: %s", name) - return nil - } - - // Find value for a given key. - value := b.Get([]byte(key)) - if value == nil { - fatalf("key not found: %s", key) - return nil - } - - println(string(value)) - return nil - }) - if err != nil { - fatal(err) - return - } -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/get_test.go b/vendor/github.com/boltdb/bolt/cmd/bolt/get_test.go deleted file mode 100644 index 8acd0f48..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/get_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package main_test - -import ( - "testing" - - "github.com/boltdb/bolt" - . "github.com/boltdb/bolt/cmd/bolt" -) - -// Ensure that a value can be retrieved from the CLI. -func TestGet(t *testing.T) { - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - return nil - }) - db.Close() - output := run("get", path, "widgets", "foo") - equals(t, "bar", output) - }) -} - -// Ensure that an error is reported if the database is not found. -func TestGetDBNotFound(t *testing.T) { - SetTestMode(true) - output := run("get", "no/such/db", "widgets", "foo") - equals(t, "stat no/such/db: no such file or directory", output) -} - -// Ensure that an error is reported if the bucket is not found. -func TestGetBucketNotFound(t *testing.T) { - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Close() - output := run("get", path, "widgets", "foo") - equals(t, "bucket not found: widgets", output) - }) -} - -// Ensure that an error is reported if the key is not found. -func TestGetKeyNotFound(t *testing.T) { - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - db.Close() - output := run("get", path, "widgets", "foo") - equals(t, "key not found: foo", output) - }) -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/info.go b/vendor/github.com/boltdb/bolt/cmd/bolt/info.go deleted file mode 100644 index cb01e38f..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/info.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "os" - - "github.com/boltdb/bolt" -) - -// Info prints basic information about a database. -func Info(path string) { - if _, err := os.Stat(path); os.IsNotExist(err) { - fatal(err) - return - } - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - defer db.Close() - - // Print basic database info. - var info = db.Info() - printf("Page Size: %d\n", info.PageSize) -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/info_test.go b/vendor/github.com/boltdb/bolt/cmd/bolt/info_test.go deleted file mode 100644 index dab74f6f..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/info_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package main_test - -import ( - "testing" - - "github.com/boltdb/bolt" - . "github.com/boltdb/bolt/cmd/bolt" -) - -// Ensure that a database info can be printed. -func TestInfo(t *testing.T) { - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - b.Put([]byte("foo"), []byte("0000")) - return nil - }) - db.Close() - output := run("info", path) - equals(t, `Page Size: 4096`, output) - }) -} - -// Ensure that an error is reported if the database is not found. -func TestInfo_NotFound(t *testing.T) { - SetTestMode(true) - output := run("info", "no/such/db") - equals(t, "stat no/such/db: no such file or directory", output) -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/keys.go b/vendor/github.com/boltdb/bolt/cmd/bolt/keys.go deleted file mode 100644 index d4bb3c3b..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/keys.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "os" - - "github.com/boltdb/bolt" -) - -// Keys retrieves a list of keys for a given bucket. -func Keys(path, name string) { - if _, err := os.Stat(path); os.IsNotExist(err) { - fatal(err) - return - } - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - defer db.Close() - - err = db.View(func(tx *bolt.Tx) error { - // Find bucket. - b := tx.Bucket([]byte(name)) - if b == nil { - fatalf("bucket not found: %s", name) - return nil - } - - // Iterate over each key. - return b.ForEach(func(key, _ []byte) error { - println(string(key)) - return nil - }) - }) - if err != nil { - fatal(err) - return - } -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/keys_test.go b/vendor/github.com/boltdb/bolt/cmd/bolt/keys_test.go deleted file mode 100644 index 0cc4e0c2..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/keys_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package main_test - -import ( - "testing" - - "github.com/boltdb/bolt" - . "github.com/boltdb/bolt/cmd/bolt" -) - -// Ensure that a list of keys can be retrieved for a given bucket. -func TestKeys(t *testing.T) { - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("0002"), []byte("")) - tx.Bucket([]byte("widgets")).Put([]byte("0001"), []byte("")) - tx.Bucket([]byte("widgets")).Put([]byte("0003"), []byte("")) - return nil - }) - db.Close() - output := run("keys", path, "widgets") - equals(t, "0001\n0002\n0003", output) - }) -} - -// Ensure that an error is reported if the database is not found. -func TestKeysDBNotFound(t *testing.T) { - SetTestMode(true) - output := run("keys", "no/such/db", "widgets") - equals(t, "stat no/such/db: no such file or directory", output) -} - -// Ensure that an error is reported if the bucket is not found. -func TestKeysBucketNotFound(t *testing.T) { - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Close() - output := run("keys", path, "widgets") - equals(t, "bucket not found: widgets", output) - }) -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/main.go b/vendor/github.com/boltdb/bolt/cmd/bolt/main.go deleted file mode 100644 index 183d1f2c..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/main.go +++ /dev/null @@ -1,198 +0,0 @@ -package main - -import ( - "bytes" - "fmt" - "log" - "os" - "time" - - "github.com/boltdb/bolt" - "github.com/codegangsta/cli" -) - -var branch, commit string - -func main() { - log.SetFlags(0) - NewApp().Run(os.Args) -} - -// NewApp creates an Application instance. -func NewApp() *cli.App { - app := cli.NewApp() - app.Name = "bolt" - app.Usage = "BoltDB toolkit" - app.Version = fmt.Sprintf("0.1.0 (%s %s)", branch, commit) - app.Commands = []cli.Command{ - { - Name: "info", - Usage: "Print basic information about a database", - Action: func(c *cli.Context) { - path := c.Args().Get(0) - Info(path) - }, - }, - { - Name: "get", - Usage: "Retrieve a value for given key in a bucket", - Action: func(c *cli.Context) { - path, name, key := c.Args().Get(0), c.Args().Get(1), c.Args().Get(2) - Get(path, name, key) - }, - }, - { - Name: "keys", - Usage: "Retrieve a list of all keys in a bucket", - Action: func(c *cli.Context) { - path, name := c.Args().Get(0), c.Args().Get(1) - Keys(path, name) - }, - }, - { - Name: "buckets", - Usage: "Retrieves a list of all buckets", - Action: func(c *cli.Context) { - path := c.Args().Get(0) - Buckets(path) - }, - }, - { - Name: "pages", - Usage: "Dumps page information for a database", - Action: func(c *cli.Context) { - path := c.Args().Get(0) - Pages(path) - }, - }, - { - Name: "check", - Usage: "Performs a consistency check on the database", - Action: func(c *cli.Context) { - path := c.Args().Get(0) - Check(path) - }, - }, - { - Name: "stats", - Usage: "Aggregate statistics for all buckets matching specified prefix", - Action: func(c *cli.Context) { - path, name := c.Args().Get(0), c.Args().Get(1) - Stats(path, name) - }, - }, - { - Name: "bench", - Usage: "Performs a synthetic benchmark", - Flags: []cli.Flag{ - &cli.StringFlag{Name: "profile-mode", Value: "rw", Usage: "Profile mode"}, - &cli.StringFlag{Name: "write-mode", Value: "seq", Usage: "Write mode"}, - &cli.StringFlag{Name: "read-mode", Value: "seq", Usage: "Read mode"}, - &cli.IntFlag{Name: "count", Value: 1000, Usage: "Item count"}, - &cli.IntFlag{Name: "batch-size", Usage: "Write batch size"}, - &cli.IntFlag{Name: "key-size", Value: 8, Usage: "Key size"}, - &cli.IntFlag{Name: "value-size", Value: 32, Usage: "Value size"}, - &cli.StringFlag{Name: "cpuprofile", Usage: "CPU profile output path"}, - &cli.StringFlag{Name: "memprofile", Usage: "Memory profile output path"}, - &cli.StringFlag{Name: "blockprofile", Usage: "Block profile output path"}, - &cli.StringFlag{Name: "stats-interval", Value: "0s", Usage: "Continuous stats interval"}, - &cli.Float64Flag{Name: "fill-percent", Value: bolt.DefaultFillPercent, Usage: "Fill percentage"}, - &cli.BoolFlag{Name: "no-sync", Usage: "Skip fsync on every commit"}, - &cli.BoolFlag{Name: "work", Usage: "Print the temp db and do not delete on exit"}, - }, - Action: func(c *cli.Context) { - statsInterval, err := time.ParseDuration(c.String("stats-interval")) - if err != nil { - fatal(err) - } - - Bench(&BenchOptions{ - ProfileMode: c.String("profile-mode"), - WriteMode: c.String("write-mode"), - ReadMode: c.String("read-mode"), - Iterations: c.Int("count"), - BatchSize: c.Int("batch-size"), - KeySize: c.Int("key-size"), - ValueSize: c.Int("value-size"), - CPUProfile: c.String("cpuprofile"), - MemProfile: c.String("memprofile"), - BlockProfile: c.String("blockprofile"), - StatsInterval: statsInterval, - FillPercent: c.Float64("fill-percent"), - NoSync: c.Bool("no-sync"), - Clean: !c.Bool("work"), - }) - }, - }} - return app -} - -var logger = log.New(os.Stderr, "", 0) -var logBuffer *bytes.Buffer - -func print(v ...interface{}) { - if testMode { - logger.Print(v...) - } else { - fmt.Print(v...) - } -} - -func printf(format string, v ...interface{}) { - if testMode { - logger.Printf(format, v...) - } else { - fmt.Printf(format, v...) - } -} - -func println(v ...interface{}) { - if testMode { - logger.Println(v...) - } else { - fmt.Println(v...) - } -} - -func fatal(v ...interface{}) { - logger.Print(v...) - if !testMode { - os.Exit(1) - } -} - -func fatalf(format string, v ...interface{}) { - logger.Printf(format, v...) - if !testMode { - os.Exit(1) - } -} - -func fatalln(v ...interface{}) { - logger.Println(v...) - if !testMode { - os.Exit(1) - } -} - -// LogBuffer returns the contents of the log. -// This only works while the CLI is in test mode. -func LogBuffer() string { - if logBuffer != nil { - return logBuffer.String() - } - return "" -} - -var testMode bool - -// SetTestMode sets whether the CLI is running in test mode and resets the logger. -func SetTestMode(value bool) { - testMode = value - if testMode { - logBuffer = bytes.NewBuffer(nil) - logger = log.New(logBuffer, "", 0) - } else { - logger = log.New(os.Stderr, "", 0) - } -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go b/vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go deleted file mode 100644 index 4448d6ee..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go +++ /dev/null @@ -1,69 +0,0 @@ -package main_test - -import ( - "fmt" - "io/ioutil" - "os" - "path/filepath" - "reflect" - "runtime" - "strings" - "testing" - - "github.com/boltdb/bolt" - . "github.com/boltdb/bolt/cmd/bolt" -) - -// open creates and opens a Bolt database in the temp directory. -func open(fn func(*bolt.DB, string)) { - path := tempfile() - defer os.RemoveAll(path) - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - panic("db open error: " + err.Error()) - } - fn(db, path) -} - -// run executes a command against the CLI and returns the output. -func run(args ...string) string { - args = append([]string{"bolt"}, args...) - NewApp().Run(args) - return strings.TrimSpace(LogBuffer()) -} - -// tempfile returns a temporary file path. -func tempfile() string { - f, _ := ioutil.TempFile("", "bolt-") - f.Close() - os.Remove(f.Name()) - return f.Name() -} - -// assert fails the test if the condition is false. -func assert(tb testing.TB, condition bool, msg string, v ...interface{}) { - if !condition { - _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: "+msg+"\033[39m\n\n", append([]interface{}{filepath.Base(file), line}, v...)...) - tb.FailNow() - } -} - -// ok fails the test if an err is not nil. -func ok(tb testing.TB, err error) { - if err != nil { - _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: unexpected error: %s\033[39m\n\n", filepath.Base(file), line, err.Error()) - tb.FailNow() - } -} - -// equals fails the test if exp is not equal to act. -func equals(tb testing.TB, exp, act interface{}) { - if !reflect.DeepEqual(exp, act) { - _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\033[39m\n\n", filepath.Base(file), line, exp, act) - tb.FailNow() - } -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/pages.go b/vendor/github.com/boltdb/bolt/cmd/bolt/pages.go deleted file mode 100644 index ec1c4b4a..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/pages.go +++ /dev/null @@ -1,57 +0,0 @@ -package main - -import ( - "os" - "strconv" - - "github.com/boltdb/bolt" -) - -// Pages prints a list of all pages in a database. -func Pages(path string) { - if _, err := os.Stat(path); os.IsNotExist(err) { - fatal(err) - return - } - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - defer db.Close() - - println("ID TYPE ITEMS OVRFLW") - println("======== ========== ====== ======") - - db.Update(func(tx *bolt.Tx) error { - var id int - for { - p, err := tx.Page(id) - if err != nil { - fatalf("page error: %d: %s", id, err) - } else if p == nil { - break - } - - // Only display count and overflow if this is a non-free page. - var count, overflow string - if p.Type != "free" { - count = strconv.Itoa(p.Count) - if p.OverflowCount > 0 { - overflow = strconv.Itoa(p.OverflowCount) - } - } - - // Print table row. - printf("%-8d %-10s %-6s %-6s\n", p.ID, p.Type, count, overflow) - - // Move to the next non-overflow page. - id += 1 - if p.Type != "free" { - id += p.OverflowCount - } - } - return nil - }) -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/stats.go b/vendor/github.com/boltdb/bolt/cmd/bolt/stats.go deleted file mode 100644 index b5d00835..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/stats.go +++ /dev/null @@ -1,77 +0,0 @@ -package main - -import ( - "bytes" - "os" - - "github.com/boltdb/bolt" -) - -// Collect stats for all top level buckets matching the prefix. -func Stats(path, prefix string) { - if _, err := os.Stat(path); os.IsNotExist(err) { - fatal(err) - return - } - - db, err := bolt.Open(path, 0600, nil) - if err != nil { - fatal(err) - return - } - defer db.Close() - - err = db.View(func(tx *bolt.Tx) error { - var s bolt.BucketStats - var count int - var prefix = []byte(prefix) - tx.ForEach(func(name []byte, b *bolt.Bucket) error { - if bytes.HasPrefix(name, prefix) { - s.Add(b.Stats()) - count += 1 - } - return nil - }) - printf("Aggregate statistics for %d buckets\n\n", count) - - println("Page count statistics") - printf("\tNumber of logical branch pages: %d\n", s.BranchPageN) - printf("\tNumber of physical branch overflow pages: %d\n", s.BranchOverflowN) - printf("\tNumber of logical leaf pages: %d\n", s.LeafPageN) - printf("\tNumber of physical leaf overflow pages: %d\n", s.LeafOverflowN) - - println("Tree statistics") - printf("\tNumber of keys/value pairs: %d\n", s.KeyN) - printf("\tNumber of levels in B+tree: %d\n", s.Depth) - - println("Page size utilization") - printf("\tBytes allocated for physical branch pages: %d\n", s.BranchAlloc) - var percentage int - if s.BranchAlloc != 0 { - percentage = int(float32(s.BranchInuse) * 100.0 / float32(s.BranchAlloc)) - } - printf("\tBytes actually used for branch data: %d (%d%%)\n", s.BranchInuse, percentage) - printf("\tBytes allocated for physical leaf pages: %d\n", s.LeafAlloc) - percentage = 0 - if s.LeafAlloc != 0 { - percentage = int(float32(s.LeafInuse) * 100.0 / float32(s.LeafAlloc)) - } - printf("\tBytes actually used for leaf data: %d (%d%%)\n", s.LeafInuse, percentage) - - println("Bucket statistics") - printf("\tTotal number of buckets: %d\n", s.BucketN) - percentage = int(float32(s.InlineBucketN) * 100.0 / float32(s.BucketN)) - printf("\tTotal number on inlined buckets: %d (%d%%)\n", s.InlineBucketN, percentage) - percentage = 0 - if s.LeafInuse != 0 { - percentage = int(float32(s.InlineBucketInuse) * 100.0 / float32(s.LeafInuse)) - } - printf("\tBytes used for inlined buckets: %d (%d%%)\n", s.InlineBucketInuse, percentage) - - return nil - }) - if err != nil { - fatal(err) - return - } -} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/stats_test.go b/vendor/github.com/boltdb/bolt/cmd/bolt/stats_test.go deleted file mode 100644 index 44ed434f..00000000 --- a/vendor/github.com/boltdb/bolt/cmd/bolt/stats_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package main_test - -import ( - "os" - "strconv" - "testing" - - "github.com/boltdb/bolt" - . "github.com/boltdb/bolt/cmd/bolt" -) - -func TestStats(t *testing.T) { - if os.Getpagesize() != 4096 { - t.Skip() - } - SetTestMode(true) - open(func(db *bolt.DB, path string) { - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("foo")) - if err != nil { - return err - } - for i := 0; i < 10; i++ { - b.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))) - } - b, err = tx.CreateBucket([]byte("bar")) - if err != nil { - return err - } - for i := 0; i < 100; i++ { - b.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))) - } - b, err = tx.CreateBucket([]byte("baz")) - if err != nil { - return err - } - b.Put([]byte("key"), []byte("value")) - return nil - }) - db.Close() - output := run("stats", path, "b") - equals(t, "Aggregate statistics for 2 buckets\n\n"+ - "Page count statistics\n"+ - "\tNumber of logical branch pages: 0\n"+ - "\tNumber of physical branch overflow pages: 0\n"+ - "\tNumber of logical leaf pages: 1\n"+ - "\tNumber of physical leaf overflow pages: 0\n"+ - "Tree statistics\n"+ - "\tNumber of keys/value pairs: 101\n"+ - "\tNumber of levels in B+tree: 1\n"+ - "Page size utilization\n"+ - "\tBytes allocated for physical branch pages: 0\n"+ - "\tBytes actually used for branch data: 0 (0%)\n"+ - "\tBytes allocated for physical leaf pages: 4096\n"+ - "\tBytes actually used for leaf data: 1996 (48%)\n"+ - "Bucket statistics\n"+ - "\tTotal number of buckets: 2\n"+ - "\tTotal number on inlined buckets: 1 (50%)\n"+ - "\tBytes used for inlined buckets: 40 (2%)", output) - }) -} diff --git a/vendor/github.com/boltdb/bolt/cursor_test.go b/vendor/github.com/boltdb/bolt/cursor_test.go deleted file mode 100644 index b12e1f91..00000000 --- a/vendor/github.com/boltdb/bolt/cursor_test.go +++ /dev/null @@ -1,511 +0,0 @@ -package bolt_test - -import ( - "bytes" - "encoding/binary" - "fmt" - "os" - "sort" - "testing" - "testing/quick" - - "github.com/boltdb/bolt" -) - -// Ensure that a cursor can return a reference to the bucket that created it. -func TestCursor_Bucket(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucket([]byte("widgets")) - c := b.Cursor() - equals(t, b, c.Bucket()) - return nil - }) -} - -// Ensure that a Tx cursor can seek to the appropriate keys. -func TestCursor_Seek(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - ok(t, b.Put([]byte("foo"), []byte("0001"))) - ok(t, b.Put([]byte("bar"), []byte("0002"))) - ok(t, b.Put([]byte("baz"), []byte("0003"))) - _, err = b.CreateBucket([]byte("bkt")) - ok(t, err) - return nil - }) - db.View(func(tx *bolt.Tx) error { - c := tx.Bucket([]byte("widgets")).Cursor() - - // Exact match should go to the key. - k, v := c.Seek([]byte("bar")) - equals(t, []byte("bar"), k) - equals(t, []byte("0002"), v) - - // Inexact match should go to the next key. - k, v = c.Seek([]byte("bas")) - equals(t, []byte("baz"), k) - equals(t, []byte("0003"), v) - - // Low key should go to the first key. - k, v = c.Seek([]byte("")) - equals(t, []byte("bar"), k) - equals(t, []byte("0002"), v) - - // High key should return no key. - k, v = c.Seek([]byte("zzz")) - assert(t, k == nil, "") - assert(t, v == nil, "") - - // Buckets should return their key but no value. - k, v = c.Seek([]byte("bkt")) - equals(t, []byte("bkt"), k) - assert(t, v == nil, "") - - return nil - }) -} - -func TestCursor_Delete(t *testing.T) { - db := NewTestDB() - defer db.Close() - - var count = 1000 - - // Insert every other key between 0 and $count. - db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucket([]byte("widgets")) - for i := 0; i < count; i += 1 { - k := make([]byte, 8) - binary.BigEndian.PutUint64(k, uint64(i)) - b.Put(k, make([]byte, 100)) - } - b.CreateBucket([]byte("sub")) - return nil - }) - - db.Update(func(tx *bolt.Tx) error { - c := tx.Bucket([]byte("widgets")).Cursor() - bound := make([]byte, 8) - binary.BigEndian.PutUint64(bound, uint64(count/2)) - for key, _ := c.First(); bytes.Compare(key, bound) < 0; key, _ = c.Next() { - if err := c.Delete(); err != nil { - return err - } - } - c.Seek([]byte("sub")) - err := c.Delete() - equals(t, err, bolt.ErrIncompatibleValue) - return nil - }) - - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - equals(t, b.Stats().KeyN, count/2+1) - return nil - }) -} - -// Ensure that a Tx cursor can seek to the appropriate keys when there are a -// large number of keys. This test also checks that seek will always move -// forward to the next key. -// -// Related: https://github.com/boltdb/bolt/pull/187 -func TestCursor_Seek_Large(t *testing.T) { - db := NewTestDB() - defer db.Close() - - var count = 10000 - - // Insert every other key between 0 and $count. - db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucket([]byte("widgets")) - for i := 0; i < count; i += 100 { - for j := i; j < i+100; j += 2 { - k := make([]byte, 8) - binary.BigEndian.PutUint64(k, uint64(j)) - b.Put(k, make([]byte, 100)) - } - } - return nil - }) - - db.View(func(tx *bolt.Tx) error { - c := tx.Bucket([]byte("widgets")).Cursor() - for i := 0; i < count; i++ { - seek := make([]byte, 8) - binary.BigEndian.PutUint64(seek, uint64(i)) - - k, _ := c.Seek(seek) - - // The last seek is beyond the end of the the range so - // it should return nil. - if i == count-1 { - assert(t, k == nil, "") - continue - } - - // Otherwise we should seek to the exact key or the next key. - num := binary.BigEndian.Uint64(k) - if i%2 == 0 { - equals(t, uint64(i), num) - } else { - equals(t, uint64(i+1), num) - } - } - - return nil - }) -} - -// Ensure that a cursor can iterate over an empty bucket without error. -func TestCursor_EmptyBucket(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - db.View(func(tx *bolt.Tx) error { - c := tx.Bucket([]byte("widgets")).Cursor() - k, v := c.First() - assert(t, k == nil, "") - assert(t, v == nil, "") - return nil - }) -} - -// Ensure that a Tx cursor can reverse iterate over an empty bucket without error. -func TestCursor_EmptyBucketReverse(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - db.View(func(tx *bolt.Tx) error { - c := tx.Bucket([]byte("widgets")).Cursor() - k, v := c.Last() - assert(t, k == nil, "") - assert(t, v == nil, "") - return nil - }) -} - -// Ensure that a Tx cursor can iterate over a single root with a couple elements. -func TestCursor_Iterate_Leaf(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("baz"), []byte{}) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte{0}) - tx.Bucket([]byte("widgets")).Put([]byte("bar"), []byte{1}) - return nil - }) - tx, _ := db.Begin(false) - c := tx.Bucket([]byte("widgets")).Cursor() - - k, v := c.First() - equals(t, string(k), "bar") - equals(t, v, []byte{1}) - - k, v = c.Next() - equals(t, string(k), "baz") - equals(t, v, []byte{}) - - k, v = c.Next() - equals(t, string(k), "foo") - equals(t, v, []byte{0}) - - k, v = c.Next() - assert(t, k == nil, "") - assert(t, v == nil, "") - - k, v = c.Next() - assert(t, k == nil, "") - assert(t, v == nil, "") - - tx.Rollback() -} - -// Ensure that a Tx cursor can iterate in reverse over a single root with a couple elements. -func TestCursor_LeafRootReverse(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("baz"), []byte{}) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte{0}) - tx.Bucket([]byte("widgets")).Put([]byte("bar"), []byte{1}) - return nil - }) - tx, _ := db.Begin(false) - c := tx.Bucket([]byte("widgets")).Cursor() - - k, v := c.Last() - equals(t, string(k), "foo") - equals(t, v, []byte{0}) - - k, v = c.Prev() - equals(t, string(k), "baz") - equals(t, v, []byte{}) - - k, v = c.Prev() - equals(t, string(k), "bar") - equals(t, v, []byte{1}) - - k, v = c.Prev() - assert(t, k == nil, "") - assert(t, v == nil, "") - - k, v = c.Prev() - assert(t, k == nil, "") - assert(t, v == nil, "") - - tx.Rollback() -} - -// Ensure that a Tx cursor can restart from the beginning. -func TestCursor_Restart(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("bar"), []byte{}) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte{}) - return nil - }) - - tx, _ := db.Begin(false) - c := tx.Bucket([]byte("widgets")).Cursor() - - k, _ := c.First() - equals(t, string(k), "bar") - - k, _ = c.Next() - equals(t, string(k), "foo") - - k, _ = c.First() - equals(t, string(k), "bar") - - k, _ = c.Next() - equals(t, string(k), "foo") - - tx.Rollback() -} - -// Ensure that a Tx can iterate over all elements in a bucket. -func TestCursor_QuickCheck(t *testing.T) { - f := func(items testdata) bool { - db := NewTestDB() - defer db.Close() - - // Bulk insert all values. - tx, _ := db.Begin(true) - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - for _, item := range items { - ok(t, b.Put(item.Key, item.Value)) - } - ok(t, tx.Commit()) - - // Sort test data. - sort.Sort(items) - - // Iterate over all items and check consistency. - var index = 0 - tx, _ = db.Begin(false) - c := tx.Bucket([]byte("widgets")).Cursor() - for k, v := c.First(); k != nil && index < len(items); k, v = c.Next() { - equals(t, k, items[index].Key) - equals(t, v, items[index].Value) - index++ - } - equals(t, len(items), index) - tx.Rollback() - - return true - } - if err := quick.Check(f, qconfig()); err != nil { - t.Error(err) - } -} - -// Ensure that a transaction can iterate over all elements in a bucket in reverse. -func TestCursor_QuickCheck_Reverse(t *testing.T) { - f := func(items testdata) bool { - db := NewTestDB() - defer db.Close() - - // Bulk insert all values. - tx, _ := db.Begin(true) - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - for _, item := range items { - ok(t, b.Put(item.Key, item.Value)) - } - ok(t, tx.Commit()) - - // Sort test data. - sort.Sort(revtestdata(items)) - - // Iterate over all items and check consistency. - var index = 0 - tx, _ = db.Begin(false) - c := tx.Bucket([]byte("widgets")).Cursor() - for k, v := c.Last(); k != nil && index < len(items); k, v = c.Prev() { - equals(t, k, items[index].Key) - equals(t, v, items[index].Value) - index++ - } - equals(t, len(items), index) - tx.Rollback() - - return true - } - if err := quick.Check(f, qconfig()); err != nil { - t.Error(err) - } -} - -// Ensure that a Tx cursor can iterate over subbuckets. -func TestCursor_QuickCheck_BucketsOnly(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - _, err = b.CreateBucket([]byte("foo")) - ok(t, err) - _, err = b.CreateBucket([]byte("bar")) - ok(t, err) - _, err = b.CreateBucket([]byte("baz")) - ok(t, err) - return nil - }) - db.View(func(tx *bolt.Tx) error { - var names []string - c := tx.Bucket([]byte("widgets")).Cursor() - for k, v := c.First(); k != nil; k, v = c.Next() { - names = append(names, string(k)) - assert(t, v == nil, "") - } - equals(t, names, []string{"bar", "baz", "foo"}) - return nil - }) -} - -// Ensure that a Tx cursor can reverse iterate over subbuckets. -func TestCursor_QuickCheck_BucketsOnly_Reverse(t *testing.T) { - db := NewTestDB() - defer db.Close() - - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("widgets")) - ok(t, err) - _, err = b.CreateBucket([]byte("foo")) - ok(t, err) - _, err = b.CreateBucket([]byte("bar")) - ok(t, err) - _, err = b.CreateBucket([]byte("baz")) - ok(t, err) - return nil - }) - db.View(func(tx *bolt.Tx) error { - var names []string - c := tx.Bucket([]byte("widgets")).Cursor() - for k, v := c.Last(); k != nil; k, v = c.Prev() { - names = append(names, string(k)) - assert(t, v == nil, "") - } - equals(t, names, []string{"foo", "baz", "bar"}) - return nil - }) -} - -func ExampleCursor() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Start a read-write transaction. - db.Update(func(tx *bolt.Tx) error { - // Create a new bucket. - tx.CreateBucket([]byte("animals")) - - // Insert data into a bucket. - b := tx.Bucket([]byte("animals")) - b.Put([]byte("dog"), []byte("fun")) - b.Put([]byte("cat"), []byte("lame")) - b.Put([]byte("liger"), []byte("awesome")) - - // Create a cursor for iteration. - c := b.Cursor() - - // Iterate over items in sorted key order. This starts from the - // first key/value pair and updates the k/v variables to the - // next key/value on each iteration. - // - // The loop finishes at the end of the cursor when a nil key is returned. - for k, v := c.First(); k != nil; k, v = c.Next() { - fmt.Printf("A %s is %s.\n", k, v) - } - - return nil - }) - - // Output: - // A cat is lame. - // A dog is fun. - // A liger is awesome. -} - -func ExampleCursor_reverse() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Start a read-write transaction. - db.Update(func(tx *bolt.Tx) error { - // Create a new bucket. - tx.CreateBucket([]byte("animals")) - - // Insert data into a bucket. - b := tx.Bucket([]byte("animals")) - b.Put([]byte("dog"), []byte("fun")) - b.Put([]byte("cat"), []byte("lame")) - b.Put([]byte("liger"), []byte("awesome")) - - // Create a cursor for iteration. - c := b.Cursor() - - // Iterate over items in reverse sorted key order. This starts - // from the last key/value pair and updates the k/v variables to - // the previous key/value on each iteration. - // - // The loop finishes at the beginning of the cursor when a nil key - // is returned. - for k, v := c.Last(); k != nil; k, v = c.Prev() { - fmt.Printf("A %s is %s.\n", k, v) - } - - return nil - }) - - // Output: - // A liger is awesome. - // A dog is fun. - // A cat is lame. -} diff --git a/vendor/github.com/boltdb/bolt/db.go b/vendor/github.com/boltdb/bolt/db.go deleted file mode 100644 index d4c85fb4..00000000 --- a/vendor/github.com/boltdb/bolt/db.go +++ /dev/null @@ -1,732 +0,0 @@ -package bolt - -import ( - "fmt" - "hash/fnv" - "os" - "runtime" - "runtime/debug" - "strings" - "sync" - "time" - "unsafe" -) - -// The largest step that can be taken when remapping the mmap. -const maxMmapStep = 1 << 30 // 1GB - -// The data file format version. -const version = 2 - -// Represents a marker value to indicate that a file is a Bolt DB. -const magic uint32 = 0xED0CDAED - -// IgnoreNoSync specifies whether the NoSync field of a DB is ignored when -// syncing changes to a file. This is required as some operating systems, -// such as OpenBSD, do not have a unified buffer cache (UBC) and writes -// must be synchronzied using the msync(2) syscall. -const IgnoreNoSync = runtime.GOOS == "openbsd" - -// Default values if not set in a DB instance. -const ( - DefaultMaxBatchSize int = 1000 - DefaultMaxBatchDelay = 10 * time.Millisecond -) - -// DB represents a collection of buckets persisted to a file on disk. -// All data access is performed through transactions which can be obtained through the DB. -// All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called. -type DB struct { - // When enabled, the database will perform a Check() after every commit. - // A panic is issued if the database is in an inconsistent state. This - // flag has a large performance impact so it should only be used for - // debugging purposes. - StrictMode bool - - // Setting the NoSync flag will cause the database to skip fsync() - // calls after each commit. This can be useful when bulk loading data - // into a database and you can restart the bulk load in the event of - // a system failure or database corruption. Do not set this flag for - // normal use. - // - // If the package global IgnoreNoSync constant is true, this value is - // ignored. See the comment on that constant for more details. - // - // THIS IS UNSAFE. PLEASE USE WITH CAUTION. - NoSync bool - - // MaxBatchSize is the maximum size of a batch. Default value is - // copied from DefaultMaxBatchSize in Open. - // - // If <=0, disables batching. - // - // Do not change concurrently with calls to Batch. - MaxBatchSize int - - // MaxBatchDelay is the maximum delay before a batch starts. - // Default value is copied from DefaultMaxBatchDelay in Open. - // - // If <=0, effectively disables batching. - // - // Do not change concurrently with calls to Batch. - MaxBatchDelay time.Duration - - path string - file *os.File - dataref []byte - data *[maxMapSize]byte - datasz int - meta0 *meta - meta1 *meta - pageSize int - opened bool - rwtx *Tx - txs []*Tx - freelist *freelist - stats Stats - - batchMu sync.Mutex - batch *batch - - rwlock sync.Mutex // Allows only one writer at a time. - metalock sync.Mutex // Protects meta page access. - mmaplock sync.RWMutex // Protects mmap access during remapping. - statlock sync.RWMutex // Protects stats access. - - ops struct { - writeAt func(b []byte, off int64) (n int, err error) - } -} - -// Path returns the path to currently open database file. -func (db *DB) Path() string { - return db.path -} - -// GoString returns the Go string representation of the database. -func (db *DB) GoString() string { - return fmt.Sprintf("bolt.DB{path:%q}", db.path) -} - -// String returns the string representation of the database. -func (db *DB) String() string { - return fmt.Sprintf("DB<%q>", db.path) -} - -// Open creates and opens a database at the given path. -// If the file does not exist then it will be created automatically. -// Passing in nil options will cause Bolt to open the database with the default options. -func Open(path string, mode os.FileMode, options *Options) (*DB, error) { - var db = &DB{opened: true} - - // Set default options if no options are provided. - if options == nil { - options = DefaultOptions - } - - // Set default values for later DB operations. - db.MaxBatchSize = DefaultMaxBatchSize - db.MaxBatchDelay = DefaultMaxBatchDelay - - // Open data file and separate sync handler for metadata writes. - db.path = path - - var err error - if db.file, err = os.OpenFile(db.path, os.O_RDWR|os.O_CREATE, mode); err != nil { - _ = db.close() - return nil, err - } - - // Lock file so that other processes using Bolt cannot use the database - // at the same time. This would cause corruption since the two processes - // would write meta pages and free pages separately. - if err := flock(db.file, options.Timeout); err != nil { - _ = db.close() - return nil, err - } - - // Default values for test hooks - db.ops.writeAt = db.file.WriteAt - - // Initialize the database if it doesn't exist. - if info, err := db.file.Stat(); err != nil { - return nil, fmt.Errorf("stat error: %s", err) - } else if info.Size() == 0 { - // Initialize new files with meta pages. - if err := db.init(); err != nil { - return nil, err - } - } else { - // Read the first meta page to determine the page size. - var buf [0x1000]byte - if _, err := db.file.ReadAt(buf[:], 0); err == nil { - m := db.pageInBuffer(buf[:], 0).meta() - if err := m.validate(); err != nil { - return nil, fmt.Errorf("meta0 error: %s", err) - } - db.pageSize = int(m.pageSize) - } - } - - // Memory map the data file. - if err := db.mmap(0); err != nil { - _ = db.close() - return nil, err - } - - // Read in the freelist. - db.freelist = newFreelist() - db.freelist.read(db.page(db.meta().freelist)) - - // Mark the database as opened and return. - return db, nil -} - -// mmap opens the underlying memory-mapped file and initializes the meta references. -// minsz is the minimum size that the new mmap can be. -func (db *DB) mmap(minsz int) error { - db.mmaplock.Lock() - defer db.mmaplock.Unlock() - - info, err := db.file.Stat() - if err != nil { - return fmt.Errorf("mmap stat error: %s", err) - } else if int(info.Size()) < db.pageSize*2 { - return fmt.Errorf("file size too small") - } - - // Ensure the size is at least the minimum size. - var size = int(info.Size()) - if size < minsz { - size = minsz - } - size, err = db.mmapSize(size) - if err != nil { - return err - } - - // Dereference all mmap references before unmapping. - if db.rwtx != nil { - db.rwtx.root.dereference() - } - - // Unmap existing data before continuing. - if err := db.munmap(); err != nil { - return err - } - - // Memory-map the data file as a byte slice. - if err := mmap(db, size); err != nil { - return err - } - - // Save references to the meta pages. - db.meta0 = db.page(0).meta() - db.meta1 = db.page(1).meta() - - // Validate the meta pages. - if err := db.meta0.validate(); err != nil { - return fmt.Errorf("meta0 error: %s", err) - } - if err := db.meta1.validate(); err != nil { - return fmt.Errorf("meta1 error: %s", err) - } - - return nil -} - -// munmap unmaps the data file from memory. -func (db *DB) munmap() error { - if err := munmap(db); err != nil { - return fmt.Errorf("unmap error: " + err.Error()) - } - return nil -} - -// mmapSize determines the appropriate size for the mmap given the current size -// of the database. The minimum size is 4MB and doubles until it reaches 1GB. -// Returns an error if the new mmap size is greater than the max allowed. -func (db *DB) mmapSize(size int) (int, error) { - // Double the size from 1MB until 1GB. - for i := uint(20); i <= 30; i++ { - if size <= 1< maxMapSize { - return 0, fmt.Errorf("mmap too large") - } - - // If larger than 1GB then grow by 1GB at a time. - sz := int64(size) - if remainder := sz % int64(maxMmapStep); remainder > 0 { - sz += int64(maxMmapStep) - remainder - } - - // Ensure that the mmap size is a multiple of the page size. - // This should always be true since we're incrementing in MBs. - pageSize := int64(db.pageSize) - if (sz % pageSize) != 0 { - sz = ((sz / pageSize) + 1) * pageSize - } - - // If we've exceeded the max size then only grow up to the max size. - if sz > maxMapSize { - sz = maxMapSize - } - - return int(sz), nil -} - -// init creates a new database file and initializes its meta pages. -func (db *DB) init() error { - // Set the page size to the OS page size. - db.pageSize = os.Getpagesize() - - // Create two meta pages on a buffer. - buf := make([]byte, db.pageSize*4) - for i := 0; i < 2; i++ { - p := db.pageInBuffer(buf[:], pgid(i)) - p.id = pgid(i) - p.flags = metaPageFlag - - // Initialize the meta page. - m := p.meta() - m.magic = magic - m.version = version - m.pageSize = uint32(db.pageSize) - m.freelist = 2 - m.root = bucket{root: 3} - m.pgid = 4 - m.txid = txid(i) - } - - // Write an empty freelist at page 3. - p := db.pageInBuffer(buf[:], pgid(2)) - p.id = pgid(2) - p.flags = freelistPageFlag - p.count = 0 - - // Write an empty leaf page at page 4. - p = db.pageInBuffer(buf[:], pgid(3)) - p.id = pgid(3) - p.flags = leafPageFlag - p.count = 0 - - // Write the buffer to our data file. - if _, err := db.ops.writeAt(buf, 0); err != nil { - return err - } - if err := fdatasync(db); err != nil { - return err - } - - return nil -} - -// Close releases all database resources. -// All transactions must be closed before closing the database. -func (db *DB) Close() error { - db.metalock.Lock() - defer db.metalock.Unlock() - return db.close() -} - -func (db *DB) close() error { - db.opened = false - - db.freelist = nil - db.path = "" - - // Clear ops. - db.ops.writeAt = nil - - // Close the mmap. - if err := db.munmap(); err != nil { - return err - } - - // Close file handles. - if db.file != nil { - // Unlock the file. - _ = funlock(db.file) - - // Close the file descriptor. - if err := db.file.Close(); err != nil { - return fmt.Errorf("db file close: %s", err) - } - db.file = nil - } - - return nil -} - -// Begin starts a new transaction. -// Multiple read-only transactions can be used concurrently but only one -// write transaction can be used at a time. Starting multiple write transactions -// will cause the calls to block and be serialized until the current write -// transaction finishes. -// -// IMPORTANT: You must close read-only transactions after you are finished or -// else the database will not reclaim old pages. -func (db *DB) Begin(writable bool) (*Tx, error) { - if writable { - return db.beginRWTx() - } - return db.beginTx() -} - -func (db *DB) beginTx() (*Tx, error) { - // Lock the meta pages while we initialize the transaction. We obtain - // the meta lock before the mmap lock because that's the order that the - // write transaction will obtain them. - db.metalock.Lock() - - // Obtain a read-only lock on the mmap. When the mmap is remapped it will - // obtain a write lock so all transactions must finish before it can be - // remapped. - db.mmaplock.RLock() - - // Exit if the database is not open yet. - if !db.opened { - db.mmaplock.RUnlock() - db.metalock.Unlock() - return nil, ErrDatabaseNotOpen - } - - // Create a transaction associated with the database. - t := &Tx{} - t.init(db) - - // Keep track of transaction until it closes. - db.txs = append(db.txs, t) - n := len(db.txs) - - // Unlock the meta pages. - db.metalock.Unlock() - - // Update the transaction stats. - db.statlock.Lock() - db.stats.TxN++ - db.stats.OpenTxN = n - db.statlock.Unlock() - - return t, nil -} - -func (db *DB) beginRWTx() (*Tx, error) { - // Obtain writer lock. This is released by the transaction when it closes. - // This enforces only one writer transaction at a time. - db.rwlock.Lock() - - // Once we have the writer lock then we can lock the meta pages so that - // we can set up the transaction. - db.metalock.Lock() - defer db.metalock.Unlock() - - // Exit if the database is not open yet. - if !db.opened { - db.rwlock.Unlock() - return nil, ErrDatabaseNotOpen - } - - // Create a transaction associated with the database. - t := &Tx{writable: true} - t.init(db) - db.rwtx = t - - // Free any pages associated with closed read-only transactions. - var minid txid = 0xFFFFFFFFFFFFFFFF - for _, t := range db.txs { - if t.meta.txid < minid { - minid = t.meta.txid - } - } - if minid > 0 { - db.freelist.release(minid - 1) - } - - return t, nil -} - -// removeTx removes a transaction from the database. -func (db *DB) removeTx(tx *Tx) { - // Release the read lock on the mmap. - db.mmaplock.RUnlock() - - // Use the meta lock to restrict access to the DB object. - db.metalock.Lock() - - // Remove the transaction. - for i, t := range db.txs { - if t == tx { - db.txs = append(db.txs[:i], db.txs[i+1:]...) - break - } - } - n := len(db.txs) - - // Unlock the meta pages. - db.metalock.Unlock() - - // Merge statistics. - db.statlock.Lock() - db.stats.OpenTxN = n - db.stats.TxStats.add(&tx.stats) - db.statlock.Unlock() -} - -// Update executes a function within the context of a read-write managed transaction. -// If no error is returned from the function then the transaction is committed. -// If an error is returned then the entire transaction is rolled back. -// Any error that is returned from the function or returned from the commit is -// returned from the Update() method. -// -// Attempting to manually commit or rollback within the function will cause a panic. -func (db *DB) Update(fn func(*Tx) error) error { - t, err := db.Begin(true) - if err != nil { - return err - } - - // Make sure the transaction rolls back in the event of a panic. - defer func() { - if t.db != nil { - t.rollback() - } - }() - - // Mark as a managed tx so that the inner function cannot manually commit. - t.managed = true - - // If an error is returned from the function then rollback and return error. - err = fn(t) - t.managed = false - if err != nil { - _ = t.Rollback() - return err - } - - return t.Commit() -} - -// View executes a function within the context of a managed read-only transaction. -// Any error that is returned from the function is returned from the View() method. -// -// Attempting to manually rollback within the function will cause a panic. -func (db *DB) View(fn func(*Tx) error) error { - t, err := db.Begin(false) - if err != nil { - return err - } - - // Make sure the transaction rolls back in the event of a panic. - defer func() { - if t.db != nil { - t.rollback() - } - }() - - // Mark as a managed tx so that the inner function cannot manually rollback. - t.managed = true - - // If an error is returned from the function then pass it through. - err = fn(t) - t.managed = false - if err != nil { - _ = t.Rollback() - return err - } - - if err := t.Rollback(); err != nil { - return err - } - - return nil -} - -// Stats retrieves ongoing performance stats for the database. -// This is only updated when a transaction closes. -func (db *DB) Stats() Stats { - db.statlock.RLock() - defer db.statlock.RUnlock() - return db.stats -} - -// This is for internal access to the raw data bytes from the C cursor, use -// carefully, or not at all. -func (db *DB) Info() *Info { - return &Info{uintptr(unsafe.Pointer(&db.data[0])), db.pageSize} -} - -// page retrieves a page reference from the mmap based on the current page size. -func (db *DB) page(id pgid) *page { - pos := id * pgid(db.pageSize) - return (*page)(unsafe.Pointer(&db.data[pos])) -} - -// pageInBuffer retrieves a page reference from a given byte array based on the current page size. -func (db *DB) pageInBuffer(b []byte, id pgid) *page { - return (*page)(unsafe.Pointer(&b[id*pgid(db.pageSize)])) -} - -// meta retrieves the current meta page reference. -func (db *DB) meta() *meta { - if db.meta0.txid > db.meta1.txid { - return db.meta0 - } - return db.meta1 -} - -// allocate returns a contiguous block of memory starting at a given page. -func (db *DB) allocate(count int) (*page, error) { - // Allocate a temporary buffer for the page. - buf := make([]byte, count*db.pageSize) - p := (*page)(unsafe.Pointer(&buf[0])) - p.overflow = uint32(count - 1) - - // Use pages from the freelist if they are available. - if p.id = db.freelist.allocate(count); p.id != 0 { - return p, nil - } - - // Resize mmap() if we're at the end. - p.id = db.rwtx.meta.pgid - var minsz = int((p.id+pgid(count))+1) * db.pageSize - if minsz >= db.datasz { - if err := db.mmap(minsz); err != nil { - return nil, fmt.Errorf("mmap allocate error: %s", err) - } - } - - // Move the page id high water mark. - db.rwtx.meta.pgid += pgid(count) - - return p, nil -} - -// Options represents the options that can be set when opening a database. -type Options struct { - // Timeout is the amount of time to wait to obtain a file lock. - // When set to zero it will wait indefinitely. This option is only - // available on Darwin and Linux. - Timeout time.Duration -} - -// DefaultOptions represent the options used if nil options are passed into Open(). -// No timeout is used which will cause Bolt to wait indefinitely for a lock. -var DefaultOptions = &Options{ - Timeout: 0, -} - -// Stats represents statistics about the database. -type Stats struct { - // Freelist stats - FreePageN int // total number of free pages on the freelist - PendingPageN int // total number of pending pages on the freelist - FreeAlloc int // total bytes allocated in free pages - FreelistInuse int // total bytes used by the freelist - - // Transaction stats - TxN int // total number of started read transactions - OpenTxN int // number of currently open read transactions - - TxStats TxStats // global, ongoing stats. -} - -// Sub calculates and returns the difference between two sets of database stats. -// This is useful when obtaining stats at two different points and time and -// you need the performance counters that occurred within that time span. -func (s *Stats) Sub(other *Stats) Stats { - if other == nil { - return *s - } - var diff Stats - diff.FreePageN = s.FreePageN - diff.PendingPageN = s.PendingPageN - diff.FreeAlloc = s.FreeAlloc - diff.FreelistInuse = s.FreelistInuse - diff.TxN = other.TxN - s.TxN - diff.TxStats = s.TxStats.Sub(&other.TxStats) - return diff -} - -func (s *Stats) add(other *Stats) { - s.TxStats.add(&other.TxStats) -} - -type Info struct { - Data uintptr - PageSize int -} - -type meta struct { - magic uint32 - version uint32 - pageSize uint32 - flags uint32 - root bucket - freelist pgid - pgid pgid - txid txid - checksum uint64 -} - -// validate checks the marker bytes and version of the meta page to ensure it matches this binary. -func (m *meta) validate() error { - if m.checksum != 0 && m.checksum != m.sum64() { - return ErrChecksum - } else if m.magic != magic { - return ErrInvalid - } else if m.version != version { - return ErrVersionMismatch - } - return nil -} - -// copy copies one meta object to another. -func (m *meta) copy(dest *meta) { - *dest = *m -} - -// write writes the meta onto a page. -func (m *meta) write(p *page) { - if m.root.root >= m.pgid { - panic(fmt.Sprintf("root bucket pgid (%d) above high water mark (%d)", m.root.root, m.pgid)) - } else if m.freelist >= m.pgid { - panic(fmt.Sprintf("freelist pgid (%d) above high water mark (%d)", m.freelist, m.pgid)) - } - - // Page id is either going to be 0 or 1 which we can determine by the transaction ID. - p.id = pgid(m.txid % 2) - p.flags |= metaPageFlag - - // Calculate the checksum. - m.checksum = m.sum64() - - m.copy(p.meta()) -} - -// generates the checksum for the meta. -func (m *meta) sum64() uint64 { - var h = fnv.New64a() - _, _ = h.Write((*[unsafe.Offsetof(meta{}.checksum)]byte)(unsafe.Pointer(m))[:]) - return h.Sum64() -} - -// _assert will panic with a given formatted message if the given condition is false. -func _assert(condition bool, msg string, v ...interface{}) { - if !condition { - panic(fmt.Sprintf("assertion failed: "+msg, v...)) - } -} - -func warn(v ...interface{}) { fmt.Fprintln(os.Stderr, v...) } -func warnf(msg string, v ...interface{}) { fmt.Fprintf(os.Stderr, msg+"\n", v...) } - -func printstack() { - stack := strings.Join(strings.Split(string(debug.Stack()), "\n")[2:], "\n") - fmt.Fprintln(os.Stderr, stack) -} diff --git a/vendor/github.com/boltdb/bolt/db_test.go b/vendor/github.com/boltdb/bolt/db_test.go deleted file mode 100644 index ad17e87e..00000000 --- a/vendor/github.com/boltdb/bolt/db_test.go +++ /dev/null @@ -1,790 +0,0 @@ -package bolt_test - -import ( - "encoding/binary" - "errors" - "flag" - "fmt" - "io/ioutil" - "os" - "regexp" - "runtime" - "sort" - "strings" - "testing" - "time" - - "github.com/boltdb/bolt" -) - -var statsFlag = flag.Bool("stats", false, "show performance stats") - -// Ensure that opening a database with a bad path returns an error. -func TestOpen_BadPath(t *testing.T) { - db, err := bolt.Open("", 0666, nil) - assert(t, err != nil, "err: %s", err) - assert(t, db == nil, "") -} - -// Ensure that a database can be opened without error. -func TestOpen(t *testing.T) { - path := tempfile() - defer os.Remove(path) - db, err := bolt.Open(path, 0666, nil) - assert(t, db != nil, "") - ok(t, err) - equals(t, db.Path(), path) - ok(t, db.Close()) -} - -// Ensure that opening an already open database file will timeout. -func TestOpen_Timeout(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("timeout not supported on windows") - } - - path := tempfile() - defer os.Remove(path) - - // Open a data file. - db0, err := bolt.Open(path, 0666, nil) - assert(t, db0 != nil, "") - ok(t, err) - - // Attempt to open the database again. - start := time.Now() - db1, err := bolt.Open(path, 0666, &bolt.Options{Timeout: 100 * time.Millisecond}) - assert(t, db1 == nil, "") - equals(t, bolt.ErrTimeout, err) - assert(t, time.Since(start) > 100*time.Millisecond, "") - - db0.Close() -} - -// Ensure that opening an already open database file will wait until its closed. -func TestOpen_Wait(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("timeout not supported on windows") - } - - path := tempfile() - defer os.Remove(path) - - // Open a data file. - db0, err := bolt.Open(path, 0666, nil) - assert(t, db0 != nil, "") - ok(t, err) - - // Close it in just a bit. - time.AfterFunc(100*time.Millisecond, func() { db0.Close() }) - - // Attempt to open the database again. - start := time.Now() - db1, err := bolt.Open(path, 0666, &bolt.Options{Timeout: 200 * time.Millisecond}) - assert(t, db1 != nil, "") - ok(t, err) - assert(t, time.Since(start) > 100*time.Millisecond, "") -} - -// Ensure that opening a database does not increase its size. -// https://github.com/boltdb/bolt/issues/291 -func TestOpen_Size(t *testing.T) { - // Open a data file. - db := NewTestDB() - path := db.Path() - defer db.Close() - - // Insert until we get above the minimum 4MB size. - ok(t, db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucketIfNotExists([]byte("data")) - for i := 0; i < 10000; i++ { - ok(t, b.Put([]byte(fmt.Sprintf("%04d", i)), make([]byte, 1000))) - } - return nil - })) - - // Close database and grab the size. - db.DB.Close() - sz := fileSize(path) - if sz == 0 { - t.Fatalf("unexpected new file size: %d", sz) - } - - // Reopen database, update, and check size again. - db0, err := bolt.Open(path, 0666, nil) - ok(t, err) - ok(t, db0.Update(func(tx *bolt.Tx) error { return tx.Bucket([]byte("data")).Put([]byte{0}, []byte{0}) })) - ok(t, db0.Close()) - newSz := fileSize(path) - if newSz == 0 { - t.Fatalf("unexpected new file size: %d", newSz) - } - - // Compare the original size with the new size. - if sz != newSz { - t.Fatalf("unexpected file growth: %d => %d", sz, newSz) - } -} - -// Ensure that opening a database beyond the max step size does not increase its size. -// https://github.com/boltdb/bolt/issues/303 -func TestOpen_Size_Large(t *testing.T) { - if testing.Short() { - t.Skip("short mode") - } - - // Open a data file. - db := NewTestDB() - path := db.Path() - defer db.Close() - - // Insert until we get above the minimum 4MB size. - var index uint64 - for i := 0; i < 10000; i++ { - ok(t, db.Update(func(tx *bolt.Tx) error { - b, _ := tx.CreateBucketIfNotExists([]byte("data")) - for j := 0; j < 1000; j++ { - ok(t, b.Put(u64tob(index), make([]byte, 50))) - index++ - } - return nil - })) - } - - // Close database and grab the size. - db.DB.Close() - sz := fileSize(path) - if sz == 0 { - t.Fatalf("unexpected new file size: %d", sz) - } else if sz < (1 << 30) { - t.Fatalf("expected larger initial size: %d", sz) - } - - // Reopen database, update, and check size again. - db0, err := bolt.Open(path, 0666, nil) - ok(t, err) - ok(t, db0.Update(func(tx *bolt.Tx) error { return tx.Bucket([]byte("data")).Put([]byte{0}, []byte{0}) })) - ok(t, db0.Close()) - newSz := fileSize(path) - if newSz == 0 { - t.Fatalf("unexpected new file size: %d", newSz) - } - - // Compare the original size with the new size. - if sz != newSz { - t.Fatalf("unexpected file growth: %d => %d", sz, newSz) - } -} - -// Ensure that a re-opened database is consistent. -func TestOpen_Check(t *testing.T) { - path := tempfile() - defer os.Remove(path) - - db, err := bolt.Open(path, 0666, nil) - ok(t, err) - ok(t, db.View(func(tx *bolt.Tx) error { return <-tx.Check() })) - db.Close() - - db, err = bolt.Open(path, 0666, nil) - ok(t, err) - ok(t, db.View(func(tx *bolt.Tx) error { return <-tx.Check() })) - db.Close() -} - -// Ensure that the database returns an error if the file handle cannot be open. -func TestDB_Open_FileError(t *testing.T) { - path := tempfile() - defer os.Remove(path) - - _, err := bolt.Open(path+"/youre-not-my-real-parent", 0666, nil) - assert(t, err.(*os.PathError) != nil, "") - equals(t, path+"/youre-not-my-real-parent", err.(*os.PathError).Path) - equals(t, "open", err.(*os.PathError).Op) -} - -// Ensure that write errors to the meta file handler during initialization are returned. -func TestDB_Open_MetaInitWriteError(t *testing.T) { - t.Skip("pending") -} - -// Ensure that a database that is too small returns an error. -func TestDB_Open_FileTooSmall(t *testing.T) { - path := tempfile() - defer os.Remove(path) - - db, err := bolt.Open(path, 0666, nil) - ok(t, err) - db.Close() - - // corrupt the database - ok(t, os.Truncate(path, int64(os.Getpagesize()))) - - db, err = bolt.Open(path, 0666, nil) - equals(t, errors.New("file size too small"), err) -} - -// TODO(benbjohnson): Test corruption at every byte of the first two pages. - -// Ensure that a database cannot open a transaction when it's not open. -func TestDB_Begin_DatabaseNotOpen(t *testing.T) { - var db bolt.DB - tx, err := db.Begin(false) - assert(t, tx == nil, "") - equals(t, err, bolt.ErrDatabaseNotOpen) -} - -// Ensure that a read-write transaction can be retrieved. -func TestDB_BeginRW(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, err := db.Begin(true) - assert(t, tx != nil, "") - ok(t, err) - assert(t, tx.DB() == db.DB, "") - equals(t, tx.Writable(), true) - ok(t, tx.Commit()) -} - -// Ensure that opening a transaction while the DB is closed returns an error. -func TestDB_BeginRW_Closed(t *testing.T) { - var db bolt.DB - tx, err := db.Begin(true) - equals(t, err, bolt.ErrDatabaseNotOpen) - assert(t, tx == nil, "") -} - -// Ensure a database can provide a transactional block. -func TestDB_Update(t *testing.T) { - db := NewTestDB() - defer db.Close() - err := db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - b.Put([]byte("foo"), []byte("bar")) - b.Put([]byte("baz"), []byte("bat")) - b.Delete([]byte("foo")) - return nil - }) - ok(t, err) - err = db.View(func(tx *bolt.Tx) error { - assert(t, tx.Bucket([]byte("widgets")).Get([]byte("foo")) == nil, "") - equals(t, []byte("bat"), tx.Bucket([]byte("widgets")).Get([]byte("baz"))) - return nil - }) - ok(t, err) -} - -// Ensure a closed database returns an error while running a transaction block -func TestDB_Update_Closed(t *testing.T) { - var db bolt.DB - err := db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - return nil - }) - equals(t, err, bolt.ErrDatabaseNotOpen) -} - -// Ensure a panic occurs while trying to commit a managed transaction. -func TestDB_Update_ManualCommit(t *testing.T) { - db := NewTestDB() - defer db.Close() - - var ok bool - db.Update(func(tx *bolt.Tx) error { - func() { - defer func() { - if r := recover(); r != nil { - ok = true - } - }() - tx.Commit() - }() - return nil - }) - assert(t, ok, "expected panic") -} - -// Ensure a panic occurs while trying to rollback a managed transaction. -func TestDB_Update_ManualRollback(t *testing.T) { - db := NewTestDB() - defer db.Close() - - var ok bool - db.Update(func(tx *bolt.Tx) error { - func() { - defer func() { - if r := recover(); r != nil { - ok = true - } - }() - tx.Rollback() - }() - return nil - }) - assert(t, ok, "expected panic") -} - -// Ensure a panic occurs while trying to commit a managed transaction. -func TestDB_View_ManualCommit(t *testing.T) { - db := NewTestDB() - defer db.Close() - - var ok bool - db.Update(func(tx *bolt.Tx) error { - func() { - defer func() { - if r := recover(); r != nil { - ok = true - } - }() - tx.Commit() - }() - return nil - }) - assert(t, ok, "expected panic") -} - -// Ensure a panic occurs while trying to rollback a managed transaction. -func TestDB_View_ManualRollback(t *testing.T) { - db := NewTestDB() - defer db.Close() - - var ok bool - db.Update(func(tx *bolt.Tx) error { - func() { - defer func() { - if r := recover(); r != nil { - ok = true - } - }() - tx.Rollback() - }() - return nil - }) - assert(t, ok, "expected panic") -} - -// Ensure a write transaction that panics does not hold open locks. -func TestDB_Update_Panic(t *testing.T) { - db := NewTestDB() - defer db.Close() - - func() { - defer func() { - if r := recover(); r != nil { - t.Log("recover: update", r) - } - }() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - panic("omg") - }) - }() - - // Verify we can update again. - err := db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - ok(t, err) - - // Verify that our change persisted. - err = db.Update(func(tx *bolt.Tx) error { - assert(t, tx.Bucket([]byte("widgets")) != nil, "") - return nil - }) -} - -// Ensure a database can return an error through a read-only transactional block. -func TestDB_View_Error(t *testing.T) { - db := NewTestDB() - defer db.Close() - err := db.View(func(tx *bolt.Tx) error { - return errors.New("xxx") - }) - equals(t, errors.New("xxx"), err) -} - -// Ensure a read transaction that panics does not hold open locks. -func TestDB_View_Panic(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - return nil - }) - - func() { - defer func() { - if r := recover(); r != nil { - t.Log("recover: view", r) - } - }() - db.View(func(tx *bolt.Tx) error { - assert(t, tx.Bucket([]byte("widgets")) != nil, "") - panic("omg") - }) - }() - - // Verify that we can still use read transactions. - db.View(func(tx *bolt.Tx) error { - assert(t, tx.Bucket([]byte("widgets")) != nil, "") - return nil - }) -} - -// Ensure that an error is returned when a database write fails. -func TestDB_Commit_WriteFail(t *testing.T) { - t.Skip("pending") // TODO(benbjohnson) -} - -// Ensure that DB stats can be returned. -func TestDB_Stats(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - stats := db.Stats() - equals(t, 2, stats.TxStats.PageCount) - equals(t, 0, stats.FreePageN) - equals(t, 2, stats.PendingPageN) -} - -// Ensure that database pages are in expected order and type. -func TestDB_Consistency(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - - for i := 0; i < 10; i++ { - db.Update(func(tx *bolt.Tx) error { - ok(t, tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar"))) - return nil - }) - } - db.Update(func(tx *bolt.Tx) error { - p, _ := tx.Page(0) - assert(t, p != nil, "") - equals(t, "meta", p.Type) - - p, _ = tx.Page(1) - assert(t, p != nil, "") - equals(t, "meta", p.Type) - - p, _ = tx.Page(2) - assert(t, p != nil, "") - equals(t, "free", p.Type) - - p, _ = tx.Page(3) - assert(t, p != nil, "") - equals(t, "free", p.Type) - - p, _ = tx.Page(4) - assert(t, p != nil, "") - equals(t, "leaf", p.Type) - - p, _ = tx.Page(5) - assert(t, p != nil, "") - equals(t, "freelist", p.Type) - - p, _ = tx.Page(6) - assert(t, p == nil, "") - return nil - }) -} - -// Ensure that DB stats can be substracted from one another. -func TestDBStats_Sub(t *testing.T) { - var a, b bolt.Stats - a.TxStats.PageCount = 3 - a.FreePageN = 4 - b.TxStats.PageCount = 10 - b.FreePageN = 14 - diff := b.Sub(&a) - equals(t, 7, diff.TxStats.PageCount) - // free page stats are copied from the receiver and not subtracted - equals(t, 14, diff.FreePageN) -} - -func ExampleDB_Update() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Execute several commands within a write transaction. - err := db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("widgets")) - if err != nil { - return err - } - if err := b.Put([]byte("foo"), []byte("bar")); err != nil { - return err - } - return nil - }) - - // If our transactional block didn't return an error then our data is saved. - if err == nil { - db.View(func(tx *bolt.Tx) error { - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - fmt.Printf("The value of 'foo' is: %s\n", value) - return nil - }) - } - - // Output: - // The value of 'foo' is: bar -} - -func ExampleDB_View() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Insert data into a bucket. - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("people")) - b := tx.Bucket([]byte("people")) - b.Put([]byte("john"), []byte("doe")) - b.Put([]byte("susy"), []byte("que")) - return nil - }) - - // Access data from within a read-only transactional block. - db.View(func(tx *bolt.Tx) error { - v := tx.Bucket([]byte("people")).Get([]byte("john")) - fmt.Printf("John's last name is %s.\n", v) - return nil - }) - - // Output: - // John's last name is doe. -} - -func ExampleDB_Begin_ReadOnly() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Create a bucket. - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - - // Create several keys in a transaction. - tx, _ := db.Begin(true) - b := tx.Bucket([]byte("widgets")) - b.Put([]byte("john"), []byte("blue")) - b.Put([]byte("abby"), []byte("red")) - b.Put([]byte("zephyr"), []byte("purple")) - tx.Commit() - - // Iterate over the values in sorted key order. - tx, _ = db.Begin(false) - c := tx.Bucket([]byte("widgets")).Cursor() - for k, v := c.First(); k != nil; k, v = c.Next() { - fmt.Printf("%s likes %s\n", k, v) - } - tx.Rollback() - - // Output: - // abby likes red - // john likes blue - // zephyr likes purple -} - -// TestDB represents a wrapper around a Bolt DB to handle temporary file -// creation and automatic cleanup on close. -type TestDB struct { - *bolt.DB -} - -// NewTestDB returns a new instance of TestDB. -func NewTestDB() *TestDB { - db, err := bolt.Open(tempfile(), 0666, nil) - if err != nil { - panic("cannot open db: " + err.Error()) - } - return &TestDB{db} -} - -// MustView executes a read-only function. Panic on error. -func (db *TestDB) MustView(fn func(tx *bolt.Tx) error) { - if err := db.DB.View(func(tx *bolt.Tx) error { - return fn(tx) - }); err != nil { - panic(err.Error()) - } -} - -// MustUpdate executes a read-write function. Panic on error. -func (db *TestDB) MustUpdate(fn func(tx *bolt.Tx) error) { - if err := db.DB.View(func(tx *bolt.Tx) error { - return fn(tx) - }); err != nil { - panic(err.Error()) - } -} - -// MustCreateBucket creates a new bucket. Panic on error. -func (db *TestDB) MustCreateBucket(name []byte) { - if err := db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte(name)) - return err - }); err != nil { - panic(err.Error()) - } -} - -// Close closes the database and deletes the underlying file. -func (db *TestDB) Close() { - // Log statistics. - if *statsFlag { - db.PrintStats() - } - - // Check database consistency after every test. - db.MustCheck() - - // Close database and remove file. - defer os.Remove(db.Path()) - db.DB.Close() -} - -// PrintStats prints the database stats -func (db *TestDB) PrintStats() { - var stats = db.Stats() - fmt.Printf("[db] %-20s %-20s %-20s\n", - fmt.Sprintf("pg(%d/%d)", stats.TxStats.PageCount, stats.TxStats.PageAlloc), - fmt.Sprintf("cur(%d)", stats.TxStats.CursorCount), - fmt.Sprintf("node(%d/%d)", stats.TxStats.NodeCount, stats.TxStats.NodeDeref), - ) - fmt.Printf(" %-20s %-20s %-20s\n", - fmt.Sprintf("rebal(%d/%v)", stats.TxStats.Rebalance, truncDuration(stats.TxStats.RebalanceTime)), - fmt.Sprintf("spill(%d/%v)", stats.TxStats.Spill, truncDuration(stats.TxStats.SpillTime)), - fmt.Sprintf("w(%d/%v)", stats.TxStats.Write, truncDuration(stats.TxStats.WriteTime)), - ) -} - -// MustCheck runs a consistency check on the database and panics if any errors are found. -func (db *TestDB) MustCheck() { - db.View(func(tx *bolt.Tx) error { - // Collect all the errors. - var errors []error - for err := range tx.Check() { - errors = append(errors, err) - if len(errors) > 10 { - break - } - } - - // If errors occurred, copy the DB and print the errors. - if len(errors) > 0 { - var path = tempfile() - tx.CopyFile(path, 0600) - - // Print errors. - fmt.Print("\n\n") - fmt.Printf("consistency check failed (%d errors)\n", len(errors)) - for _, err := range errors { - fmt.Println(err) - } - fmt.Println("") - fmt.Println("db saved to:") - fmt.Println(path) - fmt.Print("\n\n") - os.Exit(-1) - } - - return nil - }) -} - -// CopyTempFile copies a database to a temporary file. -func (db *TestDB) CopyTempFile() { - path := tempfile() - db.View(func(tx *bolt.Tx) error { return tx.CopyFile(path, 0600) }) - fmt.Println("db copied to: ", path) -} - -// tempfile returns a temporary file path. -func tempfile() string { - f, _ := ioutil.TempFile("", "bolt-") - f.Close() - os.Remove(f.Name()) - return f.Name() -} - -// mustContainKeys checks that a bucket contains a given set of keys. -func mustContainKeys(b *bolt.Bucket, m map[string]string) { - found := make(map[string]string) - b.ForEach(func(k, _ []byte) error { - found[string(k)] = "" - return nil - }) - - // Check for keys found in bucket that shouldn't be there. - var keys []string - for k, _ := range found { - if _, ok := m[string(k)]; !ok { - keys = append(keys, k) - } - } - if len(keys) > 0 { - sort.Strings(keys) - panic(fmt.Sprintf("keys found(%d): %s", len(keys), strings.Join(keys, ","))) - } - - // Check for keys not found in bucket that should be there. - for k, _ := range m { - if _, ok := found[string(k)]; !ok { - keys = append(keys, k) - } - } - if len(keys) > 0 { - sort.Strings(keys) - panic(fmt.Sprintf("keys not found(%d): %s", len(keys), strings.Join(keys, ","))) - } -} - -func trunc(b []byte, length int) []byte { - if length < len(b) { - return b[:length] - } - return b -} - -func truncDuration(d time.Duration) string { - return regexp.MustCompile(`^(\d+)(\.\d+)`).ReplaceAllString(d.String(), "$1") -} - -func fileSize(path string) int64 { - fi, err := os.Stat(path) - if err != nil { - return 0 - } - return fi.Size() -} - -func warn(v ...interface{}) { fmt.Fprintln(os.Stderr, v...) } -func warnf(msg string, v ...interface{}) { fmt.Fprintf(os.Stderr, msg+"\n", v...) } - -// u64tob converts a uint64 into an 8-byte slice. -func u64tob(v uint64) []byte { - b := make([]byte, 8) - binary.BigEndian.PutUint64(b, v) - return b -} - -// btou64 converts an 8-byte slice into an uint64. -func btou64(b []byte) uint64 { return binary.BigEndian.Uint64(b) } diff --git a/vendor/github.com/boltdb/bolt/freelist.go b/vendor/github.com/boltdb/bolt/freelist.go deleted file mode 100644 index 1346e82e..00000000 --- a/vendor/github.com/boltdb/bolt/freelist.go +++ /dev/null @@ -1,241 +0,0 @@ -package bolt - -import ( - "fmt" - "sort" - "unsafe" -) - -// freelist represents a list of all pages that are available for allocation. -// It also tracks pages that have been freed but are still in use by open transactions. -type freelist struct { - ids []pgid // all free and available free page ids. - pending map[txid][]pgid // mapping of soon-to-be free page ids by tx. - cache map[pgid]bool // fast lookup of all free and pending page ids. -} - -// newFreelist returns an empty, initialized freelist. -func newFreelist() *freelist { - return &freelist{ - pending: make(map[txid][]pgid), - cache: make(map[pgid]bool), - } -} - -// size returns the size of the page after serialization. -func (f *freelist) size() int { - return pageHeaderSize + (int(unsafe.Sizeof(pgid(0))) * f.count()) -} - -// count returns count of pages on the freelist -func (f *freelist) count() int { - return f.free_count() + f.pending_count() -} - -// free_count returns count of free pages -func (f *freelist) free_count() int { - return len(f.ids) -} - -// pending_count returns count of pending pages -func (f *freelist) pending_count() int { - var count int - for _, list := range f.pending { - count += len(list) - } - return count -} - -// all returns a list of all free ids and all pending ids in one sorted list. -func (f *freelist) all() []pgid { - ids := make([]pgid, len(f.ids)) - copy(ids, f.ids) - - for _, list := range f.pending { - ids = append(ids, list...) - } - - sort.Sort(pgids(ids)) - return ids -} - -// allocate returns the starting page id of a contiguous list of pages of a given size. -// If a contiguous block cannot be found then 0 is returned. -func (f *freelist) allocate(n int) pgid { - if len(f.ids) == 0 { - return 0 - } - - var initial, previd pgid - for i, id := range f.ids { - if id <= 1 { - panic(fmt.Sprintf("invalid page allocation: %d", id)) - } - - // Reset initial page if this is not contiguous. - if previd == 0 || id-previd != 1 { - initial = id - } - - // If we found a contiguous block then remove it and return it. - if (id-initial)+1 == pgid(n) { - // If we're allocating off the beginning then take the fast path - // and just adjust the existing slice. This will use extra memory - // temporarily but the append() in free() will realloc the slice - // as is necessary. - if (i + 1) == n { - f.ids = f.ids[i+1:] - } else { - copy(f.ids[i-n+1:], f.ids[i+1:]) - f.ids = f.ids[:len(f.ids)-n] - } - - // Remove from the free cache. - for i := pgid(0); i < pgid(n); i++ { - delete(f.cache, initial+i) - } - - return initial - } - - previd = id - } - return 0 -} - -// free releases a page and its overflow for a given transaction id. -// If the page is already free then a panic will occur. -func (f *freelist) free(txid txid, p *page) { - if p.id <= 1 { - panic(fmt.Sprintf("cannot free page 0 or 1: %d", p.id)) - } - - // Free page and all its overflow pages. - var ids = f.pending[txid] - for id := p.id; id <= p.id+pgid(p.overflow); id++ { - // Verify that page is not already free. - if f.cache[id] { - panic(fmt.Sprintf("page %d already freed", id)) - } - - // Add to the freelist and cache. - ids = append(ids, id) - f.cache[id] = true - } - f.pending[txid] = ids -} - -// release moves all page ids for a transaction id (or older) to the freelist. -func (f *freelist) release(txid txid) { - for tid, ids := range f.pending { - if tid <= txid { - // Move transaction's pending pages to the available freelist. - // Don't remove from the cache since the page is still free. - f.ids = append(f.ids, ids...) - delete(f.pending, tid) - } - } - sort.Sort(pgids(f.ids)) -} - -// rollback removes the pages from a given pending tx. -func (f *freelist) rollback(txid txid) { - // Remove page ids from cache. - for _, id := range f.pending[txid] { - delete(f.cache, id) - } - - // Remove pages from pending list. - delete(f.pending, txid) -} - -// freed returns whether a given page is in the free list. -func (f *freelist) freed(pgid pgid) bool { - return f.cache[pgid] -} - -// read initializes the freelist from a freelist page. -func (f *freelist) read(p *page) { - // If the page.count is at the max uint16 value (64k) then it's considered - // an overflow and the size of the freelist is stored as the first element. - idx, count := 0, int(p.count) - if count == 0xFFFF { - idx = 1 - count = int(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0]) - } - - // Copy the list of page ids from the freelist. - ids := ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[idx:count] - f.ids = make([]pgid, len(ids)) - copy(f.ids, ids) - - // Make sure they're sorted. - sort.Sort(pgids(f.ids)) - - // Rebuild the page cache. - f.reindex() -} - -// write writes the page ids onto a freelist page. All free and pending ids are -// saved to disk since in the event of a program crash, all pending ids will -// become free. -func (f *freelist) write(p *page) error { - // Combine the old free pgids and pgids waiting on an open transaction. - ids := f.all() - - // Update the header flag. - p.flags |= freelistPageFlag - - // The page.count can only hold up to 64k elements so if we overflow that - // number then we handle it by putting the size in the first element. - if len(ids) < 0xFFFF { - p.count = uint16(len(ids)) - copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:], ids) - } else { - p.count = 0xFFFF - ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0] = pgid(len(ids)) - copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[1:], ids) - } - - return nil -} - -// reload reads the freelist from a page and filters out pending items. -func (f *freelist) reload(p *page) { - f.read(p) - - // Build a cache of only pending pages. - pcache := make(map[pgid]bool) - for _, pendingIDs := range f.pending { - for _, pendingID := range pendingIDs { - pcache[pendingID] = true - } - } - - // Check each page in the freelist and build a new available freelist - // with any pages not in the pending lists. - var a []pgid - for _, id := range f.ids { - if !pcache[id] { - a = append(a, id) - } - } - f.ids = a - - // Once the available list is rebuilt then rebuild the free cache so that - // it includes the available and pending free pages. - f.reindex() -} - -// reindex rebuilds the free cache based on available and pending free lists. -func (f *freelist) reindex() { - f.cache = make(map[pgid]bool) - for _, id := range f.ids { - f.cache[id] = true - } - for _, pendingIDs := range f.pending { - for _, pendingID := range pendingIDs { - f.cache[pendingID] = true - } - } -} diff --git a/vendor/github.com/boltdb/bolt/freelist_test.go b/vendor/github.com/boltdb/bolt/freelist_test.go deleted file mode 100644 index 792ca922..00000000 --- a/vendor/github.com/boltdb/bolt/freelist_test.go +++ /dev/null @@ -1,129 +0,0 @@ -package bolt - -import ( - "reflect" - "testing" - "unsafe" -) - -// Ensure that a page is added to a transaction's freelist. -func TestFreelist_free(t *testing.T) { - f := newFreelist() - f.free(100, &page{id: 12}) - if !reflect.DeepEqual([]pgid{12}, f.pending[100]) { - t.Fatalf("exp=%v; got=%v", []pgid{12}, f.pending[100]) - } -} - -// Ensure that a page and its overflow is added to a transaction's freelist. -func TestFreelist_free_overflow(t *testing.T) { - f := newFreelist() - f.free(100, &page{id: 12, overflow: 3}) - if exp := []pgid{12, 13, 14, 15}; !reflect.DeepEqual(exp, f.pending[100]) { - t.Fatalf("exp=%v; got=%v", exp, f.pending[100]) - } -} - -// Ensure that a transaction's free pages can be released. -func TestFreelist_release(t *testing.T) { - f := newFreelist() - f.free(100, &page{id: 12, overflow: 1}) - f.free(100, &page{id: 9}) - f.free(102, &page{id: 39}) - f.release(100) - f.release(101) - if exp := []pgid{9, 12, 13}; !reflect.DeepEqual(exp, f.ids) { - t.Fatalf("exp=%v; got=%v", exp, f.ids) - } - - f.release(102) - if exp := []pgid{9, 12, 13, 39}; !reflect.DeepEqual(exp, f.ids) { - t.Fatalf("exp=%v; got=%v", exp, f.ids) - } -} - -// Ensure that a freelist can find contiguous blocks of pages. -func TestFreelist_allocate(t *testing.T) { - f := &freelist{ids: []pgid{3, 4, 5, 6, 7, 9, 12, 13, 18}} - if id := int(f.allocate(3)); id != 3 { - t.Fatalf("exp=3; got=%v", id) - } - if id := int(f.allocate(1)); id != 6 { - t.Fatalf("exp=6; got=%v", id) - } - if id := int(f.allocate(3)); id != 0 { - t.Fatalf("exp=0; got=%v", id) - } - if id := int(f.allocate(2)); id != 12 { - t.Fatalf("exp=12; got=%v", id) - } - if id := int(f.allocate(1)); id != 7 { - t.Fatalf("exp=7; got=%v", id) - } - if id := int(f.allocate(0)); id != 0 { - t.Fatalf("exp=0; got=%v", id) - } - if id := int(f.allocate(0)); id != 0 { - t.Fatalf("exp=0; got=%v", id) - } - if exp := []pgid{9, 18}; !reflect.DeepEqual(exp, f.ids) { - t.Fatalf("exp=%v; got=%v", exp, f.ids) - } - - if id := int(f.allocate(1)); id != 9 { - t.Fatalf("exp=9; got=%v", id) - } - if id := int(f.allocate(1)); id != 18 { - t.Fatalf("exp=18; got=%v", id) - } - if id := int(f.allocate(1)); id != 0 { - t.Fatalf("exp=0; got=%v", id) - } - if exp := []pgid{}; !reflect.DeepEqual(exp, f.ids) { - t.Fatalf("exp=%v; got=%v", exp, f.ids) - } -} - -// Ensure that a freelist can deserialize from a freelist page. -func TestFreelist_read(t *testing.T) { - // Create a page. - var buf [4096]byte - page := (*page)(unsafe.Pointer(&buf[0])) - page.flags = freelistPageFlag - page.count = 2 - - // Insert 2 page ids. - ids := (*[3]pgid)(unsafe.Pointer(&page.ptr)) - ids[0] = 23 - ids[1] = 50 - - // Deserialize page into a freelist. - f := newFreelist() - f.read(page) - - // Ensure that there are two page ids in the freelist. - if exp := []pgid{23, 50}; !reflect.DeepEqual(exp, f.ids) { - t.Fatalf("exp=%v; got=%v", exp, f.ids) - } -} - -// Ensure that a freelist can serialize into a freelist page. -func TestFreelist_write(t *testing.T) { - // Create a freelist and write it to a page. - var buf [4096]byte - f := &freelist{ids: []pgid{12, 39}, pending: make(map[txid][]pgid)} - f.pending[100] = []pgid{28, 11} - f.pending[101] = []pgid{3} - p := (*page)(unsafe.Pointer(&buf[0])) - f.write(p) - - // Read the page back out. - f2 := newFreelist() - f2.read(p) - - // Ensure that the freelist is correct. - // All pages should be present and in reverse order. - if exp := []pgid{3, 11, 12, 28, 39}; !reflect.DeepEqual(exp, f2.ids) { - t.Fatalf("exp=%v; got=%v", exp, f2.ids) - } -} diff --git a/vendor/github.com/boltdb/bolt/node_test.go b/vendor/github.com/boltdb/bolt/node_test.go deleted file mode 100644 index fa5d10f9..00000000 --- a/vendor/github.com/boltdb/bolt/node_test.go +++ /dev/null @@ -1,156 +0,0 @@ -package bolt - -import ( - "testing" - "unsafe" -) - -// Ensure that a node can insert a key/value. -func TestNode_put(t *testing.T) { - n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{meta: &meta{pgid: 1}}}} - n.put([]byte("baz"), []byte("baz"), []byte("2"), 0, 0) - n.put([]byte("foo"), []byte("foo"), []byte("0"), 0, 0) - n.put([]byte("bar"), []byte("bar"), []byte("1"), 0, 0) - n.put([]byte("foo"), []byte("foo"), []byte("3"), 0, leafPageFlag) - - if len(n.inodes) != 3 { - t.Fatalf("exp=3; got=%d", len(n.inodes)) - } - if k, v := n.inodes[0].key, n.inodes[0].value; string(k) != "bar" || string(v) != "1" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } - if k, v := n.inodes[1].key, n.inodes[1].value; string(k) != "baz" || string(v) != "2" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } - if k, v := n.inodes[2].key, n.inodes[2].value; string(k) != "foo" || string(v) != "3" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } - if n.inodes[2].flags != uint32(leafPageFlag) { - t.Fatalf("not a leaf: %d", n.inodes[2].flags) - } -} - -// Ensure that a node can deserialize from a leaf page. -func TestNode_read_LeafPage(t *testing.T) { - // Create a page. - var buf [4096]byte - page := (*page)(unsafe.Pointer(&buf[0])) - page.flags = leafPageFlag - page.count = 2 - - // Insert 2 elements at the beginning. sizeof(leafPageElement) == 16 - nodes := (*[3]leafPageElement)(unsafe.Pointer(&page.ptr)) - nodes[0] = leafPageElement{flags: 0, pos: 32, ksize: 3, vsize: 4} // pos = sizeof(leafPageElement) * 2 - nodes[1] = leafPageElement{flags: 0, pos: 23, ksize: 10, vsize: 3} // pos = sizeof(leafPageElement) + 3 + 4 - - // Write data for the nodes at the end. - data := (*[4096]byte)(unsafe.Pointer(&nodes[2])) - copy(data[:], []byte("barfooz")) - copy(data[7:], []byte("helloworldbye")) - - // Deserialize page into a leaf. - n := &node{} - n.read(page) - - // Check that there are two inodes with correct data. - if !n.isLeaf { - t.Fatal("expected leaf") - } - if len(n.inodes) != 2 { - t.Fatalf("exp=2; got=%d", len(n.inodes)) - } - if k, v := n.inodes[0].key, n.inodes[0].value; string(k) != "bar" || string(v) != "fooz" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } - if k, v := n.inodes[1].key, n.inodes[1].value; string(k) != "helloworld" || string(v) != "bye" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } -} - -// Ensure that a node can serialize into a leaf page. -func TestNode_write_LeafPage(t *testing.T) { - // Create a node. - n := &node{isLeaf: true, inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} - n.put([]byte("susy"), []byte("susy"), []byte("que"), 0, 0) - n.put([]byte("ricki"), []byte("ricki"), []byte("lake"), 0, 0) - n.put([]byte("john"), []byte("john"), []byte("johnson"), 0, 0) - - // Write it to a page. - var buf [4096]byte - p := (*page)(unsafe.Pointer(&buf[0])) - n.write(p) - - // Read the page back in. - n2 := &node{} - n2.read(p) - - // Check that the two pages are the same. - if len(n2.inodes) != 3 { - t.Fatalf("exp=3; got=%d", len(n2.inodes)) - } - if k, v := n2.inodes[0].key, n2.inodes[0].value; string(k) != "john" || string(v) != "johnson" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } - if k, v := n2.inodes[1].key, n2.inodes[1].value; string(k) != "ricki" || string(v) != "lake" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } - if k, v := n2.inodes[2].key, n2.inodes[2].value; string(k) != "susy" || string(v) != "que" { - t.Fatalf("exp=; got=<%s,%s>", k, v) - } -} - -// Ensure that a node can split into appropriate subgroups. -func TestNode_split(t *testing.T) { - // Create a node. - n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} - n.put([]byte("00000001"), []byte("00000001"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000002"), []byte("00000002"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000003"), []byte("00000003"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000004"), []byte("00000004"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000005"), []byte("00000005"), []byte("0123456701234567"), 0, 0) - - // Split between 2 & 3. - n.split(100) - - var parent = n.parent - if len(parent.children) != 2 { - t.Fatalf("exp=2; got=%d", len(parent.children)) - } - if len(parent.children[0].inodes) != 2 { - t.Fatalf("exp=2; got=%d", len(parent.children[0].inodes)) - } - if len(parent.children[1].inodes) != 3 { - t.Fatalf("exp=3; got=%d", len(parent.children[1].inodes)) - } -} - -// Ensure that a page with the minimum number of inodes just returns a single node. -func TestNode_split_MinKeys(t *testing.T) { - // Create a node. - n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} - n.put([]byte("00000001"), []byte("00000001"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000002"), []byte("00000002"), []byte("0123456701234567"), 0, 0) - - // Split. - n.split(20) - if n.parent != nil { - t.Fatalf("expected nil parent") - } -} - -// Ensure that a node that has keys that all fit on a page just returns one leaf. -func TestNode_split_SinglePage(t *testing.T) { - // Create a node. - n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} - n.put([]byte("00000001"), []byte("00000001"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000002"), []byte("00000002"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000003"), []byte("00000003"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000004"), []byte("00000004"), []byte("0123456701234567"), 0, 0) - n.put([]byte("00000005"), []byte("00000005"), []byte("0123456701234567"), 0, 0) - - // Split. - n.split(4096) - if n.parent != nil { - t.Fatalf("expected nil parent") - } -} diff --git a/vendor/github.com/boltdb/bolt/page.go b/vendor/github.com/boltdb/bolt/page.go deleted file mode 100644 index 58e43c4b..00000000 --- a/vendor/github.com/boltdb/bolt/page.go +++ /dev/null @@ -1,134 +0,0 @@ -package bolt - -import ( - "fmt" - "os" - "unsafe" -) - -const pageHeaderSize = int(unsafe.Offsetof(((*page)(nil)).ptr)) - -const minKeysPerPage = 2 - -const branchPageElementSize = int(unsafe.Sizeof(branchPageElement{})) -const leafPageElementSize = int(unsafe.Sizeof(leafPageElement{})) - -const ( - branchPageFlag = 0x01 - leafPageFlag = 0x02 - metaPageFlag = 0x04 - freelistPageFlag = 0x10 -) - -const ( - bucketLeafFlag = 0x01 -) - -type pgid uint64 - -type page struct { - id pgid - flags uint16 - count uint16 - overflow uint32 - ptr uintptr -} - -// typ returns a human readable page type string used for debugging. -func (p *page) typ() string { - if (p.flags & branchPageFlag) != 0 { - return "branch" - } else if (p.flags & leafPageFlag) != 0 { - return "leaf" - } else if (p.flags & metaPageFlag) != 0 { - return "meta" - } else if (p.flags & freelistPageFlag) != 0 { - return "freelist" - } - return fmt.Sprintf("unknown<%02x>", p.flags) -} - -// meta returns a pointer to the metadata section of the page. -func (p *page) meta() *meta { - return (*meta)(unsafe.Pointer(&p.ptr)) -} - -// leafPageElement retrieves the leaf node by index -func (p *page) leafPageElement(index uint16) *leafPageElement { - n := &((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[index] - return n -} - -// leafPageElements retrieves a list of leaf nodes. -func (p *page) leafPageElements() []leafPageElement { - return ((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[:] -} - -// branchPageElement retrieves the branch node by index -func (p *page) branchPageElement(index uint16) *branchPageElement { - return &((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[index] -} - -// branchPageElements retrieves a list of branch nodes. -func (p *page) branchPageElements() []branchPageElement { - return ((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[:] -} - -// dump writes n bytes of the page to STDERR as hex output. -func (p *page) hexdump(n int) { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:n] - fmt.Fprintf(os.Stderr, "%x\n", buf) -} - -type pages []*page - -func (s pages) Len() int { return len(s) } -func (s pages) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s pages) Less(i, j int) bool { return s[i].id < s[j].id } - -// branchPageElement represents a node on a branch page. -type branchPageElement struct { - pos uint32 - ksize uint32 - pgid pgid -} - -// key returns a byte slice of the node key. -func (n *branchPageElement) key() []byte { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) - return buf[n.pos : n.pos+n.ksize] -} - -// leafPageElement represents a node on a leaf page. -type leafPageElement struct { - flags uint32 - pos uint32 - ksize uint32 - vsize uint32 -} - -// key returns a byte slice of the node key. -func (n *leafPageElement) key() []byte { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) - return buf[n.pos : n.pos+n.ksize] -} - -// value returns a byte slice of the node value. -func (n *leafPageElement) value() []byte { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) - return buf[n.pos+n.ksize : n.pos+n.ksize+n.vsize] -} - -// PageInfo represents human readable information about a page. -type PageInfo struct { - ID int - Type string - Count int - OverflowCount int -} - -type pgids []pgid - -func (s pgids) Len() int { return len(s) } -func (s pgids) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s pgids) Less(i, j int) bool { return s[i] < s[j] } diff --git a/vendor/github.com/boltdb/bolt/page_test.go b/vendor/github.com/boltdb/bolt/page_test.go deleted file mode 100644 index 7a4d327f..00000000 --- a/vendor/github.com/boltdb/bolt/page_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package bolt - -import ( - "testing" -) - -// Ensure that the page type can be returned in human readable format. -func TestPage_typ(t *testing.T) { - if typ := (&page{flags: branchPageFlag}).typ(); typ != "branch" { - t.Fatalf("exp=branch; got=%v", typ) - } - if typ := (&page{flags: leafPageFlag}).typ(); typ != "leaf" { - t.Fatalf("exp=leaf; got=%v", typ) - } - if typ := (&page{flags: metaPageFlag}).typ(); typ != "meta" { - t.Fatalf("exp=meta; got=%v", typ) - } - if typ := (&page{flags: freelistPageFlag}).typ(); typ != "freelist" { - t.Fatalf("exp=freelist; got=%v", typ) - } - if typ := (&page{flags: 20000}).typ(); typ != "unknown<4e20>" { - t.Fatalf("exp=unknown<4e20>; got=%v", typ) - } -} - -// Ensure that the hexdump debugging function doesn't blow up. -func TestPage_dump(t *testing.T) { - (&page{id: 256}).hexdump(16) -} diff --git a/vendor/github.com/boltdb/bolt/quick_test.go b/vendor/github.com/boltdb/bolt/quick_test.go deleted file mode 100644 index 4da58177..00000000 --- a/vendor/github.com/boltdb/bolt/quick_test.go +++ /dev/null @@ -1,79 +0,0 @@ -package bolt_test - -import ( - "bytes" - "flag" - "fmt" - "math/rand" - "os" - "reflect" - "testing/quick" - "time" -) - -// testing/quick defaults to 5 iterations and a random seed. -// You can override these settings from the command line: -// -// -quick.count The number of iterations to perform. -// -quick.seed The seed to use for randomizing. -// -quick.maxitems The maximum number of items to insert into a DB. -// -quick.maxksize The maximum size of a key. -// -quick.maxvsize The maximum size of a value. -// - -var qcount, qseed, qmaxitems, qmaxksize, qmaxvsize int - -func init() { - flag.IntVar(&qcount, "quick.count", 5, "") - flag.IntVar(&qseed, "quick.seed", int(time.Now().UnixNano())%100000, "") - flag.IntVar(&qmaxitems, "quick.maxitems", 1000, "") - flag.IntVar(&qmaxksize, "quick.maxksize", 1024, "") - flag.IntVar(&qmaxvsize, "quick.maxvsize", 1024, "") - flag.Parse() - fmt.Fprintln(os.Stderr, "seed:", qseed) - fmt.Fprintf(os.Stderr, "quick settings: count=%v, items=%v, ksize=%v, vsize=%v\n", qcount, qmaxitems, qmaxksize, qmaxvsize) -} - -func qconfig() *quick.Config { - return &quick.Config{ - MaxCount: qcount, - Rand: rand.New(rand.NewSource(int64(qseed))), - } -} - -type testdata []testdataitem - -func (t testdata) Len() int { return len(t) } -func (t testdata) Swap(i, j int) { t[i], t[j] = t[j], t[i] } -func (t testdata) Less(i, j int) bool { return bytes.Compare(t[i].Key, t[j].Key) == -1 } - -func (t testdata) Generate(rand *rand.Rand, size int) reflect.Value { - n := rand.Intn(qmaxitems-1) + 1 - items := make(testdata, n) - for i := 0; i < n; i++ { - item := &items[i] - item.Key = randByteSlice(rand, 1, qmaxksize) - item.Value = randByteSlice(rand, 0, qmaxvsize) - } - return reflect.ValueOf(items) -} - -type revtestdata []testdataitem - -func (t revtestdata) Len() int { return len(t) } -func (t revtestdata) Swap(i, j int) { t[i], t[j] = t[j], t[i] } -func (t revtestdata) Less(i, j int) bool { return bytes.Compare(t[i].Key, t[j].Key) == 1 } - -type testdataitem struct { - Key []byte - Value []byte -} - -func randByteSlice(rand *rand.Rand, minSize, maxSize int) []byte { - n := rand.Intn(maxSize-minSize) + minSize - b := make([]byte, n) - for i := 0; i < n; i++ { - b[i] = byte(rand.Intn(255)) - } - return b -} diff --git a/vendor/github.com/boltdb/bolt/simulation_test.go b/vendor/github.com/boltdb/bolt/simulation_test.go deleted file mode 100644 index ceb8baef..00000000 --- a/vendor/github.com/boltdb/bolt/simulation_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package bolt_test - -import ( - "bytes" - "fmt" - "math/rand" - "sync" - "testing" - - "github.com/boltdb/bolt" -) - -func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, 100, 1) } -func TestSimulate_10op_1p(t *testing.T) { testSimulate(t, 10, 1) } -func TestSimulate_100op_1p(t *testing.T) { testSimulate(t, 100, 1) } -func TestSimulate_1000op_1p(t *testing.T) { testSimulate(t, 1000, 1) } -func TestSimulate_10000op_1p(t *testing.T) { testSimulate(t, 10000, 1) } - -func TestSimulate_10op_10p(t *testing.T) { testSimulate(t, 10, 10) } -func TestSimulate_100op_10p(t *testing.T) { testSimulate(t, 100, 10) } -func TestSimulate_1000op_10p(t *testing.T) { testSimulate(t, 1000, 10) } -func TestSimulate_10000op_10p(t *testing.T) { testSimulate(t, 10000, 10) } - -func TestSimulate_100op_100p(t *testing.T) { testSimulate(t, 100, 100) } -func TestSimulate_1000op_100p(t *testing.T) { testSimulate(t, 1000, 100) } -func TestSimulate_10000op_100p(t *testing.T) { testSimulate(t, 10000, 100) } - -func TestSimulate_10000op_1000p(t *testing.T) { testSimulate(t, 10000, 1000) } - -// Randomly generate operations on a given database with multiple clients to ensure consistency and thread safety. -func testSimulate(t *testing.T, threadCount, parallelism int) { - if testing.Short() { - t.Skip("skipping test in short mode.") - } - - rand.Seed(int64(qseed)) - - // A list of operations that readers and writers can perform. - var readerHandlers = []simulateHandler{simulateGetHandler} - var writerHandlers = []simulateHandler{simulateGetHandler, simulatePutHandler} - - var versions = make(map[int]*QuickDB) - versions[1] = NewQuickDB() - - db := NewTestDB() - defer db.Close() - - var mutex sync.Mutex - - // Run n threads in parallel, each with their own operation. - var wg sync.WaitGroup - var threads = make(chan bool, parallelism) - var i int - for { - threads <- true - wg.Add(1) - writable := ((rand.Int() % 100) < 20) // 20% writers - - // Choose an operation to execute. - var handler simulateHandler - if writable { - handler = writerHandlers[rand.Intn(len(writerHandlers))] - } else { - handler = readerHandlers[rand.Intn(len(readerHandlers))] - } - - // Execute a thread for the given operation. - go func(writable bool, handler simulateHandler) { - defer wg.Done() - - // Start transaction. - tx, err := db.Begin(writable) - if err != nil { - t.Fatal("tx begin: ", err) - } - - // Obtain current state of the dataset. - mutex.Lock() - var qdb = versions[tx.ID()] - if writable { - qdb = versions[tx.ID()-1].Copy() - } - mutex.Unlock() - - // Make sure we commit/rollback the tx at the end and update the state. - if writable { - defer func() { - mutex.Lock() - versions[tx.ID()] = qdb - mutex.Unlock() - - ok(t, tx.Commit()) - }() - } else { - defer tx.Rollback() - } - - // Ignore operation if we don't have data yet. - if qdb == nil { - return - } - - // Execute handler. - handler(tx, qdb) - - // Release a thread back to the scheduling loop. - <-threads - }(writable, handler) - - i++ - if i > threadCount { - break - } - } - - // Wait until all threads are done. - wg.Wait() -} - -type simulateHandler func(tx *bolt.Tx, qdb *QuickDB) - -// Retrieves a key from the database and verifies that it is what is expected. -func simulateGetHandler(tx *bolt.Tx, qdb *QuickDB) { - // Randomly retrieve an existing exist. - keys := qdb.Rand() - if len(keys) == 0 { - return - } - - // Retrieve root bucket. - b := tx.Bucket(keys[0]) - if b == nil { - panic(fmt.Sprintf("bucket[0] expected: %08x\n", trunc(keys[0], 4))) - } - - // Drill into nested buckets. - for _, key := range keys[1 : len(keys)-1] { - b = b.Bucket(key) - if b == nil { - panic(fmt.Sprintf("bucket[n] expected: %v -> %v\n", keys, key)) - } - } - - // Verify key/value on the final bucket. - expected := qdb.Get(keys) - actual := b.Get(keys[len(keys)-1]) - if !bytes.Equal(actual, expected) { - fmt.Println("=== EXPECTED ===") - fmt.Println(expected) - fmt.Println("=== ACTUAL ===") - fmt.Println(actual) - fmt.Println("=== END ===") - panic("value mismatch") - } -} - -// Inserts a key into the database. -func simulatePutHandler(tx *bolt.Tx, qdb *QuickDB) { - var err error - keys, value := randKeys(), randValue() - - // Retrieve root bucket. - b := tx.Bucket(keys[0]) - if b == nil { - b, err = tx.CreateBucket(keys[0]) - if err != nil { - panic("create bucket: " + err.Error()) - } - } - - // Create nested buckets, if necessary. - for _, key := range keys[1 : len(keys)-1] { - child := b.Bucket(key) - if child != nil { - b = child - } else { - b, err = b.CreateBucket(key) - if err != nil { - panic("create bucket: " + err.Error()) - } - } - } - - // Insert into database. - if err := b.Put(keys[len(keys)-1], value); err != nil { - panic("put: " + err.Error()) - } - - // Insert into in-memory database. - qdb.Put(keys, value) -} - -// QuickDB is an in-memory database that replicates the functionality of the -// Bolt DB type except that it is entirely in-memory. It is meant for testing -// that the Bolt database is consistent. -type QuickDB struct { - sync.RWMutex - m map[string]interface{} -} - -// NewQuickDB returns an instance of QuickDB. -func NewQuickDB() *QuickDB { - return &QuickDB{m: make(map[string]interface{})} -} - -// Get retrieves the value at a key path. -func (db *QuickDB) Get(keys [][]byte) []byte { - db.RLock() - defer db.RUnlock() - - m := db.m - for _, key := range keys[:len(keys)-1] { - value := m[string(key)] - if value == nil { - return nil - } - switch value := value.(type) { - case map[string]interface{}: - m = value - case []byte: - return nil - } - } - - // Only return if it's a simple value. - if value, ok := m[string(keys[len(keys)-1])].([]byte); ok { - return value - } - return nil -} - -// Put inserts a value into a key path. -func (db *QuickDB) Put(keys [][]byte, value []byte) { - db.Lock() - defer db.Unlock() - - // Build buckets all the way down the key path. - m := db.m - for _, key := range keys[:len(keys)-1] { - if _, ok := m[string(key)].([]byte); ok { - return // Keypath intersects with a simple value. Do nothing. - } - - if m[string(key)] == nil { - m[string(key)] = make(map[string]interface{}) - } - m = m[string(key)].(map[string]interface{}) - } - - // Insert value into the last key. - m[string(keys[len(keys)-1])] = value -} - -// Rand returns a random key path that points to a simple value. -func (db *QuickDB) Rand() [][]byte { - db.RLock() - defer db.RUnlock() - if len(db.m) == 0 { - return nil - } - var keys [][]byte - db.rand(db.m, &keys) - return keys -} - -func (db *QuickDB) rand(m map[string]interface{}, keys *[][]byte) { - i, index := 0, rand.Intn(len(m)) - for k, v := range m { - if i == index { - *keys = append(*keys, []byte(k)) - if v, ok := v.(map[string]interface{}); ok { - db.rand(v, keys) - } - return - } - i++ - } - panic("quickdb rand: out-of-range") -} - -// Copy copies the entire database. -func (db *QuickDB) Copy() *QuickDB { - db.RLock() - defer db.RUnlock() - return &QuickDB{m: db.copy(db.m)} -} - -func (db *QuickDB) copy(m map[string]interface{}) map[string]interface{} { - clone := make(map[string]interface{}, len(m)) - for k, v := range m { - switch v := v.(type) { - case map[string]interface{}: - clone[k] = db.copy(v) - default: - clone[k] = v - } - } - return clone -} - -func randKey() []byte { - var min, max = 1, 1024 - n := rand.Intn(max-min) + min - b := make([]byte, n) - for i := 0; i < n; i++ { - b[i] = byte(rand.Intn(255)) - } - return b -} - -func randKeys() [][]byte { - var keys [][]byte - var count = rand.Intn(2) + 2 - for i := 0; i < count; i++ { - keys = append(keys, randKey()) - } - return keys -} - -func randValue() []byte { - n := rand.Intn(8192) - b := make([]byte, n) - for i := 0; i < n; i++ { - b[i] = byte(rand.Intn(255)) - } - return b -} diff --git a/vendor/github.com/boltdb/bolt/tx_test.go b/vendor/github.com/boltdb/bolt/tx_test.go deleted file mode 100644 index 39f50c43..00000000 --- a/vendor/github.com/boltdb/bolt/tx_test.go +++ /dev/null @@ -1,424 +0,0 @@ -package bolt_test - -import ( - "errors" - "fmt" - "os" - "testing" - - "github.com/boltdb/bolt" -) - -// Ensure that committing a closed transaction returns an error. -func TestTx_Commit_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - tx.CreateBucket([]byte("foo")) - ok(t, tx.Commit()) - equals(t, tx.Commit(), bolt.ErrTxClosed) -} - -// Ensure that rolling back a closed transaction returns an error. -func TestTx_Rollback_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - ok(t, tx.Rollback()) - equals(t, tx.Rollback(), bolt.ErrTxClosed) -} - -// Ensure that committing a read-only transaction returns an error. -func TestTx_Commit_ReadOnly(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(false) - equals(t, tx.Commit(), bolt.ErrTxNotWritable) -} - -// Ensure that a transaction can retrieve a cursor on the root bucket. -func TestTx_Cursor(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.CreateBucket([]byte("woojits")) - c := tx.Cursor() - - k, v := c.First() - equals(t, "widgets", string(k)) - assert(t, v == nil, "") - - k, v = c.Next() - equals(t, "woojits", string(k)) - assert(t, v == nil, "") - - k, v = c.Next() - assert(t, k == nil, "") - assert(t, v == nil, "") - - return nil - }) -} - -// Ensure that creating a bucket with a read-only transaction returns an error. -func TestTx_CreateBucket_ReadOnly(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.View(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("foo")) - assert(t, b == nil, "") - equals(t, bolt.ErrTxNotWritable, err) - return nil - }) -} - -// Ensure that creating a bucket on a closed transaction returns an error. -func TestTx_CreateBucket_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - tx.Commit() - b, err := tx.CreateBucket([]byte("foo")) - assert(t, b == nil, "") - equals(t, bolt.ErrTxClosed, err) -} - -// Ensure that a Tx can retrieve a bucket. -func TestTx_Bucket(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - b := tx.Bucket([]byte("widgets")) - assert(t, b != nil, "") - return nil - }) -} - -// Ensure that a Tx retrieving a non-existent key returns nil. -func TestTx_Get_Missing(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - value := tx.Bucket([]byte("widgets")).Get([]byte("no_such_key")) - assert(t, value == nil, "") - return nil - }) -} - -// Ensure that a bucket can be created and retrieved. -func TestTx_CreateBucket(t *testing.T) { - db := NewTestDB() - defer db.Close() - - // Create a bucket. - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("widgets")) - assert(t, b != nil, "") - ok(t, err) - return nil - }) - - // Read the bucket through a separate transaction. - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - assert(t, b != nil, "") - return nil - }) -} - -// Ensure that a bucket can be created if it doesn't already exist. -func TestTx_CreateBucketIfNotExists(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucketIfNotExists([]byte("widgets")) - assert(t, b != nil, "") - ok(t, err) - - b, err = tx.CreateBucketIfNotExists([]byte("widgets")) - assert(t, b != nil, "") - ok(t, err) - - b, err = tx.CreateBucketIfNotExists([]byte{}) - assert(t, b == nil, "") - equals(t, bolt.ErrBucketNameRequired, err) - - b, err = tx.CreateBucketIfNotExists(nil) - assert(t, b == nil, "") - equals(t, bolt.ErrBucketNameRequired, err) - return nil - }) - - // Read the bucket through a separate transaction. - db.View(func(tx *bolt.Tx) error { - b := tx.Bucket([]byte("widgets")) - assert(t, b != nil, "") - return nil - }) -} - -// Ensure that a bucket cannot be created twice. -func TestTx_CreateBucket_Exists(t *testing.T) { - db := NewTestDB() - defer db.Close() - // Create a bucket. - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("widgets")) - assert(t, b != nil, "") - ok(t, err) - return nil - }) - - // Create the same bucket again. - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket([]byte("widgets")) - assert(t, b == nil, "") - equals(t, bolt.ErrBucketExists, err) - return nil - }) -} - -// Ensure that a bucket is created with a non-blank name. -func TestTx_CreateBucket_NameRequired(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucket(nil) - assert(t, b == nil, "") - equals(t, bolt.ErrBucketNameRequired, err) - return nil - }) -} - -// Ensure that a bucket can be deleted. -func TestTx_DeleteBucket(t *testing.T) { - db := NewTestDB() - defer db.Close() - - // Create a bucket and add a value. - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - return nil - }) - - // Delete the bucket and make sure we can't get the value. - db.Update(func(tx *bolt.Tx) error { - ok(t, tx.DeleteBucket([]byte("widgets"))) - assert(t, tx.Bucket([]byte("widgets")) == nil, "") - return nil - }) - - db.Update(func(tx *bolt.Tx) error { - // Create the bucket again and make sure there's not a phantom value. - b, err := tx.CreateBucket([]byte("widgets")) - assert(t, b != nil, "") - ok(t, err) - assert(t, tx.Bucket([]byte("widgets")).Get([]byte("foo")) == nil, "") - return nil - }) -} - -// Ensure that deleting a bucket on a closed transaction returns an error. -func TestTx_DeleteBucket_Closed(t *testing.T) { - db := NewTestDB() - defer db.Close() - tx, _ := db.Begin(true) - tx.Commit() - equals(t, tx.DeleteBucket([]byte("foo")), bolt.ErrTxClosed) -} - -// Ensure that deleting a bucket with a read-only transaction returns an error. -func TestTx_DeleteBucket_ReadOnly(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.View(func(tx *bolt.Tx) error { - equals(t, tx.DeleteBucket([]byte("foo")), bolt.ErrTxNotWritable) - return nil - }) -} - -// Ensure that nothing happens when deleting a bucket that doesn't exist. -func TestTx_DeleteBucket_NotFound(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - equals(t, bolt.ErrBucketNotFound, tx.DeleteBucket([]byte("widgets"))) - return nil - }) -} - -// Ensure that Tx commit handlers are called after a transaction successfully commits. -func TestTx_OnCommit(t *testing.T) { - var x int - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.OnCommit(func() { x += 1 }) - tx.OnCommit(func() { x += 2 }) - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - equals(t, 3, x) -} - -// Ensure that Tx commit handlers are NOT called after a transaction rolls back. -func TestTx_OnCommit_Rollback(t *testing.T) { - var x int - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.OnCommit(func() { x += 1 }) - tx.OnCommit(func() { x += 2 }) - tx.CreateBucket([]byte("widgets")) - return errors.New("rollback this commit") - }) - equals(t, 0, x) -} - -// Ensure that the database can be copied to a file path. -func TestTx_CopyFile(t *testing.T) { - db := NewTestDB() - defer db.Close() - var dest = tempfile() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - tx.Bucket([]byte("widgets")).Put([]byte("baz"), []byte("bat")) - return nil - }) - - ok(t, db.View(func(tx *bolt.Tx) error { return tx.CopyFile(dest, 0600) })) - - db2, err := bolt.Open(dest, 0600, nil) - ok(t, err) - defer db2.Close() - - db2.View(func(tx *bolt.Tx) error { - equals(t, []byte("bar"), tx.Bucket([]byte("widgets")).Get([]byte("foo"))) - equals(t, []byte("bat"), tx.Bucket([]byte("widgets")).Get([]byte("baz"))) - return nil - }) -} - -type failWriterError struct{} - -func (failWriterError) Error() string { - return "error injected for tests" -} - -type failWriter struct { - // fail after this many bytes - After int -} - -func (f *failWriter) Write(p []byte) (n int, err error) { - n = len(p) - if n > f.After { - n = f.After - err = failWriterError{} - } - f.After -= n - return n, err -} - -// Ensure that Copy handles write errors right. -func TestTx_CopyFile_Error_Meta(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - tx.Bucket([]byte("widgets")).Put([]byte("baz"), []byte("bat")) - return nil - }) - - err := db.View(func(tx *bolt.Tx) error { return tx.Copy(&failWriter{}) }) - equals(t, err.Error(), "meta copy: error injected for tests") -} - -// Ensure that Copy handles write errors right. -func TestTx_CopyFile_Error_Normal(t *testing.T) { - db := NewTestDB() - defer db.Close() - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - tx.Bucket([]byte("widgets")).Put([]byte("baz"), []byte("bat")) - return nil - }) - - err := db.View(func(tx *bolt.Tx) error { return tx.Copy(&failWriter{3 * db.Info().PageSize}) }) - equals(t, err.Error(), "error injected for tests") -} - -func ExampleTx_Rollback() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Create a bucket. - db.Update(func(tx *bolt.Tx) error { - _, err := tx.CreateBucket([]byte("widgets")) - return err - }) - - // Set a value for a key. - db.Update(func(tx *bolt.Tx) error { - return tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - }) - - // Update the key but rollback the transaction so it never saves. - tx, _ := db.Begin(true) - b := tx.Bucket([]byte("widgets")) - b.Put([]byte("foo"), []byte("baz")) - tx.Rollback() - - // Ensure that our original value is still set. - db.View(func(tx *bolt.Tx) error { - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - fmt.Printf("The value for 'foo' is still: %s\n", value) - return nil - }) - - // Output: - // The value for 'foo' is still: bar -} - -func ExampleTx_CopyFile() { - // Open the database. - db, _ := bolt.Open(tempfile(), 0666, nil) - defer os.Remove(db.Path()) - defer db.Close() - - // Create a bucket and a key. - db.Update(func(tx *bolt.Tx) error { - tx.CreateBucket([]byte("widgets")) - tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) - return nil - }) - - // Copy the database to another file. - toFile := tempfile() - db.View(func(tx *bolt.Tx) error { return tx.CopyFile(toFile, 0666) }) - defer os.Remove(toFile) - - // Open the cloned database. - db2, _ := bolt.Open(toFile, 0666, nil) - defer db2.Close() - - // Ensure that the key exists in the copy. - db2.View(func(tx *bolt.Tx) error { - value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) - fmt.Printf("The value for 'foo' in the clone is: %s\n", value) - return nil - }) - - // Output: - // The value for 'foo' in the clone is: bar -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/app_update_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/app_update_test.go deleted file mode 100644 index 36d4415a..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/app_update_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestUpdateApp(t *testing.T) { - Convey("Update app", t, func() { - setup(MockRoute{"PUT", "/v2/apps/97f7e56b-addf-4d26-be82-998a06600011", AppUpdatePayload, "", 201, "", nil}, t) - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - aur := AppUpdateResource{Name: "NewName", DiskQuota: 1024, Instances: 1, Memory: 65} - ret, err := client.UpdateApp("97f7e56b-addf-4d26-be82-998a06600011", aur) - So(err, ShouldBeNil) - So(ret.Entity.Memory, ShouldEqual, 65) - So(ret.Entity.Instances, ShouldEqual, 1) - So(ret.Entity.DiskQuota, ShouldEqual, 1024) - So(ret.Entity.Name, ShouldEqual, "NewName") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/app_usage_events_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/app_usage_events_test.go deleted file mode 100644 index 1828f8c4..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/app_usage_events_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package cfclient - -import ( - "net/url" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListAppUsageEvents(t *testing.T) { - Convey("List App Usage Events", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/app_usage_events", listAppUsageEventsPayload, "", 200, "", nil}, - {"GET", "/v2/app_usage_eventsPage2", listAppUsageEventsPayloadPage2, "", 200, "results-per-page=2&page=2", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - appUsageEvents, err := client.ListAppUsageEvents() - So(err, ShouldBeNil) - - So(len(appUsageEvents), ShouldEqual, 4) - So(appUsageEvents[0].GUID, ShouldEqual, "b32241a5-5508-4d42-893c-360e42a300b6") - So(appUsageEvents[0].CreatedAt, ShouldEqual, "2016-06-08T16:41:33Z") - }) -} - -func TestListAppUsageEventsByQuery(t *testing.T) { - Convey("List App Usage Events", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/app_usage_events", listAppUsageEventsPayload, "", 200, "results-per-page=2", nil}, - {"GET", "/v2/app_usage_eventsPage2", listAppUsageEventsPayloadPage2, "", 200, "results-per-page=2&page=2", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - var query = url.Values{ - "results-per-page": []string{ - "2", - }, - } - appUsageEvents, err := client.ListAppUsageEventsByQuery(query) - So(err, ShouldBeNil) - - So(len(appUsageEvents), ShouldEqual, 4) - So(appUsageEvents[0].GUID, ShouldEqual, "b32241a5-5508-4d42-893c-360e42a300b6") - So(appUsageEvents[0].CreatedAt, ShouldEqual, "2016-06-08T16:41:33Z") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/appevents_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/appevents_test.go deleted file mode 100644 index c561a637..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/appevents_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListAppEvents(t *testing.T) { - Convey("List App Events", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/events", listAppsCreatedEventPayload, "", 200, "q=type:audit.app.create", nil}, - {"GET", "/v2/events2", listAppsCreatedEventPayload2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - appEvents, err := client.ListAppEvents("blub") - So(err.Error(), ShouldEqual, "Unsupported app event type blub") - appEvents, err = client.ListAppEvents(AppCreate) - So(err, ShouldBeNil) - So(len(appEvents), ShouldEqual, 3) - So(appEvents[0].MetaData.Request.State, ShouldEqual, "STOPPED") - So(appEvents[1].EventType, ShouldEqual, AppCrash) - So(appEvents[1].MetaData.Request.State, ShouldEqual, "") - So(appEvents[1].MetaData.ExitReason, ShouldEqual, "CRASHED") - So(appEvents[2].MetaData.Request.State, ShouldEqual, "STARTED") - }) -} - -func TestListAppEventsByQuery(t *testing.T) { - Convey("List App Events By Query", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/events", listAppsCreatedEventPayload, "", 200, "q=type:audit.app.create&q=actee:3ca436ff-67a8-468a-8c7d-27ec68a6cfe5", nil}, - {"GET", "/v2/events2", listAppsCreatedEventPayload2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - appEvents, err := client.ListAppEventsByQuery("blub", []AppEventQuery{}) - So(err.Error(), ShouldEqual, "Unsupported app event type blub") - - appEventQuery := AppEventQuery{ - Filter: "nofilter", - Operator: ":", - Value: "retlifon", - } - appEvents, err = client.ListAppEventsByQuery(AppCreate, []AppEventQuery{appEventQuery}) - So(err.Error(), ShouldEqual, "Unsupported query filter type nofilter") - - appEventQuery = AppEventQuery{ - Filter: FilterTimestamp, - Operator: "not", - Value: "retlifon", - } - appEvents, err = client.ListAppEventsByQuery(AppCreate, []AppEventQuery{appEventQuery}) - So(err.Error(), ShouldEqual, "Unsupported query operator type not") - - appEventQuery = AppEventQuery{ - Filter: FilterActee, - Operator: ":", - Value: "3ca436ff-67a8-468a-8c7d-27ec68a6cfe5", - } - appEvents, err = client.ListAppEventsByQuery(AppCreate, []AppEventQuery{appEventQuery}) - So(err, ShouldBeNil) - So(len(appEvents), ShouldEqual, 3) - So(appEvents[0].MetaData.Request.State, ShouldEqual, "STOPPED") - So(appEvents[1].EventType, ShouldEqual, AppCrash) - So(appEvents[1].MetaData.Request.State, ShouldEqual, "") - So(appEvents[1].MetaData.ExitReason, ShouldEqual, "CRASHED") - So(appEvents[2].MetaData.Request.State, ShouldEqual, "STARTED") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/apps_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/apps_test.go deleted file mode 100644 index 8391579b..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/apps_test.go +++ /dev/null @@ -1,548 +0,0 @@ -package cfclient - -import ( - "bytes" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - "time" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListApps(t *testing.T) { - Convey("List Apps", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/apps", listAppsPayload, "Test-golang", 200, "inline-relations-depth=2", nil}, - {"GET", "/v2/appsPage2", listAppsPayloadPage2, "Test-golang", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - UserAgent: "Test-golang", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - apps, err := client.ListApps() - assertAppList(apps, err) - }) -} - -func TestListAppsByRoute(t *testing.T) { - Convey("List Apps by Route", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/routes/a3fb8d86-4620-4725-b643-0b5122a432e0/apps", listAppsPayload, "Test-golang", 200, "", nil}, - {"GET", "/v2/appsPage2", listAppsPayloadPage2, "Test-golang", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - UserAgent: "Test-golang", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - apps, err := client.ListAppsByRoute("a3fb8d86-4620-4725-b643-0b5122a432e0") - assertAppList(apps, err) - }) -} - -func assertAppList(apps []App, err error) { - So(err, ShouldBeNil) - - So(len(apps), ShouldEqual, 2) - So(apps[0].Guid, ShouldEqual, "af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c") - So(apps[0].CreatedAt, ShouldEqual, "2014-10-10T21:03:13+00:00") - So(apps[0].UpdatedAt, ShouldEqual, "2014-11-10T14:07:31+00:00") - So(apps[0].Name, ShouldEqual, "app-test") - So(apps[0].Memory, ShouldEqual, 256) - So(apps[0].Instances, ShouldEqual, 1) - So(apps[0].DiskQuota, ShouldEqual, 1024) - So(apps[0].SpaceGuid, ShouldEqual, "8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(apps[0].StackGuid, ShouldEqual, "2c531037-68a2-4e2c-a9e0-71f9d0abf0d4") - So(apps[0].State, ShouldEqual, "STARTED") - So(apps[0].Command, ShouldEqual, "") - So(apps[0].Buildpack, ShouldEqual, "https://github.com/cloudfoundry/buildpack-go.git") - So(apps[0].DetectedBuildpack, ShouldEqual, "") - So(apps[0].DetectedBuildpackGuid, ShouldEqual, "0d22f6a1-76c5-417f-ac6c-d9d21463ecbc") - So(apps[0].HealthCheckHttpEndpoint, ShouldEqual, "") - So(apps[0].HealthCheckType, ShouldEqual, "port") - So(apps[0].HealthCheckTimeout, ShouldEqual, 0) - So(apps[0].Diego, ShouldEqual, true) - So(apps[0].EnableSSH, ShouldEqual, true) - So(apps[0].DetectedStartCommand, ShouldEqual, "app-launching-service-broker") - So(apps[0].DockerImage, ShouldEqual, "") - So(apps[0].DockerCredentials["redacted_message"], ShouldEqual, "[PRIVATE DATA HIDDEN]") - So(apps[0].Environment["FOOBAR"], ShouldEqual, "QUX") - So(apps[0].StagingFailedReason, ShouldEqual, "") - So(apps[0].StagingFailedDescription, ShouldEqual, "") - So(apps[0].PackageState, ShouldEqual, "PENDING") - So(len(apps[0].Ports), ShouldEqual, 1) - So(apps[0].Ports[0], ShouldEqual, 8080) - - So(apps[1].Guid, ShouldEqual, "f9ad202b-76dd-44ec-b7c2-fd2417a561e8") - So(apps[1].Name, ShouldEqual, "app-test2") -} - -func TestGetAppByGuidNoInlineCall(t *testing.T) { - Convey("App By GUID", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2", appPayload, "Test-golang", 200, "", nil}, - {"GET", "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73", spacePayload, "Test-golang", 200, "", nil}, - {"GET", "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2", orgPayload, "Test-golang", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - UserAgent: "Test-golang", - } - - client, err := NewClient(c) - So(err, ShouldBeNil) - - app, err := client.GetAppByGuidNoInlineCall("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - - So(app.Guid, ShouldEqual, "9902530c-c634-4864-a189-71d763cb12e2") - So(app.Name, ShouldEqual, "test-env") - }) - - Convey("App By GUID with environment variables with different types", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2", appPayloadWithEnvironment, "Test-golang", 200, "", nil}, - {"GET", "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73", spacePayload, "Test-golang", 200, "", nil}, - {"GET", "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2", orgPayload, "Test-golang", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - UserAgent: "Test-golang", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - app, err := client.GetAppByGuidNoInlineCall("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - So(app.Environment["string"], ShouldEqual, "string") - So(app.Environment["int"], ShouldEqual, 1) - }) -} - -func TestAppByGuid(t *testing.T) { - Convey("App By GUID", t, func() { - setup(MockRoute{"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2", appPayload, "", 200, "inline-relations-depth=2", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - app, err := client.GetAppByGuid("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - - So(app.Guid, ShouldEqual, "9902530c-c634-4864-a189-71d763cb12e2") - So(app.Name, ShouldEqual, "test-env") - }) - - Convey("App By GUID with environment variables with different types", t, func() { - setup(MockRoute{"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2", appPayloadWithEnvironment, "", 200, "inline-relations-depth=2", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - app, err := client.GetAppByGuid("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - - So(app.Environment["string"], ShouldEqual, "string") - So(app.Environment["int"], ShouldEqual, 1) - }) -} - -func TestGetAppInstances(t *testing.T) { - Convey("App completely running", t, func() { - setup(MockRoute{"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/instances", appInstancePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - appInstances, err := client.GetAppInstances("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - - So(appInstances["0"].State, ShouldEqual, "RUNNING") - So(appInstances["1"].State, ShouldEqual, "RUNNING") - - var d0 float64 = 1455210430.5104606 - var d1 float64 = 1455210430.3912115 - date0 := time.Unix(int64(d0), 0) - date1 := time.Unix(int64(d1), 0) - - So(appInstances["0"].Since.Format(time.UnixDate), ShouldEqual, date0.Format(time.UnixDate)) - So(appInstances["1"].Since.Format(time.UnixDate), ShouldEqual, date1.Format(time.UnixDate)) - So(appInstances["0"].Since.ToTime(), ShouldHaveSameTypeAs, date0) - So(appInstances["1"].Since.ToTime(), ShouldHaveSameTypeAs, date1) - - }) - - Convey("App partially running", t, func() { - setup(MockRoute{"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/instances", appInstanceUnhealthyPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - appInstances, err := client.GetAppInstances("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - - So(appInstances["0"].State, ShouldEqual, "RUNNING") - So(appInstances["1"].State, ShouldEqual, "STARTING") - - var d0 float64 = 1455210430.5104606 - var d1 float64 = 1455210430.3912115 - date0 := time.Unix(int64(d0), 0) - date1 := time.Unix(int64(d1), 0) - - So(appInstances["0"].Since.Format(time.UnixDate), ShouldEqual, date0.Format(time.UnixDate)) - So(appInstances["1"].Since.Format(time.UnixDate), ShouldEqual, date1.Format(time.UnixDate)) - So(appInstances["0"].Since.ToTime(), ShouldHaveSameTypeAs, date0) - So(appInstances["1"].Since.ToTime(), ShouldHaveSameTypeAs, date1) - - }) -} - -func TestGetAppStats(t *testing.T) { - Convey("App stats completely running", t, func() { - setup(MockRoute{"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/stats", appStatsPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - appStats, err := client.GetAppStats("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - - So(appStats["0"].State, ShouldEqual, "RUNNING") - So(appStats["1"].State, ShouldEqual, "RUNNING") - So(appStats["2"].State, ShouldEqual, "RUNNING") - So(appStats["3"].State, ShouldEqual, "RUNNING") - - date0, _ := time.Parse("2006-01-02 15:04:05 -0700", "2016-09-17 15:46:17 +0000") - date1, _ := time.Parse("2006-01-02 15:04:05 -0700", "2016-09-17 15:46:17 +0000") - date2, _ := time.Parse(time.RFC3339Nano, "2017-04-06T20:32:19.273294439Z") - date3, _ := time.Parse("2006-01-02 15:04:05 MST", "2017-04-12 15:27:44 UTC") - - So(appStats["0"].Stats.Usage.Time.Format(time.UnixDate), ShouldEqual, date0.Format(time.UnixDate)) - So(appStats["1"].Stats.Usage.Time.Format(time.RFC3339), ShouldEqual, date1.Format(time.RFC3339)) - So(appStats["2"].Stats.Usage.Time.Format(time.RFC3339Nano), ShouldEqual, date2.Format(time.RFC3339Nano)) - So(appStats["3"].Stats.Usage.Time.Format("2006-01-02 15:04:05 MST"), ShouldEqual, date3.Format("2006-01-02 15:04:05 MST")) - So(appStats["0"].Stats.Usage.Time.ToTime(), ShouldHaveSameTypeAs, date0) - So(appStats["1"].Stats.Usage.Time.ToTime(), ShouldHaveSameTypeAs, date1) - So(appStats["2"].Stats.Usage.Time.ToTime(), ShouldHaveSameTypeAs, date2) - So(appStats["3"].Stats.Usage.Time.ToTime(), ShouldHaveSameTypeAs, date3) - So(appStats["0"].Stats.Usage.CPU, ShouldEqual, 0.36580239597146486) - So(appStats["1"].Stats.Usage.CPU, ShouldEqual, 0.33857742931636664) - So(appStats["2"].Stats.Usage.CPU, ShouldEqual, 0.33857742931636664) - So(appStats["3"].Stats.Usage.CPU, ShouldEqual, 0.33857742931636664) - So(appStats["0"].Stats.Usage.Mem, ShouldEqual, 518123520) - So(appStats["1"].Stats.Usage.Mem, ShouldEqual, 530731008) - So(appStats["2"].Stats.Usage.Mem, ShouldEqual, 530731008) - So(appStats["3"].Stats.Usage.Mem, ShouldEqual, 530731008) - So(appStats["0"].Stats.Usage.Disk, ShouldEqual, 151150592) - So(appStats["1"].Stats.Usage.Disk, ShouldEqual, 151150592) - So(appStats["2"].Stats.Usage.Disk, ShouldEqual, 151150592) - So(appStats["3"].Stats.Usage.Disk, ShouldEqual, 151150592) - - }) -} - -func TestGetAppRoutes(t *testing.T) { - Convey("List app routes", t, func() { - setup(MockRoute{"GET", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/routes", appRoutesPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - routes, err := client.GetAppRoutes("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - - So(len(routes), ShouldEqual, 1) - So(routes[0].Guid, ShouldEqual, "311d34d1-c045-4853-845f-05132377ad7d") - So(routes[0].Host, ShouldEqual, "host-36") - So(routes[0].Path, ShouldEqual, "/foo") - So(routes[0].DomainGuid, ShouldEqual, "40a499f7-198a-4289-9aa2-605ba43f92ee") - So(routes[0].SpaceGuid, ShouldEqual, "c7c0dd06-b078-43d7-adcb-3974cd785fdd") - So(routes[0].ServiceInstanceGuid, ShouldEqual, "") - So(routes[0].Port, ShouldEqual, 0) - - }) -} - -func TestUploadAppBits(t *testing.T) { - Convey("Upload app bits", t, func() { - expectedPayload := "this should really be zipped binary data" - mr := MockRoute{ - Method: "PUT-FILE", - Endpoint: "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/bits", - Status: 201, - PostForm: &expectedPayload, - } - setup(mr, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - bits := bytes.NewBufferString(expectedPayload) - err = client.UploadAppBits(bits, "9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - }) -} - -func TestGetAppBits(t *testing.T) { - Convey("Get app bits", t, func() { - - next := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - w.Header().Set("Content-Type", "application/gzip") - w.WriteHeader(http.StatusOK) - w.Write([]byte("apptarbinarydata")) - }) - s := httptest.NewServer(next) - defer s.Close() - - mr := MockRouteWithRedirect{ - MockRoute: MockRoute{ - Method: "GET", - Endpoint: "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/download", - Status: 302, - }, - RedirectLocation: s.URL, - } - setupWithRedirect(mr, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - bits, err := client.GetAppBits("9902530c-c634-4864-a189-71d763cb12e2") - So(err, ShouldBeNil) - So(bits, ShouldNotBeNil) - - var download string - if b, err := ioutil.ReadAll(bits); err == nil { - download = string(b) - } - So(download, ShouldEqual, "apptarbinarydata") - }) -} - -func TestKillAppInstance(t *testing.T) { - Convey("Kills an app instance", t, func() { - setup(MockRoute{"DELETE", "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/instances/0", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - So(client.KillAppInstance("9902530c-c634-4864-a189-71d763cb12e2", "0"), ShouldBeNil) - }) -} - -func TestAppEnv(t *testing.T) { - Convey("Find app space", t, func() { - setup(MockRoute{"GET", "/v2/apps/a7c47787-a982-467c-95d7-9ab17cbcc918/env", appEnvPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - appEnv, err := client.GetAppEnv("a7c47787-a982-467c-95d7-9ab17cbcc918") - So(err, ShouldBeNil) - So(appEnv.StagingEnv, ShouldResemble, map[string]interface{}{"STAGING_ENV": "staging_value"}) - So(appEnv.RunningEnv, ShouldResemble, map[string]interface{}{"RUNNING_ENV": "running_value"}) - So(appEnv.Environment, ShouldResemble, map[string]interface{}{"env_var": "env_val"}) - So(appEnv.SystemEnv["VCAP_SERVICES"].(map[string]interface{})["abc"], ShouldEqual, 123) - So(appEnv.ApplicationEnv["VCAP_APPLICATION"].(map[string]interface{})["application_name"], ShouldEqual, "name-2245") - }) -} - -func TestAppSummary(t *testing.T) { - Convey("Get app summary", t, func() { - setup(MockRoute{"GET", "/v2/apps/b5f0d1bd-a3a9-40a4-af1a-312ad26e5379/summary", appSummaryPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - app := &App{ - Guid: "b5f0d1bd-a3a9-40a4-af1a-312ad26e5379", - c: client, - } - - summary, err := app.Summary() - So(err, ShouldBeNil) - - So(summary.Guid, ShouldEqual, "b5f0d1bd-a3a9-40a4-af1a-312ad26e5379") - So(summary.Name, ShouldEqual, "test-app") - So(summary.ServiceCount, ShouldEqual, 1) - So(summary.RunningInstances, ShouldEqual, 1) - So(summary.SpaceGuid, ShouldEqual, "494d8b64-8181-4183-a6d3-6279db8fec6e") - So(summary.StackGuid, ShouldEqual, "67e019a3-322a-407a-96e0-178e95bd0e55") - So(summary.Buildpack, ShouldEqual, "ruby_buildpack") - So(summary.DetectedBuildpack, ShouldEqual, "") - So(summary.Memory, ShouldEqual, 256) - So(summary.Instances, ShouldEqual, 1) - So(summary.DiskQuota, ShouldEqual, 512) - So(summary.State, ShouldEqual, "STARTED") - So(summary.Command, ShouldEqual, "") - So(summary.PackageState, ShouldEqual, "STAGED") - So(summary.HealthCheckType, ShouldEqual, "port") - So(summary.HealthCheckTimeout, ShouldEqual, 0) - So(summary.StagingFailedReason, ShouldEqual, "") - So(summary.StagingFailedDescription, ShouldEqual, "") - So(summary.Diego, ShouldEqual, true) - So(summary.DockerImage, ShouldEqual, "") - So(summary.DetectedStartCommand, ShouldEqual, "rackup -p $PORT") - So(summary.EnableSSH, ShouldEqual, true) - So(summary.DockerCredentials["redacted_message"], ShouldEqual, "[PRIVATE DATA HIDDEN]") - }) -} - -func TestAppSpace(t *testing.T) { - Convey("Find app space", t, func() { - setup(MockRoute{"GET", "/v2/spaces/foobar", spacePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - app := &App{ - Guid: "123", - Name: "test app", - SpaceURL: "/v2/spaces/foobar", - c: client, - } - space, err := app.Space() - So(err, ShouldBeNil) - - So(space.Name, ShouldEqual, "test-space") - So(space.Guid, ShouldEqual, "a72fa1e8-c694-47b3-85f2-55f61fd00d73") - }) -} - -func TestDeleteApps(t *testing.T) { - Convey("Delete app", t, func() { - setup(MockRoute{"DELETE", "/v2/apps/a537761f-9d93-4b30-af17-3d73dbca181b", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteApp("a537761f-9d93-4b30-af17-3d73dbca181b") - So(err, ShouldBeNil) - }) -} - -func TestCreateApp(t *testing.T) { - Convey("Delete app", t, func() { - setup(MockRoute{"POST", "/v2/apps", appPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - req := AppCreateRequest{ - Name: "test-env", - SpaceGuid: "a72fa1e8-c694-47b3-85f2-55f61fd00d73", - } - app, err := client.CreateApp(req) - So(err, ShouldBeNil) - So(app.Guid, ShouldEqual, "9902530c-c634-4864-a189-71d763cb12e2") - So(app.Name, ShouldEqual, "test-env") - So(app.SpaceGuid, ShouldEqual, "a72fa1e8-c694-47b3-85f2-55f61fd00d73") - }) -} - -func TestStartApp(t *testing.T) { - Convey("Start app", t, func() { - expectedBody := `{ "state": "STARTED" }` - setup(MockRoute{"PUT", "/v2/apps/a537761f-9d93-4b30-af17-3d73dbca181b", appPayload, "", http.StatusCreated, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - So(client.StartApp("a537761f-9d93-4b30-af17-3d73dbca181b"), ShouldBeNil) - }) -} - -func TestStopApp(t *testing.T) { - Convey("Stop app", t, func() { - expectedBody := `{ "state": "STOPPED" }` - setup(MockRoute{"PUT", "/v2/apps/a537761f-9d93-4b30-af17-3d73dbca181b", appPayload, "", http.StatusCreated, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - So(client.StopApp("a537761f-9d93-4b30-af17-3d73dbca181b"), ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/buildpacks_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/buildpacks_test.go deleted file mode 100644 index f4c328c2..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/buildpacks_test.go +++ /dev/null @@ -1,375 +0,0 @@ -package cfclient - -import ( - "bytes" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListBuildpacks(t *testing.T) { - Convey("List buildpack", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/buildpacks", listBuildpacksPayload, "", 200, "", nil}, - {"GET", "/v2/buildpacksPage2", listBuildpacksPayload2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpacks, err := client.ListBuildpacks() - So(err, ShouldBeNil) - - So(len(buildpacks), ShouldEqual, 6) - So(buildpacks[0].Guid, ShouldEqual, "c92b6f5f-d2a4-413a-b515-647d059723aa") - So(buildpacks[0].CreatedAt, ShouldEqual, "2016-06-08T16:41:31Z") - So(buildpacks[0].UpdatedAt, ShouldEqual, "2016-06-08T16:41:26Z") - So(buildpacks[0].Name, ShouldEqual, "name_1") - So(buildpacks[0].Stack, ShouldEqual, "cflinuxfs2") - }) -} - -func TestGetBuildpackByGuid(t *testing.T) { - Convey("A buildpack", t, func() { - setup(MockRoute{"GET", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack, err := client.GetBuildpackByGuid("c92b6f5f-d2a4-413a-b515-647d059723aa") - So(err, ShouldBeNil) - - So(buildpack.Guid, ShouldEqual, "c92b6f5f-d2a4-413a-b515-647d059723aa") - So(buildpack.CreatedAt, ShouldEqual, "2016-06-08T16:41:31Z") - So(buildpack.UpdatedAt, ShouldEqual, "2016-06-08T16:41:26Z") - So(buildpack.Name, ShouldEqual, "name_1") - So(buildpack.Stack, ShouldEqual, "cflinuxfs2") - }) - Convey("A buildpack with no stack", t, func() { - setup(MockRoute{"GET", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackPayloadBackwardsCompat, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack, err := client.GetBuildpackByGuid("c92b6f5f-d2a4-413a-b515-647d059723aa") - So(err, ShouldBeNil) - - So(buildpack.Guid, ShouldEqual, "c92b6f5f-d2a4-413a-b515-647d059723aa") - So(buildpack.CreatedAt, ShouldEqual, "2016-06-08T16:41:31Z") - So(buildpack.UpdatedAt, ShouldEqual, "2016-06-08T16:41:26Z") - So(buildpack.Name, ShouldEqual, "name_1") - So(buildpack.Stack, ShouldEqual, "") - }) -} - -func TestUploadBuildpack(t *testing.T) { - Convey("Uploading a buildpack succeeds", t, func() { - expectedPayload := "this should really be zipped binary data" - setup(MockRoute{"PUT-FILE", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa/bits", buildpackUploadPayload, "", 200, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - bits := bytes.NewBufferString(expectedPayload) - buildpack := Buildpack{Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", c: client} - err = buildpack.Upload(bits, "test.zip") - So(err, ShouldBeNil) - }) - Convey("Uploading a buildpack throws an error in the event of failure", t, func() { - expectedPayload := "this should really be zipped binary data" - setup(MockRoute{"PUT-FILE", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa/bits", buildpackUploadPayload, "", 400, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - bits := bytes.NewBufferString(expectedPayload) - buildpack := Buildpack{Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", c: client} - err = buildpack.Upload(bits, "test.zip") - So(err, ShouldNotBeNil) - }) -} - -func TestUpdateBuildpack(t *testing.T) { - Convey("Updating a buildpack succeeds", t, func() { - expectedPayload := `{"name":"renamed-buildpack","enabled":true,"locked":true,"position":100}` - setup(MockRoute{"PUT", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackUpdatePayload, "", 200, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack := Buildpack{ - Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", - c: client, - } - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetName("renamed-buildpack") - buildpackRequest.Lock() - buildpackRequest.Enable() - buildpackRequest.SetPosition(100) - - err = buildpack.Update(buildpackRequest) - So(err, ShouldBeNil) - }) - Convey("Updating a buildpack doesn't accidentally unlock, rename, disable, or reorder the buildpack", t, func() { - expectedPayload := `{}` - setup(MockRoute{"PUT", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackUpdatePayload, "", 200, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack := Buildpack{ - Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", - c: client, - } - buildpackRequest := &BuildpackRequest{} - - err = buildpack.Update(buildpackRequest) - So(err, ShouldBeNil) - }) - Convey("Unlocking, disabling, reordering to 0, and removing name from buildpacks is still possible", t, func() { - expectedPayload := `{"name":"","enabled":false,"locked":false,"position":0}` - setup(MockRoute{"PUT", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackUpdatePayload, "", 200, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack := Buildpack{ - Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", - c: client, - } - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetName("") - buildpackRequest.Unlock() - buildpackRequest.Disable() - buildpackRequest.SetPosition(0) - - err = buildpack.Update(buildpackRequest) - So(err, ShouldBeNil) - }) - Convey("Updating a buildpack returns an error in the event of failure", t, func() { - expectedPayload := `{}` - setup(MockRoute{"PUT", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackUpdatePayload, "", 400, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack := Buildpack{ - Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", - c: client, - } - - buildpackRequest := &BuildpackRequest{} - - err = buildpack.Update(buildpackRequest) - So(err, ShouldNotBeNil) - }) - Convey("It is possible to update a buildpack stack from null, to a value", t, func() { - expectedPayload := `{"stack":"cflinuxfs2"}` - setup(MockRoute{"PUT", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackUpdatePayload, "", 400, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack := Buildpack{ - Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", - c: client, - } - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetStack("cflinuxfs2") - err = buildpack.Update(buildpackRequest) - So(err, ShouldNotBeNil) - }) - Convey("Updating without a stack specified doesn't change anything", t, func() { - expectedPayload := `{"name":"new-name"}` - setup(MockRoute{"PUT", "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", buildpackUpdatePayload, "", 400, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpack := Buildpack{ - Guid: "c92b6f5f-d2a4-413a-b515-647d059723aa", - c: client, - } - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetName("new-name") - err = buildpack.Update(buildpackRequest) - So(err, ShouldNotBeNil) - }) -} - -func TestCreateBuildpack(t *testing.T) { - Convey("Creating a buildpack succeeds", t, func() { - expectedPayload := `{"name":"test-buildpack","enabled":true,"locked":true,"position":10,"stack":"cflinuxfs2"}` - setup(MockRoute{"POST", "/v2/buildpacks", buildpackCreatePayload, "", 200, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetName("test-buildpack") - buildpackRequest.Lock() - buildpackRequest.Enable() - buildpackRequest.SetPosition(10) - buildpackRequest.SetStack("cflinuxfs2") - - bp, err := client.CreateBuildpack(buildpackRequest) - So(err, ShouldBeNil) - So(bp.Guid, ShouldEqual, "c92b6f5f-d2a4-413a-b515-647d059723aa") - So(bp.Name, ShouldEqual, "test-buildpack") - So(bp.Enabled, ShouldBeTrue) - So(bp.Locked, ShouldBeFalse) - So(bp.Position, ShouldEqual, 10) - So(bp.Stack, ShouldEqual, "cflinuxfs2") - }) - Convey("Creating a buildpack doesn't accidentally unlock, rename, disable, or reorder the buildpack", t, func() { - expectedPayload := `{"name":"test-buildpack"}` - setup(MockRoute{"POST", "/v2/buildpacks", buildpackCreatePayload, "", 200, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetName("test-buildpack") - - bp, err := client.CreateBuildpack(buildpackRequest) - So(err, ShouldBeNil) - So(bp, ShouldNotBeNil) - }) - Convey("Creating a buildpack as unlocked/disabled/order 0 works", t, func() { - expectedPayload := `{"name":"test-buildpack","enabled":false,"locked":false,"position":0}` - setup(MockRoute{"POST", "/v2/buildpacks", buildpackCreatePayload, "", 200, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetName("test-buildpack") - buildpackRequest.Unlock() - buildpackRequest.Disable() - buildpackRequest.SetPosition(0) - - bp, err := client.CreateBuildpack(buildpackRequest) - So(err, ShouldBeNil) - So(bp, ShouldNotBeNil) - }) - Convey("Creating a buildpack returns an error in the event of failure", t, func() { - expectedPayload := `{"name":"test-buildpack"}` - setup(MockRoute{"POST", "/v2/buildpacks", buildpackCreatePayload, "", 400, "", &expectedPayload}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpackRequest := &BuildpackRequest{} - buildpackRequest.SetName("test-buildpack") - - bp, err := client.CreateBuildpack(buildpackRequest) - So(err, ShouldNotBeNil) - So(bp, ShouldBeNil) - }) - Convey("Creating a buildpack fails if the request has no name set", t, func() { - setup(MockRoute{"POST", "/v2/buildpacks", buildpackCreatePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - buildpackRequest := &BuildpackRequest{} - bp, err := client.CreateBuildpack(buildpackRequest) - So(err, ShouldNotBeNil) - So(bp, ShouldBeNil) - }) -} - -func TestDeleteBuildpack(t *testing.T) { - Convey("Delete buildpack synchronously", t, func() { - setup(MockRoute{"DELETE", "/v2/buildpacks/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", "", "", 204, "async=false", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteBuildpack("b2a35f0c-d5ad-4a59-bea7-461711d96b0d", false) - So(err, ShouldBeNil) - }) - - Convey("Delete buildpack asynchronously", t, func() { - setup(MockRoute{"DELETE", "/v2/buildpacks/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", "", "", 202, "async=true", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteBuildpack("b2a35f0c-d5ad-4a59-bea7-461711d96b0d", true) - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/cf_error_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/cf_error_test.go deleted file mode 100644 index 706fe2b9..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/cf_error_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package cfclient - -import ( - stderrors "errors" - "testing" - - pkgerrors "github.com/pkg/errors" -) - -func TestIsSpaceNotFoundError(t *testing.T) { - tests := []struct { - name string - error - want bool - }{ - {"std/errors error", stderrors.New("is not"), false}, - {"pkg/errors error", pkgerrors.New("is not"), false}, - {"unwrapped CloudFoundry error", CloudFoundryError{ - Code: 40004, - }, true}, - {"wrapped CloudFoundry error", pkgerrors.Wrap(CloudFoundryError{ - Code: 40004, - }, ""), true}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := IsSpaceNotFoundError(tt.error) - if got != tt.want { - t.Errorf("got %v, want %v", got, tt.want) - } - }) - } -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/cf_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/cf_test.go deleted file mode 100644 index 65010ae8..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/cf_test.go +++ /dev/null @@ -1,212 +0,0 @@ -package cfclient - -import ( - "io/ioutil" - "net/http" - "net/http/httptest" - "net/url" - "strconv" - "strings" - "testing" - - _ "github.com/onsi/gomega" - - "github.com/go-martini/martini" - "github.com/martini-contrib/render" -) - -var ( - mux *http.ServeMux - server *httptest.Server - fakeUAAServer *httptest.Server -) - -type MockRoute struct { - Method string - Endpoint string - Output string - UserAgent string - Status int - QueryString string - PostForm *string -} - -type MockRouteWithRedirect struct { - MockRoute - RedirectLocation string -} - -func setup(mock MockRoute, t *testing.T) { - setupMultiple([]MockRoute{mock}, t) -} - -func setupWithRedirect(mock MockRouteWithRedirect, t *testing.T) { - setupMultipleWithRedirect([]MockRouteWithRedirect{mock}, t) -} - -func testQueryString(QueryString string, QueryStringExp string, t *testing.T) { - value, _ := url.QueryUnescape(QueryString) - - if QueryStringExp != value { - t.Fatalf("Error: Query string '%s' should be equal to '%s'", QueryStringExp, value) - } -} - -func testUserAgent(UserAgent string, UserAgentExp string, t *testing.T) { - if len(UserAgentExp) < 1 { - UserAgentExp = "Go-CF-client/1.1" - } - if UserAgent != UserAgentExp { - t.Fatalf("Error: Agent %s should be equal to %s", UserAgent, UserAgentExp) - } -} - -func testReqBody(req *http.Request, postFormBody *string, t *testing.T) { - if postFormBody != nil { - if body, err := ioutil.ReadAll(req.Body); err != nil { - t.Fatal("No request body but expected one") - } else { - defer req.Body.Close() - if strings.TrimSpace(string(body)) != strings.TrimSpace(*postFormBody) { - t.Fatalf("Expected request body (%s) does not equal request body (%s)", *postFormBody, body) - } - } - } -} - -func testBodyContains(req *http.Request, expected *string, t *testing.T) { - if expected != nil { - if body, err := ioutil.ReadAll(req.Body); err != nil { - t.Fatal("No request body but expected one") - } else { - defer req.Body.Close() - if !strings.Contains(string(body), *expected) { - t.Fatalf("Expected request body (%s) was not found in actual request body (%s)", *expected, body) - } - } - } -} - -func setupMultiple(mockEndpoints []MockRoute, t *testing.T) { - mockEndpointsWithRedirect := make([]MockRouteWithRedirect, len(mockEndpoints)) - for i, mock := range mockEndpoints { - mockEndpointsWithRedirect[i] = MockRouteWithRedirect{ - MockRoute: mock, - RedirectLocation: "", - } - } - setupMultipleWithRedirect(mockEndpointsWithRedirect, t) -} - -func setupMultipleWithRedirect(mockEndpoints []MockRouteWithRedirect, t *testing.T) { - mux = http.NewServeMux() - server = httptest.NewServer(mux) - fakeUAAServer = FakeUAAServer(3) - m := martini.New() - m.Use(render.Renderer()) - r := martini.NewRouter() - for _, mock := range mockEndpoints { - method := mock.Method - endpoint := mock.Endpoint - output := mock.Output - userAgent := mock.UserAgent - status := mock.Status - queryString := mock.QueryString - postFormBody := mock.PostForm - redirectLocation := mock.RedirectLocation - if method == "GET" { - r.Get(endpoint, func(res http.ResponseWriter, req *http.Request) (int, string) { - testUserAgent(req.Header.Get("User-Agent"), userAgent, t) - testQueryString(req.URL.RawQuery, queryString, t) - if redirectLocation != "" { - res.Header().Add("Location", redirectLocation) - } - return status, output - }) - } else if method == "POST" { - r.Post(endpoint, func(req *http.Request) (int, string) { - testUserAgent(req.Header.Get("User-Agent"), userAgent, t) - testQueryString(req.URL.RawQuery, queryString, t) - testReqBody(req, postFormBody, t) - return status, output - }) - } else if method == "DELETE" { - r.Delete(endpoint, func(req *http.Request) (int, string) { - testUserAgent(req.Header.Get("User-Agent"), userAgent, t) - testQueryString(req.URL.RawQuery, queryString, t) - return status, output - }) - } else if method == "PUT" { - r.Put(endpoint, func(req *http.Request) (int, string) { - testUserAgent(req.Header.Get("User-Agent"), userAgent, t) - testQueryString(req.URL.RawQuery, queryString, t) - testReqBody(req, postFormBody, t) - return status, output - }) - } else if method == "PATCH" { - r.Patch(endpoint, func(req *http.Request) (int, string) { - testUserAgent(req.Header.Get("User-Agent"), userAgent, t) - testQueryString(req.URL.RawQuery, queryString, t) - testReqBody(req, postFormBody, t) - return status, output - }) - } else if method == "PUT-FILE" { - r.Put(endpoint, func(req *http.Request) (int, string) { - testUserAgent(req.Header.Get("User-Agent"), userAgent, t) - testBodyContains(req, postFormBody, t) - return status, output - }) - } - } - r.Get("/v2/info", func(r render.Render) { - r.JSON(200, map[string]interface{}{ - "authorization_endpoint": fakeUAAServer.URL, - "token_endpoint": fakeUAAServer.URL, - "logging_endpoint": server.URL, - "name": "", - "build": "", - "support": "https://support.example.net", - "version": 0, - "description": "", - "min_cli_version": "6.23.0", - "min_recommended_cli_version": "6.23.0", - "api_version": "2.103.0", - "app_ssh_endpoint": "ssh.example.net:2222", - "app_ssh_host_key_fingerprint": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01", - "app_ssh_oauth_client": "ssh-proxy", - "doppler_logging_endpoint": "wss://doppler.example.net:443", - "routing_endpoint": "https://api.example.net/routing", - }) - - }) - - m.Action(r.Handle) - mux.Handle("/", m) -} - -func FakeUAAServer(expiresIn int) *httptest.Server { - mux := http.NewServeMux() - server := httptest.NewServer(mux) - m := martini.New() - m.Use(render.Renderer()) - r := martini.NewRouter() - count := 1 - r.Post("/oauth/token", func(r render.Render) { - r.JSON(200, map[string]interface{}{ - "token_type": "bearer", - "access_token": "foobar" + strconv.Itoa(count), - "refresh_token": "barfoo", - "expires_in": expiresIn, - }) - count = count + 1 - }) - r.NotFound(func() string { return "" }) - m.Action(r.Handle) - mux.Handle("/", m) - return server -} - -func teardown() { - server.Close() - fakeUAAServer.Close() -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/client_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/client_test.go deleted file mode 100644 index 50368e4a..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/client_test.go +++ /dev/null @@ -1,161 +0,0 @@ -package cfclient - -import ( - "net/http" - "testing" - "time" - - "github.com/onsi/gomega" - . "github.com/smartystreets/goconvey/convey" -) - -func TestDefaultConfig(t *testing.T) { - Convey("Default config", t, func() { - c := DefaultConfig() - So(c.ApiAddress, ShouldEqual, "http://api.bosh-lite.com") - So(c.Username, ShouldEqual, "admin") - So(c.Password, ShouldEqual, "admin") - So(c.SkipSslValidation, ShouldEqual, false) - So(c.Token, ShouldEqual, "") - So(c.UserAgent, ShouldEqual, "Go-CF-client/1.1") - }) -} - -func TestRemovalofTrailingSlashOnAPIAddress(t *testing.T) { - Convey("Test removal of trailing slash of the API Address", t, func() { - setup(MockRoute{"GET", "/v2/organizations", listOrgsPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL + "/", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - So(client.Config.ApiAddress, ShouldNotEndWith, "/") - }) -} - -func TestMakeRequest(t *testing.T) { - Convey("Test making request b", t, func() { - setup(MockRoute{"GET", "/v2/organizations", listOrgsPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Username: "foo", - Password: "bar", - SkipSslValidation: true, - } - client, err := NewClient(c) - So(err, ShouldBeNil) - req := client.NewRequest("GET", "/v2/organizations") - resp, err := client.DoRequest(req) - So(err, ShouldBeNil) - So(resp, ShouldNotBeNil) - }) -} - -func TestMakeRequestFailure(t *testing.T) { - Convey("Test making request b", t, func() { - setup(MockRoute{"GET", "/v2/organizations", listOrgsPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Username: "foo", - Password: "bar", - SkipSslValidation: true, - } - client, err := NewClient(c) - So(err, ShouldBeNil) - req := client.NewRequest("GET", "/v2/organizations") - req.url = "%gh&%ij" - resp, err := client.DoRequest(req) - So(resp, ShouldBeNil) - So(err, ShouldNotBeNil) - }) -} - -func TestMakeRequestWithTimeout(t *testing.T) { - Convey("Test making request b", t, func() { - setup(MockRoute{"GET", "/v2/organizations", listOrgsPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Username: "foo", - Password: "bar", - SkipSslValidation: true, - HttpClient: &http.Client{Timeout: 10 * time.Nanosecond}, - } - client, err := NewClient(c) - So(err, ShouldNotBeNil) - So(client, ShouldBeNil) - }) -} - -func TestHTTPErrorHandling(t *testing.T) { - Convey("Test making request b", t, func() { - setup(MockRoute{"GET", "/v2/organizations", "502 Bad Gateway", "", 502, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Username: "foo", - Password: "bar", - SkipSslValidation: true, - } - client, err := NewClient(c) - So(err, ShouldBeNil) - req := client.NewRequest("GET", "/v2/organizations") - resp, err := client.DoRequest(req) - So(err, ShouldNotBeNil) - So(resp, ShouldNotBeNil) - - httpErr := err.(CloudFoundryHTTPError) - So(httpErr.StatusCode, ShouldEqual, 502) - So(httpErr.Status, ShouldEqual, "502 Bad Gateway") - So(string(httpErr.Body), ShouldEqual, "502 Bad Gateway") - }) -} - -func TestTokenRefresh(t *testing.T) { - gomega.RegisterTestingT(t) - Convey("Test making request", t, func() { - setup(MockRoute{"GET", "/v2/organizations", listOrgsPayload, "", 200, "", nil}, t) - fakeUAAServer = FakeUAAServer(1) - c := &Config{ - ApiAddress: server.URL, - Username: "foo", - Password: "bar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - token, err := client.GetToken() - So(err, ShouldBeNil) - - gomega.Consistently(token).Should(gomega.Equal("bearer foobar2")) - gomega.Eventually(func() string { token, _ := client.GetToken(); return token }, "2s").Should(gomega.Equal("bearer foobar3")) - }) -} - -func TestEndpointRefresh(t *testing.T) { - gomega.RegisterTestingT(t) - Convey("Test expiring endpoint", t, func() { - setup(MockRoute{"GET", "/v2/organizations", listOrgsPayload, "", 200, "", nil}, t) - fakeUAAServer = FakeUAAServer(0) - - c := &Config{ - ApiAddress: server.URL, - Username: "foo", - Password: "bar", - } - - client, err := NewClient(c) - So(err, ShouldBeNil) - - lastTokenSource := client.Config.TokenSource - for i := 1; i < 5; i++ { - _, err := client.GetToken() - So(err, ShouldBeNil) - So(client.Config.TokenSource, ShouldNotEqual, lastTokenSource) - lastTokenSource = client.Config.TokenSource - } - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/domains_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/domains_test.go deleted file mode 100644 index a44267ae..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/domains_test.go +++ /dev/null @@ -1,258 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListDomains(t *testing.T) { - Convey("List domains", t, func() { - setup(MockRoute{"GET", "/v2/private_domains", listDomainsPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domains, err := client.ListDomains() - So(err, ShouldBeNil) - - So(len(domains), ShouldEqual, 4) - So(domains[0].Guid, ShouldEqual, "b2a35f0c-d5ad-4a59-bea7-461711d96b0d") - So(domains[0].Name, ShouldEqual, "vcap.me") - So(domains[0].OwningOrganizationGuid, ShouldEqual, "4cf3bc47-eccd-4662-9322-7833c3bdcded") - So(domains[0].OwningOrganizationUrl, ShouldEqual, "/v2/organizations/4cf3bc47-eccd-4662-9322-7833c3bdcded") - So(domains[0].SharedOrganizationsUrl, ShouldEqual, "/v2/private_domains/b2a35f0c-d5ad-4a59-bea7-461711d96b0d/shared_organizations") - }) -} - -func TestListSharedDomains(t *testing.T) { - Convey("List shared domains", t, func() { - setup(MockRoute{"GET", "/v2/shared_domains", listSharedDomainsPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domains, err := client.ListSharedDomains() - So(err, ShouldBeNil) - - So(len(domains), ShouldEqual, 1) - So(domains[0].Guid, ShouldEqual, "91977695-8ad9-40db-858f-4df782603ec3") - So(domains[0].Name, ShouldEqual, "domain-49.example.com") - So(domains[0].RouterGroupGuid, ShouldEqual, "my-random-guid") - So(domains[0].RouterGroupType, ShouldEqual, "tcp") - }) - - Convey("List shared domain by guid", t, func() { - setup(MockRoute{"GET", "/v2/shared_domains/91977695-8ad9-40db-858f-4df782603ec3", listSharedDomainByGuidPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domain, err := client.GetSharedDomainByGuid("91977695-8ad9-40db-858f-4df782603ec3") - So(err, ShouldBeNil) - - So(domain.Guid, ShouldEqual, "91977695-8ad9-40db-858f-4df782603ec3") - So(domain.Name, ShouldEqual, "apps.some.random.cf.installation.example.com") - }) - -} - -func TestGetDomainByName(t *testing.T) { - Convey("Get domain by name", t, func() { - setup(MockRoute{"GET", "/v2/private_domains", listDomainsPayload, "", 200, "q=name:vcap.me", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domain, err := client.GetDomainByName("vcap.me") - So(err, ShouldBeNil) - - So(domain.Guid, ShouldEqual, "b2a35f0c-d5ad-4a59-bea7-461711d96b0d") - So(domain.Name, ShouldEqual, "vcap.me") - }) - Convey("Get domain by name with an endpoint that returns a 404", t, func() { - setup(MockRoute{"GET", "/v2/private_domains", listDomainsEmptyResponse, "", 404, "q=name:vcap.me", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - _, listErr := client.GetDomainByName("vcap.me") - So(listErr, ShouldNotBeNil) - }) - Convey("Get domain by name for a non-existing domain", t, func() { - setup(MockRoute{"GET", "/v2/private_domains", listDomainsEmptyResponse, "", 200, "q=name:idontexist", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - _, listErr := client.GetDomainByName("idontexist") - So(listErr, ShouldNotBeNil) - }) -} - -func TestGetSharedDomainByName(t *testing.T) { - Convey("Get shared domain by name", t, func() { - setup(MockRoute{"GET", "/v2/shared_domains", listSharedDomainsPayload, "", 200, "q=name:domain-49.example.com", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domain, err := client.GetSharedDomainByName("domain-49.example.com") - So(err, ShouldBeNil) - - So(domain.Guid, ShouldEqual, "91977695-8ad9-40db-858f-4df782603ec3") - So(domain.Name, ShouldEqual, "domain-49.example.com") - }) - Convey("Get shared domain by name with an endpoint that returns a 404", t, func() { - setup(MockRoute{"GET", "/v2/shared_domains", listDomainsEmptyResponse, "", 404, "q=name:domain-49.example.com", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - _, listErr := client.GetSharedDomainByName("domain-49.example.com") - So(listErr, ShouldNotBeNil) - }) - Convey("Get shared domain by name for a non-existing domain", t, func() { - setup(MockRoute{"GET", "/v2/shared_domains", listDomainsEmptyResponse, "", 200, "q=name:idontexist", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - _, listErr := client.GetSharedDomainByName("idontexist") - So(listErr, ShouldNotBeNil) - }) -} - -func TestCreateDomain(t *testing.T) { - Convey("Create domain", t, func() { - setup(MockRoute{"POST", "/v2/private_domains", postDomainPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domain, err := client.CreateDomain("exmaple.com", "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db") - So(err, ShouldBeNil) - - So(domain.Guid, ShouldEqual, "b98aeca1-22b9-49f9-8428-3ace9ea2ba11") - }) -} - -func TestCreateSharedDomain(t *testing.T) { - Convey("Create external shared domain", t, func() { - setup(MockRoute{"POST", "/v2/shared_domains", postExternalSharedDomainPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domain, err := client.CreateSharedDomain("shared-example.com", false, "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db") - So(err, ShouldBeNil) - So(domain.Internal, ShouldBeFalse) - So(domain.RouterGroupType, ShouldEqual, "tcp") - }) - - Convey("Create external shared domain", t, func() { - setup(MockRoute{"POST", "/v2/shared_domains", postInternalSharedDomainPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domain, err := client.CreateSharedDomain("shared-example.com", false, "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db") - So(err, ShouldBeNil) - So(domain.Internal, ShouldBeTrue) - So(domain.RouterGroupType, ShouldBeBlank) - }) -} - -func TestDeleteDomain(t *testing.T) { - Convey("Delete domain", t, func() { - setup(MockRoute{"DELETE", "/v2/private_domains/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteDomain("b2a35f0c-d5ad-4a59-bea7-461711d96b0d") - So(err, ShouldBeNil) - }) -} - -func TestDeleteSharedDomain(t *testing.T) { - Convey("Delete shared domain synchronously", t, func() { - setup(MockRoute{"DELETE", "/v2/shared_domains/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", "", "", 204, "async=false", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteSharedDomain("b2a35f0c-d5ad-4a59-bea7-461711d96b0d", false) - So(err, ShouldBeNil) - }) - - Convey("Delete shared domain synchronously", t, func() { - setup(MockRoute{"DELETE", "/v2/shared_domains/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", "", "", 202, "async=true", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteSharedDomain("b2a35f0c-d5ad-4a59-bea7-461711d96b0d", true) - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/environmentvariablegroups_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/environmentvariablegroups_test.go deleted file mode 100644 index 014bf6a5..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/environmentvariablegroups_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestEnvionmentVariableGroups(t *testing.T) { - Convey("List Running Environment Variable Group", t, func() { - setup(MockRoute{"GET", "/v2/config/environment_variable_groups/running", getEVGPayload, "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - evg, err := client.GetRunningEnvironmentVariableGroup() - So(err, ShouldBeNil) - So(evg["foo"], ShouldEqual, "bar") - So(evg["val"], ShouldEqual, 3) - }) - - Convey("List Staging Environment Variable Group", t, func() { - setup(MockRoute{"GET", "/v2/config/environment_variable_groups/staging", getEVGPayload, "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - evg, err := client.GetStagingEnvironmentVariableGroup() - So(err, ShouldBeNil) - So(evg["foo"], ShouldEqual, "bar") - So(evg["val"], ShouldEqual, 3) - }) - - Convey("Set Running Environment Variable Group", t, func() { - setup(MockRoute{"PUT", "/v2/config/environment_variable_groups/running", getEVGPayload, "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - body := EnvironmentVariableGroup{ - "foo": "bar", - "val": 3, - } - - err = client.SetRunningEnvironmentVariableGroup(body) - So(err, ShouldBeNil) - }) - - Convey("Set Staging Environment Variable Group", t, func() { - setup(MockRoute{"PUT", "/v2/config/environment_variable_groups/staging", getEVGPayload, "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - body := EnvironmentVariableGroup{ - "foo": "bar", - "val": 3, - } - - err = client.SetStagingEnvironmentVariableGroup(body) - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/events_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/events_test.go deleted file mode 100644 index 3ad00b86..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/events_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListEvents(t *testing.T) { - Convey("List Events", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/events", listEventsPage1Payload, "", 200, "", nil}, - {"GET", "/v2/events-2", listEventsPage2Payload, "", 200, "page=2", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - events, err := client.ListEvents() - So(err, ShouldBeNil) - - So(len(events), ShouldEqual, 4) - So(events[0].GUID, ShouldEqual, "b8ede8e1-afc8-40a1-baae-236a0a77b27b") - So(events[0].Actor, ShouldEqual, "guid-008640fc-d316-4602-9251-c8d09bbdc750") - So(events[0].CreatedAt, ShouldEqual, "2016-06-08T16:41:23Z") - }) -} - -func TestTotalEvents(t *testing.T) { - Convey("Total Events", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/events", totalEventsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - total, err := client.TotalEvents() - So(err, ShouldBeNil) - - So(total, ShouldEqual, 4) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/gen_error.go b/vendor/github.com/cloudfoundry-community/go-cfclient/gen_error.go deleted file mode 100644 index 7405c6f3..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/gen_error.go +++ /dev/null @@ -1,115 +0,0 @@ -// +build ignore - -package main - -import ( - "bytes" - "go/format" - "io/ioutil" - "log" - "net/http" - "sort" - "strings" - "text/template" - "time" - - "gopkg.in/yaml.v2" -) - -type CFCode int -type HTTPCode int - -type Definition struct { - CFCode `yaml:"-"` - Name string `yaml:"name"` - HTTPCode `yaml:"http_code"` - Message string `yaml:"message"` -} - -func main() { - const url = "https://raw.githubusercontent.com/cloudfoundry/cloud_controller_ng/master/vendor/errors/v2.yml" - - resp, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - defer resp.Body.Close() - - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - log.Fatal(err) - } - - var m map[CFCode]Definition - - if err := yaml.Unmarshal(body, &m); err != nil { - log.Fatal(err) - } - - var definitions []Definition - - for c, d := range m { - d.CFCode = c - definitions = append(definitions, d) - } - - sort.Slice(definitions, func(i, j int) bool { - return definitions[i].CFCode < definitions[j].CFCode - }) - - buf := &bytes.Buffer{} - - if err := packageTemplate.Execute(buf, struct { - Timestamp time.Time - Definitions []Definition - }{ - Timestamp: time.Now(), - Definitions: definitions, - }); err != nil { - log.Fatal(err) - } - - dst, err := format.Source(buf.Bytes()) - if err != nil { - log.Printf("%s", buf.Bytes()) - log.Fatal(err) - } - - if err := ioutil.WriteFile("cf_error.go", dst, 0600); err != nil { - log.Fatal(err) - } -} - -// destutter ensures that s does not end in "Error". -func destutter(s string) string { - return strings.TrimSuffix(s, "Error") -} - -var packageTemplate = template.Must(template.New("").Funcs(template.FuncMap{ - "destutter": destutter, -}).Parse(` -package cfclient - -// Code generated by go generate. DO NOT EDIT. -// This file was generated by robots at -// {{ .Timestamp }} - -import "github.com/pkg/errors" - -{{- range .Definitions }} -{{$method := printf "Is%sError" (.Name | destutter) }} -// {{ $method }} returns a boolean indicating whether -// the error is known to report the Cloud Foundry error: -// - Cloud Foundry code: {{ .CFCode }} -// - HTTP code: {{ .HTTPCode }} -// - message: {{ printf "%q" .Message }} -func Is{{ .Name | destutter }}Error(err error) bool { - cause := errors.Cause(err) - cferr, ok := cause.(CloudFoundryError) - if !ok { - return false - } - return cferr.Code == {{ .CFCode }} -} -{{- end }} -`)) diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/go.mod b/vendor/github.com/cloudfoundry-community/go-cfclient/go.mod deleted file mode 100644 index 5404ca7c..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/go.mod +++ /dev/null @@ -1,20 +0,0 @@ -module github.com/cloudfoundry-community/go-cfclient - -require ( - code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f - github.com/Masterminds/semver v1.4.2 - github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect - github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab - github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f // indirect - github.com/jtolds/gls v4.2.1+incompatible // indirect - github.com/kr/pretty v0.1.0 // indirect - github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11 - github.com/onsi/gomega v1.4.3 - github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 // indirect - github.com/pkg/errors v0.8.1 - github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470 // indirect - github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a - golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3 - golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1 - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect -) diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/go.sum b/vendor/github.com/cloudfoundry-community/go-cfclient/go.sum deleted file mode 100644 index 945c3858..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/go.sum +++ /dev/null @@ -1,65 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= -code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= -github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f h1:FDM3EtwZLyhW48YRiyqjivNlNZjAObv4xt4NnJaU+NQ= -github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -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/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11 h1:YFh+sjyJTMQSYjKwM4dFKhJPJC/wfo98tPUc17HdoYw= -github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11/go.mod h1:Ah2dBMoxZEqk118as2T4u4fjfXarE0pPnMJaArZQZsI= -github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso= -github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470 h1:R0uuDVEvfDha2O6dfJRr4/5NBHKEbZhMPZmqOWpEkSo= -github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225 h1:kNX+jCowfMYzvlSvJu5pQWEmyWFrBXJ3PBy10xKMXK8= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3 h1:ulvT7fqt0yHWzpJwI57MezWnYDVpCAYBVuYst/L+fAY= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1 h1:VeAkjQVzKLmu+JnFcK96TPbkuaTIqwGGAzQ9hgwPjVg= -golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -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/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/info_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/info_test.go deleted file mode 100644 index 9af8e48b..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/info_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestGetInfo(t *testing.T) { - Convey("Get info", t, func() { - setupMultiple(nil, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - info, err := client.GetInfo() - So(err, ShouldBeNil) - - So(info.MinCLIVersion, ShouldEqual, "6.23.0") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/isolationsegments_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/isolationsegments_test.go deleted file mode 100644 index 92f6ff3a..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/isolationsegments_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package cfclient - -import ( - "net/http" - "testing" - "time" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestCreateIsolationSegement(t *testing.T) { - Convey("Create Isolation Segment", t, func() { - mocks := []MockRoute{ - {"POST", "/v3/isolation_segments", createIsolationSegmentPayload, "", http.StatusCreated, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - name := "TheKittenIsTheShark" - - isolationsegment, err := client.CreateIsolationSegment(name) - So(err, ShouldBeNil) - - So(isolationsegment.Name, ShouldEqual, name) - So(isolationsegment.GUID, ShouldEqual, "323f211e-fea3-4161-9bd1-615392327913") - So(isolationsegment.CreatedAt.String(), ShouldEqual, time.Date(2016, 10, 19, 20, 25, 04, 0, time.FixedZone("UTC", 0)).String()) - So(isolationsegment.UpdatedAt.String(), ShouldEqual, time.Date(2016, 11, 8, 16, 41, 26, 0, time.FixedZone("UTC", 0)).String()) - }) -} - -func TestGetIsolationSegementByGUID(t *testing.T) { - Convey("Request existing Isolation Segment", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/isolation_segments/323f211e-fea3-4161-9bd1-615392327913", createIsolationSegmentPayload, "", http.StatusOK, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - name := "TheKittenIsTheShark" - - isolationsegment, err := client.GetIsolationSegmentByGUID("323f211e-fea3-4161-9bd1-615392327913") - So(err, ShouldBeNil) - - So(isolationsegment.Name, ShouldEqual, name) - So(isolationsegment.GUID, ShouldEqual, "323f211e-fea3-4161-9bd1-615392327913") - So(isolationsegment.CreatedAt.String(), ShouldEqual, time.Date(2016, 10, 19, 20, 25, 04, 0, time.FixedZone("UTC", 0)).String()) - So(isolationsegment.UpdatedAt.String(), ShouldEqual, time.Date(2016, 11, 8, 16, 41, 26, 0, time.FixedZone("UTC", 0)).String()) - }) - - Convey("Request non-existing Isolation Segment", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/isolation_segments/323f211e-fea3-4161--9bd1-615392327913", createIsolationSegmentPayload, "", http.StatusOK, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - isolationsegment, err := client.GetIsolationSegmentByGUID("does not exit") - So(err, ShouldNotBeNil) - So(isolationsegment, ShouldBeNil) - }) -} - -func TestListIsolationSegments(t *testing.T) { - Convey("Request list of all Isolation Segments", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/isolation_segments", listIsolationSegmentsPayload, "", http.StatusOK, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - isolationsegment, err := client.ListIsolationSegments() - So(err, ShouldBeNil) - So(isolationsegment, ShouldNotBeNil) - So(len(isolationsegment), ShouldEqual, 2) - - So(isolationsegment[0].Name, ShouldEqual, "shared") - So(isolationsegment[0].GUID, ShouldEqual, "033b4c58-12bb-499a-b05d-4b6fc9e2993b") - So(isolationsegment[0].CreatedAt.String(), ShouldEqual, time.Date(2017, 4, 2, 11, 22, 4, 0, time.FixedZone("UTC", 0)).String()) - So(isolationsegment[0].UpdatedAt.String(), ShouldEqual, time.Date(2017, 4, 2, 11, 22, 4, 0, time.FixedZone("UTC", 0)).String()) - - So(isolationsegment[1].Name, ShouldEqual, "my_segment") - So(isolationsegment[1].GUID, ShouldEqual, "23d0baf4-9d3c-44d8-b2dc-1767bcdad1e0") - So(isolationsegment[1].CreatedAt.String(), ShouldEqual, time.Date(2017, 4, 7, 11, 20, 16, 0, time.FixedZone("UTC", 0)).String()) - So(isolationsegment[1].UpdatedAt.String(), ShouldEqual, time.Date(2017, 4, 7, 11, 20, 16, 0, time.FixedZone("UTC", 0)).String()) - }) -} - -func TestDeleteIsolationSegmentByGUID(t *testing.T) { - Convey("Delete an Isolation Segment by GUID", t, func() { - mocks := []MockRoute{ - {"DELETE", "/v3/isolation_segments/033b4c58-12bb-499a-b05d-4b6fc9e2993b", "", "", http.StatusNoContent, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteIsolationSegmentByGUID("033b4c58-12bb-499a-b05d-4b6fc9e2993b") - So(err, ShouldBeNil) - - err = client.DeleteIsolationSegmentByGUID("theKittenIsTheShark") - So(err, ShouldNotBeNil) - }) -} - -func TestIsolationSegmentMethods(t *testing.T) { - - postData := `{"data":[{"guid":"theKittenIsTheShark"}]}` - - Convey("Request list of all Isolation Segments", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/isolation_segments", listIsolationSegmentsPayload, "", http.StatusOK, "", nil}, - {"DELETE", "/v3/isolation_segments/033b4c58-12bb-499a-b05d-4b6fc9e2993b", "", "", http.StatusNoContent, "", nil}, - {"POST", "/v3/isolation_segments/033b4c58-12bb-499a-b05d-4b6fc9e2993b/relationships/organizations", "", "", http.StatusOK, "", &postData}, - {"DELETE", "/v3/isolation_segments/033b4c58-12bb-499a-b05d-4b6fc9e2993b/relationships/organizations/theKittenIsTheShark", "", "", http.StatusNoContent, "", nil}, - {"PUT", "/v2/spaces/theKittenIsTheShark", "", "", http.StatusCreated, "", nil}, - {"DELETE", "/v2/spaces/theKittenIsTheShark/isolation_segment", "", "", http.StatusNoContent, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - isolationsegment, err := client.ListIsolationSegments() - - So(err, ShouldBeNil) - So(isolationsegment, ShouldNotBeNil) - So(len(isolationsegment), ShouldEqual, 2) - - errAddOrg := isolationsegment[0].AddOrg("theKittenIsTheShark") - So(errAddOrg, ShouldBeNil) - - errRemOrg := isolationsegment[0].RemoveOrg("theKittenIsTheShark") - So(errRemOrg, ShouldBeNil) - - errAddSpace := isolationsegment[0].AddSpace("theKittenIsTheShark") - So(errAddSpace, ShouldBeNil) - - errRemSpace := isolationsegment[0].RemoveSpace("theKittenIsTheShark") - So(errRemSpace, ShouldBeNil) - - errDel := isolationsegment[0].Delete() - So(errDel, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/org_quotas_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/org_quotas_test.go deleted file mode 100644 index 460f0d4b..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/org_quotas_test.go +++ /dev/null @@ -1,148 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListOrgQuotas(t *testing.T) { - Convey("List Org Quotas", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/quota_definitions", listOrgQuotasPayloadPage1, "", 200, "", nil}, - {"GET", "/v2/quota_definitions_page_2", listOrgQuotasPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgQuotas, err := client.ListOrgQuotas() - So(err, ShouldBeNil) - - So(len(orgQuotas), ShouldEqual, 2) - So(orgQuotas[0].Guid, ShouldEqual, "6f9d3100-44ab-49e2-a4f8-9d7d67651ae7") - So(orgQuotas[0].Name, ShouldEqual, "test-1") - So(orgQuotas[0].NonBasicServicesAllowed, ShouldEqual, true) - So(orgQuotas[0].TotalServices, ShouldEqual, -1) - So(orgQuotas[0].TotalRoutes, ShouldEqual, 100) - So(orgQuotas[0].TotalPrivateDomains, ShouldEqual, -1) - So(orgQuotas[0].MemoryLimit, ShouldEqual, 102400) - So(orgQuotas[0].TrialDBAllowed, ShouldEqual, false) - So(orgQuotas[0].InstanceMemoryLimit, ShouldEqual, -1) - So(orgQuotas[0].AppInstanceLimit, ShouldEqual, -1) - So(orgQuotas[0].AppTaskLimit, ShouldEqual, -1) - So(orgQuotas[0].TotalServiceKeys, ShouldEqual, -1) - So(orgQuotas[0].TotalReservedRoutePorts, ShouldEqual, -1) - }) -} - -func TestGetOrgQuotaByName(t *testing.T) { - Convey("Get Org Quota By Name", t, func() { - setup(MockRoute{"GET", "/v2/quota_definitions", listOrgQuotasPayloadPage2, "", 200, "q=name:default2", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgQuota, err := client.GetOrgQuotaByName("default2") - So(err, ShouldBeNil) - - So(orgQuota.Guid, ShouldEqual, "a537761f-9d93-4b30-af17-3d73dbca181b") - So(orgQuota.Name, ShouldEqual, "test-2") - So(orgQuota.NonBasicServicesAllowed, ShouldEqual, false) - So(orgQuota.TotalServices, ShouldEqual, 10) - So(orgQuota.TotalRoutes, ShouldEqual, 20) - So(orgQuota.TotalPrivateDomains, ShouldEqual, 30) - So(orgQuota.MemoryLimit, ShouldEqual, 40) - So(orgQuota.TrialDBAllowed, ShouldEqual, true) - So(orgQuota.InstanceMemoryLimit, ShouldEqual, 50) - So(orgQuota.AppInstanceLimit, ShouldEqual, 60) - So(orgQuota.AppTaskLimit, ShouldEqual, 70) - So(orgQuota.TotalServiceKeys, ShouldEqual, 80) - So(orgQuota.TotalReservedRoutePorts, ShouldEqual, 90) - }) -} - -func TestCreateOrgQuota(t *testing.T) { - Convey("Create Org Quota", t, func() { - setup(MockRoute{"POST", "/v2/quota_definitions", orgQuotaPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgQuotaRequest := OrgQuotaRequest{ - Name: "test-2", - } - - orgQuota, err := client.CreateOrgQuota(orgQuotaRequest) - So(err, ShouldBeNil) - - So(orgQuota.Name, ShouldEqual, "test-2") - - }) -} - -func TestUpdateOrgQuota(t *testing.T) { - Convey("Create Update Quota", t, func() { - setup(MockRoute{"PUT", "/v2/quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977", orgQuotaPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgQuotaRequest := OrgQuotaRequest{ - Name: "test-2", - } - - orgQuota, err := client.UpdateOrgQuota("9ffd7c5c-d83c-4786-b399-b7bd54883977", orgQuotaRequest) - So(err, ShouldBeNil) - - So(orgQuota.Name, ShouldEqual, "test-2") - - }) -} - -func TestDeleteOrgQuota(t *testing.T) { - Convey("Delete org quota synchronously", t, func() { - setup(MockRoute{"DELETE", "/v2/quota_definitions/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", "", "", 204, "async=false", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteOrgQuota("b2a35f0c-d5ad-4a59-bea7-461711d96b0d", false) - So(err, ShouldBeNil) - }) - - Convey("Delete org quota asynchronously", t, func() { - setup(MockRoute{"DELETE", "/v2/quota_definitions/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", "", "", 202, "async=true", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteOrgQuota("b2a35f0c-d5ad-4a59-bea7-461711d96b0d", true) - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/orgs_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/orgs_test.go deleted file mode 100644 index e7284e56..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/orgs_test.go +++ /dev/null @@ -1,962 +0,0 @@ -package cfclient - -import ( - "net/url" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListOrgs(t *testing.T) { - Convey("List Orgs", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/organizations", listOrgsPayload, "", 200, "", nil}, - {"GET", "/v2/orgsPage2", listOrgsPayloadPage2, "", 200, "results-per-page=2", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgs, err := client.ListOrgs() - So(err, ShouldBeNil) - - So(len(orgs), ShouldEqual, 4) - So(orgs[0].Guid, ShouldEqual, "a537761f-9d93-4b30-af17-3d73dbca181b") - So(orgs[0].Name, ShouldEqual, "demo") - }) -} - -func TestListOrgsByQuery(t *testing.T) { - Convey("List Orgs", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/organizations", listOrgsPayload, "", 200, "results-per-page=2", nil}, - {"GET", "/v2/orgsPage2", listOrgsPayloadPage2, "", 200, "results-per-page=2", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - var query = url.Values{ - "results-per-page": []string{ - "2", - }, - } - orgs, err := client.ListOrgsByQuery(query) - So(err, ShouldBeNil) - - So(len(orgs), ShouldEqual, 4) - So(orgs[0].Guid, ShouldEqual, "a537761f-9d93-4b30-af17-3d73dbca181b") - So(orgs[0].Name, ShouldEqual, "demo") - }) -} - -func TestGetOrgByGuid(t *testing.T) { - Convey("Get org by GUID", t, func() { - setup(MockRoute{"GET", "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b", orgByGuidPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org, err := client.GetOrgByGuid("1c0e6074-777f-450e-9abc-c42f39d9b75b") - So(err, ShouldBeNil) - - So(org.Guid, ShouldEqual, "1c0e6074-777f-450e-9abc-c42f39d9b75b") - So(org.Name, ShouldEqual, "name-1716") - }) -} - -func TestOrgSpaces(t *testing.T) { - Convey("Get spaces by org", t, func() { - setup(MockRoute{"GET", "/v2/organizations/foo/spaces", orgSpacesPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaces, err := client.OrgSpaces("foo") - So(err, ShouldBeNil) - - So(len(spaces), ShouldEqual, 1) - So(spaces[0].Guid, ShouldEqual, "b8aff561-175d-45e8-b1e7-67e2aedb03b6") - So(spaces[0].Name, ShouldEqual, "test") - }) -} - -func TestListOrgUsers(t *testing.T) { - Convey("Get Org Users for an org", t, func() { - setup(MockRoute{"GET", "/v2/organizations/foo/users", listOrgPeoplePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - users, err := client.ListOrgUsers("foo") - So(err, ShouldBeNil) - So(len(users), ShouldEqual, 2) - So(users[0].Username, ShouldEqual, "user1") - So(users[1].Username, ShouldEqual, "user2") - }) -} - -func TestListOrgManagers(t *testing.T) { - Convey("Get Org Managers for an org", t, func() { - setup(MockRoute{"GET", "/v2/organizations/foo/managers", listOrgPeoplePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - managers, err := client.ListOrgManagers("foo") - So(err, ShouldBeNil) - So(len(managers), ShouldEqual, 2) - So(managers[0].Username, ShouldEqual, "user1") - So(managers[1].Username, ShouldEqual, "user2") - }) -} - -func TestListOrgAuditors(t *testing.T) { - Convey("Get Org Auditors for an org", t, func() { - setup(MockRoute{"GET", "/v2/organizations/foo/auditors", listOrgPeoplePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - users, err := client.ListOrgAuditors("foo") - So(err, ShouldBeNil) - So(len(users), ShouldEqual, 2) - So(users[0].Username, ShouldEqual, "user1") - So(users[1].Username, ShouldEqual, "user2") - }) -} -func TestListBillingManagers(t *testing.T) { - Convey("Get Billing Manager for an org", t, func() { - setup(MockRoute{"GET", "/v2/organizations/foo/billing_managers", listOrgPeoplePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - managers, err := client.ListOrgBillingManagers("foo") - So(err, ShouldBeNil) - So(len(managers), ShouldEqual, 2) - So(managers[0].Username, ShouldEqual, "user1") - So(managers[1].Username, ShouldEqual, "user2") - }) -} - -func TestOrgSummary(t *testing.T) { - Convey("Get org summary", t, func() { - setup(MockRoute{"GET", "/v2/organizations/06dcedd4-1f24-49a6-adc1-cce9131a1b2c/summary", orgSummaryPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - c: client, - } - summary, err := org.Summary() - So(err, ShouldBeNil) - - So(summary.Guid, ShouldEqual, "06dcedd4-1f24-49a6-adc1-cce9131a1b2c") - So(summary.Name, ShouldEqual, "system") - So(summary.Status, ShouldEqual, "active") - - spaces := summary.Spaces - So(len(spaces), ShouldEqual, 1) - So(spaces[0].Guid, ShouldEqual, "494d8b64-8181-4183-a6d3-6279db8fec6e") - So(spaces[0].Name, ShouldEqual, "test") - So(spaces[0].ServiceCount, ShouldEqual, 1) - So(spaces[0].AppCount, ShouldEqual, 2) - So(spaces[0].MemDevTotal, ShouldEqual, 32) - So(spaces[0].MemProdTotal, ShouldEqual, 64) - }) -} - -func TestOrgQuota(t *testing.T) { - Convey("Get org quota", t, func() { - setup(MockRoute{"GET", "/v2/quota_definitions/a537761f-9d93-4b30-af17-3d73dbca181b", orgQuotaPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - QuotaDefinitionGuid: "a537761f-9d93-4b30-af17-3d73dbca181b", - c: client, - } - orgQuota, err := org.Quota() - So(err, ShouldBeNil) - - So(orgQuota.Guid, ShouldEqual, "a537761f-9d93-4b30-af17-3d73dbca181b") - So(orgQuota.Name, ShouldEqual, "test-2") - So(orgQuota.NonBasicServicesAllowed, ShouldEqual, false) - So(orgQuota.TotalServices, ShouldEqual, 10) - So(orgQuota.TotalRoutes, ShouldEqual, 20) - So(orgQuota.TotalPrivateDomains, ShouldEqual, 30) - So(orgQuota.MemoryLimit, ShouldEqual, 40) - So(orgQuota.TrialDBAllowed, ShouldEqual, true) - So(orgQuota.InstanceMemoryLimit, ShouldEqual, 50) - So(orgQuota.AppInstanceLimit, ShouldEqual, 60) - So(orgQuota.AppTaskLimit, ShouldEqual, 70) - So(orgQuota.TotalServiceKeys, ShouldEqual, 80) - So(orgQuota.TotalReservedRoutePorts, ShouldEqual, 90) - }) -} - -func TestCreateOrg(t *testing.T) { - Convey("Create org", t, func() { - setup(MockRoute{"POST", "/v2/organizations", createOrgPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org, err := client.CreateOrg(OrgRequest{Name: "my-org"}) - So(err, ShouldBeNil) - So(org.Guid, ShouldEqual, "22b3b0a0-6511-47e5-8f7a-93bbd2ff446e") - }) -} - -func TestUpdateOrg(t *testing.T) { - Convey("Update org", t, func() { - setup(MockRoute{"PUT", "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e", createOrgPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org, err := client.UpdateOrg("22b3b0a0-6511-47e5-8f7a-93bbd2ff446e", OrgRequest{Name: "my-org"}) - So(err, ShouldBeNil) - So(org.Guid, ShouldEqual, "22b3b0a0-6511-47e5-8f7a-93bbd2ff446e") - }) -} - -func TestDeleteOrg(t *testing.T) { - Convey("Delete org", t, func() { - setup(MockRoute{"DELETE", "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b", "", "", 204, "recursive=false&async=false", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteOrg("a537761f-9d93-4b30-af17-3d73dbca181b", false, false) - So(err, ShouldBeNil) - }) -} - -func TestAssociateManager(t *testing.T) { - Convey("Associate manager", t, func() { - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers/user-guid", associateOrgUserPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateManager("user-guid") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateAuditor(t *testing.T) { - Convey("Associate auditor", t, func() { - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors/user-guid", associateOrgUserPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateAuditor("user-guid") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateBillingManager(t *testing.T) { - Convey("Associate billing manager", t, func() { - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers/user-guid", associateOrgUserPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateBillingManager("user-guid") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateUser(t *testing.T) { - Convey("Associate user", t, func() { - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/users/user-guid", associateOrgUserPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateUser("user-guid") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateManagerByUsername(t *testing.T) { - Convey("Associate manager by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateManagerByUsername("user-name") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateManagerByUsernameAndOrigin(t *testing.T) { - Convey("Associate manager by username and origin", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateManagerByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateAuditorByUsername(t *testing.T) { - Convey("Associate auditor by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateAuditorByUsername("user-name") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateAuditorByUsernameAndOrigin(t *testing.T) { - Convey("Associate auditor by username and origin", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateAuditorByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateBillingManagerByUsername(t *testing.T) { - Convey("Associate billing manager by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateBillingManagerByUsername("user-name") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateBillingManagerByUsernameAndOrigin(t *testing.T) { - Convey("Associate billing manager by username and origin", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateBillingManagerByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateUserByUsername(t *testing.T) { - Convey("Associate user by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/users", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateUserByUsername("user-name") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateUserByUsernameAndOrigin(t *testing.T) { - Convey("Associate user by username and origin", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/users", associateOrgUserPayload, "", 201, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newOrg, err := org.AssociateUserByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - So(newOrg.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestRemoveManager(t *testing.T) { - Convey("Remove manager", t, func() { - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers/user-guid", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveManager("user-guid") - So(err, ShouldBeNil) - }) -} - -func TestRemoveAuditor(t *testing.T) { - Convey("Remove auditor", t, func() { - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors/user-guid", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveAuditor("user-guid") - So(err, ShouldBeNil) - }) -} - -func TestRemoveBillingManager(t *testing.T) { - Convey("Remove billing manager", t, func() { - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers/user-guid", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveBillingManager("user-guid") - So(err, ShouldBeNil) - }) -} - -func TestRemoveUser(t *testing.T) { - Convey("Remove user", t, func() { - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/users/user-guid", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveUser("user-guid") - So(err, ShouldBeNil) - }) -} - -func TestRemoveManagerByUsername(t *testing.T) { - Convey("Remove manager by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveManagerByUsername("user-name") - So(err, ShouldBeNil) - }) -} - -func TestRemoveManagerByUsernameAndOrigin(t *testing.T) { - Convey("Remove manager by username and origin", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"POST", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers/remove", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveManagerByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - }) -} - -func TestRemoveAuditorByUsername(t *testing.T) { - Convey("Remove auditor by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveAuditorByUsername("user-name") - So(err, ShouldBeNil) - }) -} -func TestRemoveAuditorByUsernameAndOrigin(t *testing.T) { - Convey("Remove auditor by username", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"POST", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors/remove", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveAuditorByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - }) -} - -func TestRemoveBillingManagerByUsername(t *testing.T) { - Convey("Remove billing manager by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveBillingManagerByUsername("user-name") - So(err, ShouldBeNil) - }) -} - -func TestRemoveBillingManagerByUsernameAndOrigin(t *testing.T) { - Convey("Remove billing manager by username and origin", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"POST", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers/remove", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveBillingManagerByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - }) -} - -func TestRemoveUserByUsername(t *testing.T) { - Convey("Remove user by username", t, func() { - expectedBody := `{"username":"user-name"}` - setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/users", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveUserByUsername("user-name") - So(err, ShouldBeNil) - }) -} - -func TestRemoveUserByUsernameAndOrigin(t *testing.T) { - Convey("Remove user by username and origin", t, func() { - expectedBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"POST", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/users/remove", "", "", 204, "", &expectedBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - org := &Org{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = org.RemoveUserByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - }) -} - -func TestListOrgSpaceQuotas(t *testing.T) { - Convey("List Org Space Quotas", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/organizations/06dcedd4-1f24-49a6-adc1-cce9131a1b2c/space_quota_definitions", listSpaceQuotasPayloadPage1, "", 200, "", nil}, - {"GET", "/v2/space_quota_definitions_page_2", listSpaceQuotasPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaceQuotas, err := client.ListOrgSpaceQuotas("06dcedd4-1f24-49a6-adc1-cce9131a1b2c") - So(err, ShouldBeNil) - - So(len(spaceQuotas), ShouldEqual, 2) - So(spaceQuotas[0].Guid, ShouldEqual, "889aa2ed-a883-4cc0-abe5-804b2503f15d") - So(spaceQuotas[0].Name, ShouldEqual, "test-1") - So(spaceQuotas[0].NonBasicServicesAllowed, ShouldEqual, true) - So(spaceQuotas[0].TotalServices, ShouldEqual, -1) - So(spaceQuotas[0].TotalRoutes, ShouldEqual, 100) - So(spaceQuotas[0].MemoryLimit, ShouldEqual, 102400) - So(spaceQuotas[0].InstanceMemoryLimit, ShouldEqual, -1) - So(spaceQuotas[0].AppInstanceLimit, ShouldEqual, -1) - So(spaceQuotas[0].AppTaskLimit, ShouldEqual, -1) - So(spaceQuotas[0].TotalServiceKeys, ShouldEqual, -1) - So(spaceQuotas[0].TotalReservedRoutePorts, ShouldEqual, -1) - }) -} - -func TestListOrgPrivateDomains(t *testing.T) { - Convey("List Org Space Quotas", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/organizations/06dcedd4-1f24-49a6-adc1-cce9131a1b2c/private_domains", listDomainsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - privateDomains, err := client.ListOrgPrivateDomains("06dcedd4-1f24-49a6-adc1-cce9131a1b2c") - So(err, ShouldBeNil) - - So(len(privateDomains), ShouldEqual, 4) - - }) -} - -func TestShareOrgPrivateDomain(t *testing.T) { - Convey("Share Org Private Domain", t, func() { - mocks := []MockRoute{ - {"PUT", "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/private_domains/3b6f763f-aae1-4177-9b93-f2de6f2a48f2", sharePrivateDomainPayload, "", 201, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - domain, err := client.ShareOrgPrivateDomain("3b6f763f-aae1-4177-9b93-f2de6f2a48f2", "3b6f763f-aae1-4177-9b93-f2de6f2a48f2") - So(err, ShouldBeNil) - - So(domain.Guid, ShouldEqual, "3b6f763f-aae1-4177-9b93-f2de6f2a48f2") - - }) -} - -func TestUnshareOrgPrivateDomain(t *testing.T) { - Convey("Unshare Org Private Domain", t, func() { - mocks := []MockRoute{ - {"DELETE", "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/private_domains/3b6f763f-aae1-4177-9b93-f2de6f2a48f2", sharePrivateDomainPayload, "", 201, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.UnshareOrgPrivateDomain("3b6f763f-aae1-4177-9b93-f2de6f2a48f2", "3b6f763f-aae1-4177-9b93-f2de6f2a48f2") - So(err, ShouldBeNil) - - }) -} - -func TestDefaultIsolationSegmentForOrg(t *testing.T) { - Convey("set Default IsolationSegment", t, func() { - defaultIsolationSegmentPayload := `{"data":{"guid":"3b6f763f-aae1-4177-9b93-f2de6f2a48f2"}}` - mocks := []MockRoute{ - {"PATCH", "/v3/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/relationships/default_isolation_segment", "", "", 200, "", &defaultIsolationSegmentPayload}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DefaultIsolationSegmentForOrg("3b6f763f-aae1-4177-9b93-f2de6f2a48f2", "3b6f763f-aae1-4177-9b93-f2de6f2a48f2") - So(err, ShouldBeNil) - - }) -} - -func TestResetDefaultIsolationSegmentForOrg(t *testing.T) { - Convey("Reset Default IsolationSegment", t, func() { - resetIsolationSegmentPayload := `{"data":null}` - mocks := []MockRoute{ - {"PATCH", "/v3/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/relationships/default_isolation_segment", "", "", 200, "", &resetIsolationSegmentPayload}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.ResetDefaultIsolationSegmentForOrg("3b6f763f-aae1-4177-9b93-f2de6f2a48f2") - So(err, ShouldBeNil) - - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/payloads_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/payloads_test.go deleted file mode 100644 index aa81aa04..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/payloads_test.go +++ /dev/null @@ -1,4829 +0,0 @@ -package cfclient - -const listEventsPage1Payload = `{ - "total_results": 4, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/events-2?page=2", - "resources": [ - { - "metadata": { - "guid": "b8ede8e1-afc8-40a1-baae-236a0a77b27b", - "url": "/v2/events/b8ede8e1-afc8-40a1-baae-236a0a77b27b", - "created_at": "2016-06-08T16:41:23Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "type": "name-167", - "actor": "guid-008640fc-d316-4602-9251-c8d09bbdc750", - "actor_type": "name-168", - "actor_name": "name-169", - "actee": "guid-e7790fa4-be2b-4a0f-aa82-c124342b0bb4", - "actee_type": "name-170", - "actee_name": "name-171", - "timestamp": "2016-06-08T16:41:23Z", - "metadata": { - - }, - "space_guid": "3a1368e7-e3b7-46af-a98d-57b9c71445e7", - "organization_guid": "86aa12ee-8c4f-4b26-b391-2be6c1730dbc" - } - }, - { - "metadata": { - "guid": "2ccf53a8-d0eb-4807-9bb9-7dd844e65267", - "url": "/v2/events/2ccf53a8-d0eb-4807-9bb9-7dd844e65267", - "created_at": "2016-06-08T16:41:23Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "type": "name-175", - "actor": "guid-52cb38f4-d52d-4201-87e3-8e5650efc8c1", - "actor_type": "name-176", - "actor_name": "name-177", - "actee": "guid-5c4214a1-f295-42ae-bd92-38e7cb8be538", - "actee_type": "name-178", - "actee_name": "name-179", - "timestamp": "2016-06-08T16:41:23Z", - "metadata": { - - }, - "space_guid": "10f0fd9d-dd68-428e-8e93-c00bb8eff0a6", - "organization_guid": "aa3fdaaa-42c8-4141-bc22-9792c37aa62f" - } - }, - { - "metadata": { - "guid": "4f9b1fef-2ce4-4877-85e1-0da9114a92cb", - "url": "/v2/events/4f9b1fef-2ce4-4877-85e1-0da9114a92cb", - "created_at": "2016-06-08T16:41:23Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "type": "name-183", - "actor": "guid-d3be7ed1-1c08-43f6-a20d-5cd9287492e1", - "actor_type": "name-184", - "actor_name": "name-185", - "actee": "guid-9844795f-943d-47ed-a997-2c04ee611f5a", - "actee_type": "name-186", - "actee_name": "name-187", - "timestamp": "2016-06-08T16:41:23Z", - "metadata": { - - }, - "space_guid": "f9ef235c-25df-4aa1-bcb4-15eec6f92146", - "organization_guid": "24a920db-f551-46af-bf73-e1db972f652a" - } - } - ] -}` - -const listEventsPage2Payload = `{ - "total_results": 4, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "4f9b1fef-2ce4-4877-85e1-0da9114a92cb", - "url": "/v2/events/4f9b1fef-2ce4-4877-85e1-0da9114a92cb", - "created_at": "2016-06-08T16:41:23Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "type": "name-183", - "actor": "guid-d3be7ed1-1c08-43f6-a20d-5cd9287492e1", - "actor_type": "name-184", - "actor_name": "name-185", - "actee": "guid-9844795f-943d-47ed-a997-2c04ee611f5a", - "actee_type": "name-186", - "actee_name": "name-187", - "timestamp": "2016-06-08T16:41:23Z", - "metadata": { - - }, - "space_guid": "f9ef235c-25df-4aa1-bcb4-15eec6f92146", - "organization_guid": "24a920db-f551-46af-bf73-e1db972f652a" - } - } - ] -}` - -const totalEventsPayload = `{ - "total_results": 4, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [] -}` - -const listOrgsPayload = `{ -"total_results": 6, -"total_pages": 2, -"prev_url": null, -"next_url": "/v2/orgsPage2?results-per-page=2", -"resources": [ - { - "metadata": { - "guid": "a537761f-9d93-4b30-af17-3d73dbca181b", - "url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b", - "created_at": "2014-09-24T13:54:53+00:00", - "updated_at": null - }, - "entity": { - "name": "demo", - "billing_enabled": false, - "quota_definition_guid": "183599e0-d535-4559-8675-7b6ddb5cc42d", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/183599e0-d535-4559-8675-7b6ddb5cc42d", - "spaces_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/spaces", - "domains_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/domains", - "private_domains_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/private_domains", - "users_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/users", - "managers_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/managers", - "billing_managers_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/billing_managers", - "auditors_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/auditors", - "app_events_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/app_events", - "space_quota_definitions_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/space_quota_definitions" - } - }, - { - "metadata": { - "guid": "da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "created_at": "2014-09-26T13:36:41+00:00", - "updated_at": null - }, - "entity": { - "name": "test", - "billing_enabled": false, - "quota_definition_guid": "183599e0-d535-4559-8675-7b6ddb5cc42d", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/183599e0-d535-4559-8675-7b6ddb5cc42d", - "spaces_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/spaces", - "domains_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/domains", - "private_domains_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/private_domains", - "users_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/users", - "managers_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/managers", - "billing_managers_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/billing_managers", - "auditors_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/auditors", - "app_events_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/app_events", - "space_quota_definitions_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/space_quota_definitions" - } - } -] -}` - -const listOrgsPayloadPage2 = `{ -"total_results": 6, -"total_pages": 2, -"prev_url": null, -"next_url": null, -"resources": [ - { - "metadata": { - "guid": "a537761f-9d93-4b30-af17-3d73dbca181b", - "url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b", - "created_at": "2014-09-24T13:54:53+00:00", - "updated_at": null - }, - "entity": { - "name": "demo", - "billing_enabled": false, - "quota_definition_guid": "183599e0-d535-4559-8675-7b6ddb5cc42d", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/183599e0-d535-4559-8675-7b6ddb5cc42d", - "spaces_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/spaces", - "domains_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/domains", - "private_domains_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/private_domains", - "users_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/users", - "managers_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/managers", - "billing_managers_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/billing_managers", - "auditors_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/auditors", - "app_events_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/app_events", - "space_quota_definitions_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b/space_quota_definitions" - } - }, - { - "metadata": { - "guid": "da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "created_at": "2014-09-26T13:36:41+00:00", - "updated_at": null - }, - "entity": { - "name": "test", - "billing_enabled": false, - "quota_definition_guid": "183599e0-d535-4559-8675-7b6ddb5cc42d", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/183599e0-d535-4559-8675-7b6ddb5cc42d", - "spaces_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/spaces", - "domains_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/domains", - "private_domains_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/private_domains", - "users_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/users", - "managers_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/managers", - "billing_managers_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/billing_managers", - "auditors_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/auditors", - "app_events_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/app_events", - "space_quota_definitions_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/space_quota_definitions" - } - } -] -}` - -const listOrgPeoplePayload = ` -{ - "total_results": 2, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "uaa-id-231", - "url": "/v2/users/uaa-id-231", - "created_at": "2016-06-08T16:41:34Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "user1", - "spaces_url": "/v2/users/uaa-id-231/spaces", - "organizations_url": "/v2/users/uaa-id-231/organizations", - "managed_organizations_url": "/v2/users/uaa-id-231/managed_organizations", - "billing_managed_organizations_url": "/v2/users/uaa-id-231/billing_managed_organizations", - "audited_organizations_url": "/v2/users/uaa-id-231/audited_organizations", - "managed_spaces_url": "/v2/users/uaa-id-231/managed_spaces", - "audited_spaces_url": "/v2/users/uaa-id-231/audited_spaces" - } - }, - { - "metadata": { - "guid": "uaa-id-232", - "url": "/v2/users/uaa-id-232", - "created_at": "2016-06-08T16:41:34Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "user2", - "spaces_url": "/v2/users/uaa-id-232/spaces", - "organizations_url": "/v2/users/uaa-id-232/organizations", - "managed_organizations_url": "/v2/users/uaa-id-232/managed_organizations", - "billing_managed_organizations_url": "/v2/users/uaa-id-232/billing_managed_organizations", - "audited_organizations_url": "/v2/users/uaa-id-232/audited_organizations", - "managed_spaces_url": "/v2/users/uaa-id-232/managed_spaces", - "audited_spaces_url": "/v2/users/uaa-id-232/audited_spaces" - } - } - ] -} -` - -const orgByGuidPayload = `{ - "metadata": { - "guid": "1c0e6074-777f-450e-9abc-c42f39d9b75b", - "url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b", - "created_at": "2016-06-08T16:41:33Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1716", - "billing_enabled": false, - "quota_definition_guid": "769e777f-92b6-4ba0-9e48-5f77e6293670", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/769e777f-92b6-4ba0-9e48-5f77e6293670", - "spaces_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/spaces", - "domains_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/domains", - "private_domains_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/private_domains", - "users_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/users", - "managers_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/managers", - "billing_managers_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/billing_managers", - "auditors_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/auditors", - "app_events_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/app_events", - "space_quota_definitions_url": "/v2/organizations/1c0e6074-777f-450e-9abc-c42f39d9b75b/space_quota_definitions" - } -}` - -const createOrgPayload = `{ - "metadata": { - "guid": "22b3b0a0-6511-47e5-8f7a-93bbd2ff446e", - "url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e", - "created_at": "2016-06-08T16:41:33Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "my-org-name", - "billing_enabled": false, - "quota_definition_guid": "b7887f5c-34bb-40c5-9778-577572e4fb2d", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/b7887f5c-34bb-40c5-9778-577572e4fb2d", - "spaces_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/spaces", - "domains_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/domains", - "private_domains_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/private_domains", - "users_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/users", - "managers_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/managers", - "billing_managers_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/billing_managers", - "auditors_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/auditors", - "app_events_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/app_events", - "space_quota_definitions_url": "/v2/organizations/22b3b0a0-6511-47e5-8f7a-93bbd2ff446e/space_quota_definitions" - } -}` - -const orgSpacesPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "b8aff561-175d-45e8-b1e7-67e2aedb03b6", - "url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6", - "created_at": "2014-11-12T17:56:22+00:00", - "updated_at": null - }, - "entity": { - "name": "test", - "organization_guid": "0c69f181-2d31-4326-ac33-be2b114a5f99", - "space_quota_definition_guid": null, - "organization_url": "/v2/organizations/0c69f181-2d31-4326-ac33-be2b114a5f99", - "developers_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/developers", - "managers_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/managers", - "auditors_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/auditors", - "apps_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/apps", - "routes_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/routes", - "domains_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/domains", - "service_instances_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/service_instances", - "app_events_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/app_events", - "events_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/events", - "security_groups_url": "/v2/spaces/b8aff561-175d-45e8-b1e7-67e2aedb03b6/security_groups" - } - } - ] -}` - -const orgSummaryPayload = `{ - "guid": "06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - "name": "system", - "status": "active", - "spaces": [ - { - "guid": "494d8b64-8181-4183-a6d3-6279db8fec6e", - "name": "test", - "service_count": 1, - "app_count": 2, - "mem_dev_total": 32, - "mem_prod_total": 64 - } - ] -}` - -const orgQuotaPayload = `{ - "metadata": { - "guid": "a537761f-9d93-4b30-af17-3d73dbca181b", - "url": "/v2/quota_definitions/a537761f-9d93-4b30-af17-3d73dbca181b", - "created_at": "2017-01-18T16:39:10Z", - "updated_at": "2017-01-18T16:46:20Z" - }, - "entity": { - "name": "test-2", - "non_basic_services_allowed": false, - "total_services": 10, - "total_routes": 20, - "total_private_domains": 30, - "memory_limit": 40, - "trial_db_allowed": true, - "instance_memory_limit": 50, - "app_instance_limit": 60, - "app_task_limit": 70, - "total_service_keys": 80, - "total_reserved_route_ports": 90 - } -}` - -const associateOrgUserPayload = `{ - "metadata": { - "guid": "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - "url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56", - "created_at": "2016-06-08T16:41:34Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1735", - "billing_enabled": false, - "quota_definition_guid": "84eed1c7-cc2d-4823-a578-081fef03ba7d", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/84eed1c7-cc2d-4823-a578-081fef03ba7d", - "spaces_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/spaces", - "domains_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/domains", - "private_domains_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/private_domains", - "users_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/users", - "managers_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", - "billing_managers_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers", - "auditors_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", - "app_events_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/app_events", - "space_quota_definitions_url": "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/space_quota_definitions" - } -}` - -const listOrgQuotasPayloadPage1 = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/quota_definitions_page_2", - "resources": [ - { - "metadata": { - "guid": "6f9d3100-44ab-49e2-a4f8-9d7d67651ae7", - "url": "/v2/quota_definitions/6f9d3100-44ab-49e2-a4f8-9d7d67651ae7", - "created_at": "2017-01-18T16:39:10Z", - "updated_at": "2017-01-18T16:46:20Z" - }, - "entity": { - "name": "test-1", - "non_basic_services_allowed": true, - "total_services": -1, - "total_routes": 100, - "total_private_domains": -1, - "memory_limit": 102400, - "trial_db_allowed": false, - "instance_memory_limit": -1, - "app_instance_limit": -1, - "app_task_limit": -1, - "total_service_keys": -1, - "total_reserved_route_ports": -1 - } - } - ] -}` - -const listOrgQuotasPayloadPage2 = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "a537761f-9d93-4b30-af17-3d73dbca181b", - "url": "/v2/quota_definitions/a537761f-9d93-4b30-af17-3d73dbca181b", - "created_at": "2017-01-18T16:39:10Z", - "updated_at": "2017-01-18T16:46:20Z" - }, - "entity": { - "name": "test-2", - "non_basic_services_allowed": false, - "total_services": 10, - "total_routes": 20, - "total_private_domains": 30, - "memory_limit": 40, - "trial_db_allowed": true, - "instance_memory_limit": 50, - "app_instance_limit": 60, - "app_task_limit": 70, - "total_service_keys": 80, - "total_reserved_route_ports": 90 - } - } - ] -}` - -const emptyResources = `{ - "total_results": 0, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [] -}` - -const listSpacesPayload = `{ - "total_results": 8, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/spacesPage2", - "resources": [ - { - "metadata": { - "guid": "8efd7c5c-d83c-4786-b399-b7bd548839e1", - "url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1", - "created_at": "2014-09-24T13:54:54+00:00", - "updated_at": "2014-09-24T13:54:54+00:00" - }, - "entity": { - "name": "dev", - "organization_guid": "a537761f-9d93-4b30-af17-3d73dbca181b", - "space_quota_definition_guid": null, - "organization_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b", - "developers_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/developers", - "managers_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/managers", - "auditors_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/auditors", - "apps_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/apps", - "routes_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/routes", - "domains_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/domains", - "service_instances_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/service_instances", - "app_events_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/app_events", - "events_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/events", - "security_groups_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/security_groups" - } - }, - { - "metadata": { - "guid": "657b5923-7de0-486a-9928-b4d78ee24931", - "url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931", - "created_at": "2014-09-26T13:37:31+00:00", - "updated_at": "2014-09-26T13:37:31+00:00" - }, - "entity": { - "name": "demo", - "organization_guid": "da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "space_quota_definition_guid": null, - "organization_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "developers_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/developers", - "managers_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/managers", - "auditors_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/auditors", - "apps_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/apps", - "routes_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/routes", - "domains_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/domains", - "service_instances_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/service_instances", - "app_events_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/app_events", - "events_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/events", - "security_groups_url": "/v2/spaces/657b5923-7de0-486a-9928-b4d78ee24931/security_groups" - } - } - ] -}` - -const listSpacesPayloadPage2 = `{ - "total_results": 8, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "9ffd7c5c-d83c-4786-b399-b7bd54883977", - "url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977", - "created_at": "2014-09-24T13:54:54+00:00", - "updated_at": "2014-09-24T13:54:54+00:00" - }, - "entity": { - "name": "test", - "organization_guid": "a537761f-9d93-4b30-af17-3d73dbca181b", - "space_quota_definition_guid": null, - "organization_url": "/v2/organizations/b737761f-9d93-4b30-af17-3d73dbca18aa", - "developers_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/developers", - "managers_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/managers", - "auditors_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/auditors", - "apps_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/apps", - "routes_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/routes", - "domains_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/domains", - "service_instances_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/service_inst2ances", - "app_events_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/app_events", - "events_url": "/v2/spaces/9ffd7c5c-d83c-4786-b399-b7bd54883977/events", - "security_groups_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/security_groups" - } - }, - { - "metadata": { - "guid": "329b5923-7de0-486a-9928-b4d78ee24982", - "url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982", - "created_at": "2014-09-26T13:37:31+00:00", - "updated_at": "2014-09-26T13:37:31+00:00" - }, - "entity": { - "name": "prod", - "organization_guid": "da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "space_quota_definition_guid": null, - "organization_url": "/v2/organizations/ad0dba14-6064-4f7a-b15a-ff9e677e492b", - "developers_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/developers", - "managers_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/managers", - "auditors_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/auditors", - "apps_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/apps", - "routes_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/routes", - "domains_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/domains", - "service_instances_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/service_instances", - "app_events_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/app_events", - "events_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/events", - "security_groups_url": "/v2/spaces/329b5923-7de0-486a-9928-b4d78ee24982/security_groups" - } - } - ] -}` - -const listSpacePeoplePayload = `{ - "total_results": 2, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "uaa-id-411", - "url": "/v2/users/uaa-id-411", - "created_at": "2016-06-08T16:41:42Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "user1", - "spaces_url": "/v2/users/uaa-id-411/spaces", - "organizations_url": "/v2/users/uaa-id-411/organizations", - "managed_organizations_url": "/v2/users/uaa-id-411/managed_organizations", - "billing_managed_organizations_url": "/v2/users/uaa-id-411/billing_managed_organizations", - "audited_organizations_url": "/v2/users/uaa-id-411/audited_organizations", - "managed_spaces_url": "/v2/users/uaa-id-411/managed_spaces", - "audited_spaces_url": "/v2/users/uaa-id-411/audited_spaces" - } - }, - { - "metadata": { - "guid": "uaa-id-412", - "url": "/v2/users/uaa-id-412", - "created_at": "2016-06-08T16:41:42Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "user2", - "spaces_url": "/v2/users/uaa-id-412/spaces", - "organizations_url": "/v2/users/uaa-id-412/organizations", - "managed_organizations_url": "/v2/users/uaa-id-412/managed_organizations", - "billing_managed_organizations_url": "/v2/users/uaa-id-412/billing_managed_organizations", - "audited_organizations_url": "/v2/users/uaa-id-412/audited_organizations", - "managed_spaces_url": "/v2/users/uaa-id-412/managed_spaces", - "audited_spaces_url": "/v2/users/uaa-id-412/audited_spaces" - } - } - ] -}` - -const spaceByGuidPayload = `{ - "metadata": { - "guid": "8efd7c5c-d83c-4786-b399-b7bd548839e1", - "url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1", - "created_at": "2014-09-24T13:54:54+00:00", - "updated_at": null - }, - "entity": { - "name": "dev", - "organization_guid": "a537761f-9d93-4b30-af17-3d73dbca181b", - "space_quota_definition_guid": null, - "organization_url": "/v2/organizations/a537761f-9d93-4b30-af17-3d73dbca181b", - "developers_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/developers", - "managers_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/managers", - "auditors_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/auditors", - "apps_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/apps", - "routes_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/routes", - "domains_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/domains", - "service_instances_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/service_instances", - "app_events_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/app_events", - "events_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/events", - "security_groups_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/security_groups" - } -}` - -const associateSpaceUserPayload = `{ - "metadata": { - "guid": "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - "url": "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56", - "created_at": "2016-06-08T16:41:34Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1735", - "organization_guid": "227161e2-667b-483f-9821-77257a38997f", - "space_quota_definition_guid": null, - "allow_ssh": true, - "organization_url": "/v2/organizations/227161e2-667b-483f-9821-77257a38997f", - "developers_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/developers", - "managers_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/managers", - "auditors_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/auditors", - "apps_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/apps", - "routes_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/routes", - "domains_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/domains", - "service_instances_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/service_instances", - "app_events_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/app_events", - "events_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/events", - "security_groups_url": "/v2/spaces/20e7a265-f50d-4c14-ac7e-42c52f9d9cd7/security_groups" - } -}` - -const appSummaryPayload = `{ - "guid": "b5f0d1bd-a3a9-40a4-af1a-312ad26e5379", - "urls": [ - "test-app.local.pcfdev.io" - ], - "routes": [ - { - "guid": "0b44af3e-77e0-4821-abd6-18d8c79309e6", - "host": "test-app", - "port": null, - "path": "", - "domain": { - "guid": "0b183484-45cc-4855-94d4-892f80f20c13", - "name": "local.pcfdev.io" - } - } - ], - "service_count": 1, - "service_names": [ - "test-service" - ], - "running_instances": 1, - "name": "test-app", - "production": false, - "space_guid": "494d8b64-8181-4183-a6d3-6279db8fec6e", - "stack_guid": "67e019a3-322a-407a-96e0-178e95bd0e55", - "buildpack": "ruby_buildpack", - "detected_buildpack": "", - "detected_buildpack_guid": "d5860c89-fb0a-49f4-a8b7-3220ff91c91d", - "environment_json": {}, - "memory": 256, - "instances": 1, - "disk_quota": 512, - "state": "STARTED", - "version": "fa47ec0a-adba-4cc5-b0ee-a8570dc49b3d", - "command": null, - "console": false, - "debug": null, - "staging_task_id": "a21d69a7-0878-4841-ab53-4b515397dc27", - "package_state": "STAGED", - "health_check_type": "port", - "health_check_timeout": null, - "staging_failed_reason": null, - "staging_failed_description": null, - "diego": true, - "docker_image": null, - "package_updated_at": "2017-02-05T12:18:04Z", - "detected_start_command": "rackup -p $PORT", - "enable_ssh": true, - "docker_credentials_json": { - "redacted_message": "[PRIVATE DATA HIDDEN]" - }, - "ports": null -}` - -const spaceSummaryPayload = `{ - "guid": "494d8b64-8181-4183-a6d3-6279db8fec6e", - "name": "test", - "apps": [ - { - "guid": "b5f0d1bd-a3a9-40a4-af1a-312ad26e5379", - "urls": [ - "test-app.local.pcfdev.io" - ], - "routes": [ - { - "guid": "0b44af3e-77e0-4821-abd6-18d8c79309e6", - "host": "test-app", - "port": null, - "path": "", - "domain": { - "guid": "0b183484-45cc-4855-94d4-892f80f20c13", - "name": "local.pcfdev.io" - } - } - ], - "service_count": 1, - "service_names": [ - "test-service" - ], - "running_instances": 1, - "name": "test-app", - "production": false, - "space_guid": "494d8b64-8181-4183-a6d3-6279db8fec6e", - "stack_guid": "67e019a3-322a-407a-96e0-178e95bd0e55", - "buildpack": "ruby_buildpack", - "detected_buildpack": "", - "detected_buildpack_guid": "d5860c89-fb0a-49f4-a8b7-3220ff91c91d", - "environment_json": {}, - "memory": 256, - "instances": 1, - "disk_quota": 512, - "state": "STARTED", - "version": "fa47ec0a-adba-4cc5-b0ee-a8570dc49b3d", - "command": null, - "console": false, - "debug": null, - "staging_task_id": "a21d69a7-0878-4841-ab53-4b515397dc27", - "package_state": "STAGED", - "health_check_type": "port", - "health_check_timeout": null, - "staging_failed_reason": null, - "staging_failed_description": null, - "diego": true, - "docker_image": null, - "package_updated_at": "2017-02-05T12:18:04Z", - "detected_start_command": "rackup -p $PORT", - "enable_ssh": true, - "docker_credentials_json": { - "redacted_message": "[PRIVATE DATA HIDDEN]" - }, - "ports": null - } - ], - "services": [ - { - "guid": "3c5c758c-6b76-46f6-89d5-677909bfc975", - "name": "test-service", - "bound_app_count": 1, - "last_operation": { - "type": "create", - "state": "succeeded", - "description": "", - "updated_at": "2017-02-05T11:56:14Z", - "created_at": "2017-02-05T11:56:14Z" - }, - "dashboard_url": null, - "service_plan": { - "guid": "25e717d2-59a1-4cd2-a792-04508f816776", - "name": "test-plan", - "service": { - "guid": "84c238f4-3961-4b10-8406-9003374c1f2b", - "label": "test-service", - "provider": null, - "version": null - } - } - } - ] -}` - -const spaceRolesPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "uaa-id-363", - "url": "/v2/users/uaa-id-363", - "created_at": "2016-06-08T16:41:40Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "everything@example.com", - "space_roles": [ - "space_developer", - "space_manager", - "space_auditor" - ], - "spaces_url": "/v2/users/uaa-id-363/spaces", - "organizations_url": "/v2/users/uaa-id-363/organizations", - "managed_organizations_url": "/v2/users/uaa-id-363/managed_organizations", - "billing_managed_organizations_url": "/v2/users/uaa-id-363/billing_managed_organizations", - "audited_organizations_url": "/v2/users/uaa-id-363/audited_organizations", - "managed_spaces_url": "/v2/users/uaa-id-363/managed_spaces", - "audited_spaces_url": "/v2/users/uaa-id-363/audited_spaces" - } - } - ] -}` - -const spaceQuotaPayload = `{ - "metadata": { - "guid": "9ffd7c5c-d83c-4786-b399-b7bd54883977", - "url": "/v2/space_quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977", - "created_at": "2017-02-04T18:11:49Z", - "updated_at": "2017-02-04T18:11:49Z" - }, - "entity": { - "name": "test-2", - "organization_guid": "06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - "non_basic_services_allowed": false, - "total_services": 10, - "total_routes": 20, - "memory_limit": 30, - "instance_memory_limit": 40, - "app_instance_limit": 50, - "app_task_limit": 60, - "total_service_keys": 70, - "total_reserved_route_ports": 80, - "organization_url": "/v2/organizations/06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - "spaces_url": "/v2/space_quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977/spaces" - } -}` - -const listSpaceQuotasPayloadPage1 = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/space_quota_definitions_page_2", - "resources": [ - { - "metadata": { - "guid": "889aa2ed-a883-4cc0-abe5-804b2503f15d", - "url": "/v2/space_quota_definitions/889aa2ed-a883-4cc0-abe5-804b2503f15d", - "created_at": "2017-02-04T18:11:49Z", - "updated_at": "2017-02-04T18:11:49Z" - }, - "entity": { - "name": "test-1", - "organization_guid": "06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - "non_basic_services_allowed": true, - "total_services": -1, - "total_routes": 100, - "memory_limit": 102400, - "instance_memory_limit": -1, - "app_instance_limit": -1, - "app_task_limit": -1, - "total_service_keys": -1, - "total_reserved_route_ports": -1, - "organization_url": "/v2/organizations/06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - "spaces_url": "/v2/space_quota_definitions/889aa2ed-a883-4cc0-abe5-804b2503f15d/spaces" - } - } - ] -}` - -const listSpaceQuotasPayloadPage2 = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "9ffd7c5c-d83c-4786-b399-b7bd54883977", - "url": "/v2/space_quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977", - "created_at": "2017-02-04T18:11:49Z", - "updated_at": "2017-02-04T18:11:49Z" - }, - "entity": { - "name": "test-2", - "organization_guid": "06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - "non_basic_services_allowed": false, - "total_services": 10, - "total_routes": 20, - "memory_limit": 30, - "instance_memory_limit": 40, - "app_instance_limit": 50, - "app_task_limit": 60, - "total_service_keys": 70, - "total_reserved_route_ports": 80, - "organization_url": "/v2/organizations/06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - "spaces_url": "/v2/space_quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977/spaces" - } - } - ] -}` - -const listSecGroupsPayload = `{ - "total_results": 28, - "total_pages": 1, - "prev_url": null, - "next_url": "/v2/security_groupsPage2", - "resources": [ - { - "metadata": { - "guid": "af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c", - "url": "/v2/security_groups/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c", - "created_at": "2015-12-04T11:15:55Z", - "updated_at": null - }, - "entity": { - "name": "secgroup-test", - "rules": [ - { - "destination": "1.1.1.1", - "ports": "443,4443", - "protocol": "tcp" - }, - { - "destination": "1.2.3.4", - "ports": "1111", - "protocol": "udp" - } - ], - "running_default": true, - "staging_default": true, - "spaces_url": "/v2/security_groups/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/spaces", - "spaces": [] - } - } - ] -}` - -const listSecGroupsPayloadPage2 = `{ - "total_results": 28, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "f9ad202b-76dd-44ec-b7c2-fd2417a561e8", - "url": "/v2/security_groups/f9ad202b-76dd-44ec-b7c2-fd2417a561e8", - "created_at": "2015-12-04T11:15:55Z", - "updated_at": null - }, - "entity": { - "name": "secgroup-test2", - "rules": [ - { - "destination": "2.2.2.2", - "ports": "2222", - "protocol": "udp" - }, - { - "destination": "4.3.2.1", - "ports": "443,4443", - "protocol": "tcp" - } - ], - "running_default": false, - "staging_default": false, - "spaces_url": "/v2/security_groups/f9ad202b-76dd-44ec-b7c2-fd2417a561e8/spaces", - "spaces": [ - { - "metadata": { - "guid": "e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4", - "url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4", - "created_at": "2014-10-27T10:49:37Z", - "updated_at": "2015-01-21T15:30:52Z" - }, - "entity": { - "name": "space-test", - "organization_guid": "82338ba1-bc08-4576-aad1-9a5b4693b386", - "space_quota_definition_guid": null, - "allow_ssh": true, - "organization_url": "/v2/organizations/82338ba1-bc08-4576-aad1-9a5b4693b386", - "developers_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/developers", - "managers_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/managers", - "auditors_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/auditors", - "apps_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/apps", - "routes_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/routes", - "domains_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/domains", - "service_instances_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/service_instances", - "app_events_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/app_events", - "events_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/events", - "security_groups_url": "/v2/spaces/e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4/security_groups" - } - }, - { - "metadata": { - "guid": "a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333", - "url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333", - "created_at": "2014-10-27T10:49:37Z", - "updated_at": "2015-01-21T15:30:52Z" - }, - "entity": { - "name": "space-test2", - "organization_guid": "82338ba1-bc08-4576-aad1-9a5b4693b386", - "space_quota_definition_guid": null, - "allow_ssh": true, - "organization_url": "/v2/organizations/82338ba1-bc08-4576-aad1-9a5b4693b386", - "developers_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/developers", - "managers_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/managers", - "auditors_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/auditors", - "apps_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/apps", - "routes_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/routes", - "domains_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/domains", - "service_instances_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/service_instances", - "app_events_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/app_events", - "events_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/events", - "security_groups_url": "/v2/spaces/a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333/security_groups" - } - }, - { - "metadata": { - "guid": "c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1", - "url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1", - "created_at": "2014-10-27T10:49:37Z", - "updated_at": "2015-01-21T15:30:52Z" - }, - "entity": { - "name": "space-test3", - "organization_guid": "82338ba1-bc08-4576-aad1-9a5b4693b386", - "space_quota_definition_guid": null, - "allow_ssh": true, - "organization_url": "/v2/organizations/82338ba1-bc08-4576-aad1-9a5b4693b386", - "developers_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/developers", - "managers_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/managers", - "auditors_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/auditors", - "apps_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/apps", - "routes_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/routes", - "domains_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/domains", - "service_instances_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/service_instances", - "app_events_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/app_events", - "events_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/events", - "security_groups_url": "/v2/spaces/c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1/security_groups" - } - } - ] - } - } - ] -}` - -const listRunningSecGroupsPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "3014fb5b-cb2c-4ac5-952c-e3a7e04ab028", - "url": "/v2/config/running_security_groups/3014fb5b-cb2c-4ac5-952c-e3a7e04ab028", - "created_at": "2016-06-08T16:41:21Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-6", - "rules": [ - { - "protocol": "udp", - "ports": "8080", - "destination": "198.41.191.47/1" - } - ], - "running_default": true, - "staging_default": false - } - } - ] -}` - -const listStagingSecGroupsPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "611bd883-4b93-403f-af92-3283de22e3f0", - "url": "/v2/config/staging_security_groups/611bd883-4b93-403f-af92-3283de22e3f0", - "created_at": "2016-06-08T16:41:27Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1372", - "rules": [ - { - "protocol": "udp", - "ports": "8080", - "destination": "198.41.191.47/1" - } - ], - "running_default": false, - "staging_default": true - } - } - ] -}` - -const listAppsPayload = `{ - "total_results": 28, - "total_pages": 1, - "prev_url": null, - "next_url": "/v2/appsPage2", - "resources": [ - { - "metadata": { - "guid": "af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c", - "url": "/v2/apps/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c", - "created_at": "2014-10-10T21:03:13+00:00", - "updated_at": "2014-11-10T14:07:31+00:00" - }, - "entity": { - "name": "app-test", - "production": false, - "space_guid": "8efd7c5c-d83c-4786-b399-b7bd548839e1", - "stack_guid": "2c531037-68a2-4e2c-a9e0-71f9d0abf0d4", - "buildpack": "https://github.com/cloudfoundry/buildpack-go.git", - "detected_buildpack": "", - "detected_buildpack_guid": "0d22f6a1-76c5-417f-ac6c-d9d21463ecbc", - "environment_json": { - "FOOBAR": "QUX" - }, - "memory": 256, - "instances": 1, - "disk_quota": 1024, - "state": "STARTED", - "version": "97ef1272-9eb6-4839-9df1-5ed4f55b5c45", - "command": null, - "console": false, - "debug": null, - "staging_task_id": "5879c8d06a10491a879734162000def8", - "package_state": "PENDING", - "health_check_http_endpoint": null, - "health_check_type": "port", - "health_check_timeout": null, - "staging_failed_reason": null, - "staging_failed_description": null, - "diego": true, - "docker_image": null, - "package_updated_at": "2014-11-10T14:08:50+00:00", - "detected_start_command": "app-launching-service-broker", - "enable_ssh": true, - "docker_credentials_json": { - "redacted_message": "[PRIVATE DATA HIDDEN]" - }, - "ports": [ - 8080 - ], - "space_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1", - "stack_url": "/v2/stacks/2c531037-68a2-4e2c-a9e0-71f9d0abf0d4", - "events_url": "/v2/apps/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/events", - "service_bindings_url": "/v2/apps/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/service_bindings", - "routes_url": "/v2/apps/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/routes" - } - } - ] -}` - -const listAppsPayloadPage2 = `{ - "total_results": 28, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "f9ad202b-76dd-44ec-b7c2-fd2417a561e8", - "url": "/v2/apps/f9ad202b-76dd-44ec-b7c2-fd2417a561e8", - "created_at": "2014-10-10T21:03:13+00:00", - "updated_at": "2014-11-10T14:07:31+00:00" - }, - "entity": { - "name": "app-test2", - "production": false, - "space_guid": "8efd7c5c-d83c-4786-b399-b7bd548839e1", - "stack_guid": "2c531037-68a2-4e2c-a9e0-71f9d0abf0d4", - "buildpack": "https://github.com/cloudfoundry/buildpack-go.git", - "detected_buildpack": null, - "environment_json": { - "FOOBAR": "QUX" - }, - "memory": 256, - "instances": 1, - "disk_quota": 1024, - "state": "STARTED", - "version": "97ef1272-9eb6-4839-9df1-5ed4f55b5c45", - "command": null, - "console": false, - "debug": null, - "staging_task_id": "5879c8d06a10491a879734162000def8", - "package_state": "PENDING", - "health_check_timeout": null, - "staging_failed_reason": null, - "docker_image": null, - "package_updated_at": "2014-11-10T14:08:50+00:00", - "detected_start_command": "app-launching-service-broker", - "space_url": "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1", - "stack_url": "/v2/stacks/2c531037-68a2-4e2c-a9e0-71f9d0abf0d4", - "events_url": "/v2/apps/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/events", - "service_bindings_url": "/v2/apps/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/service_bindings", - "routes_url": "/v2/apps/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/routes" - } - } - ] -}` - -const appPayload = `{ - "metadata": { - "guid": "9902530c-c634-4864-a189-71d763cb12e2", - "url": "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2", - "created_at": "2014-11-07T23:11:39+00:00", - "updated_at": "2014-11-07T23:12:03+00:00" - }, - "entity": { - "name": "test-env", - "production": false, - "space_guid": "a72fa1e8-c694-47b3-85f2-55f61fd00d73", - "stack_guid": "2c531037-68a2-4e2c-a9e0-71f9d0abf0d4", - "buildpack": null, - "detected_buildpack": "Ruby", - "environment_json": {}, - "memory": 256, - "instances": 1, - "disk_quota": 1024, - "state": "STARTED", - "version": "0d2f5607-ab6a-4abd-91fe-222cde1ea0f8", - "command": null, - "console": false, - "debug": null, - "staging_task_id": "46267d4a98ae4f4390aed29975453d60", - "package_state": "STAGED", - "health_check_timeout": null, - "staging_failed_reason": null, - "docker_image": null, - "package_updated_at": "2014-11-07T23:12:58+00:00", - "detected_start_command": "rackup -p $PORT", - "space_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73", - "stack_url": "/v2/stacks/2c531037-68a2-4e2c-a9e0-71f9d0abf0d4", - "events_url": "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/events", - "service_bindings_url": "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/service_bindings", - "routes_url": "/v2/apps/9902530c-c634-4864-a189-71d763cb12e2/routes" - } -}` - -const appEnvPayload = `{ - "staging_env_json": { - "STAGING_ENV": "staging_value" - }, - "running_env_json": { - "RUNNING_ENV": "running_value" - }, - "environment_json": { - "env_var": "env_val" - }, - "system_env_json": { - "VCAP_SERVICES": { - "abc": 123 - } - }, - "application_env_json": { - "VCAP_APPLICATION": { - "limits": { - "fds": 16384, - "mem": 1024, - "disk": 1024 - }, - "application_name": "name-2245", - "application_uris": [ - - ], - "name": "name-2245", - "space_name": "name-2246", - "space_id": "3309d44f-78ae-4058-99e1-c50469d1e043", - "uris": [ - - ], - "users": null, - "application_id": "a7c47787-a982-467c-95d7-9ab17cbcc918", - "version": "ed59723c-d691-4d4f-ac5b-f174266c988f", - "application_version": "ed59723c-d691-4d4f-ac5b-f174266c988f" - } - } -}` - -const appPayloadWithEnvironment = `{ - "metadata": { - }, - "entity": { - "environment_json": {"string": "string", "int": 1} - } -}` - -const appInstancePayload = `{ - "0": { - "state": "RUNNING", - "since": 1455210430.5104606, - "debug_ip": null, - "debug_port": null, - "console_ip": null, - "console_port": null - }, - "1": { - "state": "RUNNING", - "since": 1455210430.3912115, - "debug_ip": null, - "debug_port": null, - "console_ip": null, - "console_port": null - } -}` - -const appInstanceUnhealthyPayload = `{ - "0": { - "state": "RUNNING", - "since": 1455210430.5104606, - "debug_ip": null, - "debug_port": null, - "console_ip": null, - "console_port": null - }, - "1": { - "state": "STARTING", - "since": 1455210430.3912115, - "debug_ip": null, - "debug_port": null, - "console_ip": null, - "console_port": null - } -}` - -const appStatsPayload = `{ - "0": { - "state": "RUNNING", - "stats": { - "name": "example-app", - "uris": [ - "example-app.example.com", - "example-app-route2.example.com" - ], - "host": "192.168.1.100", - "port": 61297, - "uptime": 411118, - "mem_quota": 536870912, - "disk_quota": 1073741824, - "fds_quota": 16384, - "usage": { - "time": "2016-09-17 15:46:17 +0000", - "cpu": 0.36580239597146486, - "mem": 518123520, - "disk": 151150592 - } - } - }, - "1": { - "state": "RUNNING", - "stats": { - "name": "example-app", - "uris": [ - "example-app.example.com", - "example-app-route2.example.com" - ], - "host": "192.168.1.101", - "port": 61388, - "uptime": 419568, - "mem_quota": 536870912, - "disk_quota": 1073741824, - "fds_quota": 16384, - "usage": { - "time": "2016-09-17T15:46:17Z", - "cpu": 0.33857742931636664, - "mem": 530731008, - "disk": 151150592 - } - } - }, - "2": { - "state": "RUNNING", - "stats": { - "name": "example-app", - "uris": [ - "example-app.example.com", - "example-app-route2.example.com" - ], - "host": "192.168.1.102", - "port": 61389, - "uptime": 419568, - "mem_quota": 536870912, - "disk_quota": 1073741824, - "fds_quota": 16384, - "usage": { - "time": "2017-04-06T20:32:19.273294439Z", - "cpu": 0.33857742931636664, - "mem": 530731008, - "disk": 151150592 - } - } - }, - "3": { - "state": "RUNNING", - "stats": { - "name": "example-app", - "uris": [ - "example-app.example.com", - "example-app-route2.example.com" - ], - "host": "192.168.1.102", - "port": 61389, - "uptime": 419568, - "mem_quota": 536870912, - "disk_quota": 1073741824, - "fds_quota": 16384, - "usage": { - "time": "2017-04-12 15:27:44 UTC", - "cpu": 0.33857742931636664, - "mem": 530731008, - "disk": 151150592 - } - } - } -}` - -const appRoutesPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "311d34d1-c045-4853-845f-05132377ad7d", - "url": "/v2/routes/311d34d1-c045-4853-845f-05132377ad7d", - "created_at": "2016-06-08T16:41:44Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "host": "host-36", - "path": "/foo", - "domain_guid": "40a499f7-198a-4289-9aa2-605ba43f92ee", - "space_guid": "c7c0dd06-b078-43d7-adcb-3974cd785fdd", - "service_instance_guid": null, - "port": null, - "domain_url": "/v2/private_domains/40a499f7-198a-4289-9aa2-605ba43f92ee", - "space_url": "/v2/spaces/c7c0dd06-b078-43d7-adcb-3974cd785fdd", - "apps_url": "/v2/routes/311d34d1-c045-4853-845f-05132377ad7d/apps", - "route_mappings_url": "/v2/routes/311d34d1-c045-4853-845f-05132377ad7d/route_mappings" - } - } - ] -}` - -const spacePayload = `{ - "metadata": { - "guid": "a72fa1e8-c694-47b3-85f2-55f61fd00d73", - "url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73", - "created_at": "2014-11-03T16:47:24+00:00", - "updated_at": null - }, - "entity": { - "name": "test-space", - "organization_guid": "da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "space_quota_definition_guid": null, - "organization_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "developers_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/developers", - "managers_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/managers", - "auditors_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/auditors", - "apps_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/apps", - "routes_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/routes", - "domains_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/domains", - "service_instances_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/service_instances", - "app_events_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/app_events", - "events_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/events", - "security_groups_url": "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73/security_groups" - } -}` - -const spaceServiceOfferingsPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "6ec97e21-e879-4f72-9a80-8ec550ffec30", - "url": "/v2/services/6ec97e21-e879-4f72-9a80-8ec550ffec30", - "created_at": "2017-10-03T23:47:16Z", - "updated_at": "2017-10-10T20:53:28Z" - }, - "entity": { - "label": "cool-service", - "provider": null, - "url": null, - "description": "Cool service for CF", - "long_description": null, - "version": null, - "info_url": null, - "active": 1, - "bindable": 1, - "unique_id": "beb05948-0fa8-48bf-bfb2-7b09e6687d37", - "extra": "{\"displayName\":\"Super cool service\",\"longDescription\":\"Very cool service.\",\"documentationUrl\":\"https://readthedocs.org\"}", - "tags": [ - "cool" - ], - "requires": [ - - ], - "documentation_url": null, - "service_broker_guid": "6b3da2f0-c530-4f2b-8fd2-7cd68a21e907", - "plan_updateable": 1, - "service_plans_url": "/v2/services/6ec97e21-e879-4f72-9a80-8ec550ffec30/service_plans" - } - } - ] -}` - -const orgPayload = `{ - "metadata": { - "guid": "da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2", - "created_at": "2014-09-26T13:36:41+00:00", - "updated_at": null - }, - "entity": { - "name": "test-org", - "billing_enabled": false, - "quota_definition_guid": "183599e0-d535-4559-8675-7b6ddb5cc42d", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/183599e0-d535-4559-8675-7b6ddb5cc42d", - "spaces_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/spaces", - "domains_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/domains", - "private_domains_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/private_domains", - "users_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/users", - "managers_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/managers", - "billing_managers_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/billing_managers", - "auditors_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/auditors", - "app_events_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/app_events", - "space_quota_definitions_url": "/v2/organizations/da0dba14-6064-4f7a-b15a-ff9e677e49b2/space_quota_definitions" - } -}` - -const listServiceBindingsPayloadPage1 = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/service_bindings2", - "resources": [ - { - "metadata": { - "guid": "aa599bb3-4811-405a-bbe3-a68c7c55afc8", - "url": "/v2/service_bindings/aa599bb3-4811-405a-bbe3-a68c7c55afc8", - "created_at": "2016-06-08T16:41:43Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "app_guid": "b26e7e98-f002-41a8-a663-1b60f808a92a", - "service_instance_guid": "bde206e0-1ee8-48ad-b794-44c857633d50", - "credentials": { - "creds-key-66": "creds-val-66" - }, - "binding_options": { - - }, - "gateway_data": null, - "gateway_name": "", - "syslog_drain_url": null, - "volume_mounts": [ - - ], - "app_url": "/v2/apps/b26e7e98-f002-41a8-a663-1b60f808a92a", - "service_instance_url": "/v2/service_instances/bde206e0-1ee8-48ad-b794-44c857633d50" - } - } - ] -}` - -const listServiceBindingsPayloadPage2 = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "8201b87d-b273-4fdf-8dd4-4b42ce970cc7", - "url": "/v2/service_bindings/aa599bb3-4811-405a-bbe3-a68c7c55afc8", - "created_at": "2016-06-08T16:41:43Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "app_guid": "636bbf83-5b54-488d-9528-066f680a99dc", - "service_instance_guid": "c3023201-44f5-4dc8-a903-c69c9eba9809", - "credentials": { - "creds-key-66": "creds-val-66" - }, - "binding_options": { - - }, - "gateway_data": null, - "gateway_name": "", - "syslog_drain_url": null, - "volume_mounts": [ - - ], - "app_url": "/v2/apps/636bbf83-5b54-488d-9528-066f680a99dc", - "service_instance_url": "/v2/service_instances/c3023201-44f5-4dc8-a903-c69c9eba9809" - } - } - ] -}` - -const serviceBindingByGuidPayload = `{ - "metadata": { - "guid": "foo-bar-baz", - "url": "/v2/service_bindings/foo-bar-baz", - "created_at": "2017-06-22T03:46:24Z", - "updated_at": "2017-06-22T03:46:24Z" - }, - "entity": { - "app_guid": "app-bar-baz", - "service_instance_guid": "instance-bar-baz", - "credentials": { - "host": "host.bar.baz", - "port": 5432 - }, - "binding_options": { - }, - "gateway_data": null, - "gateway_name": "", - "syslog_drain_url": null, - "volume_mounts": [ - ], - "app_url": "/v2/apps/app-bar-baz", - "service_instance_url": "/v2/service_instances/instance-bar-baz" - } -} -` - -const listServicePlansPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "6fecf53b-7553-4cb3-b97e-930f9c4e3385", - "url": "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", - "created_at": "2016-06-08T16:41:30Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1575", - "free": false, - "description": "desc-109", - "service_guid": "1ccab853-87c9-45a6-bf99-603032d17fe5", - "extra": null, - "unique_id": "1bc2884c-ee3d-4f82-a78b-1a657f79aeac", - "public": true, - "active": true, - "bindable": true, - "service_url": "/v2/services/1ccab853-87c9-45a6-bf99-603032d17fe5", - "service_instances_url": "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385/service_instances" - } - } - ] -}` - -const getServicePlanByGuidPayload = `{ - "metadata": { - "guid": "6fecf53b-7553-4cb3-b97e-930f9c4e3385", - "url": "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", - "created_at": "2016-06-08T16:41:30Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1575", - "free": false, - "description": "desc-109", - "service_guid": "1ccab853-87c9-45a6-bf99-603032d17fe5", - "extra": null, - "unique_id": "1bc2884c-ee3d-4f82-a78b-1a657f79aeac", - "public": true, - "active": true, - "bindable": true, - "service_url": "/v2/services/1ccab853-87c9-45a6-bf99-603032d17fe5", - "service_instances_url": "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385/service_instances" - } -} -` - -const privateServicePlanPayload = `{ - "metadata": { - "guid": "6fecf53b-7553-4cb3-b97e-930f9c4e3385", - "url": "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", - "created_at": "2016-06-08T16:41:30Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1575", - "free": false, - "description": "desc-109", - "service_guid": "1ccab853-87c9-45a6-bf99-603032d17fe5", - "extra": null, - "unique_id": "1bc2884c-ee3d-4f82-a78b-1a657f79aeac", - "public": false, - "active": true, - "bindable": true, - "service_url": "/v2/services/1ccab853-87c9-45a6-bf99-603032d17fe5", - "service_instances_url": "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385/service_instances" - } -} -` - -const listServicePayload = `{ - "total_results": 22, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "a3d76c01-c08a-4505-b06d-8603265682a3", - "url": "/v2/services/a3d76c01-c08a-4505-b06d-8603265682a3", - "created_at": "2014-09-24T14:10:51+00:00", - "updated_at": "2014-10-08T00:06:30+00:00" - }, - "entity": { - "label": "nats", - "provider": null, - "url": null, - "description": "NATS is a lightweight cloud messaging system", - "long_description": null, - "version": null, - "info_url": null, - "active": true, - "bindable": true, - "unique_id": "b9310aba-2fa4-11e4-b626-a6c5e4d22fb7", - "extra": "", - "tags": [ - "nats", - "mbus", - "pubsub" - ], - "requires": [], - "documentation_url": null, - "service_broker_guid": "a4bdf03a-f0c4-43f9-9c77-f434da91404f", - "plan_updateable": false, - "service_plans_url": "/v2/services/a3d76c01-c08a-4505-b06d-8603265682a3/service_plans" - } - }, - { - "metadata": { - "guid": "ab9ad9c8-1f51-463a-ae3a-5082e9f04ae6", - "url": "/v2/services/ab9ad9c8-1f51-463a-ae3a-5082e9f04ae6", - "created_at": "2014-09-24T14:10:51+00:00", - "updated_at": "2014-10-08T00:06:30+00:00" - }, - "entity": { - "label": "etcd", - "provider": null, - "url": null, - "description": "Etcd key-value storage", - "long_description": null, - "version": null, - "info_url": null, - "active": true, - "bindable": true, - "unique_id": "211411a0-2da1-11e4-852f-a6c5e4d22fb7", - "extra": "", - "tags": [ - "etcd", - "keyvalue", - "etcd-0.4.6" - ], - "requires": [], - "documentation_url": null, - "service_broker_guid": "a4bdf03a-f0c4-43f9-9c77-f434da91404f", - "plan_updateable": false, - "service_plans_url": "/v2/services/ab9ad9c8-1f51-463a-ae3a-5082e9f04ae6/service_plans" - } - } - ] -}` - -const listServicePlanVisibilitiesPayload = `{ - "total_results": 4, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "d1b5ea55-f354-4f43-b52e-53045747adb9", - "url": "/v2/service_plan_visibilities/d1b5ea55-f354-4f43-b52e-53045747adb9", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "service_plan_guid": "62cb572c-e9ca-4c9f-b822-8292db1d9a96", - "organization_guid": "81df84f3-8ce0-4c92-990a-3760b6ff66bd", - "service_plan_url": "/v2/service_plans/62cb572c-e9ca-4c9f-b822-8292db1d9a96", - "organization_url": "/v2/organizations/81df84f3-8ce0-4c92-990a-3760b6ff66bd" - } - }, - { - "metadata": { - "guid": "332331a3-7b6c-413b-a2e4-edf90ac47fa9", - "url": "/v2/service_plan_visibilities/332331a3-7b6c-413b-a2e4-edf90ac47fa9", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "service_plan_guid": "c505f2ec-81ed-4091-b194-b8e905f32b24", - "organization_guid": "99b61b74-09d6-47db-9568-a835e42d0a1d", - "service_plan_url": "/v2/service_plans/c505f2ec-81ed-4091-b194-b8e905f32b24", - "organization_url": "/v2/organizations/99b61b74-09d6-47db-9568-a835e42d0a1d" - } - } - ] -}` - -const postServicePlanVisibilityPayload = `{ - "metadata": { - "guid": "f740b01a-4afe-4435-aedd-0a8308a7e7d6", - "url": "/v2/service_plan_visibilities/f740b01a-4afe-4435-aedd-0a8308a7e7d6", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "service_plan_guid": "ab5780a9-ac8e-4412-9496-4512e865011a", - "organization_guid": "55d0ff39-dac9-431f-ba6d-83f37381f1c3", - "service_plan_url": "/v2/service_plans/ab5780a9-ac8e-4412-9496-4512e865011a", - "organization_url": "/v2/organizations/55d0ff39-dac9-431f-ba6d-83f37381f1c3" - } -}` - -const listAppsCreatedEventPayload = `{ - "total_results": 3, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/events2", - "resources": [ - { - "metadata": { - "guid": "49ab122b-82b9-4623-8a13-24e585e32e66", - "url": "/v2/events/49ab122b-82b9-4623-8a13-24e585e32e66", - "created_at": "2016-02-26T13:00:21Z", - "updated_at": null - }, - "entity": { - "type": "audit.app.update", - "actor": "fbf30c43-436e-40e4-8ace-31970b52ce89", - "actor_type": "user", - "actor_name": "team-toad@sap.com", - "actee": "3ca436ff-67a8-468a-8c7d-27ec68a6cfe5", - "actee_type": "app", - "actee_name": "authentication-v1-pre-blue", - "timestamp": "2016-02-26T13:00:21Z", - "metadata": { - "request": { - "state": "STOPPED" - } - }, - "space_guid": "08582a96-cbef-463c-822e-bda8d4284cc7", - "organization_guid": "bfdcdf09-a3b8-46f4-ab74-d494efefe5b4" - } - }, - { - "metadata": { - "guid": "49ab122b-82b9-4623-8a13-24e585e32e66", - "url": "/v2/events/49ab122b-82b9-4623-8a13-24e585e32e66", - "created_at": "2016-02-26T13:00:21Z", - "updated_at": "2016-02-26T13:00:21Z" - }, - "entity": { - "type": "app.crash", - "actor": "fbf30c43-436e-40e4-8ace-31970b52ce89", - "actor_type": "app", - "actor_name": "authentication-v1-pre-blue", - "actee": "3ca436ff-67a8-468a-8c7d-27ec68a6cfe5", - "actee_type": "app", - "actee_name": "authentication-v1-pre-blue", - "timestamp": "2016-02-26T13:00:21Z", - "metadata": { - "instance": "", - "index": 0, - "exit_description": "2 error(s) occurred:\n\n* 1 error(s) occurred:\n\n* Exited with status 4\n* 2 error(s) occurred:\n\n* cancelled\n* cancelled", - "reason": "CRASHED" - }, - "space_guid": "08582a96-cbef-463c-822e-bda8d4284cc7", - "organization_guid": "bfdcdf09-a3b8-46f4-ab74-d494efefe5b4" - } - } - ] - }` -const listAppsCreatedEventPayload2 = `{ - "total_results": 3, - "total_pages": 2, - "prev_url": "/v2/events", - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "8e8f83c7-3fc3-4127-9359-ae391380b971", - "url": "/v2/events/8e8f83c7-3fc3-4127-9359-ae391380b971", - "created_at": "2016-02-26T13:00:21Z", - "updated_at": null - }, - "entity": { - "type": "audit.app.update", - "actor": "fbf30c43-436e-40e4-8ace-31970b52ce89", - "actor_type": "user", - "actor_name": "team-toad@sap.com", - "actee": "3ca436ff-67a8-468a-8c7d-27ec68a6cfe5", - "actee_type": "app", - "actee_name": "authentication-v1-pre-blue", - "timestamp": "2016-02-26T13:00:21Z", - "metadata": { - "request": { - "health_check_timeout": 180, - "buildpack": "nodejs_buildpack", - "command": "PRIVATE DATA HIDDEN", - "state": "STARTED" - } - }, - "space_guid": "08582a96-cbef-463c-822e-bda8d4284cc7", - "organization_guid": "bfdcdf09-a3b8-46f4-ab74-d494efefe5b4" - } - } - ] - }` - -var serviceInstancePayload = `{ - "metadata": { - "guid": "8423ca96-90ad-411f-b77a-0907844949fc", - "url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc", - "created_at": "2016-10-21T18:22:56Z", - "updated_at": "2016-10-21T18:22:56Z" - }, - "entity": { - "name": "fortunes-db", - "credentials": {}, - "service_guid": "440ce9d9-b108-4bbe-80b4-08338f3cc25b", - "service_plan_guid": "f48419f7-4717-4706-86e4-a24973848a77", - "space_guid": "21e5fdc7-5131-4743-8447-6373cf336a77", - "gateway_data": null, - "dashboard_url": "https://p-mysql.system.example.com/manage/instances/8423ca96-90ad-411f-b77a-0907844949fc", - "type": "managed_service_instance", - "last_operation": { - "type": "create", - "state": "succeeded", - "description": "", - "updated_at": null, - "created_at": "2016-10-21T18:22:56Z" - }, - "tags": [], - "space_url": "/v2/spaces/21e5fdc7-5131-4743-8447-6373cf336a77", - "service_plan_url": "/v2/service_plans/f48419f7-4717-4706-86e4-a24973848a77", - "service_bindings_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_bindings", - "service_keys_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_keys", - "routes_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/routes", - "service_url": "/v2/services/440ce9d9-b108-4bbe-80b4-08338f3cc25b" - } -}` - -var listServiceInstancePayload = `{ - "total_results": 2, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "8423ca96-90ad-411f-b77a-0907844949fc", - "url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc", - "created_at": "2016-10-21T18:22:56Z", - "updated_at": null - }, - "entity": { - "name": "fortunes-db", - "credentials": {}, - "service_guid": "440ce9d9-b108-4bbe-80b4-08338f3cc25b", - "service_plan_guid": "f48419f7-4717-4706-86e4-a24973848a77", - "space_guid": "21e5fdc7-5131-4743-8447-6373cf336a77", - "gateway_data": null, - "dashboard_url": "https://p-mysql.system.example.com/manage/instances/8423ca96-90ad-411f-b77a-0907844949fc", - "type": "managed_service_instance", - "last_operation": { - "type": "create", - "state": "succeeded", - "description": "", - "updated_at": null, - "created_at": "2016-10-21T18:22:56Z" - }, - "tags": [], - "space_url": "/v2/spaces/21e5fdc7-5131-4743-8447-6373cf336a77", - "service_plan_url": "/v2/service_plans/f48419f7-4717-4706-86e4-a24973848a77", - "service_bindings_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_bindings", - "service_keys_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_keys", - "routes_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/routes", - "service_url": "/v2/services/440ce9d9-b108-4bbe-80b4-08338f3cc25b" - } - }, - { - "metadata": { - "guid": "8423ca96-90ad-411f-b77a-0907844949fc", - "url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc", - "created_at": "2016-10-21T18:22:56Z", - "updated_at": null - }, - "entity": { - "name": "fortunes-db", - "credentials": {}, - "service_guid": "440ce9d9-b108-4bbe-80b4-08338f3cc25b", - "service_plan_guid": "f48419f7-4717-4706-86e4-a24973848a77", - "space_guid": "21e5fdc7-5131-4743-8447-6373cf336a77", - "gateway_data": null, - "dashboard_url": "https://p-mysql.system.example.com/manage/instances/8423ca96-90ad-411f-b77a-0907844949fc", - "type": "managed_service_instance", - "last_operation": { - "type": "create", - "state": "succeeded", - "description": "", - "updated_at": null, - "created_at": "2016-10-21T18:22:56Z" - }, - "tags": [], - "space_url": "/v2/spaces/21e5fdc7-5131-4743-8447-6373cf336a77", - "service_plan_url": "/v2/service_plans/f48419f7-4717-4706-86e4-a24973848a77", - "service_bindings_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_bindings", - "service_keys_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_keys", - "routes_url": "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/routes", - "service_url": "/v2/services/440ce9d9-b108-4bbe-80b4-08338f3cc25b" - } - } - ] -}` - -const userProvidedServiceInstancePayload = `{ - "metadata": { - "guid": "e9358711-0ad9-4f2a-b3dc-289d47c17c87", - "url": "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87", - "created_at": "2016-06-08T16:41:33Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1700", - "credentials": { - "creds-key-58": "creds-val-58" - }, - "space_guid": "22236d1a-d9c7-44b7-bdad-2bb079a6c4a1", - "type": "user_provided_service_instance", - "syslog_drain_url": "https://foo.com/url-104", - "route_service_url": null, - "space_url": "/v2/spaces/22236d1a-d9c7-44b7-bdad-2bb079a6c4a1", - "service_bindings_url": "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/service_bindings", - "routes_url": "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/routes" - } -}` - -const listUserProvidedServiceInstancePayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "54e4c645-7d20-4271-8c27-8cc904e1e7ee", - "url": "/v2/user_provided_service_instances/54e4c645-7d20-4271-8c27-8cc904e1e7ee", - "created_at": "2016-06-08T16:41:33Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1696", - "credentials": { - "creds-key-57": "creds-val-57" - }, - "space_guid": "87d14ac2-f396-460e-a523-dc1d77aba35a", - "type": "user_provided_service_instance", - "syslog_drain_url": "https://foo.com/url-103", - "route_service_url": null, - "space_url": "/v2/spaces/87d14ac2-f396-460e-a523-dc1d77aba35a", - "service_bindings_url": "/v2/user_provided_service_instances/54e4c645-7d20-4271-8c27-8cc904e1e7ee/service_bindings", - "routes_url": "/v2/user_provided_service_instances/54e4c645-7d20-4271-8c27-8cc904e1e7ee/routes" - } - } - ] -}` - -const listRoutesPayloadPage1 string = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/routes_page_2", - "resources": [ - { - "metadata": { - "guid": "24707add-83b8-4fd8-a8f4-b7297199c805", - "url": "/v2/routes/24707add-83b8-4fd8-a8f4-b7297199c805", - "created_at": "2017-02-06T14:13:57Z", - "updated_at": "2017-02-06T14:13:57Z" - }, - "entity": { - "host": "test-1", - "path": "/foo", - "domain_guid": "0b183484-45cc-4855-94d4-892f80f20c13", - "space_guid": "494d8b64-8181-4183-a6d3-6279db8fec6e", - "service_instance_guid": null, - "port": null, - "domain_url": "/v2/shared_domains/0b183484-45cc-4855-94d4-892f80f20c13", - "space_url": "/v2/spaces/494d8b64-8181-4183-a6d3-6279db8fec6e", - "apps_url": "/v2/routes/24707add-83b8-4fd8-a8f4-b7297199c805/apps", - "route_mappings_url": "/v2/routes/24707add-83b8-4fd8-a8f4-b7297199c805/route_mappings" - } - } - ] -}` - -const listRoutesPayloadPage2 string = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "1aba0d30-eb57-4543-a805-0d1c77171b4d", - "url": "/v2/routes/1aba0d30-eb57-4543-a805-0d1c77171b4d", - "created_at": "2017-02-07T03:57:17Z", - "updated_at": "2017-02-07T03:57:17Z" - }, - "entity": { - "host": "test-2", - "path": "", - "domain_guid": "0b183484-45cc-4855-94d4-892f80f20c13", - "space_guid": "494d8b64-8181-4183-a6d3-6279db8fec6e", - "service_instance_guid": null, - "port": null, - "domain_url": "/v2/shared_domains/0b183484-45cc-4855-94d4-892f80f20c13", - "space_url": "/v2/spaces/494d8b64-8181-4183-a6d3-6279db8fec6e", - "apps_url": "/v2/routes/1aba0d30-eb57-4543-a805-0d1c77171b4d/apps", - "route_mappings_url": "/v2/routes/1aba0d30-eb57-4543-a805-0d1c77171b4d/route_mappings" - } - } - ] -}` - -const bindRoute string = ` -{ - "metadata": { - "guid": "7803de15-a20f-4dea-bf17-37de56629582", - "url": "/v2/routes/7803de15-a20f-4dea-bf17-37de56629582", - "created_at": "2016-06-08T16:41:28Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "host": "foo-host", - "path": "", - "domain_guid": "08167353-32da-4ed9-9ef5-aa7b31bbc009", - "space_guid": "b65a9a76-8c55-460b-9162-18b396da66cf", - "service_instance_guid": null, - "port": null, - "domain_url": "/v2/shared_domains/08167353-32da-4ed9-9ef5-aa7b31bbc009", - "space_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf", - "apps_url": "/v2/routes/7803de15-a20f-4dea-bf17-37de56629582/apps", - "route_mappings_url": "/v2/routes/7803de15-a20f-4dea-bf17-37de56629582/route_mappings" - } -} -` - -const createRoute string = ` -{ - "metadata": { - "guid": "b3fe6f31-e897-4e02-b49e-263ca96b4e3a", - "url": "/v2/routes/b3fe6f31-e897-4e02-b49e-263ca96b4e3a", - "created_at": "2018-05-24T22:16:36Z", - "updated_at": "2018-05-24T22:16:36Z" - }, - "entity": { - "host": "foo-host", - "path": "", - "domain_guid": "08167353-32da-4ed9-9ef5-aa7b31bbc009", - "space_guid": "b65a9a76-8c55-460b-9162-18b396da66cf", - "service_instance_guid": null, - "port": null, - "domain_url": "/v2/shared_domains/08167353-32da-4ed9-9ef5-aa7b31bbc009", - "domain": { - "metadata": { - "guid": "08167353-32da-4ed9-9ef5-aa7b31bbc009", - "url": "/v2/shared_domains/08167353-32da-4ed9-9ef5-aa7b31bbc009", - "created_at": "2018-05-11T00:28:15Z", - "updated_at": "2018-05-11T00:28:15Z" - }, - "entity": { - "name": "apps.pcf.example.com", - "router_group_guid": null, - "router_group_type": null - } - }, - "space_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf", - "space": { - "metadata": { - "guid": "b65a9a76-8c55-460b-9162-18b396da66cf", - "url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf", - "created_at": "2018-05-18T02:52:35Z", - "updated_at": "2018-05-18T02:52:35Z" - }, - "entity": { - "name": "dev", - "organization_guid": "de84b21e-dd45-4a58-b483-83be15cf1b00", - "space_quota_definition_guid": null, - "isolation_segment_guid": null, - "allow_ssh": true, - "organization_url": "/v2/organizations/de84b21e-dd45-4a58-b483-83be15cf1b00", - "developers_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/developers", - "managers_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/managers", - "auditors_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/auditors", - "apps_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/apps", - "routes_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/routes", - "domains_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/domains", - "service_instances_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/service_instances", - "app_events_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/app_events", - "events_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/events", - "security_groups_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/security_groups", - "staging_security_groups_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/staging_security_groups" - } - }, - "apps_url": "/v2/routes/b3fe6f31-e897-4e02-b49e-263ca96b4e3a/apps", - "apps": [ - - ], - "route_mappings_url": "/v2/routes/b3fe6f31-e897-4e02-b49e-263ca96b4e3a/route_mappings" - } -} -` - -const createTcpRoute string = ` -{ - "metadata": { - "guid": "78fe5006-1d1c-41ba-94de-eb7002241b82", - "url": "/v2/routes/78fe5006-1d1c-41ba-94de-eb7002241b82", - "created_at": "2017-05-24T19:04:34Z", - "updated_at": null - }, - "entity": { - "host": "", - "path": "", - "domain_guid": "08167353-32da-4ed9-9ef5-aa7b31bbc009", - "space_guid": "b65a9a76-8c55-460b-9162-18b396da66cf", - "service_instance_guid": null, - "port": 1099, - "domain_url": "/v2/shared_domains/08167353-32da-4ed9-9ef5-aa7b31bbc009", - "domain": { - "metadata": { - "guid": "08167353-32da-4ed9-9ef5-aa7b31bbc009", - "url": "/v2/shared_domains/08167353-32da-4ed9-9ef5-aa7b31bbc009", - "created_at": "2017-01-17T17:54:46Z", - "updated_at": null - }, - "entity": { - "name": "tcp.main.example.com", - "router_group_guid": "b4c90165-5689-4a7e-4cfc-f55dc41f3e22", - "router_group_type": null - } - }, - "space_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf", - "space": { - "metadata": { - "guid": "b65a9a76-8c55-460b-9162-18b396da66cf", - "url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf", - "created_at": "2016-12-09T15:06:17Z", - "updated_at": null - }, - "entity": { - "name": "system", - "organization_guid": "236c6d93-7cfb-4d4a-bc76-9a9cc2bc8e58", - "space_quota_definition_guid": null, - "allow_ssh": true, - "organization_url": "/v2/organizations/236c6d93-7cfb-4d4a-bc76-9a9cc2bc8e58", - "developers_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/developers", - "managers_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/managers", - "auditors_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/auditors", - "apps_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/apps", - "routes_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/routes", - "domains_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/domains", - "service_instances_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/service_instances", - "app_events_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/app_events", - "events_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/events", - "security_groups_url": "/v2/spaces/b65a9a76-8c55-460b-9162-18b396da66cf/security_groups" - } - }, - "apps_url": "/v2/routes/78fe5006-1d1c-41ba-94de-eb7002241b82/apps", - "apps": [ - - ], - "route_mappings_url": "/v2/routes/78fe5006-1d1c-41ba-94de-eb7002241b82/route_mappings" - } -}` - -const listStacksPayloadPage1 string = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/stacks_page_2", - "resources": [ - { - "metadata": { - "guid": "67e019a3-322a-407a-96e0-178e95bd0e55", - "url": "/v2/stacks/67e019a3-322a-407a-96e0-178e95bd0e55", - "created_at": "2017-01-18T16:39:11Z", - "updated_at": "2017-01-18T16:39:11Z" - }, - "entity": { - "name": "cflinuxfs2", - "description": "Cloud Foundry Linux-based filesystem" - } - } - ] -}` - -const listStacksPayloadPage2 string = `{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "a9be2e10-0164-401d-94e0-88455d614844", - "url": "/v2/stacks/a9be2e10-0164-401d-94e0-88455d614844", - "created_at": "2017-01-18T16:39:11Z", - "updated_at": "2017-01-18T16:39:11Z" - }, - "entity": { - "name": "windows2012R2", - "description": "Experimental Windows runtime" - } - } - ] -}` - -const listTasksPayload string = ` -{ -"pagination": { -"total_results": 2, -"total_pages": 1, -"first": { -"href": "https://api.run.example.com/v3/tasks?page=1&per_page=50" -}, -"last": { -"href": "https://api.run.example.com/v3/tasks?page=1&per_page=50" -}, -"next": null, -"previous": null -}, -"resources": [ -{ -"guid": "xxxxxxxx-e99c-4d60-xxx-e066eb45f8a7", -"sequence_id": 1, -"name": "xxxxxxxx", -"state": "FAILED", -"memory_in_mb": 1024, -"disk_in_mb": 1024, -"result": { -"failure_reason": "Exited with status 127" -}, -"created_at": "2016-12-22T13:24:20Z", -"updated_at": "2016-12-22T13:24:25Z", -"droplet_guid": "xxxxxxxx-6cae-49b0-xxxxx-9265950fc16b", -"links": { -"self": { -"href": "https://api.run.example.com/v3/tasks/xxxxxxxx-e99c-4d60-xxxxx-e066eb45f8a7" -}, -"app": { -"href": "https://api.run.example.com/v3/apps/xxxxxxxxx-1b30-4e4d-xxxxx-44dec11e3d5b" -}, -"droplet": { -"href": "https://api.run.example.com/v3/droplets/xxxxxxxxx-6cae-490b-xxxxx-9265950fc16b" -} -} -}, -{ -"guid": "xxxxxxxx-5a25-4110-xxx-b309dc5cb0aa", -"sequence_id": 2, -"name": "yyyyyyyyy", -"state": "FAILED", -"memory_in_mb": 1024, -"disk_in_mb": 1024, -"result": { -"failure_reason": "Exited with status 127" -}, -"created_at": "2016-12-22T13:24:36Z", -"updated_at": "2016-12-22T13:24:42Z", -"droplet_guid": "xxxxxxx-6cae-49b0-xxxx-9265950fc16b", -"links": { -"self": { -"href": "https://api.run.example.com/v3/tasks/xxxxxxxxx-5a25-4110-xxxxx-b309dc5cb0aa" -}, -"app": { -"href": "https://api.run.example.com/v3/apps/xxxxxxxxx-1b30-4e4d-xxxxx-44dec11e3d5b" -}, -"droplet": { -"href": "https://api.run.example.com/v3/droplets/xxxxxxxx-6cae-490b-xxxxx-9265950fc16b" -} -} -} -] -} -` - -const createTaskPayload = ` -{ - "guid": "d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa", - "sequence_id": 1, - "name": "migrate", - "command": "rake db:migrate", - "state": "RUNNING", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "result": { - "failure_reason": null - }, - "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", - "created_at": "2016-05-04T17:00:41Z", - "updated_at": "2016-05-04T17:00:42Z", - "links": { - "self": { - "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa" - }, - "app": { - "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" - }, - "droplet": { - "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" - } - } -} -` - -const errorV3Payload = `{ - "errors": [ - { - "code": 10008, - "title": "CF-UnprocessableEntity", - "detail": "something went wrong" - } - ] -} -` - -const listDomainsPayload = `{ - "total_results": 4, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "b2a35f0c-d5ad-4a59-bea7-461711d96b0d", - "url": "/v2/private_domains/b2a35f0c-d5ad-4a59-bea7-461711d96b0d", - "created_at": "2016-06-08T16:41:39Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "vcap.me", - "owning_organization_guid": "4cf3bc47-eccd-4662-9322-7833c3bdcded", - "owning_organization_url": "/v2/organizations/4cf3bc47-eccd-4662-9322-7833c3bdcded", - "shared_organizations_url": "/v2/private_domains/b2a35f0c-d5ad-4a59-bea7-461711d96b0d/shared_organizations" - } - }, - { - "metadata": { - "guid": "28db6393-cc6f-4318-a63c-f4009e8842bc", - "url": "/v2/private_domains/28db6393-cc6f-4318-a63c-f4009e8842bc", - "created_at": "2016-06-08T16:41:39Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "domain-61.example.com", - "owning_organization_guid": "c262280e-0ccc-4e13-918a-6852f2d1e3a0", - "owning_organization_url": "/v2/organizations/c262280e-0ccc-4e13-918a-6852f2d1e3a0", - "shared_organizations_url": "/v2/private_domains/28db6393-cc6f-4318-a63c-f4009e8842bc/shared_organizations" - } - }, - { - "metadata": { - "guid": "a16ffec7-5fab-4447-861e-c38da6548c6d", - "url": "/v2/private_domains/a16ffec7-5fab-4447-861e-c38da6548c6d", - "created_at": "2016-06-08T16:41:39Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "domain-62.example.com", - "owning_organization_guid": "68f69961-f751-4b52-907c-4469009fdf74", - "owning_organization_url": "/v2/organizations/68f69961-f751-4b52-907c-4469009fdf74", - "shared_organizations_url": "/v2/private_domains/a16ffec7-5fab-4447-861e-c38da6548c6d/shared_organizations" - } - }, - { - "metadata": { - "guid": "4168cdaf-1586-41a6-9e5f-d8c715c332f5", - "url": "/v2/private_domains/4168cdaf-1586-41a6-9e5f-d8c715c332f5", - "created_at": "2016-06-08T16:41:39Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "domain-63.example.com", - "owning_organization_guid": "8d8ed1ba-f7f3-48f1-8d9a-2dfaad91335b", - "owning_organization_url": "/v2/organizations/8d8ed1ba-f7f3-48f1-8d9a-2dfaad91335b", - "shared_organizations_url": "/v2/private_domains/4168cdaf-1586-41a6-9e5f-d8c715c332f5/shared_organizations" - } - } - ] -}` - -const listSharedDomainsPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "91977695-8ad9-40db-858f-4df782603ec3", - "url": "/v2/shared_domains/91977695-8ad9-40db-858f-4df782603ec3", - "created_at": "2016-06-08T16:41:37Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "domain-49.example.com", - "router_group_guid": "my-random-guid", - "router_group_type": "tcp" - } - } - ] -}` - -const listSharedDomainByGuidPayload = `{ - "metadata": { - "guid": "91977695-8ad9-40db-858f-4df782603ec3", - "url": "/v2/shared_domains/91977695-8ad9-40db-858f-4df782603ec3", - "created_at": "2016-06-08T16:41:37Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "apps.some.random.cf.installation.example.com", - "internal": false, - "router_group_guid": null, - "router_group_type": null - } -} -` - -const listDomainsEmptyResponse = `{ - "total_results": 0, - "total_pages": 0, - "prev_url": null, - "next_url": null, - "resources": [] -}` - -const postDomainPayload = `{ - "metadata": { - "guid": "b98aeca1-22b9-49f9-8428-3ace9ea2ba11", - "url": "/v2/private_domains/b98aeca1-22b9-49f9-8428-3ace9ea2ba11", - "created_at": "2016-06-08T16:41:39Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "exmaple.com", - "owning_organization_guid": "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db", - "owning_organization_url": "/v2/organizations/8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db", - "shared_organizations_url": "/v2/private_domains/b98aeca1-22b9-49f9-8428-3ace9ea2ba11/shared_organizations" - } -}` - -const postExternalSharedDomainPayload = `{ - "metadata": { - "guid": "b98aeca1-22b9-49f9-8428-3ace9ea2ba11", - "url": "/v2/shared_domains/b98aeca1-22b9-49f9-8428-3ace9ea2ba11", - "created_at": "2016-06-08T16:41:39Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "shared-exmaple.com", - "internal": false, - "router_group_guid": "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db", - "router_group_type": "tcp" - } -}` - -const postInternalSharedDomainPayload = `{ - "metadata": { - "guid": "b98aeca1-22b9-49f9-8428-3ace9ea2ba11", - "url": "/v2/shared_domains/b98aeca1-22b9-49f9-8428-3ace9ea2ba11", - "created_at": "2016-06-08T16:41:39Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "shared-exmaple.com", - "internal": true - } -}` - -const listBuildpacksPayload = `{ - "total_results": 3, - "total_pages": 1, - "prev_url": null, - "next_url": "/v2/buildpacksPage2", - "resources": [ - { - "metadata": { - "guid": "c92b6f5f-d2a4-413a-b515-647d059723aa", - "url": "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_1", - "position": 1, - "enabled": true, - "locked": false, - "filename": "name-1616", - "stack": "cflinuxfs2" - } - }, - { - "metadata": { - "guid": "4de2ac22-ef36-4d62-9698-5f2b426748a9", - "url": "/v2/buildpacks/4de2ac22-ef36-4d62-9698-5f2b426748a9", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_2", - "position": 2, - "enabled": true, - "locked": false, - "filename": "name-1617", - "stack": "cflinuxfs2" - } - }, - { - "metadata": { - "guid": "79f16936-56f1-41d5-a4c4-f0e9a8877791", - "url": "/v2/buildpacks/79f16936-56f1-41d5-a4c4-f0e9a8877791", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_3", - "position": 3, - "enabled": true, - "locked": false, - "filename": "name-1618", - "stack": "cflinuxfs2" - } - } - ] -}` - -const listBuildpacksPayload2 = `{ - "total_results": 3, - "total_pages": 1, - "prev_url": "/v2/buildpacks", - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "c92b6f5f-d2a4-413a-b515-647d059723aa", - "url": "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_1", - "position": 1, - "enabled": true, - "locked": false, - "filename": "name-1616", - "stack": "cflinuxfs2" - } - }, - { - "metadata": { - "guid": "4de2ac22-ef36-4d62-9698-5f2b426748a9", - "url": "/v2/buildpacks/4de2ac22-ef36-4d62-9698-5f2b426748a9", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_2", - "position": 2, - "enabled": true, - "locked": false, - "filename": "name-1617", - "stack": "cflinuxfs2" - } - }, - { - "metadata": { - "guid": "79f16936-56f1-41d5-a4c4-f0e9a8877791", - "url": "/v2/buildpacks/79f16936-56f1-41d5-a4c4-f0e9a8877791", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_3", - "position": 3, - "enabled": true, - "locked": false, - "filename": "name-1618", - "stack": "cflinuxfs2" - } - } - ] -}` - -const buildpackPayloadBackwardsCompat = `{ - "metadata": { - "guid": "c92b6f5f-d2a4-413a-b515-647d059723aa", - "url": "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_1", - "position": 1, - "enabled": true, - "locked": false, - "filename": "name-1616" - } -}` - -const buildpackPayload = `{ - "metadata": { - "guid": "c92b6f5f-d2a4-413a-b515-647d059723aa", - "url": "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name_1", - "position": 1, - "enabled": true, - "locked": false, - "filename": "name-1616", - "stack": "cflinuxfs2" - } -}` - -const userByGUIDPayload = `{ - "metadata": { - "guid": "72ccf759-43aa-4954-903f-7d892c268e80", - "url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80", - "created_at": "2017-11-03T01:33:31Z", - "updated_at": "2017-11-03T01:33:31Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "user@example.com", - "spaces_url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80/spaces", - "organizations_url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80/organizations", - "managed_organizations_url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80/managed_organizations", - "billing_managed_organizations_url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80/billing_managed_organizations", - "audited_organizations_url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80/audited_organizations", - "managed_spaces_url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80/managed_spaces", - "audited_spaces_url": "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80/audited_spaces" - } -}` - -const listUsersPayload = `{ - "total_results": 8, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/usersPage2", - "resources": [ - { - "metadata": { - "guid": "ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac", - "url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac", - "created_at": "2017-01-13T10:50:21Z", - "updated_at": "2017-01-27T12:20:08Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "testUser1", - "spaces_url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac/spaces", - "organizations_url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac/organizations", - "managed_organizations_url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac/managed_organizations", - "billing_managed_organizations_url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac/billing_managed_organizations", - "audited_organizations_url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac/audited_organizations", - "managed_spaces_url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac/managed_spaces", - "audited_spaces_url": "/v2/users/ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac/audited_spaces" - } - }, - { - "metadata": { - "guid": "f97f5699-c920-4633-aa23-bd70f3db0808", - "url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808", - "created_at": "2017-01-17T15:08:45Z", - "updated_at": "2017-01-27T12:23:17Z" - }, - "entity": { - "admin": false, - "active": true, - "default_space_guid": null, - "username": "testUser2", - "spaces_url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808/spaces", - "organizations_url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808/organizations", - "managed_organizations_url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808/managed_organizations", - "billing_managed_organizations_url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808/billing_managed_organizations", - "audited_organizations_url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808/audited_organizations", - "managed_spaces_url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808/managed_spaces", - "audited_spaces_url": "/v2/users/f97f5699-c920-4633-aa23-bd70f3db0808/audited_spaces" - } - } - ] -}` - -const listUsersPayloadPage2 = `{ - "total_results": 8, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "cadd6389-fcf6-4928-84f0-6153556bf693", - "url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693", - "created_at": "2017-01-04T06:27:51Z", - "updated_at": "2017-01-27T12:21:19Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "testUser3", - "spaces_url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/spaces", - "organizations_url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/organizations", - "managed_organizations_url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/managed_organizations", - "billing_managed_organizations_url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/billing_managed_organizations", - "audited_organizations_url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/audited_organizations", - "managed_spaces_url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/managed_spaces", - "audited_spaces_url": "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/audited_spaces" - } - }, - { - "metadata": { - "guid": "79c854b0-c12a-41b7-8d3c-fdd6e116e385", - "url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385", - "created_at": "2017-01-05T14:50:42Z", - "updated_at": "2017-01-27T12:23:17Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "username": "testUser4", - "spaces_url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385/spaces", - "organizations_url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385/organizations", - "managed_organizations_url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385/managed_organizations", - "billing_managed_organizations_url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385/billing_managed_organizations", - "audited_organizations_url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385/audited_organizations", - "managed_spaces_url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385/managed_spaces", - "audited_spaces_url": "/v2/users/79c854b0-c12a-41b7-8d3c-fdd6e116e385/audited_spaces" - } - } - ] -}` - -const listUserSpacesPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "9881c79e-d269-4a53-9d77-cb21b745356e", - "url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e", - "created_at": "2016-06-08T16:41:37Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "dev", - "organization_guid": "6a2a2d18-7620-43cf-a332-353824b431b2", - "space_quota_definition_guid": null, - "allow_ssh": true, - "organization_url": "/v2/organizations/6a2a2d18-7620-43cf-a332-353824b431b2", - "developers_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/developers", - "managers_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/managers", - "auditors_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/auditors", - "apps_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/apps", - "routes_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/routes", - "domains_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/domains", - "service_instances_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/service_instances", - "app_events_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/app_events", - "events_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/events", - "security_groups_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/security_groups", - "staging_security_groups_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/staging_security_groups" - } - } - ] -} -` - -const listUserOrgsPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "9881c79e-d269-4a53-9d77-cb21b745356e", - "url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e", - "created_at": "2016-06-08T16:41:37Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "dev", - "billing_enabled": false, - "quota_definition_guid": "6a2a2d18-7620-43cf-a332-353824b431b2", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/6a2a2d18-7620-43cf-a332-353824b431b2", - "spaces_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/spaces", - "domains_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/domains", - "private_domains_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/private_domains", - "users_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/users", - "managers_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/managers", - "billing_managers_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/billing_managers", - "auditors_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/auditors", - "app_events_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/app_events", - "space_quota_definitions_url": "/v2/organizations/9881c79e-d269-4a53-9d77-cb21b745356e/space_quota_definitions" - } - } - ] -} -` - -const createUserPayload = `{ - "metadata": { - "guid": "guid-cb24b36d-4656-468e-a50d-b53113ac6177", - "url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177", - "created_at": "2016-06-08T16:41:37Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "admin": false, - "active": false, - "default_space_guid": null, - "spaces_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/spaces", - "organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/organizations", - "managed_organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/managed_organizations", - "billing_managed_organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/billing_managed_organizations", - "audited_organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/audited_organizations", - "managed_spaces_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/managed_spaces", - "audited_spaces_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/audited_spaces" - } -}` - -const createIsolationSegmentPayload = `{ - "guid": "323f211e-fea3-4161-9bd1-615392327913", - "name": "TheKittenIsTheShark", - "created_at": "2016-10-19T20:25:04Z", - "updated_at": "2016-11-08T16:41:26Z", - "links": { - "self": { - "href": "https://api.example.org/v3/isolation_segments/323f211e-fea3-4161-9bd1-615392327913" - }, - "spaces": { - "href": "https://api.example.org/v3/isolation_segments/323f211e-fea3-4161-9bd1-615392327913/relationships/spaces" - }, - "organizations": { - "href": "https://api.example.org/v3/isolation_segments/323f211e-fea3-4161-9bd1-615392327913/relationships/organizations" - } - } -}` - -const listIsolationSegmentsPayload = `{ - "pagination": { - "total_results": 2, - "total_pages": 1, - "first": { - "href": "https://api.example.org/v3/isolation_segments?page=1&per_page=50" - }, - "last": { - "href": "https://api.example.org/v3/isolation_segments?page=1&per_page=50" - }, - "next": null, - "previous": null - }, - "resources": [ - { - "guid": "033b4c58-12bb-499a-b05d-4b6fc9e2993b", - "name": "shared", - "created_at": "2017-04-02T11:22:04Z", - "updated_at": "2017-04-02T11:22:04Z", - "links": { - "self": { - "href": "https://api.example.org/v3/isolation_segments/033b4c58-12bb-499a-b05d-4b6fc9e2993b" - }, - "organizations": { - "href": "https://api.example.org/v3/isolation_segments/033b4c58-12bb-499a-b05d-4b6fc9e2993b/organizations" - }, - "spaces": { - "href": "https://api.example.org/v3/isolation_segments/033b4c58-12bb-499a-b05d-4b6fc9e2993b/relationships/spaces" - } - } - }, - { - "guid": "23d0baf4-9d3c-44d8-b2dc-1767bcdad1e0", - "name": "my_segment", - "created_at": "2017-04-07T11:20:16Z", - "updated_at": "2017-04-07T11:20:16Z", - "links": { - "self": { - "href": "https://api.example.org/v3/isolation_segments/23d0baf4-9d3c-44d8-b2dc-1767bcdad1e0" - }, - "organizations": { - "href": "https://api.example.org/v3/isolation_segments/23d0baf4-9d3c-44d8-b2dc-1767bcdad1e0/organizations" - }, - "spaces": { - "href": "https://api.example.org/v3/isolation_segments/23d0baf4-9d3c-44d8-b2dc-1767bcdad1e0/relationships/spaces" - } - } - } - ] -}` - -const listServiceKeysPayloadPage1 = `{ - "total_results": 4, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/service_keys2", - "resources": [ - { - "metadata": { - "guid": "3b933598-64ed-4613-a0f5-b7e8c0379368", - "url": "/v2/service_keys/3b933598-64ed-4613-a0f5-b7e8c0379368", - "created_at": "2016-08-01T15:17:35Z", - "updated_at": "2016-08-01T15:17:35Z" - }, - "entity": { - "name": "RedisMonitoringKey", - "service_instance_guid": "ad98f310-a3a0-47aa-9116-f8295d41a9b2", - "credentials": { - "host": "10.10.10.10", - "password": "some-password", - "port": 12345 - }, - "service_instance_url": "/v2/service_instances/ad98f310-a3a0-47aa-9116-f8295d41a9b2" - } - }, - { - "metadata": { - "guid": "8be3911b-c621-4467-8866-f8b924aaee57", - "url": "/v2/service_keys/8be3911b-c621-4467-8866-f8b924aaee57", - "created_at": "2017-05-16T12:14:46Z", - "updated_at": "2017-05-16T12:14:46Z" - }, - "entity": { - "name": "test01_key", - "service_instance_guid": "ecf26687-e176-4784-b181-b3c942fecb62", - "credentials": { - "jms": "nhp://100.100.100.100:9008", - "js_uri": "http://100.100.100.100:9008", - "amqp": "amqp://100.100.100.100:9008", - "nhp": "nhp://100.100.100.100:9009", - "mqtt": "tcp://100.100.100.100:9008", - "name": "fcf26687-e176-4784-b181-b3c942fecb62", - "nsp": "nsp://100.100.100.100:9008", - "userid": "cfu-9be3911b-c621-4467-8866-f8b924aaee57", - "uri": "nhp://100.100.100.100:9008", - "uriInfos": [ - { - "host": "100.100.100.100", - "port": 9008 - } - ] - }, - "service_instance_url": "/v2/service_instances/fcf26687-e176-4784-b181-b3c942fecb62" - } - } - ] -}` - -const listServiceKeysPayloadPage2 = `{ - "total_results": 4, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "3b933598-64ed-4613-a0f5-b7e8c0379368", - "url": "/v2/service_keys/3b933598-64ed-4613-a0f5-b7e8c0379368", - "created_at": "2016-08-01T15:17:35Z", - "updated_at": "2016-08-01T15:17:35Z" - }, - "entity": { - "name": "RedisMonitoringKey", - "service_instance_guid": "ad98f310-a3a0-47aa-9116-f8295d41a9b2", - "credentials": { - "host": "10.10.10.10", - "password": "some-password", - "port": 12345 - }, - "service_instance_url": "/v2/service_instances/ad98f310-a3a0-47aa-9116-f8295d41a9b2" - } - }, - { - "metadata": { - "guid": "8be3911b-c621-4467-8866-f8b924aaee57", - "url": "/v2/service_keys/8be3911b-c621-4467-8866-f8b924aaee57", - "created_at": "2017-05-16T12:14:46Z", - "updated_at": "2017-05-16T12:14:46Z" - }, - "entity": { - "name": "test01_key", - "service_instance_guid": "ecf26687-e176-4784-b181-b3c942fecb62", - "credentials": { - "jms": "nhp://100.100.100.100:9008", - "js_uri": "http://100.100.100.100:9008", - "amqp": "amqp://100.100.100.100:9008", - "nhp": "nhp://100.100.100.100:9009", - "mqtt": "tcp://100.100.100.100:9008", - "name": "fcf26687-e176-4784-b181-b3c942fecb62", - "nsp": "nsp://100.100.100.100:9008", - "userid": "cfu-9be3911b-c621-4467-8866-f8b924aaee57", - "uri": "nhp://100.100.100.100:9008", - "uriInfos": [ - { - "host": "100.100.100.100", - "port": 9008 - } - ] - }, - "service_instance_url": "/v2/service_instances/fcf26687-e176-4784-b181-b3c942fecb62" - } - } - ] -}` - -const getServiceKeyPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "8be3911b-c621-4467-8866-f8b924aaee57", - "url": "/v2/service_keys/8be3911b-c621-4467-8866-f8b924aaee57", - "created_at": "2017-05-16T12:14:46Z", - "updated_at": "2017-05-16T12:14:46Z" - }, - "entity": { - "name": "test01_key", - "service_instance_guid": "ecf26687-e176-4784-b181-b3c942fecb62", - "credentials": { - "jms": "nhp://100.100.100.100:9008", - "js_uri": "http://100.100.100.100:9008", - "amqp": "amqp://100.100.100.100:9008", - "nhp": "nhp://100.100.100.100:9009", - "mqtt": "tcp://100.100.100.100:9008", - "name": "ecf26687-e176-4784-b181-b3c942fecb62", - "nsp": "nsp://100.100.100.100:9008", - "userid": "cfu-9be3911b-c621-4467-8866-f8b924aaee57", - "uri": "nhp://100.100.100.100:9008", - "uriInfos": [ - { - "host": "100.100.100.100", - "port": 9008 - } - ] - }, - "service_instance_url": "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62" - } - } - ] -}` - -const getServiceKeysPayload = `{ - "total_results": 2, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "8be3911b-c621-4467-8866-f8b924aaee57", - "url": "/v2/service_keys/8be3911b-c621-4467-8866-f8b924aaee57", - "created_at": "2017-05-16T12:14:46Z", - "updated_at": "2017-05-16T12:14:46Z" - }, - "entity": { - "name": "test01_key", - "service_instance_guid": "ecf26687-e176-4784-b181-b3c942fecb62", - "credentials": { - "jms": "nhp://100.100.100.100:9008", - "js_uri": "http://100.100.100.100:9008", - "amqp": "amqp://100.100.100.100:9008", - "nhp": "nhp://100.100.100.100:9009", - "mqtt": "tcp://100.100.100.100:9008", - "name": "ecf26687-e176-4784-b181-b3c942fecb62", - "nsp": "nsp://100.100.100.100:9008", - "userid": "cfu-9be3911b-c621-4467-8866-f8b924aaee57", - "uri": "nhp://100.100.100.100:9008", - "uriInfos": [ - { - "host": "100.100.100.100", - "port": 9008 - } - ] - }, - "service_instance_url": "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62" - } - }, - { - "metadata": { - "guid": "9361b5dc-9262-4a83-8969-9b3469211884", - "url": "/v2/service_keys/9361b5dc-9262-4a83-8969-9b3469211884", - "created_at": "2017-10-24T17:00:46Z", - "updated_at": "2017-10-24T17:00:46Z" - }, - "entity": { - "name": "test02_key", - "service_instance_guid": "ecf26687-e176-4784-b181-b3c942fecb62", - "credentials": { - "jms": "nhp://100.100.47.11:9008", - "js_uri": "http://100.100.47.11:9008", - "amqp": "amqp://100.100.47.11:9008", - "nhp": "nhp://100.100.47.11:9009", - "mqtt": "tcp://100.100.47.11.100:9008", - "name": "ecf26687-e176-4784-b181-b3c942fecb62", - "nsp": "nsp://100.100.47.11:9008", - "userid": "cfu-7fb486c4-4d9e-49cb-b121-3241ece5dc10", - "uri": "nhp://100.100.47.11:9008", - "uriInfos": [ - { - "host": "100.100.47.11", - "port": 9008 - } - ] - }, - "service_instance_url": "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62" - } - } - - ] -}` - -const postServiceKeysPayload = `{ - "metadata": { - "guid": "9361b5dc-9262-4a83-8969-9b3469211884", - "url": "/v2/service_keys/9361b5dc-9262-4a83-8969-9b3469211884", - "created_at": "2017-10-25T17:31:23Z", - "updated_at": "2017-10-25T17:31:23Z" - }, - "entity": { - "name": "key1", - "service_instance_guid": "ecf26687-e176-4784-b181-b3c942fecb62", - "credentials": { - "jms": "nhp://100.100.47.11:9008", - "js_uri": "http://100.100.47.11:9008", - "amqp": "amqp://100.100.47.11:9008", - "nhp": "nhp://100.100.47.11:9009", - "mqtt": "tcp://100.100.47.11.100:9008", - "name": "ecf26687-e176-4784-b181-b3c942fecb62", - "nsp": "nsp://100.100.47.11:9008", - "userid": "cfu-7fb486c4-4d9e-49cb-b121-3241ece5dc10", - "uri": "nhp://100.100.47.11:9008", - "uriInfos": [ - { - "host": "100.100.47.11", - "port": 9008 - } - ] - }, - "service_instance_url": "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62" - } -}` - -const postServiceKeysDuplicatePayload = `{ - "description": "The service key name is taken: key1", - "error_code": "CF-ServiceKeyNameTaken", - "code": 360001 -}` - -const postServiceKeysBadPayload = `{ - "description": "The service key name is taken: key1", - "error_code": "CF-ServiceKeyNameTaken", - "code": 360001 -` - -const listServiceBrokersPayload = ` -{ - "total_results": 3, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "90a413fd-a636-4133-8bfb-a94b07839e96", - "url": "/v2/service_brokers/90a413fd-a636-4133-8bfb-a94b07839e96", - "created_at": "2016-06-08T16:41:22Z", - "updated_at": "2016-06-08T16:41:22Z" - }, - "entity": { - "name": "name-85", - "broker_url": "https://foo.com/url-2", - "auth_username": "auth_username-2", - "space_guid": "1d43e64d-ed64-43dd-9046-11f422bd407b" - } - } - ] -} -` - -const getServiceByGuidPayload = ` -{ - "metadata": { - "guid": "53f52780-e93c-4af7-a96c-6958311c40e5", - "url": "/v2/services/53f52780-e93c-4af7-a96c-6958311c40e5", - "created_at": "2016-06-08T16:41:32Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "label": "label-58", - "provider": null, - "url": null, - "description": "desc-135", - "long_description": null, - "version": null, - "info_url": null, - "active": true, - "bindable": true, - "unique_id": "c181996b-f233-43d1-8901-3a43eafcaacf", - "extra": null, - "tags": [ - - ], - "requires": [ - - ], - "documentation_url": null, - "service_broker_guid": "0e7250aa-364f-42c2-8fd2-808b0224376f", - "plan_updateable": false, - "service_plans_url": "/v2/services/53f52780-e93c-4af7-a96c-6958311c40e5/service_plans" - } -} -` - -const buildpackUploadPayload = `{ "metadata":{ "guid": "my-job-guid" } }` - -const buildpackUpdatePayload = ` -{ - "metadata": { - "guid": "c92b6f5f-d2a4-413a-b515-647d059723aa", - "url": "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:31Z" - }, - "entity": { - "name": "renamed-buildpack", - "position": 2, - "enabled": true, - "locked": true, - "filename": "my-file", - "stack": "cflinuxfs2" - } -}` -const buildpackCreatePayload = ` -{ - "metadata": { - "guid": "c92b6f5f-d2a4-413a-b515-647d059723aa", - "url": "/v2/buildpacks/c92b6f5f-d2a4-413a-b515-647d059723aa", - "created_at": "2016-06-08T16:41:31Z", - "updated_at": "2016-06-08T16:41:31Z" - }, - "entity": { - "name": "test-buildpack", - "position": 10, - "enabled": true, - "locked": false, - "filename": null, - "stack": "cflinuxfs2" - } -}` - -const listAppUsageEventsPayload = ` -{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/app_usage_eventsPage2?results-per-page=2&page=2", - "resources": [ - { - "metadata": { - "guid": "b32241a5-5508-4d42-893c-360e42a300b6", - "url": "/v2/app_usage_events/b32241a5-5508-4d42-893c-360e42a300b6", - "created_at": "2016-06-08T16:41:33Z" - }, - "entity": { - "state": "STARTED", - "previous_state": null, - "memory_in_mb_per_instance": 564, - "previous_memory_in_mb_per_instance": null, - "instance_count": 1, - "previous_instance_count": null, - "app_guid": "guid-d9fbb7f8-cba5-44a2-b720-c24f1fe5e1c4", - "app_name": "name-1663", - "space_guid": "guid-5e28f12f-9d80-473e-b826-537b148eb338", - "space_name": "name-1664", - "org_guid": "guid-036444f4-f2f5-4ea8-a353-e73330ca0f0a", - "buildpack_guid": "guid-df37754c-819b-4697-a523-4b457d3c83dd", - "buildpack_name": "name-1665", - "package_state": "STAGED", - "previous_package_state": null, - "parent_app_guid": null, - "parent_app_name": null, - "process_type": "web", - "task_name": null, - "task_guid": null - } - }, - { - "metadata": { - "guid": "b32241a5-5508-4d42-893c-360e42a300a8", - "url": "/v2/app_usage_events/b32241a5-5508-4d42-893c-360e42a300a8", - "created_at": "2016-06-08T16:41:33Z" - }, - "entity": { - "state": "STARTED", - "previous_state": null, - "memory_in_mb_per_instance": 564, - "previous_memory_in_mb_per_instance": null, - "instance_count": 1, - "previous_instance_count": null, - "app_guid": "guid-d9fbb7f8-cba5-44a2-b720-c24f1fe5e1c4", - "app_name": "name-1663", - "space_guid": "guid-5e28f12f-9d80-473e-b826-537b148eb338", - "space_name": "name-1664", - "org_guid": "guid-036444f4-f2f5-4ea8-a353-e73330ca0f0a", - "buildpack_guid": "guid-df37754c-819b-4697-a523-4b457d3c83dd", - "buildpack_name": "name-1665", - "package_state": "STARTED", - "previous_package_state": null, - "parent_app_guid": null, - "parent_app_name": null, - "process_type": "web", - "task_name": null, - "task_guid": null - } - } - ] -}` - -const listAppUsageEventsPayloadPage2 = ` -{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "b32241a5-5508-4d42-893c-360e42a300b6", - "url": "/v2/app_usage_events/b32241a5-5508-4d42-893c-360e42a300b6", - "created_at": "2016-06-08T16:41:33Z" - }, - "entity": { - "state": "STOPPED", - "previous_state": null, - "memory_in_mb_per_instance": 564, - "previous_memory_in_mb_per_instance": null, - "instance_count": 1, - "previous_instance_count": null, - "app_guid": "guid-d9fbb7f8-cba5-44a2-b720-c24f1fe5e1c4", - "app_name": "name-1663", - "space_guid": "guid-5e28f12f-9d80-473e-b826-537b148eb338", - "space_name": "name-1664", - "org_guid": "guid-036444f4-f2f5-4ea8-a353-e73330ca0f0a", - "buildpack_guid": "guid-df37754c-819b-4697-a523-4b457d3c83dd", - "buildpack_name": "name-1665", - "package_state": "STAGED", - "previous_package_state": null, - "parent_app_guid": null, - "parent_app_name": null, - "process_type": "web", - "task_name": null, - "task_guid": null - } - }, - { - "metadata": { - "guid": "b32241a5-5508-4d42-893c-360e42a300a8", - "url": "/v2/app_usage_events/b32241a5-5508-4d42-893c-360e42a300a8", - "created_at": "2016-06-08T16:41:33Z" - }, - "entity": { - "state": "CRASHED", - "previous_state": null, - "memory_in_mb_per_instance": 564, - "previous_memory_in_mb_per_instance": null, - "instance_count": 1, - "previous_instance_count": null, - "app_guid": "guid-d9fbb7f8-cba5-44a2-b720-c24f1fe5e1c4", - "app_name": "name-1663", - "space_guid": "guid-5e28f12f-9d80-473e-b826-537b148eb338", - "space_name": "name-1664", - "org_guid": "guid-036444f4-f2f5-4ea8-a353-e73330ca0f0a", - "buildpack_guid": "guid-df37754c-819b-4697-a523-4b457d3c83dd", - "buildpack_name": "name-1665", - "package_state": "STARTED", - "previous_package_state": null, - "parent_app_guid": null, - "parent_app_name": null, - "process_type": "web", - "task_name": null, - "task_guid": null - } - } - ] -}` - -const listServiceUsageEventsPayload = ` -{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": "/v2/service_usage_eventsPage2?results-per-page=2&page=2", - "resources": [ - { - "metadata": { - "guid": "985c09c5-bf5a-44eb-a260-41c532dc0f1d", - "url": "/v2/service_usage_events/985c09c5-bf5a-44eb-a260-41c532dc0f1d", - "created_at": "2016-06-08T16:41:39Z" - }, - "entity": { - "state": "CREATED", - "org_guid": "guid-396a8cb9-5524-4a2b-8e9e-2bfc70edb58d", - "space_guid": "guid-be1f6fe3-e63a-41a3-b196-3fc084022823", - "space_name": "name-1981", - "service_instance_guid": "guid-f93250f7-7ef5-4b02-8d33-353919ce8358", - "service_instance_name": "name-1982", - "service_instance_type": "type-5", - "service_plan_guid": "guid-e9d2d5a0-69a6-46ef-bac5-43f3ed177614", - "service_plan_name": "name-1983", - "service_guid": "guid-34916716-31d7-40c1-9afd-f312996c9654", - "service_label": "label-64" - } - }, - { - "metadata": { - "guid": "985c09c5-bf5a-44eb-a260-41c532dc0f2a", - "url": "/v2/service_usage_events/985c09c5-bf5a-44eb-a260-41c532dc0f1d", - "created_at": "2016-06-08T16:41:39Z" - }, - "entity": { - "state": "DELETED", - "org_guid": "guid-396a8cb9-5524-4a2b-8e9e-2bfc70edb58d", - "space_guid": "guid-be1f6fe3-e63a-41a3-b196-3fc084022823", - "space_name": "name-1981", - "service_instance_guid": "guid-f93250f7-7ef5-4b02-8d33-353919ce8358", - "service_instance_name": "name-1983", - "service_instance_type": "type-5", - "service_plan_guid": "guid-e9d2d5a0-69a6-46ef-bac5-43f3ed177614", - "service_plan_name": "name-1984", - "service_guid": "guid-34916716-31d7-40c1-9afd-f312996c9655", - "service_label": "label-65" - } - } - ] -}` - -const listServiceUsageEventsPayloadPage2 = ` -{ - "total_results": 2, - "total_pages": 2, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "985c09c5-bf5a-44eb-a260-41c532dc0f3f", - "url": "/v2/service_usage_events/985c09c5-bf5a-44eb-a260-41c532dc0f1d", - "created_at": "2016-06-08T16:41:39Z" - }, - "entity": { - "state": "CREATED", - "org_guid": "guid-396a8cb9-5524-4a2b-8e9e-2bfc70edb58d", - "space_guid": "guid-be1f6fe3-e63a-41a3-b196-3fc084022823", - "space_name": "name-1988", - "service_instance_guid": "guid-f93250f7-7ef5-4b02-8d33-353919ce8358", - "service_instance_name": "name-1988", - "service_instance_type": "type-5", - "service_plan_guid": "guid-e9d2d5a0-69a6-46ef-bac5-43f3ed177614", - "service_plan_name": "name-1988", - "service_guid": "guid-34916716-31d7-40c1-9afd-f312996c9654", - "service_label": "label-64" - } - }, - { - "metadata": { - "guid": "985c09c5-bf5a-44eb-a260-41c532dc0f6d", - "url": "/v2/service_usage_events/985c09c5-bf5a-44eb-a260-41c532dc0f1d", - "created_at": "2016-06-08T16:41:39Z" - }, - "entity": { - "state": "UPDATED", - "org_guid": "guid-396a8cb9-5524-4a2b-8e9e-2bfc70edb58d", - "space_guid": "guid-be1f6fe3-e63a-41a3-b196-3fc084022823", - "space_name": "name-1985", - "service_instance_guid": "guid-f93250f7-7ef5-4b02-8d33-353919ce8358", - "service_instance_name": "name-1985", - "service_instance_type": "type-5", - "service_plan_guid": "guid-e9d2d5a0-69a6-46ef-bac5-43f3ed177614", - "service_plan_name": "name-1985", - "service_guid": "guid-34916716-31d7-40c1-9afd-f312996c9655", - "service_label": "label-65" - } - } - ] -}` - -const sharePrivateDomainPayload = `{ - "metadata": { - "guid": "3b6f763f-aae1-4177-9b93-f2de6f2a48f2", - "url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2", - "created_at": "2016-06-08T16:41:35Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "name": "name-1777", - "billing_enabled": false, - "quota_definition_guid": "8737180b-8587-4244-a37d-a12bffcc24b5", - "status": "active", - "quota_definition_url": "/v2/quota_definitions/8737180b-8587-4244-a37d-a12bffcc24b5", - "spaces_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/spaces", - "domains_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/domains", - "private_domains_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/private_domains", - "users_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/users", - "managers_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/managers", - "billing_managers_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/billing_managers", - "auditors_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/auditors", - "app_events_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/app_events", - "space_quota_definitions_url": "/v2/organizations/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/space_quota_definitions" - } -} -` -const AppUpdatePayload = ` -{ - "metadata": { - "guid": "97f7e56b-addf-4d26-be82-998a06600011", - "url": "/v2/apps/97f7e56b-addf-4d26-be82-998a06600011", - "created_at": "2018-03-04T16:05:36Z", - "updated_at": "2018-03-06T20:46:26Z" - }, - "entity": { - "name": "NewName", - "production": false, - "space_guid": "d17d98b9-5f88-44c6-8dbc-6036c9607ce0", - "stack_guid": "46ff2259-d51b-48a3-ac7e-72a86c51d85c", - "buildpack": "go_buildpack", - "detected_buildpack": "", - "detected_buildpack_guid": "d42d6cd9-7c1f-4a01-9251-178b51d1ed47", - "environment_json": { - "GOPACKAGENAME": "MichaelIsMetal" - }, - "memory": 65, - "instances": 1, - "disk_quota": 1024, - "state": "STOPPED", - "version": "ac75afb9-bfa6-426e-b0f6-96866e295f2c", - "command": "MichaelIsMetal", - "console": false, - "debug": "", - "staging_task_id": "6379fc80-a71b-4848-812f-520faec910a5", - "package_state": "STAGED", - "health_check_http_endpoint": "", - "health_check_type": "port", - "health_check_timeout": 0, - "staging_failed_reason": "", - "staging_failed_description": "", - "diego": true, - "docker_image": "", - "docker_credentials": { - "username": "", - "password": "" - }, - "package_updated_at": "2018-03-04T21:31:10Z", - "detected_start_command": "./bin/MichaelIsMetal", - "enable_ssh": true, - "ports": [ - 8080 - ], - "space_url": "/v2/spaces/d17d98b9-5f88-44c6-8dbc-6036c9607ce0", - "stack_url": "/v2/stacks/46ff2259-d51b-48a3-ac7e-72a86c51d85c", - "routes_url": "/v2/apps/97f7e56b-addf-4d26-be82-998a06600011/routes", - "events_url": "/v2/apps/97f7e56b-addf-4d26-be82-998a06600011/events", - "service_bindings_url": "/v2/apps/97f7e56b-addf-4d26-be82-998a06600011/service_bindings", - "route_mappings_url": "/v2/apps/97f7e56b-addf-4d26-be82-998a06600011/route_mappings" - } -}` - -const postServiceBindingPayload = `{ - "metadata": { - "guid": "4e690cd4-66ef-4052-a23d-0d748316f18c", - "url": "/v2/service_bindings/4e690cd4-66ef-4052-a23d-0d748316f18c", - "created_at": "2016-06-08T16:41:42Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "app_guid": "081d55a0-1bfa-4e51-8d08-273f764988db", - "service_instance_guid": "a0029c76-7017-4a74-94b0-54a04ad94b80", - "credentials": { - "creds-key-63": "creds-val-63" - }, - "name": "prod-db", - "binding_options": { - }, - "gateway_data": null, - "gateway_name": "", - "syslog_drain_url": null, - "volume_mounts": [ - ], - "app_url": "/v2/apps/081d55a0-1bfa-4e51-8d08-273f764988db", - "service_instance_url": "/v2/user_provided_service_instances/a0029c76-7017-4a74-94b0-54a04ad94b80" - } -}` - -const postRouteMappingsPayload = `{ - "metadata": { - "guid": "f869fa46-22b1-40ee-b491-58e321345528", - "url": "/v2/route_mappings/f869fa46-22b1-40ee-b491-58e321345528", - "created_at": "2016-06-08T16:41:42Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "app_port": 8888, - "app_guid": "fa23ddfc-b635-4205-8283-844c53122888", - "route_guid": "e00fb1e1-f7d4-4e36-9912-f76a587e9858", - "app_url": "/v2/apps/fa23ddfc-b635-4205-8283-844c53122888", - "route_url": "/v2/routes/e00fb1e1-f7d4-4e36-9912-f76a587e9858" - } -}` - -const listRouteMappingsPayload = `{ - "total_results": 1, - "total_pages": 1, - "prev_url": null, - "next_url": null, - "resources": [ - { - "metadata": { - "guid": "63603ed7-bd4a-4475-a371-5b34381e0cf7", - "url": "/v2/route_mappings/63603ed7-bd4a-4475-a371-5b34381e0cf7", - "created_at": "2016-06-08T16:41:42Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "app_port": 8888, - "app_guid": "ee8b175a-2228-4931-be8a-1f6445bd63bc", - "route_guid": "eb1c4fcd-7d6d-41d2-bd2f-5811f53b6677", - "app_url": "/v2/apps/ee8b175a-2228-4931-be8a-1f6445bd63bc", - "route_url": "/v2/routes/eb1c4fcd-7d6d-41d2-bd2f-5811f53b6677" - } - }, - { - "metadata": { - "guid": "63603ed7-bd4a-4475-a371-5b34381e0cf8", - "url": "/v2/route_mappings/63603ed7-bd4a-4475-a371-5b34381e0cf8", - "created_at": "2016-06-08T16:41:42Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "app_port": 8888, - "app_guid": "ee8b175a-2228-4931-be8a-1f6445bd63bd", - "route_guid": "eb1c4fcd-7d6d-41d2-bd2f-5811f53b6678", - "app_url": "/v2/apps/ee8b175a-2228-4931-be8a-1f6445bd63bd", - "route_url": "/v2/routes/eb1c4fcd-7d6d-41d2-bd2f-5811f53b6678" - } - } - ] -}` - -const getRouteMappingByGuidPayload = `{ - "metadata": { - "guid": "93eb2527-81b9-4e15-8ba0-2fd8dd8c0c1c", - "url": "/v2/route_mappings/93eb2527-81b9-4e15-8ba0-2fd8dd8c0c1c", - "created_at": "2016-06-08T16:41:42Z", - "updated_at": "2016-06-08T16:41:26Z" - }, - "entity": { - "app_port": 8888, - "app_guid": "caf3e3a9-1f64-46d3-a0d5-a3d4ae3f4be4", - "route_guid": "34931bf5-79d0-4303-b082-df023b3305ce", - "app_url": "/v2/apps/caf3e3a9-1f64-46d3-a0d5-a3d4ae3f4be4", - "route_url": "/v2/routes/34931bf5-79d0-4303-b082-df023b3305ce" - } -}` - -const getEVGPayload = `{ - "foo": "bar", - "val": 3 -}` - -const listProcessesPayload1 = `{ - "pagination": { - "total_results": 26, - "total_pages": 2, - "first": { - "href": "https://api.run.example.com/v3/processes?page=1&per_page=20" - }, - "last": { - "href": "https://api.run.example.com/v3/processes?page=2&per_page=20" - }, - "next": { - "href": "https://api.run.example.com/v3/processesPage2?page=2&per_page=20" - }, - "previous": null - }, - "resources": [ - { - "guid": "30200dd1-64c0-451a-8c37-3c91e05c6741", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 2, - "memory_in_mb": 256, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-05-22T21:06:42Z", - "updated_at": "2018-06-05T21:07:08Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/30200dd1-64c0-451a-8c37-3c91e05c6741" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/30200dd1-64c0-451a-8c37-3c91e05c6741/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/30200dd1-64c0-451a-8c37-3c91e05c6741" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/30200dd1-64c0-451a-8c37-3c91e05c6741/stats" - } - } - }, - { - "guid": "0a8eb31c-0450-465d-90a1-837d92895504", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 6, - "memory_in_mb": 128, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-05-22T21:06:43Z", - "updated_at": "2018-06-05T21:07:07Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/0a8eb31c-0450-465d-90a1-837d92895504" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/0a8eb31c-0450-465d-90a1-837d92895504/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/0a8eb31c-0450-465d-90a1-837d92895504" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/0a8eb31c-0450-465d-90a1-837d92895504/stats" - } - } - }, - { - "guid": "c55dca62-ff2e-4641-a4ec-9bea56f987b2", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-05-22T21:17:50Z", - "updated_at": "2018-06-05T21:19:26Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/c55dca62-ff2e-4641-a4ec-9bea56f987b2" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/c55dca62-ff2e-4641-a4ec-9bea56f987b2/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/c55dca62-ff2e-4641-a4ec-9bea56f987b2" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/d5ecae4a-3bfc-4302-af74-bee452108316" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/c55dca62-ff2e-4641-a4ec-9bea56f987b2/stats" - } - } - }, - { - "guid": "72fab46a-8bcd-4941-b556-99694627c402", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-05-29T20:03:48Z", - "updated_at": "2018-05-29T20:07:40Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/72fab46a-8bcd-4941-b556-99694627c402" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/72fab46a-8bcd-4941-b556-99694627c402/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/72fab46a-8bcd-4941-b556-99694627c402" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/6d6eaa00-1fba-4c31-9121-db9a72299240" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/72fab46a-8bcd-4941-b556-99694627c402/stats" - } - } - }, - { - "guid": "46b49bad-e469-418d-9f22-2fa8eb8a9144", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 2, - "memory_in_mb": 256, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-05-30T01:19:06Z", - "updated_at": "2018-06-05T21:07:07Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/46b49bad-e469-418d-9f22-2fa8eb8a9144" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/46b49bad-e469-418d-9f22-2fa8eb8a9144/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/46b49bad-e469-418d-9f22-2fa8eb8a9144" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/46b49bad-e469-418d-9f22-2fa8eb8a9144/stats" - } - } - }, - { - "guid": "74600cfb-9cc9-4026-8473-f638f44ade12", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 6, - "memory_in_mb": 128, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-05-30T01:19:06Z", - "updated_at": "2018-06-05T21:07:07Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/74600cfb-9cc9-4026-8473-f638f44ade12" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/74600cfb-9cc9-4026-8473-f638f44ade12/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/74600cfb-9cc9-4026-8473-f638f44ade12" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/74600cfb-9cc9-4026-8473-f638f44ade12/stats" - } - } - }, - { - "guid": "d782ee5f-8cff-451a-ad30-a0101c7fb430", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 256, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-05-30T17:57:29Z", - "updated_at": "2018-05-30T18:20:20Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/d782ee5f-8cff-451a-ad30-a0101c7fb430" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/d782ee5f-8cff-451a-ad30-a0101c7fb430/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/d782ee5f-8cff-451a-ad30-a0101c7fb430" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/6d6eaa00-1fba-4c31-9121-db9a72299240" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/d782ee5f-8cff-451a-ad30-a0101c7fb430/stats" - } - } - }, - { - "guid": "1b4d1907-3a54-46e6-ac73-d4732af2a28b", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 2, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": 360 - } - }, - "created_at": "2018-06-05T19:41:09Z", - "updated_at": "2018-06-05T21:06:35Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/1b4d1907-3a54-46e6-ac73-d4732af2a28b" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/1b4d1907-3a54-46e6-ac73-d4732af2a28b/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/1b4d1907-3a54-46e6-ac73-d4732af2a28b" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/1b4d1907-3a54-46e6-ac73-d4732af2a28b/stats" - } - } - }, - { - "guid": "bec57af6-4b84-4698-a366-1c4de1f4cc1e", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "none", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-05T19:41:09Z", - "updated_at": "2018-06-05T21:06:14Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/bec57af6-4b84-4698-a366-1c4de1f4cc1e" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/bec57af6-4b84-4698-a366-1c4de1f4cc1e/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/bec57af6-4b84-4698-a366-1c4de1f4cc1e" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/bec57af6-4b84-4698-a366-1c4de1f4cc1e/stats" - } - } - }, - { - "guid": "5d449f8d-999a-4720-9296-5b6afce15a69", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 2048, - "disk_in_mb": 1024, - "health_check": { - "type": "none", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-05T19:41:09Z", - "updated_at": "2018-06-05T21:06:20Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/5d449f8d-999a-4720-9296-5b6afce15a69" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/5d449f8d-999a-4720-9296-5b6afce15a69/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/5d449f8d-999a-4720-9296-5b6afce15a69" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/5d449f8d-999a-4720-9296-5b6afce15a69/stats" - } - } - }, - { - "guid": "57a598af-c4a6-4ade-8db6-05679ae092f5", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 2, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": 180 - } - }, - "created_at": "2018-06-05T19:45:25Z", - "updated_at": "2018-06-05T21:10:23Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/57a598af-c4a6-4ade-8db6-05679ae092f5" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/57a598af-c4a6-4ade-8db6-05679ae092f5/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/57a598af-c4a6-4ade-8db6-05679ae092f5" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/1c17814c-e195-4ea5-9be2-6d01d9bf6007" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/57a598af-c4a6-4ade-8db6-05679ae092f5/stats" - } - } - }, - { - "guid": "79616d63-1075-4c02-a058-574a01314206", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "none", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-05T21:04:37Z", - "updated_at": "2018-06-05T21:04:48Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/79616d63-1075-4c02-a058-574a01314206" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/79616d63-1075-4c02-a058-574a01314206/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/79616d63-1075-4c02-a058-574a01314206" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/79616d63-1075-4c02-a058-574a01314206/stats" - } - } - }, - { - "guid": "a2298d27-57fe-41e9-ad1e-f540427a0949", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 2, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": 360 - } - }, - "created_at": "2018-06-05T21:04:37Z", - "updated_at": "2018-06-05T21:06:34Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/a2298d27-57fe-41e9-ad1e-f540427a0949" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/a2298d27-57fe-41e9-ad1e-f540427a0949/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/a2298d27-57fe-41e9-ad1e-f540427a0949" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/a2298d27-57fe-41e9-ad1e-f540427a0949/stats" - } - } - }, - { - "guid": "a98f0649-4e31-435a-bb61-a96364c366a4", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 2048, - "disk_in_mb": 1024, - "health_check": { - "type": "none", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-05T21:04:38Z", - "updated_at": "2018-06-05T21:04:49Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/a98f0649-4e31-435a-bb61-a96364c366a4" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/a98f0649-4e31-435a-bb61-a96364c366a4/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/a98f0649-4e31-435a-bb61-a96364c366a4" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/a98f0649-4e31-435a-bb61-a96364c366a4/stats" - } - } - }, - { - "guid": "6aa28ed8-d377-4225-b853-80001e64113b", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 3, - "memory_in_mb": 64, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-05T21:07:29Z", - "updated_at": "2018-06-05T21:08:02Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/6aa28ed8-d377-4225-b853-80001e64113b" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/6aa28ed8-d377-4225-b853-80001e64113b/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/6aa28ed8-d377-4225-b853-80001e64113b" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/2bd2080e-b9d7-4911-a607-a4e5adb00b59" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/6aa28ed8-d377-4225-b853-80001e64113b/stats" - } - } - }, - { - "guid": "dfc0f648-a3c8-4f46-b0a4-425136f238c6", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 2, - "memory_in_mb": 64, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-05T21:08:19Z", - "updated_at": "2018-06-05T21:08:41Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/dfc0f648-a3c8-4f46-b0a4-425136f238c6" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/dfc0f648-a3c8-4f46-b0a4-425136f238c6/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/dfc0f648-a3c8-4f46-b0a4-425136f238c6" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/2bd2080e-b9d7-4911-a607-a4e5adb00b59" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/dfc0f648-a3c8-4f46-b0a4-425136f238c6/stats" - } - } - }, - { - "guid": "ba159a14-a3b5-4711-95c7-4bf89ff89a6c", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 2, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": 180 - } - }, - "created_at": "2018-06-05T21:08:57Z", - "updated_at": "2018-06-05T21:10:23Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/ba159a14-a3b5-4711-95c7-4bf89ff89a6c" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/ba159a14-a3b5-4711-95c7-4bf89ff89a6c/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/ba159a14-a3b5-4711-95c7-4bf89ff89a6c" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/1c17814c-e195-4ea5-9be2-6d01d9bf6007" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/ba159a14-a3b5-4711-95c7-4bf89ff89a6c/stats" - } - } - }, - { - "guid": "c7d20ea3-028b-4559-9f0c-a61966abc163", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 3, - "memory_in_mb": 256, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-05T21:11:44Z", - "updated_at": "2018-06-05T21:12:00Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/c7d20ea3-028b-4559-9f0c-a61966abc163" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/c7d20ea3-028b-4559-9f0c-a61966abc163/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/c7d20ea3-028b-4559-9f0c-a61966abc163" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/7443e429-eee3-48ea-89cb-c9d3234c7fbf" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/c7d20ea3-028b-4559-9f0c-a61966abc163/stats" - } - } - }, - { - "guid": "956ca6e5-6560-49c6-ae01-843144b24ec5", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": 120 - } - }, - "created_at": "2018-06-05T21:12:01Z", - "updated_at": "2018-06-05T21:12:54Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/956ca6e5-6560-49c6-ae01-843144b24ec5" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/956ca6e5-6560-49c6-ae01-843144b24ec5/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/956ca6e5-6560-49c6-ae01-843144b24ec5" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/7443e429-eee3-48ea-89cb-c9d3234c7fbf" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/956ca6e5-6560-49c6-ae01-843144b24ec5/stats" - } - } - }, - { - "guid": "787fd0c1-d827-4c9e-975b-acd73267a583", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-29T18:31:10Z", - "updated_at": "2018-06-29T18:31:10Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/787fd0c1-d827-4c9e-975b-acd73267a583" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/787fd0c1-d827-4c9e-975b-acd73267a583/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/787fd0c1-d827-4c9e-975b-acd73267a583" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/787fd0c1-d827-4c9e-975b-acd73267a583/stats" - } - } - } - ] -}` - -const listProcessesPayload2 = `{ - "pagination": { - "total_results": 26, - "total_pages": 2, - "first": { - "href": "https://api.run.example.com/v3/processes?page=1&per_page=20" - }, - "last": { - "href": "https://api.run.example.com/v3/processes?page=2&per_page=20" - }, - "next": null, - "previous": { - "href": "https://api.run.example.com/v3/processes?page=1&per_page=20" - } - }, - "resources": [ - { - "guid": "09eb0d25-75b0-48e1-b45f-1636ea5bbe0c", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-06-29T18:32:35Z", - "updated_at": "2018-06-29T18:32:35Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/09eb0d25-75b0-48e1-b45f-1636ea5bbe0c" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/09eb0d25-75b0-48e1-b45f-1636ea5bbe0c/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/09eb0d25-75b0-48e1-b45f-1636ea5bbe0c" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/60fa9e9b-c6eb-47a7-92ad-f438e775d234" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/09eb0d25-75b0-48e1-b45f-1636ea5bbe0c/stats" - } - } - }, - { - "guid": "00944be5-fe20-43ba-abe2-8fcc41ee2edc", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-07-13T20:17:23Z", - "updated_at": "2018-07-18T17:20:59Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/00944be5-fe20-43ba-abe2-8fcc41ee2edc" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/00944be5-fe20-43ba-abe2-8fcc41ee2edc/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/00944be5-fe20-43ba-abe2-8fcc41ee2edc" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/a40da3ef-f0a3-4374-a7af-9c867382b30c" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/00944be5-fe20-43ba-abe2-8fcc41ee2edc/stats" - } - } - }, - { - "guid": "750ce4f3-3c28-4acc-9b50-357dc7dde27a", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-07-17T14:46:37Z", - "updated_at": "2018-07-17T14:46:37Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/750ce4f3-3c28-4acc-9b50-357dc7dde27a" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/750ce4f3-3c28-4acc-9b50-357dc7dde27a/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/750ce4f3-3c28-4acc-9b50-357dc7dde27a" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/a40da3ef-f0a3-4374-a7af-9c867382b30c" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/750ce4f3-3c28-4acc-9b50-357dc7dde27a/stats" - } - } - }, - { - "guid": "2274c4c4-7e6e-413f-b976-e8210ddcc748", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 256, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-08-06T21:45:14Z", - "updated_at": "2018-08-07T18:11:33Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/2274c4c4-7e6e-413f-b976-e8210ddcc748" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/2274c4c4-7e6e-413f-b976-e8210ddcc748/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/2274c4c4-7e6e-413f-b976-e8210ddcc748" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/939eb497-671b-46cb-abd2-26e89129cc5b" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/2274c4c4-7e6e-413f-b976-e8210ddcc748/stats" - } - } - }, - { - "guid": "bc69b3fe-0d80-4508-a1d2-9bc53269287f", - "type": "web", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 128, - "disk_in_mb": 1024, - "health_check": { - "type": "port", - "data": { - "timeout": null - } - }, - "created_at": "2018-08-07T22:27:14Z", - "updated_at": "2018-08-08T16:09:41Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/bc69b3fe-0d80-4508-a1d2-9bc53269287f" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/bc69b3fe-0d80-4508-a1d2-9bc53269287f/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/bc69b3fe-0d80-4508-a1d2-9bc53269287f" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/a40da3ef-f0a3-4374-a7af-9c867382b30c" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/bc69b3fe-0d80-4508-a1d2-9bc53269287f/stats" - } - } - }, - { - "guid": "4b32fba5-ec34-40e1-9511-0a25c8f93d8f", - "type": "worker", - "command": "[PRIVATE DATA HIDDEN IN LISTS]", - "instances": 1, - "memory_in_mb": 1024, - "disk_in_mb": 1024, - "health_check": { - "type": "process", - "data": { - "timeout": null - } - }, - "created_at": "2018-08-07T22:28:44Z", - "updated_at": "2018-08-08T16:09:41Z", - "links": { - "self": { - "href": "https://api.run.example.com/v3/processes/4b32fba5-ec34-40e1-9511-0a25c8f93d8f" - }, - "scale": { - "href": "https://api.run.example.com/v3/processes/4b32fba5-ec34-40e1-9511-0a25c8f93d8f/actions/scale", - "method": "POST" - }, - "app": { - "href": "https://api.run.example.com/v3/apps/bc69b3fe-0d80-4508-a1d2-9bc53269287f" - }, - "space": { - "href": "https://api.run.example.com/v3/spaces/a40da3ef-f0a3-4374-a7af-9c867382b30c" - }, - "stats": { - "href": "https://api.run.example.com/v3/processes/4b32fba5-ec34-40e1-9511-0a25c8f93d8f/stats" - } - } - } - ] -}` diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/processes_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/processes_test.go deleted file mode 100644 index f024d1a7..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/processes_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package cfclient - -import ( - "net/url" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListProcesses(t *testing.T) { - Convey("List Processes", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/processes", listProcessesPayload1, "", 200, "per_page=20", nil}, - {"GET", "/v3/processesPage2", listProcessesPayload2, "", 200, "page=2&per_page=20", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - q := url.Values{} - q.Add("per_page", "20") - procs, err := client.ListAllProcessesByQuery(q) - So(err, ShouldBeNil) - - So(procs, ShouldHaveLength, 26) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/route_mappings_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/route_mappings_test.go deleted file mode 100644 index ae9ac3bb..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/route_mappings_test.go +++ /dev/null @@ -1,89 +0,0 @@ -package cfclient - -import ( - . "github.com/smartystreets/goconvey/convey" - "net/http" - "testing" -) - -func TestMappingAppAndRoute(t *testing.T) { - Convey("Mapping app and route", t, func() { - setup(MockRoute{"POST", "/v2/route_mappings", postRouteMappingsPayload, "", http.StatusCreated, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - mappingRequest := RouteMappingRequest{AppGUID: "fa23ddfc-b635-4205-8283-844c53122888", RouteGUID: "e00fb1e1-f7d4-4e36-9912-f76a587e9858", AppPort: 8888} - - mapping, err := client.MappingAppAndRoute(mappingRequest) - So(err, ShouldBeNil) - So(mapping.Guid, ShouldEqual, "f869fa46-22b1-40ee-b491-58e321345528") - So(mapping.AppGUID, ShouldEqual, "fa23ddfc-b635-4205-8283-844c53122888") - So(mapping.RouteGUID, ShouldEqual, "e00fb1e1-f7d4-4e36-9912-f76a587e9858") - }) -} - -func TestListRouteMappings(t *testing.T) { - Convey("List route mappings", t, func() { - setup(MockRoute{"GET", "/v2/route_mappings", listRouteMappingsPayload, "", http.StatusOK, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - routeMappings, err := client.ListRouteMappings() - So(err, ShouldBeNil) - - So(len(routeMappings), ShouldEqual, 2) - So(routeMappings[0].Guid, ShouldEqual, "63603ed7-bd4a-4475-a371-5b34381e0cf7") - So(routeMappings[1].Guid, ShouldEqual, "63603ed7-bd4a-4475-a371-5b34381e0cf8") - So(routeMappings[0].AppGUID, ShouldEqual, "ee8b175a-2228-4931-be8a-1f6445bd63bc") - So(routeMappings[1].AppGUID, ShouldEqual, "ee8b175a-2228-4931-be8a-1f6445bd63bd") - So(routeMappings[0].RouteGUID, ShouldEqual, "eb1c4fcd-7d6d-41d2-bd2f-5811f53b6677") - So(routeMappings[1].RouteGUID, ShouldEqual, "eb1c4fcd-7d6d-41d2-bd2f-5811f53b6678") - }) -} - -func TestGetRouteMappingByGuid(t *testing.T) { - Convey("Get route mapping by guid", t, func() { - setup(MockRoute{"GET", "/v2/route_mappings/93eb2527-81b9-4e15-8ba0-2fd8dd8c0c1c", getRouteMappingByGuidPayload, "", http.StatusOK, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - routeMapping, err := client.GetRouteMappingByGuid("93eb2527-81b9-4e15-8ba0-2fd8dd8c0c1c") - So(err, ShouldBeNil) - So(routeMapping.Guid, ShouldEqual, "93eb2527-81b9-4e15-8ba0-2fd8dd8c0c1c") - So(routeMapping.AppGUID, ShouldEqual, "caf3e3a9-1f64-46d3-a0d5-a3d4ae3f4be4") - So(routeMapping.RouteGUID, ShouldEqual, "34931bf5-79d0-4303-b082-df023b3305ce") - }) -} - -func TestDeleteRouteMapping(t *testing.T) { - Convey("Delete route mapping", t, func() { - setup(MockRoute{"DELETE", "/v2/route_mappings/93eb2527-81b9-4e15-8ba0-2fd8dd8c0c1c", "", "", http.StatusNoContent, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteRouteMapping("93eb2527-81b9-4e15-8ba0-2fd8dd8c0c1c") - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/routes_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/routes_test.go deleted file mode 100644 index c154ae84..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/routes_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListRoutes(t *testing.T) { - Convey("List Routes", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/routes", listRoutesPayloadPage1, "", 200, "", nil}, - {"GET", "/v2/routes_page_2", listRoutesPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - routes, err := client.ListRoutes() - So(err, ShouldBeNil) - - So(len(routes), ShouldEqual, 2) - So(routes[0].Guid, ShouldEqual, "24707add-83b8-4fd8-a8f4-b7297199c805") - So(routes[0].Host, ShouldEqual, "test-1") - So(routes[0].Path, ShouldEqual, "/foo") - So(routes[0].DomainGuid, ShouldEqual, "0b183484-45cc-4855-94d4-892f80f20c13") - So(routes[0].SpaceGuid, ShouldEqual, "494d8b64-8181-4183-a6d3-6279db8fec6e") - So(routes[0].ServiceInstanceGuid, ShouldEqual, "") - So(routes[0].Port, ShouldEqual, 0) - }) -} - -func TestCreateRoute(t *testing.T) { - Convey("Create HTTP Route", t, func() { - setup(MockRoute{"POST", "/v2/routes", createRoute, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - routeRequest := RouteRequest{ - DomainGuid: "08167353-32da-4ed9-9ef5-aa7b31bbc009", - SpaceGuid: "b65a9a76-8c55-460b-9162-18b396da66cf", - Host: "foo-host", - } - - route, err := client.CreateRoute(routeRequest) - So(err, ShouldBeNil) - - So(route.Guid, ShouldEqual, "b3fe6f31-e897-4e02-b49e-263ca96b4e3a") - So(route.SpaceGuid, ShouldEqual, "b65a9a76-8c55-460b-9162-18b396da66cf") - So(route.DomainGuid, ShouldEqual, "08167353-32da-4ed9-9ef5-aa7b31bbc009") - So(route.Host, ShouldEqual, "foo-host") - So(route.Port, ShouldEqual, 0) - So(route.Path, ShouldEqual, "") - So(route.ServiceInstanceGuid, ShouldEqual, "") - }) -} - -func TestCreateTcpRoute(t *testing.T) { - Convey("Create TCP Route", t, func() { - setup(MockRoute{"POST", "/v2/routes", createTcpRoute, "", 201, "generate_port=true", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - routeRequest := RouteRequest{ - DomainGuid: "08167353-32da-4ed9-9ef5-aa7b31bbc009", - SpaceGuid: "b65a9a76-8c55-460b-9162-18b396da66cf", - } - - route, err := client.CreateTcpRoute(routeRequest) - So(err, ShouldBeNil) - - So(route.Guid, ShouldEqual, "78fe5006-1d1c-41ba-94de-eb7002241b82") - So(route.SpaceGuid, ShouldEqual, "b65a9a76-8c55-460b-9162-18b396da66cf") - So(route.DomainGuid, ShouldEqual, "08167353-32da-4ed9-9ef5-aa7b31bbc009") - So(route.Port, ShouldEqual, 1099) - }) -} - -func TestBindRoute(t *testing.T) { - Convey("Bind route", t, func() { - Convey("When a successful status code is returned", func() { - setup(MockRoute{"PUT", "/v2/routes/7803de15-a20f-4dea-bf17-37de56629582/apps/ce5d0e27-3048-4024-80cb-fafbae9c3161", bindRoute, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.BindRoute("7803de15-a20f-4dea-bf17-37de56629582", "ce5d0e27-3048-4024-80cb-fafbae9c3161") - So(err, ShouldBeNil) - - }) - Convey("When an error status code is returned", func() { - setup(MockRoute{"PUT", "/v2/routes/7803de15-a20f-4dea-bf17-37de56629582/apps/ce5d0e27-3048-4024-80cb-fafbae9c3161", "", "", 400, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.BindRoute("7803de15-a20f-4dea-bf17-37de56629582", "ce5d0e27-3048-4024-80cb-fafbae9c3161") - So(err, ShouldNotBeNil) - So(err.Error(), ShouldStartWith, "Error binding route 7803de15-a20f-4dea-bf17-37de56629582 to app ce5d0e27-3048-4024-80cb-fafbae9c3161") - }) - }) -} - -func TestDeleteRoute(t *testing.T) { - Convey("Delete route", t, func() { - Convey("When a successful status code is returned", func() { - setup(MockRoute{"DELETE", "/v2/routes/a537761f-9d93-4b30-af17-3d73dbca181b", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteRoute("a537761f-9d93-4b30-af17-3d73dbca181b") - So(err, ShouldBeNil) - }) - - Convey("When an error status code is returned", func() { - setup(MockRoute{"DELETE", "/v2/routes/a537761f-9d93-4b30-af17-3d73dbca181b", "", "", 404, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteRoute("a537761f-9d93-4b30-af17-3d73dbca181b") - So(err, ShouldNotBeNil) - }) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/secgroups_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/secgroups_test.go deleted file mode 100644 index 72281e54..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/secgroups_test.go +++ /dev/null @@ -1,256 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListSecGroups(t *testing.T) { - Convey("List SecGroups", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/security_groups", listSecGroupsPayload, "", 200, "inline-relations-depth=1", nil}, - {"GET", "/v2/security_groupsPage2", listSecGroupsPayloadPage2, "", 200, "", nil}, - {"GET", "/v2/security_groups/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/spaces", emptyResources, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - secGroups, err := client.ListSecGroups() - So(err, ShouldBeNil) - - So(len(secGroups), ShouldEqual, 2) - So(secGroups[0].Guid, ShouldEqual, "af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c") - So(secGroups[0].Name, ShouldEqual, "secgroup-test") - So(secGroups[0].Running, ShouldEqual, true) - So(secGroups[0].Staging, ShouldEqual, true) - So(secGroups[0].Rules[0].Protocol, ShouldEqual, "tcp") - So(secGroups[0].Rules[0].Ports, ShouldEqual, "443,4443") - So(secGroups[0].Rules[0].Destination, ShouldEqual, "1.1.1.1") - So(secGroups[0].Rules[1].Protocol, ShouldEqual, "udp") - So(secGroups[0].Rules[1].Ports, ShouldEqual, "1111") - So(secGroups[0].Rules[1].Destination, ShouldEqual, "1.2.3.4") - So(secGroups[0].SpacesURL, ShouldEqual, "/v2/security_groups/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/spaces") - So(secGroups[0].SpacesData, ShouldBeEmpty) - So(secGroups[1].Guid, ShouldEqual, "f9ad202b-76dd-44ec-b7c2-fd2417a561e8") - So(secGroups[1].Name, ShouldEqual, "secgroup-test2") - So(secGroups[1].Running, ShouldEqual, false) - So(secGroups[1].Staging, ShouldEqual, false) - So(secGroups[1].Rules[0].Protocol, ShouldEqual, "udp") - So(secGroups[1].Rules[0].Ports, ShouldEqual, "2222") - So(secGroups[1].Rules[0].Destination, ShouldEqual, "2.2.2.2") - So(secGroups[1].Rules[1].Protocol, ShouldEqual, "tcp") - So(secGroups[1].Rules[1].Ports, ShouldEqual, "443,4443") - So(secGroups[1].Rules[1].Destination, ShouldEqual, "4.3.2.1") - So(secGroups[1].SpacesData[0].Entity.Guid, ShouldEqual, "e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4") - So(secGroups[1].SpacesData[0].Entity.Name, ShouldEqual, "space-test") - So(secGroups[1].SpacesData[1].Entity.Guid, ShouldEqual, "a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333") - So(secGroups[1].SpacesData[1].Entity.Name, ShouldEqual, "space-test2") - So(secGroups[1].SpacesData[2].Entity.Guid, ShouldEqual, "c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1") - So(secGroups[1].SpacesData[2].Entity.Name, ShouldEqual, "space-test3") - }) -} - -func TestSecGroupListSpaceResources(t *testing.T) { - Convey("List Space Resources", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/security_groups/123/spaces", listSpacesPayload, "", 200, "", nil}, - {"GET", "/v2/spacesPage2", listSpacesPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - secGroup := &SecGroup{ - Guid: "123", - Name: "test-sec-group", - SpacesURL: "/v2/security_groups/123/spaces", - c: client, - } - spaces, err := secGroup.ListSpaceResources() - So(err, ShouldBeNil) - - So(len(spaces), ShouldEqual, 4) - So(spaces[0].Entity.Guid, ShouldEqual, "8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(spaces[0].Entity.Name, ShouldEqual, "dev") - So(spaces[1].Entity.Guid, ShouldEqual, "657b5923-7de0-486a-9928-b4d78ee24931") - So(spaces[1].Entity.Name, ShouldEqual, "demo") - So(spaces[2].Entity.Guid, ShouldEqual, "9ffd7c5c-d83c-4786-b399-b7bd54883977") - So(spaces[2].Entity.Name, ShouldEqual, "test") - So(spaces[3].Entity.Guid, ShouldEqual, "329b5923-7de0-486a-9928-b4d78ee24982") - So(spaces[3].Entity.Name, ShouldEqual, "prod") - }) -} - -func TestBindStagingSecGroupToSpaces(t *testing.T) { - Convey("Associate a security group to a space for staging", t, func() { - mocks := []MockRoute{ - {"PUT", "/v2/security_groups/8efd7c5c-d83c-4786-b399-b7bd548839e1/staging_spaces/329b5923-7de0-486a-9928-b4d78ee24982", "", "", 201, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.BindStagingSecGroupToSpace("8efd7c5c-d83c-4786-b399-b7bd548839e1", "329b5923-7de0-486a-9928-b4d78ee24982") - So(err, ShouldBeNil) - }) -} - -func TestNegativeBindStagingSecGroupToSpaces(t *testing.T) { - Convey("Try to associate a security group to a space for staging on a pre-2.68.0 API", t, func() { - mocks := []MockRoute{ - {"PUT", "/v2/security_groups/8efd7c5c-d83c-4786-b399-b7bd548839e1/staging_spaces/329b5923-7de0-486a-9928-b4d78ee24982", "", "", 404, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.BindStagingSecGroupToSpace("8efd7c5c-d83c-4786-b399-b7bd548839e1", "329b5923-7de0-486a-9928-b4d78ee24982") - So(err, ShouldNotBeNil) - }) -} - -func TestListRunningSecGroups(t *testing.T) { - Convey("List Running SecGroups", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/config/running_security_groups", listRunningSecGroupsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - secGroups, err := client.ListRunningSecGroups() - So(err, ShouldBeNil) - - So(len(secGroups), ShouldEqual, 1) - for i := range secGroups { - So(secGroups[i].Running, ShouldBeTrue) - } - }) -} - -func TestListStagingSecGroups(t *testing.T) { - Convey("List Staging SecGroups", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/config/staging_security_groups", listStagingSecGroupsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - secGroups, err := client.ListStagingSecGroups() - So(err, ShouldBeNil) - - So(len(secGroups), ShouldEqual, 1) - for i := range secGroups { - So(secGroups[i].Staging, ShouldBeTrue) - } - }) -} - -func TestBindRunningSecGroups(t *testing.T) { - Convey("Unbind Running Sec Groups", t, func() { - mocks := []MockRoute{ - {"PUT", "/v2/config/running_security_groups/8efd7c5c-d83c-4786-b399-b7bd548839e1", "", "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.BindRunningSecGroup("8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(err, ShouldBeNil) - }) -} - -func TestUnbindRunningSecGroups(t *testing.T) { - Convey("Unbind Running Sec Groups", t, func() { - mocks := []MockRoute{ - {"DELETE", "/v2/config/running_security_groups/8efd7c5c-d83c-4786-b399-b7bd548839e1", "", "", 204, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.UnbindRunningSecGroup("8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(err, ShouldBeNil) - }) -} - -func TestBindStagingSecGroups(t *testing.T) { - Convey("Unbind Staging Sec Groups", t, func() { - mocks := []MockRoute{ - {"PUT", "/v2/config/staging_security_groups/8efd7c5c-d83c-4786-b399-b7bd548839e1", "", "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.BindStagingSecGroup("8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(err, ShouldBeNil) - }) -} - -func TestUnbindStagingSecGroups(t *testing.T) { - Convey("Unbind Staging Sec Groups", t, func() { - mocks := []MockRoute{ - {"DELETE", "/v2/config/staging_security_groups/8efd7c5c-d83c-4786-b399-b7bd548839e1", "", "", 204, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.UnbindStagingSecGroup("8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/service_bindings_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/service_bindings_test.go deleted file mode 100644 index 8cdb43c4..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/service_bindings_test.go +++ /dev/null @@ -1,158 +0,0 @@ -package cfclient - -import ( - "net/http" - "reflect" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServiceBindings(t *testing.T) { - Convey("List Service Bindings", t, func() { - mocks := []MockRoute{ - { - Method: "GET", - Endpoint: "/v2/service_bindings", - Output: listServiceBindingsPayloadPage1, - Status: 200, - }, - { - Method: "GET", - Endpoint: "/v2/service_bindings2", - Output: listServiceBindingsPayloadPage2, - Status: 200, - }, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - serviceBindings, err := client.ListServiceBindings() - So(err, ShouldBeNil) - - So(len(serviceBindings), ShouldEqual, 2) - So(serviceBindings[0].Guid, ShouldEqual, "aa599bb3-4811-405a-bbe3-a68c7c55afc8") - So(serviceBindings[0].AppGuid, ShouldEqual, "b26e7e98-f002-41a8-a663-1b60f808a92a") - So(serviceBindings[0].ServiceInstanceGuid, ShouldEqual, "bde206e0-1ee8-48ad-b794-44c857633d50") - So(reflect.DeepEqual( - serviceBindings[0].Credentials, - map[string]interface{}{"creds-key-66": "creds-val-66"}), ShouldBeTrue) - So(serviceBindings[0].BindingOptions, ShouldBeEmpty) - So(serviceBindings[0].GatewayData, ShouldBeNil) - So(serviceBindings[0].GatewayName, ShouldEqual, "") - So(serviceBindings[0].SyslogDrainUrl, ShouldEqual, "") - So(serviceBindings[0].VolumeMounts, ShouldBeEmpty) - So(serviceBindings[0].AppUrl, ShouldEqual, "/v2/apps/b26e7e98-f002-41a8-a663-1b60f808a92a") - So(serviceBindings[0].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/bde206e0-1ee8-48ad-b794-44c857633d50") - So(serviceBindings[1].Guid, ShouldEqual, "8201b87d-b273-4fdf-8dd4-4b42ce970cc7") - So(serviceBindings[1].AppGuid, ShouldEqual, "636bbf83-5b54-488d-9528-066f680a99dc") - So(serviceBindings[1].ServiceInstanceGuid, ShouldEqual, "c3023201-44f5-4dc8-a903-c69c9eba9809") - So(reflect.DeepEqual( - serviceBindings[1].Credentials, - map[string]interface{}{"creds-key-66": "creds-val-66"}), ShouldBeTrue) - So(serviceBindings[1].BindingOptions, ShouldBeEmpty) - So(serviceBindings[1].GatewayData, ShouldBeNil) - So(serviceBindings[1].GatewayName, ShouldEqual, "") - So(serviceBindings[1].SyslogDrainUrl, ShouldEqual, "") - So(serviceBindings[1].VolumeMounts, ShouldBeEmpty) - So(serviceBindings[1].AppUrl, ShouldEqual, "/v2/apps/636bbf83-5b54-488d-9528-066f680a99dc") - So(serviceBindings[1].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/c3023201-44f5-4dc8-a903-c69c9eba9809") - - }) -} -func TestServiceBindingByGuid(t *testing.T) { - Convey("Service Binding By Guid", t, func() { - setup(MockRoute{"GET", "/v2/service_bindings/foo-bar-baz", serviceBindingByGuidPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - serviceBinding, err := client.GetServiceBindingByGuid("foo-bar-baz") - So(err, ShouldBeNil) - - So(serviceBinding.Guid, ShouldEqual, "foo-bar-baz") - So(serviceBinding.AppGuid, ShouldEqual, "app-bar-baz") - }) -} - -func TestDeleteServiceBinding(t *testing.T) { - Convey("Delete service binding", t, func() { - setup(MockRoute{"DELETE", "/v2/service_bindings/guid", "", "", http.StatusNoContent, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteServiceBinding("guid") - So(err, ShouldBeNil) - }) -} - -func TestCreateServiceBinding(t *testing.T) { - Convey("Create service binding", t, func() { - body := `{"app_guid":"app-guid","service_instance_guid":"service-instance-guid"}` - setup(MockRoute{"POST", "/v2/service_bindings", postServiceBindingPayload, "", http.StatusCreated, "", &body}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - binding, err := client.CreateServiceBinding("app-guid", "service-instance-guid") - So(err, ShouldBeNil) - So(binding.Guid, ShouldEqual, "4e690cd4-66ef-4052-a23d-0d748316f18c") - So(binding.AppGuid, ShouldEqual, "081d55a0-1bfa-4e51-8d08-273f764988db") - So(binding.ServiceInstanceGuid, ShouldEqual, "a0029c76-7017-4a74-94b0-54a04ad94b80") - }) -} - -func TestCreateRouteServiceBinding(t *testing.T) { - Convey("Create route service binding", t, func() { - setup(MockRoute{"PUT", "/v2/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774/routes/237d9236-7997-4b1a-be8d-2aaf2d85421a", "", "", http.StatusCreated, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.CreateRouteServiceBinding("237d9236-7997-4b1a-be8d-2aaf2d85421a", "5badd282-6e07-4fc6-a8c4-78be99040774") - So(err, ShouldBeNil) - }) -} - -func TestDeleteRouteServiceBinding(t *testing.T) { - Convey("Delete route service binding", t, func() { - setup(MockRoute{"DELETE", "/v2/service_instances/5badd282-6e07-4fc6-a8c4-78be99040774/routes/237d9236-7997-4b1a-be8d-2aaf2d85421a", "", "", http.StatusOK, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteRouteServiceBinding("237d9236-7997-4b1a-be8d-2aaf2d85421a", "5badd282-6e07-4fc6-a8c4-78be99040774") - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/service_brokers_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/service_brokers_test.go deleted file mode 100644 index 33879726..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/service_brokers_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServiceBrokers(t *testing.T) { - Convey("List Service Brokers", t, func() { - setup(MockRoute{"GET", "/v2/service_brokers", listServiceBrokersPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - servicePlans, err := client.ListServiceBrokers() - So(err, ShouldBeNil) - - So(len(servicePlans), ShouldEqual, 1) - So(servicePlans[0].Guid, ShouldEqual, "90a413fd-a636-4133-8bfb-a94b07839e96") - So(servicePlans[0].Name, ShouldEqual, "name-85") - So(servicePlans[0].BrokerURL, ShouldEqual, "https://foo.com/url-2") - So(servicePlans[0].Username, ShouldEqual, "auth_username-2") - So(servicePlans[0].SpaceGUID, ShouldEqual, "1d43e64d-ed64-43dd-9046-11f422bd407b") - So(servicePlans[0].Password, ShouldBeEmpty) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/service_instances_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/service_instances_test.go deleted file mode 100644 index f39ea5fc..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/service_instances_test.go +++ /dev/null @@ -1,163 +0,0 @@ -package cfclient - -import ( - "net/http" - "strings" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServicesInstances(t *testing.T) { - Convey("List Service Instances", t, func() { - setup(MockRoute{"GET", "/v2/service_instances", listServiceInstancePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - instances, err := client.ListServiceInstances() - So(err, ShouldBeNil) - - So(len(instances), ShouldEqual, 2) - So(instances[0].Guid, ShouldEqual, "8423ca96-90ad-411f-b77a-0907844949fc") - So(instances[0].Name, ShouldEqual, "fortunes-db") - }) -} - -func TestServiceInstanceByGuid(t *testing.T) { - Convey("Service instance by Guid", t, func() { - setup(MockRoute{"GET", "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc", serviceInstancePayload, "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - service, err := client.GetServiceInstanceByGuid("8423ca96-90ad-411f-b77a-0907844949fc") - So(err, ShouldBeNil) - - expected := ServiceInstance{ - Guid: "8423ca96-90ad-411f-b77a-0907844949fc", - CreatedAt: "2016-10-21T18:22:56Z", - UpdatedAt: "2016-10-21T18:22:56Z", - Credentials: map[string]interface{}{}, - Name: "fortunes-db", - LastOperation: LastOperation{ - Type: "create", - State: "succeeded", - Description: "", - UpdatedAt: "", - CreatedAt: "2016-10-21T18:22:56Z", - }, - Tags: []string{}, - ServiceGuid: "440ce9d9-b108-4bbe-80b4-08338f3cc25b", - ServicePlanGuid: "f48419f7-4717-4706-86e4-a24973848a77", - SpaceGuid: "21e5fdc7-5131-4743-8447-6373cf336a77", - DashboardUrl: "https://p-mysql.system.example.com/manage/instances/8423ca96-90ad-411f-b77a-0907844949fc", - Type: "managed_service_instance", - SpaceUrl: "/v2/spaces/21e5fdc7-5131-4743-8447-6373cf336a77", - ServicePlanUrl: "/v2/service_plans/f48419f7-4717-4706-86e4-a24973848a77", - ServiceBindingsUrl: "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_bindings", - ServiceKeysUrl: "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_keys", - RoutesUrl: "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/routes", - ServiceUrl: "/v2/services/440ce9d9-b108-4bbe-80b4-08338f3cc25b", - c: client, - } - So(service, ShouldResemble, expected) - }) -} - -func TestCreateServiceInstance(t *testing.T) { - Convey("Create service instance", t, func() { - setup(MockRoute{"POST", "/v2/service_instances", serviceInstancePayload, "", 202, "accepts_incomplete=true", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - req := ServiceInstanceRequest{ - Name: "test-service", - ServicePlanGuid: "f48419f7-4717-4706-86e4-a24973848a77", - SpaceGuid: "21e5fdc7-5131-4743-8447-6373cf336a77", - } - - service, err := client.CreateServiceInstance(req) - So(err, ShouldBeNil) - - expected := ServiceInstance{ - Guid: "8423ca96-90ad-411f-b77a-0907844949fc", - CreatedAt: "2016-10-21T18:22:56Z", - UpdatedAt: "2016-10-21T18:22:56Z", - Credentials: map[string]interface{}{}, - Name: "fortunes-db", - LastOperation: LastOperation{ - Type: "create", - State: "succeeded", - Description: "", - UpdatedAt: "", - CreatedAt: "2016-10-21T18:22:56Z", - }, - Tags: []string{}, - ServiceGuid: "440ce9d9-b108-4bbe-80b4-08338f3cc25b", - ServicePlanGuid: "f48419f7-4717-4706-86e4-a24973848a77", - SpaceGuid: "21e5fdc7-5131-4743-8447-6373cf336a77", - DashboardUrl: "https://p-mysql.system.example.com/manage/instances/8423ca96-90ad-411f-b77a-0907844949fc", - Type: "managed_service_instance", - SpaceUrl: "/v2/spaces/21e5fdc7-5131-4743-8447-6373cf336a77", - ServicePlanUrl: "/v2/service_plans/f48419f7-4717-4706-86e4-a24973848a77", - ServiceBindingsUrl: "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_bindings", - ServiceKeysUrl: "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/service_keys", - RoutesUrl: "/v2/service_instances/8423ca96-90ad-411f-b77a-0907844949fc/routes", - ServiceUrl: "/v2/services/440ce9d9-b108-4bbe-80b4-08338f3cc25b", - c: client, - } - So(service, ShouldResemble, expected) - }) -} - -func TestUpdateServiceInstance(t *testing.T) { - Convey("Update service instance", t, func() { - updateBody := "myUpdate" - - setup(MockRoute{"PUT", "/v2/service_instances/guid", "", "", http.StatusAccepted, "accepts_incomplete=false", &updateBody}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.UpdateServiceInstance("guid", strings.NewReader(updateBody), false) - So(err, ShouldBeNil) - }) -} - -func TestDeleteServiceInstance(t *testing.T) { - Convey("Delete service instance", t, func() { - setup(MockRoute{"DELETE", "/v2/service_instances/guid", "", "", http.StatusAccepted, "recursive=true&accepts_incomplete=false&async=false", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteServiceInstance("guid", true, false) - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/service_keys_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/service_keys_test.go deleted file mode 100644 index f94beadd..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/service_keys_test.go +++ /dev/null @@ -1,265 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServiceKeys(t *testing.T) { - Convey("List Service Keys", t, func() { - mocks := []MockRoute{ - { - Method: "GET", - Endpoint: "/v2/service_keys", - Output: listServiceKeysPayloadPage1, - Status: 200, - }, - { - Method: "GET", - Endpoint: "/v2/service_keys2", - Output: listServiceKeysPayloadPage2, - Status: 200, - }, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - serviceKeys, err := client.ListServiceKeys() - So(err, ShouldBeNil) - - So(len(serviceKeys), ShouldEqual, 4) - So(serviceKeys[0].Guid, ShouldEqual, "3b933598-64ed-4613-a0f5-b7e8c0379368") - So(serviceKeys[0].Name, ShouldEqual, "RedisMonitoringKey") - So(serviceKeys[0].ServiceInstanceGuid, ShouldEqual, "ad98f310-a3a0-47aa-9116-f8295d41a9b2") - So(serviceKeys[0].Credentials, ShouldNotEqual, nil) - So(serviceKeys[0].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/ad98f310-a3a0-47aa-9116-f8295d41a9b2") - So(serviceKeys[1].Guid, ShouldEqual, "8be3911b-c621-4467-8866-f8b924aaee57") - So(serviceKeys[1].Name, ShouldEqual, "test01_key") - So(serviceKeys[1].ServiceInstanceGuid, ShouldEqual, "ecf26687-e176-4784-b181-b3c942fecb62") - So(serviceKeys[1].Credentials, ShouldNotEqual, nil) - m := serviceKeys[1].Credentials.(map[string]interface{}) - So(m["uri"], ShouldEqual, "nhp://100.100.100.100:9008") - So(serviceKeys[1].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/fcf26687-e176-4784-b181-b3c942fecb62") - So(serviceKeys[2].Guid, ShouldEqual, "3b933598-64ed-4613-a0f5-b7e8c0379368") - So(serviceKeys[2].Name, ShouldEqual, "RedisMonitoringKey") - So(serviceKeys[2].ServiceInstanceGuid, ShouldEqual, "ad98f310-a3a0-47aa-9116-f8295d41a9b2") - So(serviceKeys[2].Credentials, ShouldNotEqual, nil) - So(serviceKeys[2].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/ad98f310-a3a0-47aa-9116-f8295d41a9b2") - So(serviceKeys[3].Guid, ShouldEqual, "8be3911b-c621-4467-8866-f8b924aaee57") - So(serviceKeys[3].Name, ShouldEqual, "test01_key") - So(serviceKeys[3].ServiceInstanceGuid, ShouldEqual, "ecf26687-e176-4784-b181-b3c942fecb62") - So(serviceKeys[3].Credentials, ShouldNotEqual, nil) - m = serviceKeys[3].Credentials.(map[string]interface{}) - So(m["uri"], ShouldEqual, "nhp://100.100.100.100:9008") - So(serviceKeys[3].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/fcf26687-e176-4784-b181-b3c942fecb62") - }) -} - -func TestGetServiceKeyByName(t *testing.T) { - Convey("Get service key by name", t, func() { - setup(MockRoute{"GET", "/v2/service_keys", getServiceKeyPayload, "", 200, "q=name:test01_key", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - serviceKey, err := client.GetServiceKeyByName("test01_key") - So(err, ShouldBeNil) - - So(serviceKey, ShouldNotBeNil) - So(serviceKey.Name, ShouldEqual, "test01_key") - So(serviceKey.ServiceInstanceGuid, ShouldEqual, "ecf26687-e176-4784-b181-b3c942fecb62") - So(serviceKey.Credentials, ShouldNotEqual, nil) - So(serviceKey.ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62") - }) -} - -func TestGetServiceKeyByGuid(t *testing.T) { - Convey("Get service key by guid", t, func() { - setup(MockRoute{"GET", "/v2/service_keys", getServiceKeyPayload, "", 200, "q=service_instance_guid:ecf26687-e176-4784-b181-b3c942fecb62", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - serviceKey, err := client.GetServiceKeyByInstanceGuid("ecf26687-e176-4784-b181-b3c942fecb62") - So(err, ShouldBeNil) - - So(serviceKey, ShouldNotBeNil) - So(serviceKey.Name, ShouldEqual, "test01_key") - So(serviceKey.ServiceInstanceGuid, ShouldEqual, "ecf26687-e176-4784-b181-b3c942fecb62") - So(serviceKey.Credentials, ShouldNotEqual, nil) - So(serviceKey.ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62") - }) -} - -func TestGetServiceKeysByGuid(t *testing.T) { - Convey("Get service key by guid", t, func() { - setup(MockRoute{"GET", "/v2/service_keys", getServiceKeysPayload, "", 200, "q=service_instance_guid:ecf26687-e176-4784-b181-b3c942fecb62", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - serviceKeys, err := client.GetServiceKeysByInstanceGuid("ecf26687-e176-4784-b181-b3c942fecb62") - So(err, ShouldBeNil) - So(len(serviceKeys), ShouldEqual, 2) - - So(serviceKeys[0].Name, ShouldEqual, "test01_key") - So(serviceKeys[0].ServiceInstanceGuid, ShouldEqual, "ecf26687-e176-4784-b181-b3c942fecb62") - So(serviceKeys[0].Credentials, ShouldNotEqual, nil) - So(serviceKeys[0].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62") - - So(serviceKeys[1].Name, ShouldEqual, "test02_key") - So(serviceKeys[1].ServiceInstanceGuid, ShouldEqual, "ecf26687-e176-4784-b181-b3c942fecb62") - So(serviceKeys[1].Credentials, ShouldNotEqual, nil) - So(serviceKeys[1].ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62") - }) -} - -func TestCreateServiceKey(t *testing.T) { - Convey("Create a service key succeeds", t, func() { - setup(MockRoute{"POST", "/v2/service_keys", postServiceKeysPayload, "", 201, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - csr := CreateServiceKeyRequest{ - Name: "key1", - ServiceInstanceGuid: "ecf26687-e176-4784-b181-b3c942fecb62", - } - - key, err := client.CreateServiceKey(csr) - So(err, ShouldBeNil) - - So(key.Name, ShouldEqual, "key1") - So(key.ServiceInstanceUrl, ShouldEqual, "/v2/service_instances/ecf26687-e176-4784-b181-b3c942fecb62") - }) - - Convey("Create a service key with parameters succeeds", t, func() { - setup(MockRoute{"POST", "/v2/service_keys", postServiceKeysPayload, "", 201, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - csr := CreateServiceKeyRequest{ - Name: "key1", - ServiceInstanceGuid: "ecf26687-e176-4784-b181-b3c942fecb62", - Parameters: map[string]interface{}{ - "read-only": true, - "username": "user1", - "connections": 6, - }, - } - - _, err = client.CreateServiceKey(csr) - So(err, ShouldBeNil) - }) - - Convey("Delete a service key succeeds", t, func() { - setup(MockRoute{"DELETE", "/v2/service_keys/ecf26687-e176-4784-b181-b3c942fecb62", "", "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteServiceKey("ecf26687-e176-4784-b181-b3c942fecb62") - So(err, ShouldBeNil) - }) - - Convey("Create a duplicate service key", t, func() { - setup(MockRoute{"POST", "/v2/service_keys", postServiceKeysDuplicatePayload, "", 400, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - csr := CreateServiceKeyRequest{ - Name: "key1", - ServiceInstanceGuid: "ecf26687-e176-4784-b181-b3c942fecb62", - } - - key, err := client.CreateServiceKey(csr) - So(err.Error(), ShouldEqual, "cfclient error (CF-ServiceKeyNameTaken|360001): The service key name is taken: key1") - - So(key.Name, ShouldEqual, "") - }) - - Convey("Gets a bad JSON response", t, func() { - setup(MockRoute{"POST", "/v2/service_keys", postServiceKeysBadPayload, "", 201, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - csr := CreateServiceKeyRequest{ - Name: "key1", - ServiceInstanceGuid: "ecf26687-e176-4784-b181-b3c942fecb62", - } - - key, err := client.CreateServiceKey(csr) - So(err.Error(), ShouldEqual, "unexpected end of JSON input") - - So(key.Name, ShouldEqual, "") - }) - - Convey("Gets an unexpected HTTP status code", t, func() { - setup(MockRoute{"POST", "/v2/service_keys", "", "", 202, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - csr := CreateServiceKeyRequest{ - Name: "key1", - ServiceInstanceGuid: "ecf26687-e176-4784-b181-b3c942fecb62", - } - - key, err := client.CreateServiceKey(csr) - So(err.Error(), ShouldEqual, "CF API returned with status code 202") - - So(key.Name, ShouldEqual, "") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/service_plan_visibilities_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/service_plan_visibilities_test.go deleted file mode 100644 index df6fdceb..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/service_plan_visibilities_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServicePlanVisibilities(t *testing.T) { - Convey("List service plan visibilities", t, func() { - setup(MockRoute{"GET", "/v2/service_plan_visibilities", listServicePlanVisibilitiesPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - servicePlanVisibilities, err := client.ListServicePlanVisibilities() - So(err, ShouldBeNil) - - So(len(servicePlanVisibilities), ShouldEqual, 2) - So(servicePlanVisibilities[0].Guid, ShouldEqual, "d1b5ea55-f354-4f43-b52e-53045747adb9") - So(servicePlanVisibilities[0].ServicePlanGuid, ShouldEqual, "62cb572c-e9ca-4c9f-b822-8292db1d9a96") - So(servicePlanVisibilities[0].OrganizationGuid, ShouldEqual, "81df84f3-8ce0-4c92-990a-3760b6ff66bd") - So(servicePlanVisibilities[0].ServicePlanUrl, ShouldEqual, "/v2/service_plans/62cb572c-e9ca-4c9f-b822-8292db1d9a96") - So(servicePlanVisibilities[0].OrganizationUrl, ShouldEqual, "/v2/organizations/81df84f3-8ce0-4c92-990a-3760b6ff66bd") - }) -} - -func TestCreateServicePlanVisibility(t *testing.T) { - Convey("Create service plan visibility", t, func() { - setup(MockRoute{"POST", "/v2/service_plan_visibilities", postServicePlanVisibilityPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - servicePlanVisibility, err := client.CreateServicePlanVisibility("ab5780a9-ac8e-4412-9496-4512e865011a", "55d0ff39-dac9-431f-ba6d-83f37381f1c3") - So(err, ShouldBeNil) - - So(servicePlanVisibility.Guid, ShouldEqual, "f740b01a-4afe-4435-aedd-0a8308a7e7d6") - So(servicePlanVisibility.ServicePlanGuid, ShouldEqual, "ab5780a9-ac8e-4412-9496-4512e865011a") - So(servicePlanVisibility.OrganizationGuid, ShouldEqual, "55d0ff39-dac9-431f-ba6d-83f37381f1c3") - So(servicePlanVisibility.ServicePlanUrl, ShouldEqual, "/v2/service_plans/ab5780a9-ac8e-4412-9496-4512e865011a") - So(servicePlanVisibility.OrganizationUrl, ShouldEqual, "/v2/organizations/55d0ff39-dac9-431f-ba6d-83f37381f1c3") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/service_plans_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/service_plans_test.go deleted file mode 100644 index db585807..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/service_plans_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServicePlans(t *testing.T) { - Convey("List Service Plans", t, func() { - setup(MockRoute{"GET", "/v2/service_plans", listServicePlansPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - servicePlans, err := client.ListServicePlans() - So(err, ShouldBeNil) - - So(len(servicePlans), ShouldEqual, 1) - So(servicePlans[0].Guid, ShouldEqual, "6fecf53b-7553-4cb3-b97e-930f9c4e3385") - So(servicePlans[0].Name, ShouldEqual, "name-1575") - So(servicePlans[0].Description, ShouldEqual, "desc-109") - So(servicePlans[0].ServiceGuid, ShouldEqual, "1ccab853-87c9-45a6-bf99-603032d17fe5") - So(servicePlans[0].Extra, ShouldBeNil) - So(servicePlans[0].UniqueId, ShouldEqual, "1bc2884c-ee3d-4f82-a78b-1a657f79aeac") - So(servicePlans[0].Public, ShouldEqual, true) - So(servicePlans[0].Active, ShouldEqual, true) - So(servicePlans[0].Bindable, ShouldEqual, true) - So(servicePlans[0].ServiceUrl, ShouldEqual, "/v2/services/1ccab853-87c9-45a6-bf99-603032d17fe5") - So(servicePlans[0].ServiceInstancesUrl, ShouldEqual, "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385/service_instances") - }) -} - -func TestGetServicePlanByGuid(t *testing.T) { - Convey("List Service Plans", t, func() { - setup(MockRoute{"GET", "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", getServicePlanByGuidPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - servicePlan, err := client.GetServicePlanByGUID("6fecf53b-7553-4cb3-b97e-930f9c4e3385") - So(err, ShouldBeNil) - So(servicePlan.Guid, ShouldEqual, "6fecf53b-7553-4cb3-b97e-930f9c4e3385") - So(servicePlan.Name, ShouldEqual, "name-1575") - So(servicePlan.Description, ShouldEqual, "desc-109") - So(servicePlan.ServiceGuid, ShouldEqual, "1ccab853-87c9-45a6-bf99-603032d17fe5") - So(servicePlan.Extra, ShouldBeNil) - So(servicePlan.UniqueId, ShouldEqual, "1bc2884c-ee3d-4f82-a78b-1a657f79aeac") - So(servicePlan.Public, ShouldEqual, true) - So(servicePlan.Active, ShouldEqual, true) - So(servicePlan.Bindable, ShouldEqual, true) - So(servicePlan.ServiceUrl, ShouldEqual, "/v2/services/1ccab853-87c9-45a6-bf99-603032d17fe5") - So(servicePlan.ServiceInstancesUrl, ShouldEqual, "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385/service_instances") - }) -} - -func TestMakeServicePlanPublic(t *testing.T) { - Convey("Make Service Plan public", t, func() { - setupMultiple([]MockRoute{ - MockRoute{"GET", "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", privateServicePlanPayload, "", 200, "", nil}, - MockRoute{"PUT", "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", getServicePlanByGuidPayload, "", 201, "", nil}, - }, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - servicePlan, err := client.GetServicePlanByGUID("6fecf53b-7553-4cb3-b97e-930f9c4e3385") - So(err, ShouldBeNil) - So(servicePlan.Public, ShouldBeFalse) - - err = client.MakeServicePlanPublic("6fecf53b-7553-4cb3-b97e-930f9c4e3385") - So(err, ShouldBeNil) - }) -} - -func TestMakeServicePlanPrivate(t *testing.T) { - Convey("Make Service Plan private", t, func() { - setupMultiple([]MockRoute{ - MockRoute{"GET", "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", getServicePlanByGuidPayload, "", 200, "", nil}, - MockRoute{"PUT", "/v2/service_plans/6fecf53b-7553-4cb3-b97e-930f9c4e3385", privateServicePlanPayload, "", 201, "", nil}, - }, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - servicePlan, err := client.GetServicePlanByGUID("6fecf53b-7553-4cb3-b97e-930f9c4e3385") - So(err, ShouldBeNil) - So(servicePlan.Public, ShouldBeTrue) - - err = client.MakeServicePlanPrivate("6fecf53b-7553-4cb3-b97e-930f9c4e3385") - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/service_usage_events_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/service_usage_events_test.go deleted file mode 100644 index 0d4b6a6f..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/service_usage_events_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package cfclient - -import ( - "net/url" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServiceUsageEvents(t *testing.T) { - Convey("List Service Usage Events", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/service_usage_events", listServiceUsageEventsPayload, "", 200, "", nil}, - {"GET", "/v2/service_usage_eventsPage2", listServiceUsageEventsPayloadPage2, "", 200, "results-per-page=2&page=2", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - serviceUsageEvents, err := client.ListServiceUsageEvents() - So(err, ShouldBeNil) - - So(len(serviceUsageEvents), ShouldEqual, 4) - So(serviceUsageEvents[0].GUID, ShouldEqual, "985c09c5-bf5a-44eb-a260-41c532dc0f1d") - So(serviceUsageEvents[0].CreatedAt, ShouldEqual, "2016-06-08T16:41:39Z") - }) -} - -func TestListServiceUsageEventsByQuery(t *testing.T) { - Convey("List Service Usage Events", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/service_usage_events", listServiceUsageEventsPayload, "", 200, "results-per-page=2", nil}, - {"GET", "/v2/service_usage_eventsPage2", listServiceUsageEventsPayloadPage2, "", 200, "results-per-page=2&page=2", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - var query = url.Values{ - "results-per-page": []string{ - "2", - }, - } - serviceUsageEvents, err := client.ListServiceUsageEventsByQuery(query) - So(err, ShouldBeNil) - - So(len(serviceUsageEvents), ShouldEqual, 4) - So(serviceUsageEvents[0].GUID, ShouldEqual, "985c09c5-bf5a-44eb-a260-41c532dc0f1d") - So(serviceUsageEvents[0].CreatedAt, ShouldEqual, "2016-06-08T16:41:39Z") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/services_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/services_test.go deleted file mode 100644 index daddcbb9..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/services_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListServices(t *testing.T) { - Convey("List Services", t, func() { - setup(MockRoute{"GET", "/v2/services", listServicePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - services, err := client.ListServices() - So(err, ShouldBeNil) - - So(len(services), ShouldEqual, 2) - So(services[0].Guid, ShouldEqual, "a3d76c01-c08a-4505-b06d-8603265682a3") - So(services[0].Label, ShouldEqual, "nats") - So(services[0].Description, ShouldEqual, "NATS is a lightweight cloud messaging system") - So(services[0].Active, ShouldEqual, true) - So(services[0].Bindable, ShouldEqual, true) - So(services[0].PlanUpdateable, ShouldEqual, false) - So(services[1].ServiceBrokerGuid, ShouldEqual, "a4bdf03a-f0c4-43f9-9c77-f434da91404f") - So(services[1].Guid, ShouldEqual, "ab9ad9c8-1f51-463a-ae3a-5082e9f04ae6") - So(services[1].Label, ShouldEqual, "etcd") - So(services[1].Description, ShouldEqual, "Etcd key-value storage") - So(services[1].Active, ShouldEqual, true) - So(services[1].Bindable, ShouldEqual, true) - So(services[1].PlanUpdateable, ShouldEqual, false) - So(services[1].ServiceBrokerGuid, ShouldEqual, "a4bdf03a-f0c4-43f9-9c77-f434da91404f") - So(len(services[1].Tags), ShouldEqual, 3) - So(services[1].Tags[0], ShouldEqual, "etcd") - So(services[1].Tags[1], ShouldEqual, "keyvalue") - So(services[1].Tags[2], ShouldEqual, "etcd-0.4.6") - }) -} - -func TestGetServiceByGuid(t *testing.T) { - Convey("Get Service By Guid", t, func() { - setup(MockRoute{"GET", "/v2/services/53f52780-e93c-4af7-a96c-6958311c40e5", getServiceByGuidPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - service, err := client.GetServiceByGuid("53f52780-e93c-4af7-a96c-6958311c40e5") - So(err, ShouldBeNil) - - So(service.Guid, ShouldEqual, "53f52780-e93c-4af7-a96c-6958311c40e5") - So(service.Label, ShouldEqual, "label-58") - So(service.Description, ShouldEqual, "desc-135") - So(service.Active, ShouldEqual, true) - So(service.Bindable, ShouldEqual, true) - So(service.PlanUpdateable, ShouldEqual, false) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/space_quotas_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/space_quotas_test.go deleted file mode 100644 index dd5d80a0..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/space_quotas_test.go +++ /dev/null @@ -1,134 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListSpaceQuotas(t *testing.T) { - Convey("List Space Quotas", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/space_quota_definitions", listSpaceQuotasPayloadPage1, "", 200, "", nil}, - {"GET", "/v2/space_quota_definitions_page_2", listSpaceQuotasPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaceQuotas, err := client.ListSpaceQuotas() - So(err, ShouldBeNil) - - So(len(spaceQuotas), ShouldEqual, 2) - So(spaceQuotas[0].Guid, ShouldEqual, "889aa2ed-a883-4cc0-abe5-804b2503f15d") - So(spaceQuotas[0].Name, ShouldEqual, "test-1") - So(spaceQuotas[0].NonBasicServicesAllowed, ShouldEqual, true) - So(spaceQuotas[0].TotalServices, ShouldEqual, -1) - So(spaceQuotas[0].TotalRoutes, ShouldEqual, 100) - So(spaceQuotas[0].MemoryLimit, ShouldEqual, 102400) - So(spaceQuotas[0].InstanceMemoryLimit, ShouldEqual, -1) - So(spaceQuotas[0].AppInstanceLimit, ShouldEqual, -1) - So(spaceQuotas[0].AppTaskLimit, ShouldEqual, -1) - So(spaceQuotas[0].TotalServiceKeys, ShouldEqual, -1) - So(spaceQuotas[0].TotalReservedRoutePorts, ShouldEqual, -1) - }) -} - -func TestGetSpaceQuotaByName(t *testing.T) { - Convey("Get Space Quota By Name", t, func() { - setup(MockRoute{"GET", "/v2/space_quota_definitions", listSpaceQuotasPayloadPage2, "", 200, "q=name:test-2", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaceQuota, err := client.GetSpaceQuotaByName("test-2") - So(err, ShouldBeNil) - - So(spaceQuota.Guid, ShouldEqual, "9ffd7c5c-d83c-4786-b399-b7bd54883977") - So(spaceQuota.Name, ShouldEqual, "test-2") - So(spaceQuota.NonBasicServicesAllowed, ShouldEqual, false) - So(spaceQuota.TotalServices, ShouldEqual, 10) - So(spaceQuota.TotalRoutes, ShouldEqual, 20) - So(spaceQuota.MemoryLimit, ShouldEqual, 30) - So(spaceQuota.InstanceMemoryLimit, ShouldEqual, 40) - So(spaceQuota.AppInstanceLimit, ShouldEqual, 50) - So(spaceQuota.AppTaskLimit, ShouldEqual, 60) - So(spaceQuota.TotalServiceKeys, ShouldEqual, 70) - So(spaceQuota.TotalReservedRoutePorts, ShouldEqual, 80) - }) -} - -func TestCreateSpaceQuota(t *testing.T) { - Convey("Create Space Quota", t, func() { - setup(MockRoute{"POST", "/v2/space_quota_definitions", spaceQuotaPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaceQuotaRequest := SpaceQuotaRequest{ - Name: "test-2", - OrganizationGuid: "06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - } - - spaceQuota, err := client.CreateSpaceQuota(spaceQuotaRequest) - So(err, ShouldBeNil) - - So(spaceQuota.Name, ShouldEqual, "test-2") - So(spaceQuota.OrganizationGuid, ShouldEqual, "06dcedd4-1f24-49a6-adc1-cce9131a1b2c") - - }) -} - -func TestUpdateSpaceQuota(t *testing.T) { - Convey("Create Update Quota", t, func() { - setup(MockRoute{"PUT", "/v2/space_quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977", spaceQuotaPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaceQuotaRequest := SpaceQuotaRequest{ - Name: "test-2", - OrganizationGuid: "06dcedd4-1f24-49a6-adc1-cce9131a1b2c", - } - - spaceQuota, err := client.UpdateSpaceQuota("9ffd7c5c-d83c-4786-b399-b7bd54883977", spaceQuotaRequest) - So(err, ShouldBeNil) - - So(spaceQuota.Name, ShouldEqual, "test-2") - So(spaceQuota.OrganizationGuid, ShouldEqual, "06dcedd4-1f24-49a6-adc1-cce9131a1b2c") - - }) -} - -func TestAssignSpaceQuota(t *testing.T) { - Convey("Assign Space Quota", t, func() { - setup(MockRoute{"PUT", "/v2/space_quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1", "", "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.AssignSpaceQuota("9ffd7c5c-d83c-4786-b399-b7bd54883977", "8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/spaces_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/spaces_test.go deleted file mode 100644 index 7a71297b..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/spaces_test.go +++ /dev/null @@ -1,726 +0,0 @@ -package cfclient - -import ( - "fmt" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListSpaces(t *testing.T) { - Convey("List Space", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/spaces", listSpacesPayload, "", 200, "", nil}, - {"GET", "/v2/spacesPage2", listSpacesPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaces, err := client.ListSpaces() - So(err, ShouldBeNil) - - So(len(spaces), ShouldEqual, 4) - So(spaces[0].Guid, ShouldEqual, "8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(spaces[0].CreatedAt, ShouldEqual, "2014-09-24T13:54:54+00:00") - So(spaces[0].UpdatedAt, ShouldEqual, "2014-09-24T13:54:54+00:00") - So(spaces[0].Name, ShouldEqual, "dev") - So(spaces[0].OrganizationGuid, ShouldEqual, "a537761f-9d93-4b30-af17-3d73dbca181b") - So(spaces[1].Guid, ShouldEqual, "657b5923-7de0-486a-9928-b4d78ee24931") - So(spaces[1].CreatedAt, ShouldEqual, "2014-09-26T13:37:31+00:00") - So(spaces[1].UpdatedAt, ShouldEqual, "2014-09-26T13:37:31+00:00") - So(spaces[1].Name, ShouldEqual, "demo") - So(spaces[1].OrganizationGuid, ShouldEqual, "da0dba14-6064-4f7a-b15a-ff9e677e49b2") - So(spaces[2].Guid, ShouldEqual, "9ffd7c5c-d83c-4786-b399-b7bd54883977") - So(spaces[2].CreatedAt, ShouldEqual, "2014-09-24T13:54:54+00:00") - So(spaces[2].UpdatedAt, ShouldEqual, "2014-09-24T13:54:54+00:00") - So(spaces[2].Name, ShouldEqual, "test") - So(spaces[2].OrganizationGuid, ShouldEqual, "a537761f-9d93-4b30-af17-3d73dbca181b") - So(spaces[3].Guid, ShouldEqual, "329b5923-7de0-486a-9928-b4d78ee24982") - So(spaces[3].CreatedAt, ShouldEqual, "2014-09-26T13:37:31+00:00") - So(spaces[3].UpdatedAt, ShouldEqual, "2014-09-26T13:37:31+00:00") - So(spaces[3].Name, ShouldEqual, "prod") - So(spaces[3].OrganizationGuid, ShouldEqual, "da0dba14-6064-4f7a-b15a-ff9e677e49b2") - }) -} -func TestListSpaceSecGroups(t *testing.T) { - Convey("List Space SecGroups", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1/security_groups", listSecGroupsPayload, "", 200, "inline-relations-depth=1", nil}, - {"GET", "/v2/security_groupsPage2", listSecGroupsPayloadPage2, "", 200, "", nil}, - {"GET", "/v2/security_groups/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/spaces", emptyResources, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - secGroups, err := client.ListSpaceSecGroups("8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(err, ShouldBeNil) - - So(len(secGroups), ShouldEqual, 2) - So(secGroups[0].Guid, ShouldEqual, "af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c") - So(secGroups[0].Name, ShouldEqual, "secgroup-test") - So(secGroups[0].Running, ShouldEqual, true) - So(secGroups[0].Staging, ShouldEqual, true) - So(secGroups[0].Rules[0].Protocol, ShouldEqual, "tcp") - So(secGroups[0].Rules[0].Ports, ShouldEqual, "443,4443") - So(secGroups[0].Rules[0].Destination, ShouldEqual, "1.1.1.1") - So(secGroups[0].Rules[1].Protocol, ShouldEqual, "udp") - So(secGroups[0].Rules[1].Ports, ShouldEqual, "1111") - So(secGroups[0].Rules[1].Destination, ShouldEqual, "1.2.3.4") - So(secGroups[0].SpacesURL, ShouldEqual, "/v2/security_groups/af15c29a-6bde-4a9b-8cdf-43aa0d4b7e3c/spaces") - So(secGroups[0].SpacesData, ShouldBeEmpty) - So(secGroups[1].Guid, ShouldEqual, "f9ad202b-76dd-44ec-b7c2-fd2417a561e8") - So(secGroups[1].Name, ShouldEqual, "secgroup-test2") - So(secGroups[1].Running, ShouldEqual, false) - So(secGroups[1].Staging, ShouldEqual, false) - So(secGroups[1].Rules[0].Protocol, ShouldEqual, "udp") - So(secGroups[1].Rules[0].Ports, ShouldEqual, "2222") - So(secGroups[1].Rules[0].Destination, ShouldEqual, "2.2.2.2") - So(secGroups[1].Rules[1].Protocol, ShouldEqual, "tcp") - So(secGroups[1].Rules[1].Ports, ShouldEqual, "443,4443") - So(secGroups[1].Rules[1].Destination, ShouldEqual, "4.3.2.1") - So(secGroups[1].SpacesData[0].Entity.Guid, ShouldEqual, "e0a0d1bf-ad74-4b3c-8f4a-0c33859a54e4") - So(secGroups[1].SpacesData[0].Entity.Name, ShouldEqual, "space-test") - So(secGroups[1].SpacesData[1].Entity.Guid, ShouldEqual, "a2a0d1bf-ad74-4b3c-8f4a-0c33859a5333") - So(secGroups[1].SpacesData[1].Entity.Name, ShouldEqual, "space-test2") - So(secGroups[1].SpacesData[2].Entity.Guid, ShouldEqual, "c7a0d1bf-ad74-4b3c-8f4a-0c33859adsa1") - So(secGroups[1].SpacesData[2].Entity.Name, ShouldEqual, "space-test3") - }) -} -func TestListSpaceManagers(t *testing.T) { - Convey("ListSpaceManagers()", t, func() { - setup(MockRoute{"GET", "/v2/spaces/foo/managers", listSpacePeoplePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - users, err := client.ListSpaceManagers("foo") - So(err, ShouldBeNil) - So(len(users), ShouldEqual, 2) - So(users[0].Username, ShouldEqual, "user1") - So(users[1].Username, ShouldEqual, "user2") - }) -} -func TestListSpaceAuditors(t *testing.T) { - Convey("ListSpaceAuditors()", t, func() { - setup(MockRoute{"GET", "/v2/spaces/foo/auditors", listSpacePeoplePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - users, err := client.ListSpaceAuditors("foo") - So(err, ShouldBeNil) - So(len(users), ShouldEqual, 2) - So(users[0].Username, ShouldEqual, "user1") - So(users[1].Username, ShouldEqual, "user2") - }) -} -func TestListSpaceDevelopers(t *testing.T) { - Convey("ListSpaceDevelopers()", t, func() { - setup(MockRoute{"GET", "/v2/spaces/foo/developers", listSpacePeoplePayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - users, err := client.ListSpaceDevelopers("foo") - So(err, ShouldBeNil) - So(len(users), ShouldEqual, 2) - So(users[0].Username, ShouldEqual, "user1") - So(users[1].Username, ShouldEqual, "user2") - }) -} - -func TestCreateSpace(t *testing.T) { - Convey("Create Space", t, func() { - setup(MockRoute{"POST", "/v2/spaces", spacePayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaceRequest := SpaceRequest{Name: "test-space", OrganizationGuid: "da0dba14-6064-4f7a-b15a-ff9e677e49b2", AllowSSH: false} - - space, err := client.CreateSpace(spaceRequest) - So(err, ShouldBeNil) - - So(space.Name, ShouldEqual, "test-space") - So(space.OrganizationGuid, ShouldEqual, "da0dba14-6064-4f7a-b15a-ff9e677e49b2") - So(space.AllowSSH, ShouldEqual, false) - }) -} - -func TestUpdateSpace(t *testing.T) { - Convey("Update Space", t, func() { - setup(MockRoute{"PUT", "/v2/spaces/a72fa1e8-c694-47b3-85f2-55f61fd00d73", spacePayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - updateSpaceRequest := SpaceRequest{ - Name: "test-space", - AllowSSH: false, - } - - space, err := client.UpdateSpace("a72fa1e8-c694-47b3-85f2-55f61fd00d73", updateSpaceRequest) - So(err, ShouldBeNil) - - So(space.Guid, ShouldEqual, "a72fa1e8-c694-47b3-85f2-55f61fd00d73") - So(space.Name, ShouldEqual, "test-space") - So(space.OrganizationGuid, ShouldEqual, "da0dba14-6064-4f7a-b15a-ff9e677e49b2") - So(space.AllowSSH, ShouldEqual, false) - }) -} - -func TestDeleteSpace(t *testing.T) { - Convey("Delete space", t, func() { - setup(MockRoute{"DELETE", "/v2/spaces/a537761f-9d93-4b30-af17-3d73dbca181b", "", "", 204, "recursive=false&async=false", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteSpace("a537761f-9d93-4b30-af17-3d73dbca181b", false, false) - So(err, ShouldBeNil) - }) -} -func TestSpaceOrg(t *testing.T) { - Convey("Find space org", t, func() { - setup(MockRoute{"GET", "/v2/org/foobar", orgPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "123", - Name: "test space", - OrgURL: "/v2/org/foobar", - c: client, - } - org, err := space.Org() - So(err, ShouldBeNil) - - So(org.Name, ShouldEqual, "test-org") - So(org.Guid, ShouldEqual, "da0dba14-6064-4f7a-b15a-ff9e677e49b2") - }) -} - -func TestSpaceQuota(t *testing.T) { - Convey("Get space quota", t, func() { - setup(MockRoute{"GET", "/v2/space_quota_definitions/9ffd7c5c-d83c-4786-b399-b7bd54883977", spaceQuotaPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - QuotaDefinitionGuid: "9ffd7c5c-d83c-4786-b399-b7bd54883977", - c: client, - } - - spaceQuota, err := space.Quota() - So(err, ShouldBeNil) - - So(spaceQuota.Guid, ShouldEqual, "9ffd7c5c-d83c-4786-b399-b7bd54883977") - So(spaceQuota.Name, ShouldEqual, "test-2") - So(spaceQuota.NonBasicServicesAllowed, ShouldEqual, false) - So(spaceQuota.TotalServices, ShouldEqual, 10) - So(spaceQuota.TotalRoutes, ShouldEqual, 20) - So(spaceQuota.MemoryLimit, ShouldEqual, 30) - So(spaceQuota.InstanceMemoryLimit, ShouldEqual, 40) - So(spaceQuota.AppInstanceLimit, ShouldEqual, 50) - So(spaceQuota.AppTaskLimit, ShouldEqual, 60) - So(spaceQuota.TotalServiceKeys, ShouldEqual, 70) - So(spaceQuota.TotalReservedRoutePorts, ShouldEqual, 80) - }) -} - -func TestSpaceSummary(t *testing.T) { - Convey("Get space summary", t, func() { - setup(MockRoute{"GET", "/v2/spaces/494d8b64-8181-4183-a6d3-6279db8fec6e/summary", spaceSummaryPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "494d8b64-8181-4183-a6d3-6279db8fec6e", - c: client, - } - - summary, err := space.Summary() - So(err, ShouldBeNil) - - So(summary.Guid, ShouldEqual, "494d8b64-8181-4183-a6d3-6279db8fec6e") - So(summary.Name, ShouldEqual, "test") - - So(len(summary.Apps), ShouldEqual, 1) - So(summary.Apps[0].Guid, ShouldEqual, "b5f0d1bd-a3a9-40a4-af1a-312ad26e5379") - So(summary.Apps[0].Name, ShouldEqual, "test-app") - So(summary.Apps[0].ServiceCount, ShouldEqual, 1) - So(summary.Apps[0].RunningInstances, ShouldEqual, 1) - So(summary.Apps[0].SpaceGuid, ShouldEqual, "494d8b64-8181-4183-a6d3-6279db8fec6e") - So(summary.Apps[0].StackGuid, ShouldEqual, "67e019a3-322a-407a-96e0-178e95bd0e55") - So(summary.Apps[0].Buildpack, ShouldEqual, "ruby_buildpack") - So(summary.Apps[0].DetectedBuildpack, ShouldEqual, "") - So(summary.Apps[0].Memory, ShouldEqual, 256) - So(summary.Apps[0].Instances, ShouldEqual, 1) - So(summary.Apps[0].DiskQuota, ShouldEqual, 512) - So(summary.Apps[0].State, ShouldEqual, "STARTED") - So(summary.Apps[0].Command, ShouldEqual, "") - So(summary.Apps[0].PackageState, ShouldEqual, "STAGED") - So(summary.Apps[0].HealthCheckType, ShouldEqual, "port") - So(summary.Apps[0].HealthCheckTimeout, ShouldEqual, 0) - So(summary.Apps[0].StagingFailedReason, ShouldEqual, "") - So(summary.Apps[0].StagingFailedDescription, ShouldEqual, "") - So(summary.Apps[0].Diego, ShouldEqual, true) - So(summary.Apps[0].DockerImage, ShouldEqual, "") - So(summary.Apps[0].DetectedStartCommand, ShouldEqual, "rackup -p $PORT") - So(summary.Apps[0].EnableSSH, ShouldEqual, true) - So(summary.Apps[0].DockerCredentials["redacted_message"], ShouldEqual, "[PRIVATE DATA HIDDEN]") - - So(len(summary.Services), ShouldEqual, 1) - So(summary.Services[0].Guid, ShouldEqual, "3c5c758c-6b76-46f6-89d5-677909bfc975") - So(summary.Services[0].Name, ShouldEqual, "test-service") - So(summary.Services[0].BoundAppCount, ShouldEqual, 1) - }) -} - -func TestSpaceRoles(t *testing.T) { - Convey("Get space roles", t, func() { - setup(MockRoute{"GET", "/v2/spaces/494d8b64-8181-4183-a6d3-6279db8fec6e/user_roles", spaceRolesPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "494d8b64-8181-4183-a6d3-6279db8fec6e", - c: client, - } - - roles, err := space.Roles() - So(err, ShouldBeNil) - - So(len(roles), ShouldEqual, 1) - So(roles[0].Guid, ShouldEqual, "uaa-id-363") - So(roles[0].Admin, ShouldEqual, false) - So(roles[0].Active, ShouldEqual, false) - So(roles[0].DefaultSpaceGuid, ShouldEqual, "") - So(roles[0].Username, ShouldEqual, "everything@example.com") - So(roles[0].SpaceRoles, ShouldResemble, []string{"space_developer", "space_manager", "space_auditor"}) - So(roles[0].SpacesUrl, ShouldEqual, "/v2/users/uaa-id-363/spaces") - So(roles[0].OrganizationsUrl, ShouldEqual, "/v2/users/uaa-id-363/organizations") - So(roles[0].ManagedOrganizationsUrl, ShouldEqual, "/v2/users/uaa-id-363/managed_organizations") - So(roles[0].BillingManagedOrganizationsUrl, ShouldEqual, "/v2/users/uaa-id-363/billing_managed_organizations") - So(roles[0].AuditedOrganizationsUrl, ShouldEqual, "/v2/users/uaa-id-363/audited_organizations") - So(roles[0].ManagedSpacesUrl, ShouldEqual, "/v2/users/uaa-id-363/managed_spaces") - So(roles[0].AuditedSpacesUrl, ShouldEqual, "/v2/users/uaa-id-363/audited_spaces") - }) -} - -func TestAssociateSpaceAuditorByUsername(t *testing.T) { - Convey("Associate auditor by username", t, func() { - requestBody := `{"username":"user-name"}` - setup(MockRoute{"PUT", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", associateSpaceUserPayload, "", 201, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newSpace, err := space.AssociateAuditorByUsername("user-name") - So(err, ShouldBeNil) - So(newSpace.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateSpaceAuditorByUsernameAndOrigin(t *testing.T) { - Convey("Associate auditor by username and origin", t, func() { - requestBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"PUT", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", associateSpaceUserPayload, "", 201, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newSpace, err := space.AssociateAuditorByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - So(newSpace.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateSpaceDeveloperByUsername(t *testing.T) { - Convey("Associate developer by username", t, func() { - requestBody := `{"username":"user-name"}` - setup(MockRoute{"PUT", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/developers", associateSpaceUserPayload, "", 201, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newSpace, err := space.AssociateDeveloperByUsername("user-name") - So(err, ShouldBeNil) - So(newSpace.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateSpaceDeveloperByUsernameAndOrigin(t *testing.T) { - Convey("Associate developer by username and origin", t, func() { - requestBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"PUT", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/developers", associateSpaceUserPayload, "", 201, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newSpace, err := space.AssociateDeveloperByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - So(newSpace.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateSpaceManagerByUsername(t *testing.T) { - Convey("Associate manager by username", t, func() { - requestBody := `{"username":"user-name"}` - setup(MockRoute{"PUT", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", associateSpaceUserPayload, "", 201, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newSpace, err := space.AssociateManagerByUsername("user-name") - So(err, ShouldBeNil) - So(newSpace.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestAssociateSpaceManagerByUsernameAndOrigin(t *testing.T) { - Convey("Associate manager by username and origin", t, func() { - requestBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"PUT", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", associateSpaceUserPayload, "", 201, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - newSpace, err := space.AssociateManagerByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - So(newSpace.Guid, ShouldEqual, "bc7b4caf-f4b8-4d85-b126-0729b9351e56") - }) -} - -func TestRemoveSpaceDeveloperByUsername(t *testing.T) { - Convey("Remove developer by username", t, func() { - requestBody := `{"username":"user-name"}` - setup(MockRoute{"DELETE", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/developers", "", "", 200, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = space.RemoveDeveloperByUsername("user-name") - So(err, ShouldBeNil) - }) -} -func TestRemoveSpaceDeveloperByUsernameAndOrigin(t *testing.T) { - Convey("Remove developer by username and origin", t, func() { - requestBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"POST", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/developers/remove", "", "", 200, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = space.RemoveDeveloperByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - }) -} -func TestRemoveSpaceAuditorByUsername(t *testing.T) { - Convey("Remove auditor by username", t, func() { - requestBody := `{"username":"user-name"}` - setup(MockRoute{"DELETE", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", "", "", 200, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = space.RemoveAuditorByUsername("user-name") - So(err, ShouldBeNil) - }) -} - -func TestRemoveSpaceAuditorByUsernameAndOrigin(t *testing.T) { - Convey("Remove auditor by username and origin", t, func() { - requestBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"POST", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors/remove", "", "", 200, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = space.RemoveAuditorByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - }) -} - -func TestRemoveSpaceManagerByUsername(t *testing.T) { - Convey("Remove manager by username", t, func() { - requestBody := `{"username":"user-name"}` - setup(MockRoute{"DELETE", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", "", "", 200, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = space.RemoveManagerByUsername("user-name") - So(err, ShouldBeNil) - }) -} - -func TestRemoveSpaceManagerByUsernameAndOrigin(t *testing.T) { - Convey("Remove manager by username and origin", t, func() { - requestBody := `{"origin":"ldap","username":"user-name"}` - setup(MockRoute{"POST", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers/remove", "", "", 200, "", &requestBody}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: "bc7b4caf-f4b8-4d85-b126-0729b9351e56", - c: client, - } - - err = space.RemoveManagerByUsernameAndOrigin("user-name", "ldap") - So(err, ShouldBeNil) - }) -} - -func TestGetSpaceByGuid(t *testing.T) { - Convey("List Space", t, func() { - setup(MockRoute{"GET", "/v2/spaces/8efd7c5c-d83c-4786-b399-b7bd548839e1", spaceByGuidPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space, err := client.GetSpaceByGuid("8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(err, ShouldBeNil) - - So(space.Guid, ShouldEqual, "8efd7c5c-d83c-4786-b399-b7bd548839e1") - So(space.Name, ShouldEqual, "dev") - }) -} - -func TestGetSpaceServiceOfferings(t *testing.T) { - guid := `8efd7c5c-d83c-4786-b399-b7bd548839e1` - Convey("Get service offerings for space", t, func() { - setup(MockRoute{ - Method: "GET", - Endpoint: fmt.Sprintf("/v2/spaces/%s/services", guid), - Output: spaceServiceOfferingsPayload, - UserAgent: "", - Status: 200, - QueryString: "", - PostForm: nil, - }, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - space := &Space{ - Guid: guid, - c: client, - } - - offerings, err := space.GetServiceOfferings() - So(offerings, ShouldNotBeEmpty) - So(err, ShouldBeNil) - }) -} - -func TestIsolationSegmentForSpace(t *testing.T) { - Convey("set Default IsolationSegment", t, func() { - defaultIsolationSegmentPayload := `{"data":{"guid":"3b6f763f-aae1-4177-9b93-f2de6f2a48f2"}}` - mocks := []MockRoute{ - {"PATCH", "/v3/spaces/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/relationships/isolation_segment", "", "", 200, "", &defaultIsolationSegmentPayload}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.IsolationSegmentForSpace("3b6f763f-aae1-4177-9b93-f2de6f2a48f2", "3b6f763f-aae1-4177-9b93-f2de6f2a48f2") - So(err, ShouldBeNil) - - }) -} - -func TestResetIsolationSegmentForSpace(t *testing.T) { - Convey("Reset IsolationSegment", t, func() { - resetIsolationSegmentPayload := `{"data":null}` - mocks := []MockRoute{ - {"PATCH", "/v3/spaces/3b6f763f-aae1-4177-9b93-f2de6f2a48f2/relationships/isolation_segment", "", "", 200, "", &resetIsolationSegmentPayload}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.ResetIsolationSegmentForSpace("3b6f763f-aae1-4177-9b93-f2de6f2a48f2") - So(err, ShouldBeNil) - - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/stacks_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/stacks_test.go deleted file mode 100644 index b5311e20..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/stacks_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListStacks(t *testing.T) { - Convey("List Stacks", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/stacks", listStacksPayloadPage1, "", 200, "", nil}, - {"GET", "/v2/stacks_page_2", listStacksPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - stacks, err := client.ListStacks() - So(err, ShouldBeNil) - - So(len(stacks), ShouldEqual, 2) - So(stacks[0].Guid, ShouldEqual, "67e019a3-322a-407a-96e0-178e95bd0e55") - So(stacks[0].Name, ShouldEqual, "cflinuxfs2") - So(stacks[0].Description, ShouldEqual, "Cloud Foundry Linux-based filesystem") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/tasks_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/tasks_test.go deleted file mode 100644 index b77099d6..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/tasks_test.go +++ /dev/null @@ -1,258 +0,0 @@ -package cfclient - -import ( - "net/url" - "testing" - "time" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestListTasks(t *testing.T) { - Convey("List Tasks", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/tasks", listTasksPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - task, err := client.ListTasks() - So(err, ShouldBeNil) - - So(len(task), ShouldEqual, 2) - - So(task[0].GUID, ShouldEqual, "xxxxxxxx-e99c-4d60-xxx-e066eb45f8a7") - So(task[0].State, ShouldEqual, "FAILED") - So(task[0].SequenceID, ShouldEqual, 1) - So(task[0].MemoryInMb, ShouldEqual, 1024) - So(task[0].DiskInMb, ShouldEqual, 1024) - So(task[0].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 20, 0, time.FixedZone("UTC", 0)).String()) - - So(task[1].GUID, ShouldEqual, "xxxxxxxx-5a25-4110-xxx-b309dc5cb0aa") - So(task[1].State, ShouldEqual, "FAILED") - So(task[1].SequenceID, ShouldEqual, 2) - So(task[1].MemoryInMb, ShouldEqual, 1024) - So(task[1].DiskInMb, ShouldEqual, 1024) - So(task[1].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 36, 0, time.FixedZone("UTC", 0)).String()) - }) -} -func TestListTasksByQuery(t *testing.T) { - Convey("List Tasks", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/tasks", listTasksPayload, "", 200, "names=my-fancy-name&page=1", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - query := url.Values{} - query.Add("names", "my-fancy-name") - query.Add("page", "1") - task, err := client.ListTasksByQuery(query) - So(err, ShouldBeNil) - - So(len(task), ShouldEqual, 2) - - So(task[0].GUID, ShouldEqual, "xxxxxxxx-e99c-4d60-xxx-e066eb45f8a7") - So(task[0].State, ShouldEqual, "FAILED") - So(task[0].SequenceID, ShouldEqual, 1) - So(task[0].MemoryInMb, ShouldEqual, 1024) - So(task[0].DiskInMb, ShouldEqual, 1024) - So(task[0].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 20, 0, time.FixedZone("UTC", 0)).String()) - - So(task[1].GUID, ShouldEqual, "xxxxxxxx-5a25-4110-xxx-b309dc5cb0aa") - So(task[1].State, ShouldEqual, "FAILED") - So(task[1].SequenceID, ShouldEqual, 2) - So(task[1].MemoryInMb, ShouldEqual, 1024) - So(task[1].DiskInMb, ShouldEqual, 1024) - So(task[1].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 36, 0, time.FixedZone("UTC", 0)).String()) - }) -} - -func TestCreateTask(t *testing.T) { - Convey("Create Task", t, func() { - mocks := []MockRoute{ - {"POST", "/v3/apps/740ebd2b-162b-469a-bd72-3edb96fabd9a/tasks", createTaskPayload, "", 201, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - tr := TaskRequest{ - Command: "rake db:migrate", - Name: "migrate", - MemoryInMegabyte: 512, - DiskInMegabyte: 1024, - DropletGUID: "740ebd2b-162b-469a-bd72-3edb96fabd9a", - } - task, err := client.CreateTask(tr) - So(err, ShouldBeNil) - - So(task.Command, ShouldEqual, "rake db:migrate") - So(task.Name, ShouldEqual, "migrate") - So(task.DiskInMb, ShouldEqual, 1024) - So(task.MemoryInMb, ShouldEqual, 512) - So(task.DropletGUID, ShouldEqual, "740ebd2b-162b-469a-bd72-3edb96fabd9a") - }) -} - -func TestCreateTaskFails(t *testing.T) { - Convey("Create Task fails", t, func() { - mocks := []MockRoute{ - {"POST", "/v3/apps/740ebd2b-162b-469a-bd72-3edb96fabd9a/tasks", errorV3Payload, "", 400, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - tr := TaskRequest{ - Command: "rake db:migrate", - Name: "migrate", - MemoryInMegabyte: 512, - DiskInMegabyte: 1024, - DropletGUID: "740ebd2b-162b-469a-bd72-3edb96fabd9a", - } - - task, err := client.CreateTask(tr) - So(err.Error(), ShouldEqual, "Error creating task: cfclient error (CF-UnprocessableEntity|10008): something went wrong") - So(task.Name, ShouldBeEmpty) - }) -} - -func TestTerminateTask(t *testing.T) { - Convey("Terminate Task", t, func() { - mocks := []MockRoute{ - {"PUT", "/v3/tasks/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/cancel", "", "", 202, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - errTerm := client.TerminateTask("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") - So(errTerm, ShouldBeNil) - }) -} - -func TestGetTask(t *testing.T) { - Convey("Create Task", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/tasks/740ebd2b-162b-469a-bd72-3edb96fabd9a", createTaskPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - task, err := client.GetTaskByGuid("740ebd2b-162b-469a-bd72-3edb96fabd9a") - So(err, ShouldBeNil) - - So(task.Command, ShouldEqual, "rake db:migrate") - So(task.Name, ShouldEqual, "migrate") - So(task.DiskInMb, ShouldEqual, 1024) - So(task.MemoryInMb, ShouldEqual, 512) - So(task.DropletGUID, ShouldEqual, "740ebd2b-162b-469a-bd72-3edb96fabd9a") - }) -} - -func TestTasksByApp(t *testing.T) { - Convey("List Tasks by App", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks", listTasksPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - task, err := client.TasksByApp("ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") - So(err, ShouldBeNil) - - So(len(task), ShouldEqual, 2) - - So(task[0].GUID, ShouldEqual, "xxxxxxxx-e99c-4d60-xxx-e066eb45f8a7") - So(task[0].State, ShouldEqual, "FAILED") - So(task[0].SequenceID, ShouldEqual, 1) - So(task[0].MemoryInMb, ShouldEqual, 1024) - So(task[0].DiskInMb, ShouldEqual, 1024) - So(task[0].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 20, 0, time.FixedZone("UTC", 0)).String()) - - So(task[1].GUID, ShouldEqual, "xxxxxxxx-5a25-4110-xxx-b309dc5cb0aa") - So(task[1].State, ShouldEqual, "FAILED") - So(task[1].SequenceID, ShouldEqual, 2) - So(task[1].MemoryInMb, ShouldEqual, 1024) - So(task[1].DiskInMb, ShouldEqual, 1024) - So(task[1].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 36, 0, time.FixedZone("UTC", 0)).String()) - }) -} - -func TestTasksByAppByQuery(t *testing.T) { - Convey("List Tasks by App", t, func() { - mocks := []MockRoute{ - {"GET", "/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks", listTasksPayload, "", 200, "names=my-fancy-name&page=1", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - query := url.Values{} - query.Add("names", "my-fancy-name") - query.Add("page", "1") - task, err := client.TasksByAppByQuery("ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5", query) - So(err, ShouldBeNil) - - So(len(task), ShouldEqual, 2) - - So(task[0].GUID, ShouldEqual, "xxxxxxxx-e99c-4d60-xxx-e066eb45f8a7") - So(task[0].State, ShouldEqual, "FAILED") - So(task[0].SequenceID, ShouldEqual, 1) - So(task[0].MemoryInMb, ShouldEqual, 1024) - So(task[0].DiskInMb, ShouldEqual, 1024) - So(task[0].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 20, 0, time.FixedZone("UTC", 0)).String()) - - So(task[1].GUID, ShouldEqual, "xxxxxxxx-5a25-4110-xxx-b309dc5cb0aa") - So(task[1].State, ShouldEqual, "FAILED") - So(task[1].SequenceID, ShouldEqual, 2) - So(task[1].MemoryInMb, ShouldEqual, 1024) - So(task[1].DiskInMb, ShouldEqual, 1024) - So(task[1].CreatedAt.String(), ShouldEqual, time.Date(2016, 12, 22, 13, 24, 36, 0, time.FixedZone("UTC", 0)).String()) - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/user_provided_service_instances_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/user_provided_service_instances_test.go deleted file mode 100644 index 286e7ae6..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/user_provided_service_instances_test.go +++ /dev/null @@ -1,135 +0,0 @@ -package cfclient - -import ( - "reflect" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestUserProvidedServiceInstanceByGuid(t *testing.T) { - Convey("Service instance by Guid", t, func() { - setup(MockRoute{"GET", "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87", userProvidedServiceInstancePayload, "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - instance, err := client.GetUserProvidedServiceInstanceByGuid("e9358711-0ad9-4f2a-b3dc-289d47c17c87") - So(err, ShouldBeNil) - - So(instance.Guid, ShouldEqual, "e9358711-0ad9-4f2a-b3dc-289d47c17c87") - So(reflect.DeepEqual( - instance.Credentials, - map[string]interface{}{"creds-key-58": "creds-val-58"}), ShouldBeTrue) - So(instance.Name, ShouldEqual, "name-1700") - So(instance.SpaceGuid, ShouldEqual, "22236d1a-d9c7-44b7-bdad-2bb079a6c4a1") - So(instance.RouteServiceUrl, ShouldEqual, "") - So(instance.Type, ShouldEqual, "user_provided_service_instance") - So(instance.SpaceUrl, ShouldEqual, "/v2/spaces/22236d1a-d9c7-44b7-bdad-2bb079a6c4a1") - So(instance.SyslogDrainUrl, ShouldEqual, "https://foo.com/url-104") - So(instance.ServiceBindingsUrl, ShouldEqual, "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/service_bindings") - So(instance.RoutesUrl, ShouldEqual, "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/routes") - }) -} - -func TestListUserProvidedServiceInstances(t *testing.T) { - Convey("List Service Instances", t, func() { - setup(MockRoute{"GET", "/v2/user_provided_service_instances", listUserProvidedServiceInstancePayload, "", 200, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - instances, err := client.ListUserProvidedServiceInstances() - So(err, ShouldBeNil) - - instance := instances[0] - So(instance.Guid, ShouldEqual, "54e4c645-7d20-4271-8c27-8cc904e1e7ee") - So(reflect.DeepEqual( - instance.Credentials, - map[string]interface{}{"creds-key-57": "creds-val-57"}), ShouldBeTrue) - So(instance.Name, ShouldEqual, "name-1696") - So(instance.SpaceGuid, ShouldEqual, "87d14ac2-f396-460e-a523-dc1d77aba35a") - So(instance.RouteServiceUrl, ShouldEqual, "") - So(instance.Type, ShouldEqual, "user_provided_service_instance") - So(instance.SpaceUrl, ShouldEqual, "/v2/spaces/87d14ac2-f396-460e-a523-dc1d77aba35a") - So(instance.SyslogDrainUrl, ShouldEqual, "https://foo.com/url-103") - So(instance.ServiceBindingsUrl, ShouldEqual, "/v2/user_provided_service_instances/54e4c645-7d20-4271-8c27-8cc904e1e7ee/service_bindings") - So(instance.RoutesUrl, ShouldEqual, "/v2/user_provided_service_instances/54e4c645-7d20-4271-8c27-8cc904e1e7ee/routes") - }) -} - -func TestCreateUserProvidedServiceInstance(t *testing.T) { - Convey("Create User Provided Service Instance", t, func() { - setup(MockRoute{"POST", "/v2/user_provided_service_instances", userProvidedServiceInstancePayload, "", 201, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - - client, err := NewClient(c) - So(err, ShouldBeNil) - - upsRequest := UserProvidedServiceInstanceRequest{Credentials: map[string]interface{}{"creds-key-58": "creds-val-58"}, SyslogDrainUrl: "https://foo.com/url-104"} - upsInstance, err := client.CreateUserProvidedServiceInstance(upsRequest) - - So(err, ShouldBeNil) - So(upsInstance.Guid, ShouldEqual, "e9358711-0ad9-4f2a-b3dc-289d47c17c87") - So(upsInstance.Name, ShouldEqual, "name-1700") - So(upsInstance.Credentials["creds-key-58"], ShouldEqual, "creds-val-58") - So(upsInstance.SyslogDrainUrl, ShouldEqual, "https://foo.com/url-104") - }) -} - -func TestDeleteUserProvidedServiceInstance(t *testing.T) { - Convey("Delete User Provided Service Instance", t, func() { - setup(MockRoute{"DELETE", "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87", "", "", 204, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteUserProvidedServiceInstance("e9358711-0ad9-4f2a-b3dc-289d47c17c87") - So(err, ShouldBeNil) - }) -} - -func TestUpdateUserProvidedServiceInstance(t *testing.T) { - Convey("Update User Provided Service Instance", t, func() { - setup(MockRoute{"PUT", "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87", userProvidedServiceInstancePayload, "", 201, "", nil}, t) - defer teardown() - - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - - client, err := NewClient(c) - So(err, ShouldBeNil) - - upsRequest := UserProvidedServiceInstanceRequest{Credentials: map[string]interface{}{"creds-key-58": "creds-val-58"}, SyslogDrainUrl: "https://foo.com/url-104"} - upsInstance, err := client.UpdateUserProvidedServiceInstance("e9358711-0ad9-4f2a-b3dc-289d47c17c87", upsRequest) - - So(err, ShouldBeNil) - So(upsInstance.Guid, ShouldEqual, "e9358711-0ad9-4f2a-b3dc-289d47c17c87") - So(upsInstance.Name, ShouldEqual, "name-1700") - So(upsInstance.Credentials["creds-key-58"], ShouldEqual, "creds-val-58") - So(upsInstance.SyslogDrainUrl, ShouldEqual, "https://foo.com/url-104") - }) -} diff --git a/vendor/github.com/cloudfoundry-community/go-cfclient/users_test.go b/vendor/github.com/cloudfoundry-community/go-cfclient/users_test.go deleted file mode 100644 index 99ac73da..00000000 --- a/vendor/github.com/cloudfoundry-community/go-cfclient/users_test.go +++ /dev/null @@ -1,272 +0,0 @@ -package cfclient - -import ( - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func TestGetUserByGUID(t *testing.T) { - Convey("Get user by GUID", t, func() { - setup(MockRoute{"GET", "/v2/users/72ccf759-43aa-4954-903f-7d892c268e80", userByGUIDPayload, "", 200, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - user, err := client.GetUserByGUID("72ccf759-43aa-4954-903f-7d892c268e80") - So(err, ShouldBeNil) - - So(user.Guid, ShouldEqual, "72ccf759-43aa-4954-903f-7d892c268e80") - So(user.Username, ShouldEqual, "user@example.com") - }) -} - -func TestListUsers(t *testing.T) { - Convey("List Users", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users", listUsersPayload, "", 200, "", nil}, - {"GET", "/v2/usersPage2", listUsersPayloadPage2, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - users, err := client.ListUsers() - So(err, ShouldBeNil) - - So(len(users), ShouldEqual, 4) - So(users[0].Guid, ShouldEqual, "ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac") - So(users[0].Username, ShouldEqual, "testUser1") - So(users[1].Guid, ShouldEqual, "f97f5699-c920-4633-aa23-bd70f3db0808") - So(users[1].Username, ShouldEqual, "testUser2") - So(users[2].Guid, ShouldEqual, "cadd6389-fcf6-4928-84f0-6153556bf693") - So(users[2].Username, ShouldEqual, "testUser3") - So(users[3].Guid, ShouldEqual, "79c854b0-c12a-41b7-8d3c-fdd6e116e385") - So(users[3].Username, ShouldEqual, "testUser4") - }) -} - -func TestListUserSpaces(t *testing.T) { - Convey("List User Spaces", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/spaces", listUserSpacesPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaces, err := client.ListUserSpaces("cadd6389-fcf6-4928-84f0-6153556bf693") - So(err, ShouldBeNil) - - So(len(spaces), ShouldEqual, 1) - So(spaces[0].Guid, ShouldEqual, "9881c79e-d269-4a53-9d77-cb21b745356e") - So(spaces[0].Name, ShouldEqual, "dev") - So(spaces[0].OrganizationGuid, ShouldEqual, "6a2a2d18-7620-43cf-a332-353824b431b2") - }) -} - -func TestListUserManagedSpaces(t *testing.T) { - Convey("List User Audited Spaces", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/managed_spaces", listUserSpacesPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaces, err := client.ListUserManagedSpaces("cadd6389-fcf6-4928-84f0-6153556bf693") - So(err, ShouldBeNil) - - So(len(spaces), ShouldEqual, 1) - So(spaces[0].Guid, ShouldEqual, "9881c79e-d269-4a53-9d77-cb21b745356e") - So(spaces[0].Name, ShouldEqual, "dev") - So(spaces[0].OrganizationGuid, ShouldEqual, "6a2a2d18-7620-43cf-a332-353824b431b2") - }) -} - -func TestListUserAuditedSpaces(t *testing.T) { - Convey("List User Managed Spaces", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/audited_spaces", listUserSpacesPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - spaces, err := client.ListUserAuditedSpaces("cadd6389-fcf6-4928-84f0-6153556bf693") - So(err, ShouldBeNil) - - So(len(spaces), ShouldEqual, 1) - So(spaces[0].Guid, ShouldEqual, "9881c79e-d269-4a53-9d77-cb21b745356e") - So(spaces[0].Name, ShouldEqual, "dev") - So(spaces[0].OrganizationGuid, ShouldEqual, "6a2a2d18-7620-43cf-a332-353824b431b2") - }) -} - -func TestListUserOrgs(t *testing.T) { - Convey("List User Spaces", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/organizations", listUserOrgsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgs, err := client.ListUserOrgs("cadd6389-fcf6-4928-84f0-6153556bf693") - So(err, ShouldBeNil) - - So(len(orgs), ShouldEqual, 1) - So(orgs[0].Guid, ShouldEqual, "9881c79e-d269-4a53-9d77-cb21b745356e") - So(orgs[0].Name, ShouldEqual, "dev") - So(orgs[0].QuotaDefinitionGuid, ShouldEqual, "6a2a2d18-7620-43cf-a332-353824b431b2") - }) -} - -func TestListUserManagedOrgs(t *testing.T) { - Convey("List User Spaces", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/managed_organizations", listUserOrgsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgs, err := client.ListUserManagedOrgs("cadd6389-fcf6-4928-84f0-6153556bf693") - So(err, ShouldBeNil) - - So(len(orgs), ShouldEqual, 1) - So(orgs[0].Guid, ShouldEqual, "9881c79e-d269-4a53-9d77-cb21b745356e") - So(orgs[0].Name, ShouldEqual, "dev") - So(orgs[0].QuotaDefinitionGuid, ShouldEqual, "6a2a2d18-7620-43cf-a332-353824b431b2") - }) -} - -func ListUserAuditedOrgs(t *testing.T) { - Convey("List User Audited Spaces", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/audited_organizations", listUserOrgsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgs, err := client.ListUserAuditedOrgs("cadd6389-fcf6-4928-84f0-6153556bf693") - So(err, ShouldBeNil) - - So(len(orgs), ShouldEqual, 1) - So(orgs[0].Guid, ShouldEqual, "9881c79e-d269-4a53-9d77-cb21b745356e") - So(orgs[0].Name, ShouldEqual, "dev") - So(orgs[0].QuotaDefinitionGuid, ShouldEqual, "6a2a2d18-7620-43cf-a332-353824b431b2") - }) -} - -func TestUserBillingManagedOrgs(t *testing.T) { - Convey("List User Managed Spaces", t, func() { - mocks := []MockRoute{ - {"GET", "/v2/users/cadd6389-fcf6-4928-84f0-6153556bf693/billing_managed_organizations", listUserOrgsPayload, "", 200, "", nil}, - } - setupMultiple(mocks, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - orgs, err := client.ListUserBillingManagedOrgs("cadd6389-fcf6-4928-84f0-6153556bf693") - So(err, ShouldBeNil) - - So(len(orgs), ShouldEqual, 1) - So(orgs[0].Guid, ShouldEqual, "9881c79e-d269-4a53-9d77-cb21b745356e") - So(orgs[0].Name, ShouldEqual, "dev") - So(orgs[0].QuotaDefinitionGuid, ShouldEqual, "6a2a2d18-7620-43cf-a332-353824b431b2") - }) -} - -func TestGetUserByUsername(t *testing.T) { - Convey("Get User by Username", t, func() { - user1 := User{Guid: "ccec6d06-5f71-48a0-a4c5-c91a1d9f2fac", Username: "testUser1"} - user2 := User{Guid: "f97f5699-c920-4633-aa23-bd70f3db0808", Username: "testUser2"} - user3 := User{Guid: "cadd6389-fcf6-4928-84f0-6153556bf693", Username: "testUser3"} - user4 := User{Guid: "79c854b0-c12a-41b7-8d3c-fdd6e116e385", Username: "testUser4"} - users := Users{user1, user2, user3, user4} - - So(users.GetUserByUsername("testUser1"), ShouldResemble, user1) - So(users.GetUserByUsername("testUser2"), ShouldResemble, user2) - So(users.GetUserByUsername("testUser3"), ShouldResemble, user3) - So(users.GetUserByUsername("testUser4"), ShouldResemble, user4) - }) -} - -func TestCreateUser(t *testing.T) { - Convey("Create user", t, func() { - setup(MockRoute{"POST", "/v2/users", createUserPayload, "", 201, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - user, err := client.CreateUser(UserRequest{Guid: "guid-cb24b36d-4656-468e-a50d-b53113ac6177"}) - So(err, ShouldBeNil) - So(user.Guid, ShouldEqual, "guid-cb24b36d-4656-468e-a50d-b53113ac6177") - }) -} - -func TestDeleteUser(t *testing.T) { - Convey("Delete user", t, func() { - setup(MockRoute{"DELETE", "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177", "", "", 204, "", nil}, t) - defer teardown() - c := &Config{ - ApiAddress: server.URL, - Token: "foobar", - } - client, err := NewClient(c) - So(err, ShouldBeNil) - - err = client.DeleteUser("guid-cb24b36d-4656-468e-a50d-b53113ac6177") - So(err, ShouldBeNil) - }) -} diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/.gitignore b/vendor/github.com/cloudfoundry-incubator/uaago/.gitignore deleted file mode 100644 index e660fd93..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bin/ diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/.travis.yml b/vendor/github.com/cloudfoundry-incubator/uaago/.travis.yml deleted file mode 100644 index 9648b13e..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: go - -go: - - 1.8.x - - 1.9.x - - master - -matrix: - allow_failures: - - go: master diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/LICENSE b/vendor/github.com/cloudfoundry-incubator/uaago/LICENSE deleted file mode 100644 index e434046f..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/LICENSE +++ /dev/null @@ -1,176 +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 \ No newline at end of file diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/README.md b/vendor/github.com/cloudfoundry-incubator/uaago/README.md deleted file mode 100644 index 5ad91203..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# uaago - -Golang client for UAA. - -## Usage - -See [samples](/samples). - -You can run the auth token sample like this: - -```bash -$ go build -o bin/auth_token samples/auth-token/main.go -$ ./bin/auth_token [URL] [USER] [PASS] -``` - -You can run the refresh token sample like this: - -```bash -$ go build -o bin/refresh_token samples/refresh-token/main.go -$ ./bin/refresh_token [URL] [CLIENT_ID] [EXISTING_REFRESH_TOKEN] -``` diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/client.go b/vendor/github.com/cloudfoundry-incubator/uaago/client.go deleted file mode 100644 index b1e1492a..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/client.go +++ /dev/null @@ -1,162 +0,0 @@ -package uaago - -import ( - "crypto/tls" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "strconv" - "strings" - "time" -) - -type Client struct { - uaaUrl *url.URL -} - -func NewClient(uaaUrl string) (*Client, error) { - if len(uaaUrl) == 0 { - return nil, fmt.Errorf("client: missing url") - } - - parsedURL, err := url.Parse(uaaUrl) - if err != nil { - return nil, err - } - - return &Client{ - uaaUrl: parsedURL, - }, nil -} - -func (c *Client) GetAuthToken(username, password string, insecureSkipVerify bool) (string, error) { - token, _, err := c.GetAuthTokenWithExpiresIn(username, password, insecureSkipVerify) - return token, err -} - -func (c *Client) GetAuthTokenWithExpiresIn(username, password string, insecureSkipVerify bool) (string, int, error) { - data := url.Values{ - "client_id": {username}, - "grant_type": {"client_credentials"}, - } - - request, err := http.NewRequest("POST", fmt.Sprintf("%s/oauth/token", c.uaaUrl), strings.NewReader(data.Encode())) - if err != nil { - return "", -1, err - } - request.SetBasicAuth(username, password) - request.Header.Set("Content-Type", "application/x-www-form-urlencoded") - - resp, err := c.httpClient(insecureSkipVerify).Do(request) - if err != nil { - return "", -1, err - } - - if resp.StatusCode != http.StatusOK { - return "", -1, fmt.Errorf("Received a status code %v", resp.Status) - } - defer resp.Body.Close() - - jsonData := make(map[string]interface{}) - decoder := json.NewDecoder(resp.Body) - err = decoder.Decode(&jsonData) - - expiresIn := 0 - if value, ok := jsonData["expires_in"]; ok { - asFloat, err := strconv.ParseFloat(fmt.Sprintf("%f", value), 64) - if err != nil { - return "", -1, err - } - expiresIn = int(asFloat) - } - - return fmt.Sprintf("%s %s", jsonData["token_type"], jsonData["access_token"]), expiresIn, err -} - -func (c *Client) TokenIsAuthorized(username, password, token, client_id string, insecureSkipVerify bool) (bool, error) { - - request, err := http.NewRequest("POST", fmt.Sprintf("%s/check_token", c.uaaUrl.String()), strings.NewReader("token="+token)) - if err != nil { - return false, err - } - request.SetBasicAuth(username, password) - request.Header.Set("Content-Type", "application/x-www-form-urlencoded") - - resp, err := c.httpClient(insecureSkipVerify).Do(request) - if err != nil { - return false, err - } - if resp.StatusCode != http.StatusOK { - return false, fmt.Errorf("Received a status code %v", resp.Status) - } - defer resp.Body.Close() - - responseBody, err := ioutil.ReadAll(resp.Body) - if err != nil { - return false, err - } - - if strings.Contains(string(responseBody), client_id) { - return true, nil - } - - return false, nil -} - -func (c *Client) GetRefreshToken(clientID, refreshToken string, insecureSkipVerify bool) (string, string, error) { - data := url.Values{ - "client_id": {clientID}, - "grant_type": {"refresh_token"}, - "refresh_token": {refreshToken}, - } - - request, err := http.NewRequest("POST", fmt.Sprintf("%s/oauth/token", c.uaaUrl), strings.NewReader(data.Encode())) - if err != nil { - return "", "", fmt.Errorf("Unable to create request: %s", err) - } - request.SetBasicAuth(clientID, "") - request.Header.Set("Content-Type", "application/x-www-form-urlencoded") - request.Header.Set("Accept", "application/json") - - resp, err := c.httpClient(insecureSkipVerify).Do(request) - if err != nil { - return "", "", fmt.Errorf("Unable to make request: %s", err) - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return "", "", fmt.Errorf("Unexpected status code: %d", resp.StatusCode) - } - - jsonData := make(map[string]interface{}) - decoder := json.NewDecoder(resp.Body) - err = decoder.Decode(&jsonData) - if err != nil { - return "", "", fmt.Errorf("Unable to decode json data: %s", err) - } - - newRefreshToken, ok := jsonData["refresh_token"] - if !ok { - return "", "", fmt.Errorf("Missing refresh_token in response body") - } - - tokenType, ok := jsonData["token_type"] - if !ok { - return "", "", fmt.Errorf("Missing token_type in response body") - } - - accessToken, ok := jsonData["access_token"] - if !ok { - return "", "", fmt.Errorf("Missing access_token in response body") - } - - return fmt.Sprintf("%s", newRefreshToken), fmt.Sprintf("%s %s", tokenType, accessToken), nil -} - -func (c *Client) httpClient(insecureSkipVerify bool) *http.Client { - config := &tls.Config{InsecureSkipVerify: insecureSkipVerify} - tr := &http.Transport{TLSClientConfig: config, Proxy: http.ProxyFromEnvironment} - return &http.Client{Timeout: 10 * time.Second, Transport: tr} -} diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/client_test.go b/vendor/github.com/cloudfoundry-incubator/uaago/client_test.go deleted file mode 100644 index f1fb07a0..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/client_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package uaago_test - -import ( - "encoding/base64" - "net/http" - "net/http/httptest" - - "io/ioutil" - - "github.com/cloudfoundry-incubator/uaago" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -type request struct { - Request *http.Request - Body []byte -} - -var _ = Describe("Client", func() { - Context("GetOauthToken", func() { - Context("with https", func() { - var testServer *httptest.Server - BeforeEach(func() { - testServer = httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - if validRequest(request) { - authValue := request.Header.Get("Authorization") - authValueBytes := "Basic " + base64.StdEncoding.EncodeToString([]byte("myusername:mypassword")) - if authValueBytes == authValue { - jsonData := []byte(` - { - "access_token":"good-token", - "token_type":"bearer", - "expires_in":599, - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - return - } - } - writer.WriteHeader(http.StatusUnauthorized) - })) - }) - AfterEach(func() { - testServer.Close() - }) - It("Should get a valid oauth token from the given UAA", func() { - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - token, err := client.GetAuthToken("myusername", "mypassword", true) - Expect(err).ToNot(HaveOccurred()) - Expect(token).To(Equal("bearer good-token")) - }) - }) - }) - - Context("GetOauthToken With Expires_in", func() { - Context("with https", func() { - var testServer *httptest.Server - BeforeEach(func() { - testServer = httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - if validRequest(request) { - authValue := request.Header.Get("Authorization") - authValueBytes := "Basic " + base64.StdEncoding.EncodeToString([]byte("myusername:mypassword")) - if authValueBytes == authValue { - jsonData := []byte(` - { - "access_token":"good-token", - "token_type":"bearer", - "expires_in":598, - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - return - } - } - writer.WriteHeader(http.StatusUnauthorized) - })) - }) - AfterEach(func() { - testServer.Close() - }) - It("Should get a valid oauth token and expires_in from the given UAA", func() { - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - token, expiresIn, err := client.GetAuthTokenWithExpiresIn("myusername", "mypassword", true) - Expect(err).ToNot(HaveOccurred()) - Expect(token).To(Equal("bearer good-token")) - Expect(expiresIn).To(Equal(598)) - }) - }) - - Context("with invalid expires_in", func() { - var testServer *httptest.Server - BeforeEach(func() { - testServer = httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - if validRequest(request) { - authValue := request.Header.Get("Authorization") - authValueBytes := "Basic " + base64.StdEncoding.EncodeToString([]byte("myusername:mypassword")) - if authValueBytes == authValue { - jsonData := []byte(` - { - "access_token":"good-token", - "token_type":"bearer", - "expires_in":"invalid", - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - return - } - } - writer.WriteHeader(http.StatusUnauthorized) - })) - }) - AfterEach(func() { - testServer.Close() - }) - It("Should get a valid oauth token and expires_in from the given UAA", func() { - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - token, expiresIn, err := client.GetAuthTokenWithExpiresIn("myusername", "mypassword", true) - Expect(err).To(HaveOccurred()) - Expect(token).To(Equal("")) - Expect(expiresIn).To(Equal(-1)) - }) - }) - - Context("without expires_in", func() { - var testServer *httptest.Server - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - if validRequest(request) { - authValue := request.Header.Get("Authorization") - authValueBytes := "Basic " + base64.StdEncoding.EncodeToString([]byte("myusername:mypassword")) - if authValueBytes == authValue { - jsonData := []byte(` - { - "access_token":"good-token", - "token_type":"bearer", - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - return - } - } - writer.WriteHeader(http.StatusUnauthorized) - })) - }) - AfterEach(func() { - testServer.Close() - }) - It("Should get a valid oauth token missing the expires_in from the given UAA", func() { - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - token, expiresIn, err := client.GetAuthTokenWithExpiresIn("myusername", "mypassword", false) - Expect(err).ToNot(HaveOccurred()) - Expect(token).To(Equal("bearer good-token")) - Expect(expiresIn).To(Equal(0)) - }) - }) - }) - - Context("TokenIsAuthorized", func() { - var ( - uaaTestServer *httptest.Server - uaaRequests = make(chan *request, 10) - uaaResponseBodies = make(chan string, 10) - client *uaago.Client - - basicAuthUser = "some-basic-auth-user" - basicAuthPass = "some-basic-auth-pass" - ) - - BeforeEach(func() { - uaaTestServer = httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, req *http.Request) { - body, _ := ioutil.ReadAll(req.Body) - req.Body.Close() - uaaRequests <- &request{Request: req, Body: body} - - writer.WriteHeader(http.StatusOK) - writer.Write([]byte(<-uaaResponseBodies)) - })) - client, _ = uaago.NewClient(uaaTestServer.URL) - }) - - AfterEach(func() { - uaaTestServer.Close() - }) - - It("talks to UAA", func() { - uaaResponseBodies <- "some client_id" - client.TokenIsAuthorized(basicAuthUser, basicAuthPass, "some token", "some client_id", false) - var req *request - Eventually(uaaRequests).Should(Receive(&req)) - - Expect(req.Request.Method).To(Equal("POST")) - Expect(req.Request.URL).To(ContainSubstring("/check_token")) - - Expect(string(req.Body)).To(ContainSubstring("some token")) - - authUser, authPass, ok := req.Request.BasicAuth() - Expect(ok).To(BeTrue()) - Expect(authUser).To(Equal(basicAuthUser)) - Expect(authPass).To(Equal(basicAuthPass)) - }) - - It("returns an error for non-200 http responses", func() { - unauthServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(401) - })) - client, _ = uaago.NewClient(unauthServer.URL) - defer unauthServer.Close() - - _, err := client.TokenIsAuthorized("some-user", "some-password", "some-token", "some-client-id", false) - Expect(err).To(HaveOccurred()) - }) - - Context("valid: client_id=ingestor", func() { - It("returns true", func() { - uaaResponseBodies <- "ingestor" - isValid, err := client.TokenIsAuthorized(basicAuthUser, basicAuthPass, "some token", "ingestor", false) - - Expect(err).ToNot(HaveOccurred()) - Expect(isValid).To(BeTrue()) - }) - }) - - Context("invalid: client_id=foo", func() { - It("returns false", func() { - uaaResponseBodies <- "foo" - isValid, err := client.TokenIsAuthorized(basicAuthUser, basicAuthPass, "some token", "ingestor", false) - - Expect(err).ToNot(HaveOccurred()) - Expect(isValid).To(BeFalse()) - }) - }) - }) - - Context("GetRefreshToken", func() { - Context("with https", func() { - var testServer *httptest.Server - It("should get a valid refresh and access token from the given UAA", func() { - testServer = httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - if validRequest(request) { - Expect(request.PostForm.Get("refresh_token")).To(Equal("refresh-token")) - Expect(request.PostForm.Get("client_id")).To(Equal("some-client-id")) - Expect(request.PostForm.Get("grant_type")).To(Equal("refresh_token")) - jsonData := []byte(` - { - "access_token":"some-access-token", - "token_type":"bearer", - "refresh_token" : "some-new-token-r", - "expires_in" : 43199, - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - return - } - })) - - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - refreshToken, accessToken, err := client.GetRefreshToken("some-client-id", "refresh-token", true) - Expect(err).ToNot(HaveOccurred()) - Expect(refreshToken).To(Equal("some-new-token-r")) - Expect(accessToken).To(Equal("bearer some-access-token")) - - testServer.Close() - }) - - It("should return an error for non-200 response from UAA", func() { - unauthServer := httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - writer.WriteHeader(401) - })) - client, _ := uaago.NewClient(unauthServer.URL) - defer unauthServer.Close() - - _, _, err := client.GetRefreshToken("some-client-id", "invalid-token", true) - Expect(err).To(HaveOccurred()) - }) - - It("should return an error if refresh_token is not populated", func() { - testServer = httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - jsonData := []byte(` - { - "access_token":"good-token", - "token_type":"bearer", - "expires_in" : 43199, - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - })) - - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - _, _, err = client.GetRefreshToken("some-client-id", "refresh-token", true) - Expect(err).To(MatchError("Missing refresh_token in response body")) - }) - - It("should return an error if token_type is not populated", func() { - testServer = httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - jsonData := []byte(` - { - "access_token":"good-token", - "refresh_token": "refresh-token", - "expires_in" : 43199, - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - })) - - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - _, _, err = client.GetRefreshToken("some-client-id", "refresh-token", true) - Expect(err).To(MatchError("Missing token_type in response body")) - }) - - It("should return an error if access_token is not populated", func() { - testServer = httptest.NewTLSServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - jsonData := []byte(` - { - "token_type":"bearer", - "refresh_token" : "some-new-token-r", - "expires_in" : 43199, - "scope":"cloud_controller.write doppler.firehose", - "jti":"28edda5c-4e37-4a63-9ba3-b32f48530a51" - } - `) - writer.Write(jsonData) - })) - - client, err := uaago.NewClient(testServer.URL) - Expect(err).ToNot(HaveOccurred()) - - _, _, err = client.GetRefreshToken("some-client-id", "refresh-token", true) - Expect(err).To(MatchError("Missing access_token in response body")) - }) - }) - }) -}) - -func validRequest(request *http.Request) bool { - isPost := request.Method == "POST" - correctPath := request.URL.Path == "/oauth/token" - correctType := request.Header.Get("content-type") == "application/x-www-form-urlencoded" - request.ParseForm() - hasClientId := len(request.PostForm.Get("client_id")) > 0 - hasGrantType := len(request.PostForm.Get("grant_type")) > 0 - - return isPost && correctPath && correctType && hasClientId && hasGrantType -} diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/.gitignore b/vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/.gitignore deleted file mode 100644 index 98d6c8b2..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/.gitignore +++ /dev/null @@ -1 +0,0 @@ -auth_token diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/main.go b/vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/main.go deleted file mode 100644 index 8091e883..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/examples/auth_token/main.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" - - "github.com/cloudfoundry-incubator/uaago" -) - -func main() { - log := log.New(os.Stderr, "", 0) - - if len(os.Args[1:]) != 3 { - log.Fatalf("Usage %s [URL] [USERNAME] [PASS]", os.Args[0]) - } - - uaa, err := uaago.NewClient(os.Args[1]) - if err != nil { - log.Fatalf("Failed to create client: %s", err.Error()) - } - - token, err := uaa.GetAuthToken(os.Args[2], os.Args[3], false) - if err != nil { - log.Fatalf("Faild to get auth token: %s", err.Error()) - } - - fmt.Println(token) -} diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/.gitignore b/vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/.gitignore deleted file mode 100644 index e614ad3e..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/.gitignore +++ /dev/null @@ -1 +0,0 @@ -refresh_token diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/main.go b/vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/main.go deleted file mode 100644 index b5ae1e48..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/examples/refresh_token/main.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" - - "github.com/cloudfoundry-incubator/uaago" -) - -func main() { - os.Exit(run(os.Args)) -} - -func run(args []string) int { - log := log.New(os.Stderr, "", 0) - - if len(args[1:]) != 3 { - log.Fatalf("Usage %s [URL] [CLIENT_ID] [EXISTING_REFRESH_TOKEN]", args[0]) - return 1 - } - - uaa, err := uaago.NewClient(args[1]) - if err != nil { - log.Fatalf("Failed to create client: %s", err.Error()) - return 1 - } - - refreshToken, accessToken, err := uaa.GetRefreshToken(args[2], args[3], true) - if err != nil { - if refreshToken == "" { - log.Fatalf("Failed to get new refresh token: %s", err.Error()) - } - if accessToken == "" { - log.Fatalf("Failed to get access token: %s", err.Error()) - } - return 1 - } - - fmt.Printf("REFRESH_TOKEN: %s\n", refreshToken) - fmt.Printf("ACCESS_TOKEN: %s\n", accessToken) - return 0 -} diff --git a/vendor/github.com/cloudfoundry-incubator/uaago/uaago_suite_test.go b/vendor/github.com/cloudfoundry-incubator/uaago/uaago_suite_test.go deleted file mode 100644 index bc6a5954..00000000 --- a/vendor/github.com/cloudfoundry-incubator/uaago/uaago_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package uaago_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestUaaGo(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "UaaGo Suite") -} diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/async_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/async_test.go deleted file mode 100644 index 53d9a221..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/async_test.go +++ /dev/null @@ -1,1051 +0,0 @@ -package consumer_test - -import ( - "crypto/tls" - "fmt" - "net/http" - "net/http/httptest" - "sync" - "time" - - "github.com/cloudfoundry/noaa/consumer" - "github.com/cloudfoundry/noaa/errors" - "github.com/cloudfoundry/noaa/test_helpers" - "github.com/cloudfoundry/sonde-go/events" - "github.com/gogo/protobuf/proto" - "github.com/onsi/gomega/types" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Consumer (Asynchronous)", func() { - var ( - cnsmr *consumer.Consumer - trafficControllerURL string - testServer *httptest.Server - fakeHandler *test_helpers.FakeHandler - tlsSettings *tls.Config - maxRetryCount int - - appGuid string - authToken string - messagesToSend chan []byte - - streamPathBuilder consumer.StreamPathBuilder - ) - - BeforeEach(func() { - trafficControllerURL = "" - testServer = nil - fakeHandler = nil - tlsSettings = nil - maxRetryCount = consumer.DefaultMaxRetryCount - - appGuid = "" - authToken = "" - messagesToSend = make(chan []byte, 256) - - streamPathBuilder = nil - }) - - JustBeforeEach(func() { - cnsmr = consumer.New(trafficControllerURL, tlsSettings, nil) - cnsmr.SetMinRetryDelay(100 * time.Millisecond) - cnsmr.SetMaxRetryDelay(500 * time.Millisecond) - cnsmr.SetMaxRetryCount(maxRetryCount) - - if streamPathBuilder != nil { - cnsmr.SetStreamPathBuilder(streamPathBuilder) - } - }) - - AfterEach(func() { - cnsmr.Close() - if testServer != nil { - testServer.Close() - } - }) - - Describe("SetOnConnectCallback", func() { - BeforeEach(func() { - testServer = httptest.NewServer(NewWebsocketHandler(messagesToSend, 100*time.Millisecond)) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - close(messagesToSend) - }) - - It("sets a callback and calls it when connecting", func() { - called := make(chan bool) - cb := func() { called <- true } - - cnsmr.SetOnConnectCallback(cb) - - cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) - - Eventually(called).Should(Receive()) - }) - - Context("when the connection fails", func() { - BeforeEach(func() { - trafficControllerURL = "!!!bad-url" - }) - - It("does not call the callback", func() { - called := make(chan bool) - cb := func() { called <- true } - - cnsmr.SetOnConnectCallback(cb) - cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) - - Consistently(called).ShouldNot(Receive()) - }) - }) - - Context("when authorization fails", func() { - var ( - failure test_helpers.AuthFailureHandler - ) - - BeforeEach(func() { - failure = test_helpers.AuthFailureHandler{Message: "Helpful message"} - testServer = httptest.NewServer(failure) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("does not call the callback", func() { - called := false - cb := func() { called = true } - - cnsmr.SetOnConnectCallback(cb) - _, errs := cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) - - Consistently(func() bool { return called }).Should(BeFalse()) - Eventually(errs).Should(Receive(Not(BeRetryable()))) - }) - - }) - - }) - - var startFakeTrafficController = func() { - fakeHandler = &test_helpers.FakeHandler{ - InputChan: make(chan []byte, 10), - GenerateHandler: func(input chan []byte) http.Handler { - return NewWebsocketHandler(input, 100*time.Millisecond) - }, - } - - testServer = httptest.NewServer(fakeHandler) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - appGuid = "app-guid" - } - - Describe("Debug Printing", func() { - var debugPrinter *mockDebugPrinter - - BeforeEach(func() { - startFakeTrafficController() - }) - - JustBeforeEach(func() { - debugPrinter = newMockDebugPrinter() - cnsmr.SetDebugPrinter(debugPrinter) - }) - - It("includes websocket handshake", func() { - fakeHandler.Close() - - cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) - - var body string - Eventually(debugPrinter.PrintInput.Dump).Should(Receive(&body)) - Expect(body).To(ContainSubstring("Sec-WebSocket-Version: 13")) - }) - - It("does not include messages sent or received", func() { - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - - fakeHandler.Close() - cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) - - var body string - Eventually(debugPrinter.PrintInput.Dump).Should(Receive(&body)) - Expect(body).ToNot(ContainSubstring("hello")) - }) - }) - - Describe("TailingLogsWithoutReconnect", func() { - var ( - logMessages <-chan *events.LogMessage - errors <-chan error - ) - - BeforeEach(func() { - startFakeTrafficController() - }) - - JustBeforeEach(func() { - logMessages, errors = cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) - }) - - AfterEach(func() { - cnsmr.Close() - Eventually(logMessages).Should(BeClosed()) - }) - - Context("when there is no TLS Config or consumerProxyFunc setting", func() { - Context("when the connection can be established", func() { - It("returns a read only LogMessage chan and error chan", func() { - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - - var message *events.LogMessage - Eventually(logMessages).Should(Receive(&message)) - Expect(message.GetMessage()).To(Equal([]byte("hello"))) - Consistently(errors).ShouldNot(Receive()) - }) - - It("receives messages on the incoming channel", func(done Done) { - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - - message := <-logMessages - - Expect(message.GetMessage()).To(Equal([]byte("hello"))) - fakeHandler.Close() - - close(done) - }) - - It("does not include metrics", func(done Done) { - fakeHandler.InputChan <- marshalMessage(createContainerMetric(int32(1), int64(2))) - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - - message := <-logMessages - - Expect(message.GetMessage()).To(Equal([]byte("hello"))) - fakeHandler.Close() - - close(done) - }) - - Context("with a specific app", func() { - BeforeEach(func() { - appGuid = "the-app-guid" - }) - - It("sends messages for a specific app", func() { - fakeHandler.Close() - - Eventually(fakeHandler.GetLastURL).Should(ContainSubstring("/apps/the-app-guid/stream")) - }) - - Context("when a stream path builder is provided", func() { - BeforeEach(func() { - streamPathBuilder = func(appGuid string) string { - return fmt.Sprintf("/logs/%s/stream", appGuid) - } - }) - - It("uses the stream path from the builder", func() { - fakeHandler.Close() - - Eventually(fakeHandler.GetLastURL).Should(ContainSubstring("/logs/the-app-guid/stream")) - }) - }) - }) - - Context("with an access token", func() { - BeforeEach(func() { - authToken = "auth-token" - }) - - It("sends an Authorization header with an access token", func() { - fakeHandler.Close() - - Eventually(fakeHandler.GetAuthHeader).Should(Equal("auth-token")) - }) - }) - - Context("when remote connection dies unexpectedly", func() { - It("receives a message on the error channel", func(done Done) { - fakeHandler.Close() - - var err error - Eventually(errors).Should(Receive(&err)) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("websocket: close 1000")) - - close(done) - }) - }) - - Context("when the message fails to parse", func() { - It("skips that message but continues to read messages", func(done Done) { - fakeHandler.InputChan <- []byte{0} - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - fakeHandler.Close() - - message := <-logMessages - - Expect(message.GetMessage()).To(Equal([]byte("hello"))) - - close(done) - }) - }) - }) - - Context("when the connection cannot be established", func() { - BeforeEach(func() { - trafficControllerURL = "!!!bad-url" - }) - - It("receives an error on errChan", func() { - var err error - Eventually(errors).Should(Receive(&err)) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("Please ask your Cloud Foundry Operator")) - }) - }) - - Context("when the authorization fails", func() { - var failure test_helpers.AuthFailureHandler - - BeforeEach(func() { - failure = test_helpers.AuthFailureHandler{Message: "Helpful message"} - testServer = httptest.NewServer(failure) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("it returns a helpful error message", func() { - var err error - Eventually(errors).Should(Receive(&err)) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("You are not authorized. Helpful message")) - }) - }) - }) - - Context("when SSL settings are passed in", func() { - BeforeEach(func() { - testServer = httptest.NewTLSServer(NewWebsocketHandler(messagesToSend, 100*time.Millisecond)) - trafficControllerURL = "wss://" + testServer.Listener.Addr().String() - - tlsSettings = &tls.Config{InsecureSkipVerify: true} - }) - - It("connects using those settings", func() { - Consistently(errors).ShouldNot(Receive()) - - close(messagesToSend) - Eventually(errors).Should(Receive()) - }) - }) - - Context("when error source is not NOAA", func() { - It("does not pass on the error", func(done Done) { - fakeHandler.InputChan <- marshalMessage(createError("foreign error")) - - Consistently(errors).Should(BeEmpty()) - fakeHandler.Close() - - close(done) - }) - - It("continues to process log messages", func() { - fakeHandler.InputChan <- marshalMessage(createError("foreign error")) - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - - fakeHandler.Close() - - Eventually(logMessages).Should(Receive()) - }) - }) - }) - - Describe("TailingLogs", func() { - var ( - logMessages <-chan *events.LogMessage - errors <-chan error - retries uint - ) - - BeforeEach(func() { - retries = 5 - startFakeTrafficController() - }) - - JustBeforeEach(func() { - logMessages, errors = cnsmr.TailingLogs(appGuid, authToken) - }) - - It("resets the delay after a successful connection", func() { - fakeHandler.InputChan <- marshalMessage(createMessage("message 1", 0)) - Eventually(logMessages).Should(Receive()) - - fakeHandler.Close() - expectedErrorCount := 4 - for i := 0; i < expectedErrorCount; i++ { - Eventually(errors, time.Second).Should(Receive(HaveOccurred())) - } - fakeHandler.Reset() - - fakeHandler.InputChan <- marshalMessage(createMessage("message 2", 0)) - - Eventually(logMessages).Should(Receive()) - - fakeHandler.Close() - for i := uint(0); i < retries; i++ { - Eventually(errors).Should(Receive(BeRetryable())) - } - }) - - Context("when maxRetryCount is set", func() { - BeforeEach(func() { - maxRetryCount = 3 - }) - - It("resets the count after a successful connection", func() { - fakeHandler.InputChan <- marshalMessage(createMessage("message 1", 0)) - Eventually(logMessages).Should(Receive()) - - fakeHandler.Close() - for i := 0; i < maxRetryCount-1; i++ { - Eventually(errors, time.Second).Should(Receive(HaveOccurred())) - } - fakeHandler.Reset() - - fakeHandler.InputChan <- marshalMessage(createMessage("message 2", 0)) - - Eventually(logMessages).Should(Receive()) - - fakeHandler.Close() - for i := 0; i < maxRetryCount-1; i++ { - Eventually(errors).Should(Receive(BeRetryable())) - } - }) - }) - - Context("with multiple connections", func() { - var ( - moreLogMessages <-chan *events.LogMessage - moreErrors <-chan error - ) - - JustBeforeEach(func() { - moreLogMessages, moreErrors = cnsmr.TailingLogs(appGuid, authToken) - }) - - It("closes all channels", func() { - cnsmr.Close() - Eventually(logMessages).Should(BeClosed()) - Eventually(errors).Should(BeClosed()) - Eventually(moreLogMessages).Should(BeClosed()) - Eventually(moreErrors).Should(BeClosed()) - }) - }) - - Context("when the connection cannot be established", func() { - BeforeEach(func() { - trafficControllerURL = `https://invalid` - }) - - It("returns an error", func() { - var err error - Eventually(errors).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("Please ask your Cloud Foundry Operator")) - }) - }) - - Context("with a failing handler", func() { - BeforeEach(func() { - fakeHandler.Fail = true - }) - - It("exponentially backs off", func() { - ts := make(chan time.Duration, 100) - done := make(chan struct{}) - - var wg sync.WaitGroup - wg.Add(1) - defer wg.Wait() - defer close(done) - go func() { - defer GinkgoRecover() - defer wg.Done() - last := time.Now() - for { - select { - case err := <-errors: - Expect(err).To(BeRetryable()) - ts <- time.Since(last) - last = time.Now() - case <-done: - return - } - } - }() - - Eventually(ts).Should(Receive(BeNumerically("<", 50*time.Millisecond))) - Eventually(ts).Should(Receive(BeNumerically("~", 100*time.Millisecond, 50*time.Millisecond))) - Eventually(ts).Should(Receive(BeNumerically("~", 200*time.Millisecond, 50*time.Millisecond))) - Eventually(ts).Should(Receive(BeNumerically("~", 400*time.Millisecond, 50*time.Millisecond))) - }) - - It("doesn't go beyond max sleep", func() { - ts := make(chan time.Duration, 100) - done := make(chan struct{}) - - var wg sync.WaitGroup - wg.Add(1) - defer wg.Wait() - defer close(done) - go func() { - defer GinkgoRecover() - defer wg.Done() - last := time.Now() - for { - select { - case err := <-errors: - Expect(err).To(BeRetryable()) - ts <- time.Since(last) - last = time.Now() - case <-done: - return - } - } - }() - - Eventually(ts).Should(Receive()) - timeout := time.After(time.Second) - for { - select { - case delay := <-ts: - Expect(delay).To(BeNumerically("<", 550*time.Millisecond)) - case <-timeout: - return - } - } - }) - - Context("when maxRetryCount is set", func() { - BeforeEach(func() { - maxRetryCount = 3 - }) - - It("doesn't go beyond maxRetryCount", func() { - for i := 0; i < maxRetryCount; i++ { - Eventually(errors).Should(Receive(BeRetryable())) - } - Eventually(errors).Should(Receive(Equal(consumer.ErrMaxRetriesReached))) - Eventually(logMessages).Should(BeClosed()) - Eventually(errors).Should(BeClosed()) - }) - }) - - It("will not attempt reconnect if consumer is closed", func() { - Eventually(errors).Should(Receive()) - Expect(fakeHandler.WasCalled()).To(BeTrue()) - fakeHandler.Reset() - cnsmr.Close() - - Eventually(errors).Should(BeClosed()) - Consistently(fakeHandler.WasCalled, 2).Should(BeFalse()) - }) - }) - }) - - Describe("StreamWithoutReconnect", func() { - var ( - incoming <-chan *events.Envelope - errors <-chan error - ) - - BeforeEach(func() { - startFakeTrafficController() - }) - - JustBeforeEach(func() { - incoming, errors = cnsmr.StreamWithoutReconnect(appGuid, authToken) - }) - - Context("when there is no TLS Config or consumerProxyFunc setting", func() { - Context("when the connection can be established", func() { - It("receives messages on the incoming channel", func(done Done) { - defer close(done) - - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - - var message *events.Envelope - Eventually(incoming).Should(Receive(&message)) - Expect(message.GetLogMessage().GetMessage()).To(Equal([]byte("hello"))) - fakeHandler.Close() - - }) - - Context("with a specific app ID", func() { - BeforeEach(func() { - appGuid = "the-app-guid" - }) - - It("sends messages for a specific app", func() { - fakeHandler.Close() - - Eventually(fakeHandler.GetLastURL).Should(ContainSubstring("/apps/the-app-guid/stream")) - }) - }) - - Context("with an access token", func() { - BeforeEach(func() { - authToken = "auth-token" - }) - - It("sends an Authorization header with an access token", func() { - fakeHandler.Close() - - Eventually(fakeHandler.GetAuthHeader).Should(Equal("auth-token")) - }) - }) - - Context("when the message fails to parse", func() { - It("skips that message but continues to read messages", func(done Done) { - fakeHandler.InputChan <- []byte{0} - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - fakeHandler.Close() - - message := <-incoming - - Expect(message.GetLogMessage().GetMessage()).To(Equal([]byte("hello"))) - - close(done) - }) - }) - }) - - Context("when the connection cannot be established", func() { - BeforeEach(func() { - trafficControllerURL = `http://invalid` - }) - - It("returns an error", func(done Done) { - var err error - Eventually(errors).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("Please ask your Cloud Foundry Operator")) - - close(done) - }) - }) - - Context("when the authorization fails", func() { - var failer test_helpers.AuthFailureHandler - - BeforeEach(func() { - failer = test_helpers.AuthFailureHandler{Message: "Helpful message"} - testServer = httptest.NewServer(failer) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("it returns a helpful error message", func() { - var err error - Eventually(errors).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("You are not authorized. Helpful message")) - }) - }) - }) - - Context("when SSL settings are passed in", func() { - BeforeEach(func() { - testServer = httptest.NewTLSServer(NewWebsocketHandler(messagesToSend, 100*time.Millisecond)) - trafficControllerURL = "wss://" + testServer.Listener.Addr().String() - - tlsSettings = &tls.Config{InsecureSkipVerify: true} - }) - - It("connects using those settings", func() { - Consistently(errors).ShouldNot(Receive()) - - close(messagesToSend) - Eventually(errors).Should(Receive()) - }) - }) - }) - - Describe("Stream", func() { - var ( - envelopes <-chan *events.Envelope - errors <-chan error - ) - - BeforeEach(func() { - startFakeTrafficController() - }) - - JustBeforeEach(func() { - envelopes, errors = cnsmr.Stream(appGuid, authToken) - }) - - Context("when the connection fails", func() { - BeforeEach(func() { - fakeHandler.Fail = true - }) - - It("exponentially backs off", func() { - ts := make(chan time.Duration, 100) - done := make(chan struct{}) - - var wg sync.WaitGroup - wg.Add(1) - defer wg.Wait() - defer close(done) - go func() { - defer GinkgoRecover() - defer wg.Done() - last := time.Now() - for { - select { - case err := <-errors: - Expect(err).To(BeRetryable()) - ts <- time.Since(last) - last = time.Now() - case <-done: - return - } - } - }() - - Eventually(ts).Should(Receive(BeNumerically("<", 50*time.Millisecond))) - Eventually(ts).Should(Receive(BeNumerically("~", 100*time.Millisecond, 50*time.Millisecond))) - Eventually(ts).Should(Receive(BeNumerically("~", 200*time.Millisecond, 50*time.Millisecond))) - Eventually(ts).Should(Receive(BeNumerically("~", 400*time.Millisecond, 50*time.Millisecond))) - }) - }) - - It("resets the delay after a successful connection", func() { - fakeHandler.InputChan <- marshalMessage(createMessage("message 1", 0)) - Eventually(envelopes).Should(Receive()) - - fakeHandler.Close() - expectedErrorCount := 4 - for i := 0; i < expectedErrorCount; i++ { - Eventually(errors, time.Second).Should(Receive(BeRetryable())) - } - fakeHandler.Reset() - - fakeHandler.InputChan <- marshalMessage(createMessage("message 2", 0)) - - Eventually(envelopes).Should(Receive()) - - fakeHandler.Close() - for i := uint(0); i < 3; i++ { - Eventually(errors).Should(Receive(BeRetryable())) - } - }) - }) - - Describe("Close", func() { - var ( - incomings <-chan *events.Envelope - streamErrors <-chan error - ) - - BeforeEach(func() { - startFakeTrafficController() - }) - - Context("when a connection is not open", func() { - It("returns an error", func() { - err := cnsmr.Close() - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(Equal("connection does not exist")) - fakeHandler.Close() - }) - }) - - Context("when a connection is open", func() { - JustBeforeEach(func() { - incomings, streamErrors = cnsmr.StreamWithoutReconnect(appGuid, authToken) - }) - - It("closes the outputs", func() { - Eventually(fakeHandler.WasCalled).Should(BeTrue()) - - Expect(cnsmr.Close()).To(Succeed()) - Eventually(incomings).Should(BeClosed()) - Eventually(streamErrors).Should(BeClosed()) - - fakeHandler.Close() - }) - - Context("and the server is closed", func() { - It("returns errors", func() { - fakeHandler.Close() - - var err error - Eventually(streamErrors).Should(Receive(&err)) - Expect(err.Error()).To(ContainSubstring("websocket: close 1000")) - - connErr := cnsmr.Close() - Expect(connErr).To(HaveOccurred()) - Expect(connErr.Error()).To(ContainSubstring("close sent")) - }) - - It("returns multiple errors when multiple connections fail to close", func() { - incomings, streamErrors = cnsmr.StreamWithoutReconnect(appGuid, authToken) - fakeHandler.Close() - - var err error - Eventually(streamErrors).Should(Receive(&err)) - Expect(err.Error()).To(ContainSubstring("websocket: close 1000")) - - connErr := cnsmr.Close() - Expect(connErr).To(HaveOccurred()) - Expect(connErr.Error()).To(ContainSubstring("close sent, websocket: close sent")) - }) - }) - }) - }) - - Describe("Firehose", func() { - var ( - envelopes <-chan *events.Envelope - errors <-chan error - ) - - BeforeEach(func() { - startFakeTrafficController() - }) - - Context("with data in the server", func() { - BeforeEach(func() { - fakeHandler.InputChan <- marshalMessage(createMessage("message 1", 0)) - }) - - JustBeforeEach(func() { - envelopes, errors = cnsmr.Firehose("subscription-id", authToken) - }) - - It("resets the delay after a successful connection", func(done Done) { - defer close(done) - Eventually(envelopes).Should(Receive()) - - fakeHandler.Close() - - expectedErrorCount := 4 - for i := 0; i < expectedErrorCount; i++ { - Eventually(errors).Should(Receive(BeRetryable())) - } - fakeHandler.Reset() - - fakeHandler.InputChan <- marshalMessage(createMessage("message 2", 0)) - - Eventually(envelopes).Should(Receive()) - fakeHandler.Close() - for i := 0; i < 5; i++ { - Eventually(errors).Should(Receive(BeRetryable())) - } - }, 10) - }) - - Context("when the connection read takes too long", func() { - var ( - idleTimeout time.Duration - ) - - JustBeforeEach(func() { - idleTimeout = 500 * time.Millisecond - cnsmr.SetIdleTimeout(idleTimeout) - envelopes, errors = cnsmr.Firehose("subscription-id", authToken) - }) - - It("returns an error when the idle timeout expires", func() { - var err error - Eventually(errors).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err).To(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("i/o timeout")) - }) - - It("reestablishes the connection", func() { - Eventually(fakeHandler.WasCalled).Should(BeTrue()) - fakeHandler.Reset() - Eventually(fakeHandler.WasCalled).Should(BeTrue()) - }) - }) - }) - - Describe("FirehoseWithoutReconnect", func() { - var ( - incomings <-chan *events.Envelope - streamErrors <-chan error - idleTimeout time.Duration - ) - - BeforeEach(func() { - incomings = make(chan *events.Envelope) - startFakeTrafficController() - }) - - JustBeforeEach(func() { - cnsmr.SetIdleTimeout(idleTimeout) - incomings, streamErrors = cnsmr.FirehoseWithoutReconnect("subscription-id", authToken) - }) - - Context("when there is no TLS Config or consumerProxyFunc setting", func() { - Context("when the connection can be established", func() { - It("receives messages from the full firehose", func() { - fakeHandler.Close() - - Eventually(fakeHandler.GetLastURL).Should(ContainSubstring("/firehose/subscription-id")) - }) - - Context("with a message", func() { - BeforeEach(func() { - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - }) - - It("receives messages on the incoming channel", func(done Done) { - defer close(done) - - message := <-incomings - - Expect(message.GetLogMessage().GetMessage()).To(Equal([]byte("hello"))) - fakeHandler.Close() - }) - }) - - Context("with an authorization token", func() { - BeforeEach(func() { - authToken = "auth-token" - }) - - It("sends an Authorization header with an access token", func() { - fakeHandler.Close() - Eventually(fakeHandler.GetAuthHeader).Should(Equal("auth-token")) - }) - }) - - Context("when the message fails to parse", func() { - BeforeEach(func() { - fakeHandler.InputChan <- []byte{0} - fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0)) - }) - - It("skips that message but continues to read messages", func(done Done) { - defer close(done) - fakeHandler.Close() - - message := <-incomings - Expect(message.GetLogMessage().GetMessage()).To(Equal([]byte("hello"))) - }) - }) - }) - - Context("when the connection cannot be established", func() { - BeforeEach(func() { - trafficControllerURL = "https://invalid" - }) - - It("returns an error", func(done Done) { - defer close(done) - - var err error - Eventually(streamErrors).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("Please ask your Cloud Foundry Operator")) - }) - }) - - Context("when the authorization fails", func() { - var failer test_helpers.AuthFailureHandler - - BeforeEach(func() { - failer = test_helpers.AuthFailureHandler{Message: "Helpful message"} - testServer = httptest.NewServer(failer) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("it returns a helpful error message", func() { - var err error - Eventually(streamErrors).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err).ToNot(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("You are not authorized. Helpful message")) - }) - }) - }) - - Context("when the connection read takes too long", func() { - BeforeEach(func() { - idleTimeout = 500 * time.Millisecond - }) - - It("returns an error when the idle timeout expires", func() { - var err error - Eventually(streamErrors).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err).To(BeRetryable()) - Expect(err.Error()).To(ContainSubstring("i/o timeout")) - }) - }) - - Context("when SSL settings are passed in", func() { - BeforeEach(func() { - testServer = httptest.NewTLSServer(NewWebsocketHandler(messagesToSend, 100*time.Millisecond)) - trafficControllerURL = "wss://" + testServer.Listener.Addr().String() - - tlsSettings = &tls.Config{InsecureSkipVerify: true} - }) - - It("connects using those settings", func() { - Consistently(streamErrors).ShouldNot(Receive()) - - close(messagesToSend) - Eventually(streamErrors).Should(Receive()) - }) - }) - }) - - Describe("FilteredFirehose", func() { - BeforeEach(func() { - startFakeTrafficController() - }) - - It("appends the correct query string for filtering log messages", func() { - cnsmr.FilteredFirehose("subscription-id", authToken, consumer.LogMessages) - fakeHandler.Close() - Eventually(fakeHandler.GetLastURL).Should(ContainSubstring("/firehose/subscription-id?filter-type=logs")) - }) - - It("appends the correct query string for filtering metrics", func() { - cnsmr.FilteredFirehose("subscription-id", authToken, consumer.Metrics) - fakeHandler.Close() - Eventually(fakeHandler.GetLastURL).Should(ContainSubstring("/firehose/subscription-id?filter-type=metrics")) - }) - }) -}) - -func BeRetryable() types.GomegaMatcher { - return BeAssignableToTypeOf(errors.NewRetryError(fmt.Errorf("some-error"))) -} - -func createError(message string) *events.Envelope { - timestamp := time.Now().UnixNano() - - err := &events.Error{ - Message: &message, - Source: proto.String("foreign"), - Code: proto.Int32(42), - } - - return &events.Envelope{ - Error: err, - EventType: events.Envelope_Error.Enum(), - Origin: proto.String("fake-origin-1"), - Timestamp: proto.Int64(timestamp), - } -} diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/consumer_proxy_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/consumer_proxy_test.go deleted file mode 100644 index 779f1514..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/consumer_proxy_test.go +++ /dev/null @@ -1,241 +0,0 @@ -package consumer_test - -import ( - "bytes" - "errors" - "log" - "net/http" - "net/http/httptest" - "net/url" - "time" - - "github.com/cloudfoundry/noaa/consumer" - "github.com/cloudfoundry/sonde-go/events" - "github.com/elazarl/goproxy" - "github.com/elazarl/goproxy/ext/auth" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Consumer connecting through a Proxy", func() { - var ( - connection *consumer.Consumer - - messagesToSend chan []byte - testServer *httptest.Server - endpoint string - proxy func(*http.Request) (*url.URL, error) - - testProxyServer *httptest.Server - goProxyHandler *goproxy.ProxyHttpServer - ) - - BeforeEach(func() { - messagesToSend = make(chan []byte, 256) - testServer = httptest.NewServer(NewWebsocketHandler(messagesToSend, 100*time.Millisecond)) - endpoint = "ws://" + testServer.Listener.Addr().String() - - goProxyHandler = goproxy.NewProxyHttpServer() - goProxyHandler.Logger = log.New(bytes.NewBufferString(""), "", 0) - testProxyServer = httptest.NewServer(goProxyHandler) - u, err := url.Parse(testProxyServer.URL) - proxy = func(*http.Request) (*url.URL, error) { - return u, err - } - }) - - JustBeforeEach(func() { - connection = consumer.New(endpoint, nil, proxy) - }) - - AfterEach(func() { - testProxyServer.Close() - testServer.Close() - }) - - Describe("StreamWithoutReconnect", func() { - var ( - incoming <-chan *events.Envelope - errs <-chan error - ) - - JustBeforeEach(func() { - incoming, errs = connection.StreamWithoutReconnect("fakeAppGuid", "authToken") - }) - - AfterEach(func() { - close(messagesToSend) - }) - - Context("with a message in the trafficcontroller", func() { - BeforeEach(func() { - messagesToSend <- marshalMessage(createMessage("hello", 0)) - }) - - It("connects using valid URL to running proxy server", func() { - message := <-incoming - Expect(message.GetLogMessage().GetMessage()).To(Equal([]byte("hello"))) - }) - }) - - Context("with an auth proxy server", func() { - BeforeEach(func() { - goProxyHandler.OnRequest().HandleConnect(auth.BasicConnect("my_realm", func(user, passwd string) bool { - return user == "user" && passwd == "password" - })) - proxyURL, err := url.Parse(testProxyServer.URL) - proxy = func(*http.Request) (*url.URL, error) { - proxyURL.User = url.UserPassword("user", "password") - if err != nil { - return nil, err - } - - return proxyURL, nil - } - messagesToSend <- marshalMessage(createMessage("hello", 0)) - }) - - It("connects successfully", func() { - message := <-incoming - Expect(message.GetLogMessage().GetMessage()).To(Equal([]byte("hello"))) - }) - }) - - Context("with an auth proxy server with bad credential", func() { - BeforeEach(func() { - goProxyHandler.OnRequest().HandleConnect(auth.BasicConnect("my_realm", func(user, passwd string) bool { - return user == "user" && passwd == "password" - })) - proxyURL, err := url.Parse(testProxyServer.URL) - proxy = func(*http.Request) (*url.URL, error) { - proxyURL.User = url.UserPassword("user", "passwrd") - if err != nil { - return nil, err - } - - return proxyURL, nil - } - }) - - It("connects successfully", func() { - var err error - Eventually(errs).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("Proxy Authentication Required")) - }) - }) - - Context("with a closed proxy server", func() { - BeforeEach(func() { - testProxyServer.Close() - }) - - It("sends a connection refused error", func() { - Eventually(func() string { - err := <-errs - return err.Error() - }).Should(ContainSubstring("connection refused")) - }) - }) - - Context("with a proxy that returns errors", func() { - const errMsg = "Invalid proxy URL" - - BeforeEach(func() { - proxy = func(*http.Request) (*url.URL, error) { - return nil, errors.New(errMsg) - } - }) - - It("sends the errors", func() { - var err error - Eventually(errs).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring(errMsg)) - }) - }) - - Context("with a proxy that rejects connections", func() { - BeforeEach(func() { - goProxyHandler.OnRequest().HandleConnect(goproxy.AlwaysReject) - }) - - It("sends a dialing error", func() { - var err error - Eventually(errs).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("Error dialing trafficcontroller server")) - }) - }) - - Context("with a non-proxy server", func() { - BeforeEach(func() { - nonProxyServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - http.Error(w, "Go away, I am not a proxy!", http.StatusBadRequest) - })) - proxy = func(*http.Request) (*url.URL, error) { - return url.Parse(nonProxyServer.URL) - } - }) - - It("sends a bad request error", func() { - var err error - Eventually(errs).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring(http.StatusText(http.StatusBadRequest))) - }) - }) - }) - - Describe("RecentLogs", func() { - var ( - httpTestServer *httptest.Server - incomingMessages []*events.LogMessage - err error - ) - - BeforeEach(func() { - httpTestServer = httptest.NewServer(NewHttpHandler(messagesToSend)) - endpoint = "ws://" + httpTestServer.Listener.Addr().String() - }) - - JustBeforeEach(func() { - close(messagesToSend) - incomingMessages, err = connection.RecentLogs("fakeAppGuid", "authToken") - }) - - AfterEach(func() { - httpTestServer.Close() - }) - - Context("with recent logs", func() { - BeforeEach(func() { - messagesToSend <- marshalMessage(createMessage("test-message-0", 0)) - messagesToSend <- marshalMessage(createMessage("test-message-1", 0)) - }) - - It("returns those logs from the server", func() { - Expect(err).NotTo(HaveOccurred()) - Expect(incomingMessages).To(HaveLen(2)) - Expect(incomingMessages[0].GetMessage()).To(Equal([]byte("test-message-0"))) - Expect(incomingMessages[1].GetMessage()).To(Equal([]byte("test-message-1"))) - }) - }) - - Context("with a proxy that returns errors", func() { - const errMsg = "Invalid proxy URL" - - BeforeEach(func() { - proxy = func(*http.Request) (*url.URL, error) { - return nil, errors.New(errMsg) - } - }) - - It("connects using failing proxyFunc", func() { - Expect(err).To(HaveOccurred(), "THIS WILL FAIL ON GOLANG 1.3 - 1.3.3 DUE TO BUG IN STANDARD LIBRARY (see https://code.google.com/p/go/issues/detail?id=8755)") - Expect(err.Error()).To(ContainSubstring(errMsg)) - }) - }) - }) -}) diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/consumer_suite_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/consumer_suite_test.go deleted file mode 100644 index 54e8db37..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/consumer_suite_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package consumer_test - -import ( - "time" - - "github.com/cloudfoundry/sonde-go/events" - "github.com/gogo/protobuf/proto" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestConsumer(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Consumer Suite") -} - -func createMessage(message string, timestamp int64) *events.Envelope { - if timestamp == 0 { - timestamp = time.Now().UnixNano() - } - - logMessage := createLogMessage(message, timestamp) - - return &events.Envelope{ - LogMessage: logMessage, - EventType: events.Envelope_LogMessage.Enum(), - Origin: proto.String("fake-origin-1"), - Timestamp: proto.Int64(timestamp), - } -} - -func createContainerMetric(instanceIndex int32, timestamp int64) *events.Envelope { - if timestamp == 0 { - timestamp = time.Now().UnixNano() - } - - cm := &events.ContainerMetric{ - ApplicationId: proto.String("appId"), - InstanceIndex: proto.Int32(instanceIndex), - CpuPercentage: proto.Float64(1), - MemoryBytes: proto.Uint64(2), - DiskBytes: proto.Uint64(3), - } - - return &events.Envelope{ - ContainerMetric: cm, - EventType: events.Envelope_ContainerMetric.Enum(), - Origin: proto.String("fake-origin-1"), - Timestamp: proto.Int64(timestamp), - } -} - -func createLogMessage(message string, timestamp int64) *events.LogMessage { - return &events.LogMessage{ - Message: []byte(message), - MessageType: events.LogMessage_OUT.Enum(), - AppId: proto.String("my-app-guid"), - SourceType: proto.String("DEA"), - Timestamp: proto.Int64(timestamp), - } -} - -func marshalMessage(message *events.Envelope) []byte { - data, err := proto.Marshal(message) - if err != nil { - println(err.Error()) - } - - return data -} diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/handlers_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/handlers_test.go deleted file mode 100644 index db1ea696..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/handlers_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package consumer_test - -import ( - "log" - "mime/multipart" - "net/http" - "time" - - "github.com/gorilla/websocket" -) - -type HttpHandler struct { - Messages <-chan []byte -} - -func NewHttpHandler(m <-chan []byte) *HttpHandler { - return &HttpHandler{Messages: m} -} - -func (h *HttpHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - mp := multipart.NewWriter(rw) - defer mp.Close() - - rw.Header().Set("Content-Type", `multipart/x-protobuf; boundary=`+mp.Boundary()) - - for message := range h.Messages { - partWriter, err := mp.CreatePart(nil) - if err != nil { - return - } - - partWriter.Write(message) - } -} - -type websocketHandler struct { - messages <-chan []byte - keepAlive time.Duration -} - -func NewWebsocketHandler(m <-chan []byte, keepAlive time.Duration) *websocketHandler { - return &websocketHandler{messages: m, keepAlive: keepAlive} -} - -func (h *websocketHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - upgrader := websocket.Upgrader{ - CheckOrigin: func(*http.Request) bool { return true }, - } - - ws, err := upgrader.Upgrade(rw, r, nil) - if err != nil { - log.Printf("websocket handler: Not a websocket handshake: %s", err) - return - } - defer ws.Close() - - closeCode, closeMessage := h.runWebsocketUntilClosed(ws) - ws.WriteControl(websocket.CloseMessage, websocket.FormatCloseMessage(closeCode, closeMessage), time.Time{}) -} - -func (h *websocketHandler) runWebsocketUntilClosed(ws *websocket.Conn) (closeCode int, closeMessage string) { - keepAliveExpired := make(chan struct{}) - clientWentAway := make(chan struct{}) - - // TODO: remove this loop (but keep ws.ReadMessage()) once we retire support in the cli for old style keep alives - go func() { - for { - _, _, err := ws.ReadMessage() - if err != nil { - close(clientWentAway) - return - } - } - }() - - go func() { - NewKeepAlive(ws, h.keepAlive).Run() - close(keepAliveExpired) - }() - - closeCode = websocket.CloseNormalClosure - closeMessage = "" - for { - select { - case <-clientWentAway: - return - case <-keepAliveExpired: - closeCode = websocket.ClosePolicyViolation - closeMessage = "Client did not respond to ping before keep-alive timeout expired." - return - case message, ok := <-h.messages: - if !ok { - return - } - err := ws.WriteMessage(websocket.BinaryMessage, message) - if err != nil { - return - } - } - } -} - -type KeepAlive struct { - conn *websocket.Conn - pongChan chan struct{} - keepAliveInterval time.Duration -} - -func NewKeepAlive(conn *websocket.Conn, keepAliveInterval time.Duration) *KeepAlive { - return &KeepAlive{ - conn: conn, - pongChan: make(chan struct{}, 1), - keepAliveInterval: keepAliveInterval, - } -} - -func (k *KeepAlive) Run() { - k.conn.SetPongHandler(k.pongHandler) - defer k.conn.SetPongHandler(nil) - - timeout := time.NewTimer(k.keepAliveInterval) - for { - err := k.conn.WriteControl(websocket.PingMessage, nil, time.Time{}) - if err != nil { - return - } - timeout.Reset(k.keepAliveInterval) - select { - case <-k.pongChan: - time.Sleep(k.keepAliveInterval / 2) - continue - case <-timeout.C: - return - } - } -} - -func (k *KeepAlive) pongHandler(string) error { - select { - case k.pongChan <- struct{}{}: - default: - } - return nil -} diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/mock_debug_printer_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/mock_debug_printer_test.go deleted file mode 100644 index f21c682b..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/mock_debug_printer_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// This file was generated by github.com/nelsam/hel. Do not -// edit this code by hand unless you *really* know what you're -// doing. Expect any changes made manually to be overwritten -// the next time hel regenerates this file. - -package consumer_test - -type mockDebugPrinter struct { - PrintCalled chan bool - PrintInput struct { - Title, Dump chan string - } -} - -func newMockDebugPrinter() *mockDebugPrinter { - m := &mockDebugPrinter{} - m.PrintCalled = make(chan bool, 100) - m.PrintInput.Title = make(chan string, 100) - m.PrintInput.Dump = make(chan string, 100) - return m -} -func (m *mockDebugPrinter) Print(title, dump string) { - m.PrintCalled <- true - m.PrintInput.Title <- title - m.PrintInput.Dump <- dump -} diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/mock_token_refresher_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/mock_token_refresher_test.go deleted file mode 100644 index 37d21e4d..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/mock_token_refresher_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// This file was generated by github.com/nelsam/hel. Do not -// edit this code by hand unless you *really* know what you're -// doing. Expect any changes made manually to be overwritten -// the next time hel regenerates this file. - -package consumer_test - -type mockTokenRefresher struct { - RefreshAuthTokenCalled chan bool - RefreshAuthTokenOutput struct { - Token chan string - AuthError chan error - } -} - -func newMockTokenRefresher() *mockTokenRefresher { - m := &mockTokenRefresher{} - m.RefreshAuthTokenCalled = make(chan bool, 100) - m.RefreshAuthTokenOutput.Token = make(chan string, 100) - m.RefreshAuthTokenOutput.AuthError = make(chan error, 100) - return m -} -func (m *mockTokenRefresher) RefreshAuthToken() (token string, authError error) { - m.RefreshAuthTokenCalled <- true - return <-m.RefreshAuthTokenOutput.Token, <-m.RefreshAuthTokenOutput.AuthError -} diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/sync_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/sync_test.go deleted file mode 100644 index f9b88fff..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/sync_test.go +++ /dev/null @@ -1,451 +0,0 @@ -package consumer_test - -import ( - "crypto/tls" - "fmt" - "net/http" - "net/http/httptest" - - "github.com/cloudfoundry/noaa/consumer" - "github.com/cloudfoundry/noaa/errors" - "github.com/cloudfoundry/noaa/test_helpers" - "github.com/cloudfoundry/sonde-go/events" - - "net/url" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Consumer (Synchronous)", func() { - var ( - cnsmr *consumer.Consumer - trafficControllerURL string - testServer *httptest.Server - fakeHandler *test_helpers.FakeHandler - tlsSettings *tls.Config - - appGuid string - authToken string - messagesToSend chan []byte - - recentPathBuilder consumer.RecentPathBuilder - ) - - BeforeEach(func() { - trafficControllerURL = "" - testServer = nil - fakeHandler = nil - tlsSettings = nil - - appGuid = "" - authToken = "" - messagesToSend = make(chan []byte, 256) - - recentPathBuilder = nil - }) - - JustBeforeEach(func() { - cnsmr = consumer.New(trafficControllerURL, tlsSettings, nil) - - if recentPathBuilder != nil { - cnsmr.SetRecentPathBuilder(recentPathBuilder) - } - }) - - AfterEach(func() { - cnsmr.Close() - if testServer != nil { - testServer.Close() - } - }) - - Describe("RecentLogs", func() { - var ( - receivedLogMessages []*events.LogMessage - recentError error - ) - - BeforeEach(func() { - appGuid = "appGuid" - }) - - JustBeforeEach(func() { - close(messagesToSend) - receivedLogMessages, recentError = cnsmr.RecentLogs(appGuid, authToken) - }) - - Context("with an invalid URL", func() { - BeforeEach(func() { - trafficControllerURL = "invalid-url" - }) - - It("returns an error", func() { - Expect(recentError).ToNot(BeNil()) - }) - }) - - Context("when the connection can be established", func() { - BeforeEach(func() { - testServer = httptest.NewServer(NewHttpHandler(messagesToSend)) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - - messagesToSend <- marshalMessage(createMessage("test-message-0", 0)) - messagesToSend <- marshalMessage(createMessage("test-message-1", 0)) - }) - - It("returns messages from the server", func() { - Expect(recentError).NotTo(HaveOccurred()) - Expect(receivedLogMessages).To(HaveLen(2)) - Expect(receivedLogMessages[0].GetMessage()).To(Equal([]byte("test-message-0"))) - Expect(receivedLogMessages[1].GetMessage()).To(Equal([]byte("test-message-1"))) - }) - }) - - Context("when the content type is missing", func() { - BeforeEach(func() { - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/recentlogs", func(resp http.ResponseWriter, req *http.Request) { - resp.Header().Set("Content-Type", "") - resp.Write([]byte("OK")) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a bad reponse error message", func() { - Expect(recentError).To(HaveOccurred()) - Expect(recentError).To(Equal(consumer.ErrBadResponse)) - }) - }) - - Context("when the content length is unknown", func() { - BeforeEach(func() { - fakeHandler = &test_helpers.FakeHandler{ - ContentLen: "", - InputChan: make(chan []byte, 10), - GenerateHandler: func(input chan []byte) http.Handler { - return NewHttpHandler(input) - }, - } - testServer = httptest.NewServer(fakeHandler) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - - fakeHandler.InputChan <- marshalMessage(createMessage("bad-content-length", 0)) - fakeHandler.Close() - }) - - It("does not throw an error", func() { - Expect(recentError).NotTo(HaveOccurred()) - Expect(receivedLogMessages).To(HaveLen(1)) - }) - - }) - - Context("when the content type doesn't have a boundary", func() { - BeforeEach(func() { - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/recentlogs", func(resp http.ResponseWriter, req *http.Request) { - resp.Write([]byte("OK")) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a bad reponse error message", func() { - Expect(recentError).To(HaveOccurred()) - Expect(recentError).To(Equal(consumer.ErrBadResponse)) - }) - - }) - - Context("when the content type's boundary is blank", func() { - BeforeEach(func() { - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/recentlogs", func(resp http.ResponseWriter, req *http.Request) { - resp.Header().Set("Content-Type", "boundary=") - resp.Write([]byte("OK")) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a bad reponse error message", func() { - Expect(recentError).To(HaveOccurred()) - Expect(recentError).To(Equal(consumer.ErrBadResponse)) - }) - - }) - - Context("when the path is not found", func() { - BeforeEach(func() { - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/recentlogs", func(resp http.ResponseWriter, req *http.Request) { - resp.WriteHeader(http.StatusNotFound) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a not found reponse error message", func() { - Expect(recentError).To(HaveOccurred()) - Expect(recentError).To(Equal(consumer.ErrNotFound)) - }) - - }) - - Context("when the authorization fails", func() { - var failer test_helpers.AuthFailureHandler - - BeforeEach(func() { - failer = test_helpers.AuthFailureHandler{Message: "Helpful message"} - serverMux := http.NewServeMux() - serverMux.Handle(fmt.Sprintf("/apps/%s/recentlogs", appGuid), failer) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a helpful error message", func() { - Expect(recentError).To(HaveOccurred()) - Expect(recentError.Error()).To(ContainSubstring("You are not authorized. Helpful message")) - Expect(recentError).To(BeAssignableToTypeOf(&errors.UnauthorizedError{})) - }) - }) - - Context("when a recent path builder is provided", func() { - var pathUsed bool - - BeforeEach(func() { - pathUsed = false - recentPathBuilder = func(trafficControllerUrl *url.URL, appGuid string, endpoint string) string { - return fmt.Sprintf("http://%s/logs/%s/%s", trafficControllerUrl.Host, endpoint, appGuid) - } - - serverMux := http.NewServeMux() - serverMux.HandleFunc("/logs/recentlogs/appGuid", func(resp http.ResponseWriter, req *http.Request) { - pathUsed = true - resp.WriteHeader(http.StatusUnauthorized) // Avoid having to do more - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("uses the path provided by the recent path builder", func() { - Expect(pathUsed).To(BeTrue()) - Expect(recentError).To(MatchError((&errors.UnauthorizedError{}).Error())) - }) - }) - - Context("when an invalid envelope is sent", func() { - BeforeEach(func() { - testServer = httptest.NewServer(NewHttpHandler(messagesToSend)) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - - messagesToSend <- []byte("invalid") - }) - - It("ignores the envelope", func() { - Expect(recentError).NotTo(HaveOccurred()) - Expect(receivedLogMessages).To(HaveLen(0)) - }) - }) - }) - - Describe("ContainerMetrics", func() { - var handler *HttpHandler - - BeforeEach(func() { - handler = NewHttpHandler(messagesToSend) - testServer = httptest.NewServer(handler) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns the ContainerMetric values from ContainerEnvelopes", func() { - env := createContainerMetric(2, 2000) - messagesToSend <- marshalMessage(env) - close(messagesToSend) - envelopes, _ := cnsmr.ContainerEnvelopes(appGuid, authToken) - - messagesToSend = make(chan []byte, 100) - handler.Messages = messagesToSend - messagesToSend <- marshalMessage(env) - close(messagesToSend) - metrics, err := cnsmr.ContainerMetrics(appGuid, authToken) - Expect(metrics).To(HaveLen(1)) - Expect(err).ToNot(HaveOccurred()) - Expect(metrics).To(ConsistOf(envelopes[0].ContainerMetric)) - }) - }) - - Describe("ContainerEnvelopes", func() { - var ( - envelopes []*events.Envelope - err error - ) - - BeforeEach(func() { - appGuid = "appGuid" - }) - - JustBeforeEach(func() { - close(messagesToSend) - envelopes, err = cnsmr.ContainerEnvelopes(appGuid, authToken) - }) - - Context("when the connection cannot be established", func() { - BeforeEach(func() { - trafficControllerURL = "invalid-url" - }) - - It("invalid urls return error", func() { - Expect(err).ToNot(BeNil()) - }) - }) - - Context("when the connection can be established", func() { - BeforeEach(func() { - testServer = httptest.NewServer(NewHttpHandler(messagesToSend)) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - Context("with a successful connection", func() { - BeforeEach(func() { - messagesToSend <- marshalMessage(createContainerMetric(2, 2000)) - }) - - It("returns envelopes from the server", func() { - Expect(err).NotTo(HaveOccurred()) - Expect(envelopes).To(HaveLen(1)) - Expect(envelopes[0].GetContainerMetric().GetInstanceIndex()).To(Equal(int32(2))) - }) - }) - - Context("when trafficcontroller returns an error as a log message", func() { - BeforeEach(func() { - messagesToSend <- marshalMessage(createContainerMetric(2, 2000)) - messagesToSend <- marshalMessage(createMessage("an error occurred", 2000)) - }) - - It("returns the error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError("Upstream error: an error occurred")) - }) - }) - }) - - Context("when the content type is missing", func() { - BeforeEach(func() { - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/containermetrics", func(resp http.ResponseWriter, req *http.Request) { - resp.Header().Set("Content-Type", "") - resp.Write([]byte("OK")) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a bad reponse error message", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(Equal(consumer.ErrBadResponse)) - }) - }) - - Context("when the content length is unknown", func() { - BeforeEach(func() { - fakeHandler = &test_helpers.FakeHandler{ - ContentLen: "", - InputChan: make(chan []byte, 10), - GenerateHandler: func(input chan []byte) http.Handler { - return NewHttpHandler(input) - }, - } - testServer = httptest.NewServer(fakeHandler) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - - fakeHandler.InputChan <- marshalMessage(createContainerMetric(2, 2000)) - fakeHandler.Close() - }) - - It("does not throw an error", func() { - Expect(err).NotTo(HaveOccurred()) - Expect(envelopes).To(HaveLen(1)) - }) - }) - - Context("when the content type doesn't have a boundary", func() { - BeforeEach(func() { - - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/containermetrics", func(resp http.ResponseWriter, req *http.Request) { - resp.Write([]byte("OK")) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a bad reponse error message", func() { - - Expect(err).To(HaveOccurred()) - Expect(err).To(Equal(consumer.ErrBadResponse)) - }) - - }) - - Context("when the content type's boundary is blank", func() { - BeforeEach(func() { - - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/containermetrics", func(resp http.ResponseWriter, req *http.Request) { - resp.Header().Set("Content-Type", "boundary=") - resp.Write([]byte("OK")) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a bad reponse error message", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(Equal(consumer.ErrBadResponse)) - }) - - }) - - Context("when the path is not found", func() { - BeforeEach(func() { - - serverMux := http.NewServeMux() - serverMux.HandleFunc("/apps/appGuid/containermetrics", func(resp http.ResponseWriter, req *http.Request) { - resp.WriteHeader(http.StatusNotFound) - }) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a not found reponse error message", func() { - - Expect(err).To(HaveOccurred()) - Expect(err).To(Equal(consumer.ErrNotFound)) - }) - - }) - - Context("when the authorization fails", func() { - var failer test_helpers.AuthFailureHandler - - BeforeEach(func() { - failer = test_helpers.AuthFailureHandler{Message: "Helpful message"} - serverMux := http.NewServeMux() - serverMux.Handle("/apps/appGuid/containermetrics", failer) - testServer = httptest.NewServer(serverMux) - trafficControllerURL = "ws://" + testServer.Listener.Addr().String() - }) - - It("returns a helpful error message", func() { - - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("You are not authorized. Helpful message")) - Expect(err).To(BeAssignableToTypeOf(&errors.UnauthorizedError{})) - }) - }) - }) -}) diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/timeout_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/timeout_test.go deleted file mode 100644 index 142fe69a..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/timeout_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package consumer_test - -import ( - "net/http" - "net/http/httptest" - "strings" - "time" - - "github.com/cloudfoundry/noaa/consumer" - "github.com/cloudfoundry/noaa/consumer/internal" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -type nullHandler chan struct{} - -func (h nullHandler) ServeHTTP(http.ResponseWriter, *http.Request) { - <-h -} - -const ( - appGuid = "fakeAppGuid" - authToken = "fakeAuthToken" - testTimeout = 1 * time.Second -) - -var ( - cnsmr *consumer.Consumer - testServer *httptest.Server - fakeHandler nullHandler -) - -var _ = Describe("Timeout", func() { - AfterSuite(func() { - if testServer != nil { - testServer.Close() - } - }) - - BeforeEach(func() { - internal.Timeout = testTimeout - - fakeHandler = make(nullHandler, 1) - testServer = httptest.NewServer(fakeHandler) - }) - - AfterEach(func() { - cnsmr.Close() - }) - - Describe("TailingLogsWithoutReconnect", func() { - It("times out due to handshake timeout", func() { - defer close(fakeHandler) - cnsmr = consumer.New(strings.Replace(testServer.URL, "http", "ws", 1), nil, nil) - - _, errCh := cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) - var err error - Eventually(errCh, 2*testTimeout).Should(Receive(&err)) - Expect(err.Error()).To(ContainSubstring("i/o timeout")) - }) - }) - - Describe("Stream", func() { - It("times out due to handshake timeout", func() { - defer close(fakeHandler) - - cnsmr = consumer.New(strings.Replace(testServer.URL, "http", "ws", 1), nil, nil) - - _, errCh := cnsmr.Stream(appGuid, authToken) - var err error - Eventually(errCh, 2*testTimeout).Should(Receive(&err)) - Expect(err.Error()).To(ContainSubstring("i/o timeout")) - }) - }) - - Describe("RecentLogs", func() { - It("times out due to an unresponsive server", func() { - defer close(fakeHandler) - errs := make(chan error, 10) - cnsmr = consumer.New(strings.Replace(testServer.URL, "http", "ws", 1), nil, nil) - go func() { - _, err := cnsmr.RecentLogs("some-guid", "some-token") - errs <- err - }() - - var err error - Eventually(errs, 2*testTimeout).Should(Receive(&err)) - Expect(err).To(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/cloudfoundry/noaa/consumer/token_refresher_test.go b/vendor/github.com/cloudfoundry/noaa/consumer/token_refresher_test.go deleted file mode 100644 index 7168b1d7..00000000 --- a/vendor/github.com/cloudfoundry/noaa/consumer/token_refresher_test.go +++ /dev/null @@ -1,209 +0,0 @@ -package consumer_test - -import ( - "errors" - "net/http" - "net/http/httptest" - "time" - - "github.com/cloudfoundry/noaa/consumer" - - . "github.com/apoydence/eachers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("RefreshTokenFrom", func() { - Context("Asynchronous", func() { - var ( - cnsmr *consumer.Consumer - testHandler *errorRespondingHandler - tcURL string - refresher *mockTokenRefresher - ) - - BeforeEach(func() { - testHandler = &errorRespondingHandler{ - subHandler: NewWebsocketHandler(make(chan []byte), 100*time.Millisecond), - responseStatuses: make(chan int, 10), - } - server := httptest.NewServer(testHandler) - tcURL = "ws://" + server.Listener.Addr().String() - - refresher = newMockTokenRefresher() - cnsmr = consumer.New(tcURL, nil, nil) - - cnsmr.RefreshTokenFrom(refresher) - }) - - Describe("TailingLogs", func() { - It("loads a token if the provided token is empty", func() { - cnsmr.TailingLogs("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - testHandler.responseStatuses <- http.StatusUnauthorized - cnsmr.TailingLogs("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("returns any error when fetching the token from the refresher", func() { - errMsg := "Fetching authToken failed" - refresher.RefreshAuthTokenOutput.Token <- "" - refresher.RefreshAuthTokenOutput.AuthError <- errors.New(errMsg) - - _, errChan := cnsmr.TailingLogs("some-fake-app-guid", "") - Eventually(errChan).Should(Receive(MatchError(errMsg))) - }) - }) - - Describe("TailingLogsWithoutReconnect", func() { - It("loads a token if the provided token is empty", func() { - cnsmr.TailingLogsWithoutReconnect("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - testHandler.responseStatuses <- http.StatusUnauthorized - cnsmr.TailingLogsWithoutReconnect("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - }) - - Describe("StreamWithoutReconnect", func() { - It("loads a token if the provided token is empty", func() { - cnsmr.StreamWithoutReconnect("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - testHandler.responseStatuses <- http.StatusUnauthorized - cnsmr.StreamWithoutReconnect("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - }) - - Describe("Stream", func() { - It("loads a token if the provided token is empty", func() { - cnsmr.Stream("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - testHandler.responseStatuses <- http.StatusUnauthorized - cnsmr.Stream("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - }) - - Describe("FirehoseWithoutReconnect", func() { - It("loads a token if the provided token is empty", func() { - cnsmr.FirehoseWithoutReconnect("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - testHandler.responseStatuses <- http.StatusUnauthorized - cnsmr.FirehoseWithoutReconnect("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - }) - - Describe("Firehose", func() { - It("loads a token if the provided token is empty", func() { - cnsmr.Firehose("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - testHandler.responseStatuses <- http.StatusUnauthorized - cnsmr.Firehose("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - }) - }) - - Context("Synchronous", func() { - var ( - cnsmr *consumer.Consumer - statuses chan int - testHandler http.Handler - tcURL string - refresher *mockTokenRefresher - ) - - BeforeEach(func() { - statuses = make(chan int, 10) - testHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - select { - case status := <-statuses: - w.WriteHeader(status) - default: - w.WriteHeader(http.StatusOK) - } - }) - server := httptest.NewServer(testHandler) - tcURL = "ws://" + server.Listener.Addr().String() - - refresher = newMockTokenRefresher() - refresher.RefreshAuthTokenOutput.Token <- "some-example-token" - refresher.RefreshAuthTokenOutput.AuthError <- nil - - cnsmr = consumer.New(tcURL, nil, nil) - - cnsmr.RefreshTokenFrom(refresher) - }) - - Describe("RecentLogs", func() { - It("uses the token refresher to obtain a new token", func() { - cnsmr.RecentLogs("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - statuses <- http.StatusUnauthorized - cnsmr.RecentLogs("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - }) - - Describe("ContainerMetrics", func() { - It("uses the token refresher to obtain a new token", func() { - cnsmr.ContainerMetrics("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - - It("loads a token if the provided token fails with 401", func() { - statuses <- http.StatusUnauthorized - cnsmr.ContainerMetrics("some-fake-app-guid", "") - Eventually(refresher.RefreshAuthTokenCalled).Should(BeCalled()) - }) - }) - }) - - It("does not use the token refresher if an auth token is valid", func() { - refresher := newMockTokenRefresher() - - cnsmr := consumer.New("fakeTrafficControllerURL", nil, nil) - - cnsmr.RefreshTokenFrom(refresher) - - cnsmr.TailingLogs("some-fake-app-guid", "someToken") - Consistently(refresher.RefreshAuthTokenCalled).ShouldNot(BeCalled()) - }) -}) - -type errorRespondingHandler struct { - subHandler http.Handler - responseStatuses chan int -} - -func (h *errorRespondingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - select { - case status := <-h.responseStatuses: - w.WriteHeader(status) - default: - h.subHandler.ServeHTTP(w, r) - } -} diff --git a/vendor/github.com/cloudfoundry/noaa/noaa_suite_test.go b/vendor/github.com/cloudfoundry/noaa/noaa_suite_test.go deleted file mode 100644 index 22b5e0c8..00000000 --- a/vendor/github.com/cloudfoundry/noaa/noaa_suite_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package noaa_test - -import ( - "github.com/cloudfoundry/sonde-go/events" - "github.com/gogo/protobuf/proto" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestNoaa(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Noaa Suite") -} - -func createLogMessage(message string, timestamp int64) *events.LogMessage { - return &events.LogMessage{ - Message: []byte(message), - MessageType: events.LogMessage_OUT.Enum(), - AppId: proto.String("my-app-guid"), - SourceType: proto.String("DEA"), - Timestamp: proto.Int64(timestamp), - } -} diff --git a/vendor/github.com/cloudfoundry/noaa/samples/app_logs/main.go b/vendor/github.com/cloudfoundry/noaa/samples/app_logs/main.go deleted file mode 100644 index 20d70c78..00000000 --- a/vendor/github.com/cloudfoundry/noaa/samples/app_logs/main.go +++ /dev/null @@ -1,51 +0,0 @@ -package main - -import ( - "crypto/tls" - "fmt" - "os" - - "github.com/cloudfoundry/noaa/consumer" -) - -var ( - dopplerAddress = os.Getenv("DOPPLER_ADDR") - appGuid = os.Getenv("APP_GUID") - authToken = os.Getenv("CF_ACCESS_TOKEN") -) - -func main() { - consumer := consumer.New(dopplerAddress, &tls.Config{InsecureSkipVerify: true}, nil) - consumer.SetDebugPrinter(ConsoleDebugPrinter{}) - - messages, err := consumer.RecentLogs(appGuid, authToken) - - if err != nil { - fmt.Printf("===== Error getting recent messages: %v\n", err) - } else { - fmt.Println("===== Recent logs") - for _, msg := range messages { - fmt.Println(msg) - } - } - - fmt.Println("===== Streaming metrics") - msgChan, errorChan := consumer.Stream(appGuid, authToken) - - go func() { - for err := range errorChan { - fmt.Fprintf(os.Stderr, "%v\n", err.Error()) - } - }() - - for msg := range msgChan { - fmt.Printf("%v \n", msg) - } -} - -type ConsoleDebugPrinter struct{} - -func (c ConsoleDebugPrinter) Print(title, dump string) { - println(title) - println(dump) -} diff --git a/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/README.md b/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/README.md deleted file mode 100644 index 288a336e..00000000 --- a/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Container Metrics Sample - -## Overview - -We can use Dropsonde to send container metrics to metron which will emit them -to Doppler; which is then polled by trafficcontroller. The endpoint on the -trafficcontroller should report the latest container metric for each instance -of the specified app. - -`samples/container_metrics/consumer/main.go` connects to the trafficcontroller -and polls the container metrics endpoint. - -`samples/container_metrics/emitter/main.go` is a sample app that emits container -metrics to metron using the dropsonde library. - -## To see containter metrics: - -1. Push an app: - - cf push some-app - -1. Export the app's guid as an environment variable: - - export APP_GUID=$(cf app some-app --guid) - -1. Take note of the app GUID, you will need it later: - - echo $APP_GUID - -1. Set the doppler address as an environment variable: - - export DOPPLER_ADDR="wss://your-doppler.example.com/" - -1. Export your access token: - - export CF_ACCESS_TOKEN=$(cf oauth-token | grep bear) - -1. Start the consumer: - - go run samples/container_metrics/consumer/main.go - -1. Now build the emitter in a new terminal window. Make sure your $GOPATH is - set and run: - - GOOS=linux go build -o bin/emitter samples/container_metrics/emitter/main.go - -1. Move the emitter executable onto a machine with metron running inside your - cf deployment: - - scp bin/emitter vcap@bosh.example.com:emitter - ssh -A vcap@bosh.example.com - -1. You can get a VM IP by doing `bosh vms` and selecting an IP: - - scp emitter vcap@some.vm.ip:emitter - ssh vcap@some.vm.ip - export APP_GUID="YOUR-APP-GUID" - ./emitter - -1. You should now see metrics appearing in the listener window. - -### Things to look for: - -1. The diskBytes value should be increasing. -1. The diskBytes value should be skipping some numbers, this is b/c we are - listening on a three second window, but publishing on a one second window - and are only returning the most recent result. -1. There should be only entries for the applicationId you entered with multiple - instance indexes. diff --git a/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/consumer/main.go b/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/consumer/main.go deleted file mode 100644 index 5ac61047..00000000 --- a/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/consumer/main.go +++ /dev/null @@ -1,45 +0,0 @@ -package main - -import ( - "crypto/tls" - "fmt" - "os" - "time" - - "github.com/cloudfoundry/noaa/consumer" -) - -var ( - dopplerAddress = os.Getenv("DOPPLER_ADDR") - appId = os.Getenv("APP_GUID") - authToken = os.Getenv("CF_ACCESS_TOKEN") -) - -func main() { - consumer := consumer.New(dopplerAddress, &tls.Config{InsecureSkipVerify: true}, nil) - consumer.SetDebugPrinter(ConsoleDebugPrinter{}) - - fmt.Println("===== Streaming ContainerMetrics (will only succeed if you have admin credentials)") - - for { - containerMetrics, err := consumer.ContainerMetrics(appId, authToken) - - for _, cm := range containerMetrics { - fmt.Printf("%v \n", cm) - } - - if err != nil { - fmt.Fprintf(os.Stderr, "%v\n", err.Error()) - } - - time.Sleep(3 * time.Second) - } - -} - -type ConsoleDebugPrinter struct{} - -func (c ConsoleDebugPrinter) Print(title, dump string) { - println(title) - println(dump) -} diff --git a/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/emitter/main.go b/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/emitter/main.go deleted file mode 100644 index ffd9fe37..00000000 --- a/vendor/github.com/cloudfoundry/noaa/samples/container_metrics/emitter/main.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "os" - "time" - - "github.com/cloudfoundry/dropsonde" - "github.com/cloudfoundry/dropsonde/metrics" -) - -var ( - appId = os.Getenv("APP_GUID") - metronAddr = defaultEnv("METRON_ADDR", "localhost:3457") -) - -func main() { - err := dropsonde.Initialize(metronAddr, "METRIC-TEST", "z1", "0") - if err != nil { - println(err.Error()) - } - - for i := uint64(0); ; i++ { - println("emitting metric at counter: ", i) - metrics.SendContainerMetric(appId, 0, 42.42, 1234, i) - metrics.SendContainerMetric(appId, 1, 11.41, 1234, i) - metrics.SendContainerMetric(appId, 2, 11.41, 1234, i) - metrics.SendContainerMetric("donotseethis", 2, 11.41, 1234, i) - time.Sleep(1 * time.Second) - } -} - -func defaultEnv(key, fallback string) string { - val := os.Getenv(key) - if val == "" { - return fallback - } - return val -} diff --git a/vendor/github.com/cloudfoundry/noaa/samples/firehose/main.go b/vendor/github.com/cloudfoundry/noaa/samples/firehose/main.go deleted file mode 100644 index e45787aa..00000000 --- a/vendor/github.com/cloudfoundry/noaa/samples/firehose/main.go +++ /dev/null @@ -1,59 +0,0 @@ -package main - -import ( - "crypto/tls" - "flag" - "fmt" - "os" - - "github.com/cloudfoundry/noaa/consumer" - "github.com/cloudfoundry/sonde-go/events" -) - -const firehoseSubscriptionId = "firehose-a" - -var ( - dopplerAddress = os.Getenv("DOPPLER_ADDR") - authToken = os.Getenv("CF_ACCESS_TOKEN") -) - -func main() { - filterType := flag.String("filter", "all", "filter messages by 'logs' or 'metrics' (default: all)") - flag.Parse() - - cnsmr := consumer.New(dopplerAddress, &tls.Config{InsecureSkipVerify: true}, nil) - cnsmr.SetDebugPrinter(ConsoleDebugPrinter{}) - - fmt.Println("===== Streaming Firehose (will only succeed if you have admin credentials)") - - var ( - msgChan <-chan *events.Envelope - errorChan <-chan error - ) - - switch *filterType { - case "logs": - msgChan, errorChan = cnsmr.FilteredFirehose(firehoseSubscriptionId, authToken, consumer.LogMessages) - case "metrics": - msgChan, errorChan = cnsmr.FilteredFirehose(firehoseSubscriptionId, authToken, consumer.Metrics) - default: - msgChan, errorChan = cnsmr.Firehose(firehoseSubscriptionId, authToken) - } - - go func() { - for err := range errorChan { - fmt.Fprintf(os.Stderr, "%v\n", err.Error()) - } - }() - - for msg := range msgChan { - fmt.Printf("%v \n", msg) - } -} - -type ConsoleDebugPrinter struct{} - -func (c ConsoleDebugPrinter) Print(title, dump string) { - println(title) - println(dump) -} diff --git a/vendor/github.com/cloudfoundry/noaa/samples/token_refresher/main.go b/vendor/github.com/cloudfoundry/noaa/samples/token_refresher/main.go deleted file mode 100644 index efce056a..00000000 --- a/vendor/github.com/cloudfoundry/noaa/samples/token_refresher/main.go +++ /dev/null @@ -1,65 +0,0 @@ -package main - -import ( - "crypto/tls" - "fmt" - "os" - - "github.com/cloudfoundry-incubator/uaago" - "github.com/cloudfoundry/noaa/consumer" -) - -var ( - dopplerAddress = os.Getenv("DOPPLER_ADDR") - appGuid = os.Getenv("APP_GUID") - clientName = os.Getenv("UAA_CLIENT_NAME") - clientSecret = os.Getenv("UAA_CLIENT_SECRET") - uaaEndpoint = os.Getenv("UAA_ENDPOINT") -) - -func main() { - - uaa, err := uaago.NewClient(uaaEndpoint) - if err != nil { - fmt.Printf("Error from uaaClient %s\n", err) - os.Exit(1) - } - - refresher := tokenRefresher{uaaClient: uaa} - - consumer := consumer.New(dopplerAddress, &tls.Config{InsecureSkipVerify: true}, nil) - consumer.RefreshTokenFrom(&refresher) - consumer.SetDebugPrinter(ConsoleDebugPrinter{}) - - fmt.Println("===== Streaming metrics") - msgChan, errorChan := consumer.Firehose(appGuid, "") - - go func() { - for err := range errorChan { - fmt.Fprintf(os.Stderr, "%v\n", err.Error()) - } - }() - - for msg := range msgChan { - fmt.Printf("%v \n", msg) - } -} - -type ConsoleDebugPrinter struct{} - -func (c ConsoleDebugPrinter) Print(title, dump string) { - println(title) - println(dump) -} - -type tokenRefresher struct { - uaaClient *uaago.Client -} - -func (t *tokenRefresher) RefreshAuthToken() (string, error) { - token, err := t.uaaClient.GetAuthToken(clientName, clientSecret, true) - if err != nil { - return "", err - } - return token, nil -} diff --git a/vendor/github.com/cloudfoundry/noaa/sort_container_metrics_test.go b/vendor/github.com/cloudfoundry/noaa/sort_container_metrics_test.go deleted file mode 100644 index 8d000b94..00000000 --- a/vendor/github.com/cloudfoundry/noaa/sort_container_metrics_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package noaa_test - -import ( - "github.com/cloudfoundry/noaa" - "github.com/cloudfoundry/sonde-go/events" - "github.com/gogo/protobuf/proto" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("SortContainerMetrics", func() { - var messages []*events.ContainerMetric - - BeforeEach(func() { - messages = []*events.ContainerMetric{ - &events.ContainerMetric{ - ApplicationId: proto.String("appId"), - InstanceIndex: proto.Int32(2), - }, - &events.ContainerMetric{ - ApplicationId: proto.String("appId"), - InstanceIndex: proto.Int32(1), - }, - } - }) - - It("sorts container metrics by instance index", func() { - sortedMessages := noaa.SortContainerMetrics(messages) - - Expect(sortedMessages[0].GetInstanceIndex()).To(Equal(int32(1))) - Expect(sortedMessages[1].GetInstanceIndex()).To(Equal(int32(2))) - }) -}) diff --git a/vendor/github.com/cloudfoundry/noaa/sort_recent_test.go b/vendor/github.com/cloudfoundry/noaa/sort_recent_test.go deleted file mode 100644 index ec539bcf..00000000 --- a/vendor/github.com/cloudfoundry/noaa/sort_recent_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package noaa_test - -import ( - "github.com/cloudfoundry/noaa" - "github.com/cloudfoundry/sonde-go/events" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("SortRecent", func() { - var messages []*events.LogMessage - - BeforeEach(func() { - messages = []*events.LogMessage{createLogMessage("hello", 2), createLogMessage("konnichiha", 1)} - }) - - It("sorts messages", func() { - sortedMessages := noaa.SortRecent(messages) - - Expect(*sortedMessages[0].Timestamp).To(Equal(int64(1))) - Expect(*sortedMessages[1].Timestamp).To(Equal(int64(2))) - }) - - It("sorts using a stable algorithm", func() { - messages = append(messages, createLogMessage("guten tag", 1)) - - sortedMessages := noaa.SortRecent(messages) - - Expect(sortedMessages[0].GetMessage()).To(Equal([]byte("konnichiha"))) - Expect(sortedMessages[1].GetMessage()).To(Equal([]byte("guten tag"))) - Expect(sortedMessages[2].GetMessage()).To(Equal([]byte("hello"))) - }) -}) diff --git a/vendor/github.com/cloudfoundry/noaa/test_helpers/auth_failure.go b/vendor/github.com/cloudfoundry/noaa/test_helpers/auth_failure.go deleted file mode 100644 index 7c7e6366..00000000 --- a/vendor/github.com/cloudfoundry/noaa/test_helpers/auth_failure.go +++ /dev/null @@ -1,16 +0,0 @@ -package test_helpers - -import ( - "fmt" - "net/http" -) - -type AuthFailureHandler struct { - Message string -} - -func (failer AuthFailureHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - rw.Header().Set("WWW-Authenticate", "Basic") - rw.WriteHeader(http.StatusUnauthorized) - fmt.Fprintf(rw, "You are not authorized. %s", failer.Message) -} diff --git a/vendor/github.com/cloudfoundry/noaa/test_helpers/fake_debug_printer.go b/vendor/github.com/cloudfoundry/noaa/test_helpers/fake_debug_printer.go deleted file mode 100644 index 1961f9f0..00000000 --- a/vendor/github.com/cloudfoundry/noaa/test_helpers/fake_debug_printer.go +++ /dev/null @@ -1,14 +0,0 @@ -package test_helpers - -type FakeDebugPrinter struct { - Messages []*fakeDebugPrinterMessage -} - -type fakeDebugPrinterMessage struct { - Title, Body string -} - -func (p *FakeDebugPrinter) Print(title, body string) { - message := &fakeDebugPrinterMessage{title, body} - p.Messages = append(p.Messages, message) -} diff --git a/vendor/github.com/cloudfoundry/noaa/test_helpers/fake_handler.go b/vendor/github.com/cloudfoundry/noaa/test_helpers/fake_handler.go deleted file mode 100644 index 8511ae69..00000000 --- a/vendor/github.com/cloudfoundry/noaa/test_helpers/fake_handler.go +++ /dev/null @@ -1,83 +0,0 @@ -package test_helpers - -import ( - "net/http" - "sync" -) - -type FakeHandler struct { - GenerateHandler func(chan []byte) http.Handler - InputChan chan []byte - Fail bool - ContentLen string - called bool - lastURL string - authHeader string - sync.RWMutex -} - -func (fh *FakeHandler) GetAuthHeader() string { - fh.RLock() - defer fh.RUnlock() - return fh.authHeader -} - -func (fh *FakeHandler) SetAuthHeader(authHeader string) { - fh.Lock() - defer fh.Unlock() - fh.authHeader = authHeader -} - -func (fh *FakeHandler) GetLastURL() string { - fh.RLock() - defer fh.RUnlock() - return fh.lastURL -} - -func (fh *FakeHandler) SetLastURL(url string) { - fh.Lock() - defer fh.Unlock() - fh.lastURL = url -} - -func (fh *FakeHandler) Call() { - fh.Lock() - defer fh.Unlock() - fh.called = true -} - -func (fh *FakeHandler) WasCalled() bool { - fh.RLock() - defer fh.RUnlock() - return fh.called -} - -func (fh *FakeHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - fh.SetLastURL(r.URL.String()) - fh.SetAuthHeader(r.Header.Get("Authorization")) - fh.Call() - if len(fh.ContentLen) > 0 { - rw.Header().Set("Content-Length", fh.ContentLen) - } - - if fh.Fail { - return - } - - fh.RLock() - defer fh.RUnlock() - handler := fh.GenerateHandler(fh.InputChan) - handler.ServeHTTP(rw, r) -} - -func (fh *FakeHandler) Close() { - close(fh.InputChan) -} - -func (fh *FakeHandler) Reset() { - fh.Lock() - defer fh.Unlock() - - fh.InputChan = make(chan []byte) - fh.called = false -} diff --git a/vendor/github.com/cloudfoundry/sonde-go/.gitignore b/vendor/github.com/cloudfoundry/sonde-go/.gitignore deleted file mode 100644 index daf913b1..00000000 --- a/vendor/github.com/cloudfoundry/sonde-go/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# 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/cloudfoundry/sonde-go/.gitmodules b/vendor/github.com/cloudfoundry/sonde-go/.gitmodules deleted file mode 100644 index 45c36047..00000000 --- a/vendor/github.com/cloudfoundry/sonde-go/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "definitions"] - path = definitions - url = https://github.com/cloudfoundry/dropsonde-protocol.git - branch = master diff --git a/vendor/github.com/cloudfoundry/sonde-go/README.md b/vendor/github.com/cloudfoundry/sonde-go/README.md deleted file mode 100644 index 5b52f425..00000000 --- a/vendor/github.com/cloudfoundry/sonde-go/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# sonde-go -Go implementation of Cloud Foundry's Dropsonde Protocol - -## Libraries sharing this protocol - -* [Dropsonde](https://github.com/cloudfoundry/dropsonde) is a Go library for applications that wish to emit messages in this format. -* [NOAA](https://github.com/cloudfoundry/noaa) is a library (also in Go) for applications that wish to consume messages from the Cloud Foundry [metric system](https://github.com/cloudfoundry/loggregator). - -## Generating Code - -1. Install [protobuf](https://github.com/google/protobuf) Version 3 because of our [dropsonde-protocol dependency](https://github.com/cloudfoundry/dropsonde-protocol#generating-code). - - ```bash - # Currently, the command below installs v3.X - brew install protobuf --devel - ``` -1. Generate go code - ```bash - ./generate-go.sh - ``` - -Code will be generated within this directory using the proto files from [Dropsonde Protocol](https://github.com/cloudfoundry/dropsonde-protocol). For other languages, message documentation, and communication protocols, reference [Dropsonde Protocol](https://github.com/cloudfoundry/dropsonde-protocol). diff --git a/vendor/github.com/cloudfoundry/sonde-go/doc.go b/vendor/github.com/cloudfoundry/sonde-go/doc.go deleted file mode 100644 index c53956e0..00000000 --- a/vendor/github.com/cloudfoundry/sonde-go/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -//Go implementation of Cloud Foundry's Dropsonde Protocol -package sonde diff --git a/vendor/github.com/cloudfoundry/sonde-go/generate-go.sh b/vendor/github.com/cloudfoundry/sonde-go/generate-go.sh deleted file mode 100755 index 8a3f6ba4..00000000 --- a/vendor/github.com/cloudfoundry/sonde-go/generate-go.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -dir_resolve() -{ - cd "$1" 2>/dev/null || return $? # cd to desired directory; if fail, quell any error messages but return exit status - echo "`pwd -P`" # output full, link-resolved path -} - -set -e - -TARGET=`dirname $0` -TARGET=`dir_resolve $TARGET` -cd $TARGET - -go get github.com/gogo/protobuf/{proto,protoc-gen-gogo,gogoproto} - -rm -rf generate-go-tmp -mkdir -p generate-go-tmp/events - -mkdir -p events -for i in $(ls definitions/events/*.proto); do - cp go/go_preamble.proto generate-go-tmp/events/`basename $i` - cat $i >> generate-go-tmp/events/`basename $i` -done - -pushd generate-go-tmp/events > /dev/null -protoc --plugin=$(which protoc-gen-gogo) --gogo_out=$TARGET/events --proto_path=$GOPATH/src:$GOPATH/src/github.com/gogo/protobuf/protobuf:. *.proto -popd > /dev/null - -rm -r generate-go-tmp - diff --git a/vendor/github.com/cloudfoundry/sonde-go/go/go_preamble.proto b/vendor/github.com/cloudfoundry/sonde-go/go/go_preamble.proto deleted file mode 100644 index 037105c1..00000000 --- a/vendor/github.com/cloudfoundry/sonde-go/go/go_preamble.proto +++ /dev/null @@ -1,5 +0,0 @@ -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; diff --git a/vendor/github.com/gogo/protobuf/.gitignore b/vendor/github.com/gogo/protobuf/.gitignore deleted file mode 100644 index ea050e9b..00000000 --- a/vendor/github.com/gogo/protobuf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -._* diff --git a/vendor/github.com/gogo/protobuf/.mailmap b/vendor/github.com/gogo/protobuf/.mailmap deleted file mode 100644 index bc001021..00000000 --- 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 5cebf109..00000000 --- a/vendor/github.com/gogo/protobuf/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -env: - - PROTOBUF_VERSION=2.5.0 - - PROTOBUF_VERSION=2.6.1 - - PROTOBUF_VERSION=3.0.0-beta-2 - -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 [ "$TRAVIS_GO_VERSION" == 1.6 ] && [[ "$PROTOBUF_VERSION" == 3.0.0* ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi - -language: go - -go: - - 1.3.3 - - 1.4.2 - - 1.5.3 - - 1.6 diff --git a/vendor/github.com/gogo/protobuf/Makefile b/vendor/github.com/gogo/protobuf/Makefile deleted file mode 100644 index 97e0ccc6..00000000 --- a/vendor/github.com/gogo/protobuf/Makefile +++ /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. - -.PHONY: nuke regenerate tests clean install gofmt vet contributors - -all: clean install regenerate install tests errcheck vet - -buildserverall: clean install regenerate install tests vet - -install: - go install ./proto - go install ./gogoproto - go install ./jsonpb - go install ./protoc-gen-gogo - go install ./protoc-gen-gofast - go install ./protoc-gen-gogofast - go install ./protoc-gen-gogofaster - go install ./protoc-gen-gogoslick - go install ./protoc-min-version - go install ./protoc-gen-combo - -clean: - go clean ./... - -nuke: - go clean -i ./... - -gofmt: - gofmt -l -s -w . - -regenerate: - make -C protoc-gen-gogo/descriptor regenerate - make -C protoc-gen-gogo/plugin regenerate - make -C protoc-gen-gogo/testdata regenerate - make -C gogoproto regenerate - make -C proto/testdata regenerate - make -C jsonpb/jsonpb_test_proto regenerate - make -C test regenerate - make -C test/example regenerate - make -C test/unrecognized regenerate - make -C test/group regenerate - make -C test/unrecognizedgroup regenerate - make -C test/enumstringer regenerate - make -C test/unmarshalmerge regenerate - make -C test/moredefaults regenerate - make -C test/issue8 regenerate - make -C test/enumprefix regenerate - make -C test/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/mapsproto2 regenerate - make -C test/issue42order regenerate - make -C proto generate-test-pbs - make -C test/importdedup regenerate - make -C test/custombytesnonstruct regenerate - make -C test/required regenerate - make -C test/casttype regenerate - make -C test/castvalue regenerate - make -C vanity/test regenerate - make -C test/sizeunderscore regenerate - make -C test/issue34 regenerate - make -C test/empty-issue70 regenerate - make -C test/indeximport-issue72 regenerate - make -C test/fuzztests regenerate - make -C test/oneofembed regenerate - make -C test/asymetric-issue125 regenerate - make -C test/filedotname regenerate - make -C test/nopackage regenerate - make gofmt - -tests: - go build ./test/enumprefix - go test ./... - -vet: - go vet ./... - go tool vet --shadow . - -errcheck: - go get -u github.com/kisielk/errcheck - errcheck ./test/... - -drone: - sudo apt-get install protobuf-compiler - (cd $(GOPATH)/src/github.com/gogo/protobuf && make buildserverall) - -testall: - make -C protoc-gen-gogo/testdata test - make -C vanity/test test - make tests - -bench: - (cd test/mixbench && go build .) - (cd test/mixbench && ./mixbench) - -contributors: - git log --format='%aN <%aE>' | sort -fu > CONTRIBUTORS - - diff --git a/vendor/github.com/gogo/protobuf/README b/vendor/github.com/gogo/protobuf/README deleted file mode 100644 index b4accc0c..00000000 --- a/vendor/github.com/gogo/protobuf/README +++ /dev/null @@ -1,214 +0,0 @@ -GoGoProtobuf http://github.com/gogo/protobuf extends -GoProtobuf http://github.com/golang/protobuf - -# Go support for Protocol Buffers - -Google's data interchange format. -Copyright 2010 The Go Authors. -https://github.com/golang/protobuf - -This package and the code it generates requires at least Go 1.4. - -This software implements Go bindings for protocol buffers. For -information about protocol buffers themselves, see - https://developers.google.com/protocol-buffers/ - -## Installation ## - -To use this software, you must: -- Install the standard C++ implementation of protocol buffers from - https://developers.google.com/protocol-buffers/ -- Of course, install the Go compiler and tools from - https://golang.org/ - See - https://golang.org/doc/install - for details or, if you are using gccgo, follow the instructions at - https://golang.org/doc/install/gccgo -- Grab the code from the repository and install the proto package. - The simplest way is to run `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`. - The compiler plugin, protoc-gen-go, will be installed in $GOBIN, - defaulting to $GOPATH/bin. It must be in your $PATH for the protocol - compiler, protoc, to find it. - -This software has two parts: a 'protocol compiler plugin' that -generates Go source files that, once compiled, can access and manage -protocol buffers; and a library that implements run-time support for -encoding (marshaling), decoding (unmarshaling), and accessing protocol -buffers. - -There is support for gRPC in Go using protocol buffers. -See the note at the bottom of this file for details. - -There are no insertion points in the plugin. - -GoGoProtobuf provides extensions for protocol buffers and GoProtobuf -see http://github.com/gogo/protobuf/gogoproto/doc.go - -## Using protocol buffers with Go ## - -Once the software is installed, there are two steps to using it. -First you must compile the protocol buffer definitions and then import -them, with the support library, into your program. - -To compile the protocol buffer definition, run protoc with the --gogo_out -parameter set to the directory you want to output the Go code to. - - protoc --gogo_out=. *.proto - -The generated files will be suffixed .pb.go. See the Test code below -for an example using such a file. - -The package comment for the proto library contains text describing -the interface provided in Go for protocol buffers. Here is an edited -version. - -If you are using any gogo.proto extensions you will need to specify the -proto_path to include the descriptor.proto and gogo.proto. -gogo.proto is located in github.com/gogo/protobuf/gogoproto -This should be fine, since your import is the same. -descriptor.proto is located in either github.com/gogo/protobuf/protobuf -or code.google.com/p/protobuf/trunk/src/ -Its import is google/protobuf/descriptor.proto so it might need some help. - - protoc --gogo_out=. -I=.:github.com/gogo/protobuf/protobuf *.proto - -========== - -The proto package converts data structures to and from the -wire format of protocol buffers. It works in concert with the -Go source code generated for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - Helpers for getting values are superseded by the - GetFoo methods and their use is deprecated. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed with the enum's type name. Enum types have - a String method, and a Enum method to assist in message construction. - - Nested groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -When the .proto file specifies `syntax="proto3"`, there are some differences: - - - Non-repeated fields of non-message type are values instead of pointers. - - Getters are only generated for message and oneof fields. - - Enum types do not get an Enum method. - -Consider file test.proto, containing - -```proto - 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 - -## 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 293da37b..00000000 --- a/vendor/github.com/gogo/protobuf/Readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# Protocol Buffers for Go with Gadgets - -Travis CI Matrix Builds: [![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf) - -### Getting Started (Give me the speed I don't care about the rest) - -Install the protoc-gen-gofast binary - - go get github.com/gogo/protobuf/protoc-gen-gofast - -Use it to generate faster marshaling and unmarshaling go code for your protocol buffers. - - protoc --gofast_out=. myproto.proto - -### Getting started (I have heard about fields without pointers and more code generation) - -Other binaries are also included: - - protoc-gen-gogofast (same as gofast, but imports gogoprotobuf) - protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields) - protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods) - -### Getting started (I want more customization power over fields, speed, other serialization formats and tests, etc.) - -Please visit the [homepage](http://gogo.github.io) for more documentation. - -### Installation - -To install it, you must first have Go (at least version 1.3.3) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). Go 1.3.3, 1.4.2, 1.5.3 and 1.6 are continiuosly tested. - -Next, install the standard protocol buffer implementation from [https://github.com/google/protobuf](https://github.com/google/protobuf). -Most versions from 2.3.1 should not give any problems, but 2.5.0, 2.6.1 and 3 alpha are continuously tested. - -Finally run: - - go get github.com/gogo/protobuf/proto - go get github.com/gogo/protobuf/protoc-gen-gogo - go get github.com/gogo/protobuf/gogoproto - -### Proto3 - -Proto3 is supported, but most of the new native types are not supported yet. -[See Proto3 Issue](https://github.com/gogo/protobuf/issues/57) for more details. - -### GRPC - -It works the same as golang/protobuf, simply specify the plugin. -Here is an example using gofast: - - protoc --gofast_out=plugins=grpc:. my.proto diff --git a/vendor/github.com/gogo/protobuf/codec/codec.go b/vendor/github.com/gogo/protobuf/codec/codec.go deleted file mode 100644 index 91d10fe7..00000000 --- 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 de2c9bc4..00000000 --- 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/install-protobuf.sh b/vendor/github.com/gogo/protobuf/install-protobuf.sh deleted file mode 100755 index 10c9320e..00000000 --- a/vendor/github.com/gogo/protobuf/install-protobuf.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -die() { - echo "$@" >&2 - exit 1 -} - -case "$PROTOBUF_VERSION" in -2*) - basename=protobuf-$PROTOBUF_VERSION - ;; -3*) - basename=protobuf-cpp-$PROTOBUF_VERSION - ;; -*) - die "unknown protobuf version: $PROTOBUF_VERSION" - ;; -esac - -cd /home/travis - -wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz -tar xzf $basename.tar.gz - -cd protobuf-$PROTOBUF_VERSION - -./configure --prefix=/home/travis && make -j2 && make install diff --git a/vendor/github.com/gogo/protobuf/io/full.go b/vendor/github.com/gogo/protobuf/io/full.go deleted file mode 100644 index 550726a3..00000000 --- a/vendor/github.com/gogo/protobuf/io/full.go +++ /dev/null @@ -1,102 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "github.com/gogo/protobuf/proto" - "io" -) - -func NewFullWriter(w io.Writer) WriteCloser { - return &fullWriter{w, nil} -} - -type fullWriter struct { - w io.Writer - buffer []byte -} - -func (this *fullWriter) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n, ok := getSize(m) - if !ok { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - _, err = this.w.Write(data) - return err -} - -func (this *fullWriter) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -type fullReader struct { - r io.Reader - buf []byte -} - -func NewFullReader(r io.Reader, maxSize int) ReadCloser { - return &fullReader{r, make([]byte, maxSize)} -} - -func (this *fullReader) ReadMsg(msg proto.Message) error { - length, err := this.r.Read(this.buf) - if err != nil { - return err - } - return proto.Unmarshal(this.buf[:length], msg) -} - -func (this *fullReader) Close() error { - if closer, ok := this.r.(io.Closer); ok { - return closer.Close() - } - return nil -} diff --git a/vendor/github.com/gogo/protobuf/io/io.go b/vendor/github.com/gogo/protobuf/io/io.go deleted file mode 100644 index 6dca519a..00000000 --- a/vendor/github.com/gogo/protobuf/io/io.go +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "github.com/gogo/protobuf/proto" - "io" -) - -type Writer interface { - WriteMsg(proto.Message) error -} - -type WriteCloser interface { - Writer - io.Closer -} - -type Reader interface { - ReadMsg(msg proto.Message) error -} - -type ReadCloser interface { - Reader - io.Closer -} - -type marshaler interface { - MarshalTo(data []byte) (n int, err error) -} - -func getSize(v interface{}) (int, bool) { - if sz, ok := v.(interface { - Size() (n int) - }); ok { - return sz.Size(), true - } else if sz, ok := v.(interface { - ProtoSize() (n int) - }); ok { - return sz.ProtoSize(), true - } else { - return 0, false - } -} diff --git a/vendor/github.com/gogo/protobuf/io/io_test.go b/vendor/github.com/gogo/protobuf/io/io_test.go deleted file mode 100644 index 0b74b310..00000000 --- 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.go b/vendor/github.com/gogo/protobuf/io/uint32.go deleted file mode 100644 index c3dad1ae..00000000 --- a/vendor/github.com/gogo/protobuf/io/uint32.go +++ /dev/null @@ -1,126 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "encoding/binary" - "github.com/gogo/protobuf/proto" - "io" -) - -func NewUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder) WriteCloser { - return &uint32Writer{w, byteOrder, nil} -} - -func NewSizeUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder, size int) WriteCloser { - return &uint32Writer{w, byteOrder, make([]byte, size)} -} - -type uint32Writer struct { - w io.Writer - byteOrder binary.ByteOrder - buffer []byte -} - -func (this *uint32Writer) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n, ok := getSize(m) - if !ok { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - length := uint32(len(data)) - if err = binary.Write(this.w, this.byteOrder, &length); err != nil { - return err - } - _, err = this.w.Write(data) - return err -} - -func (this *uint32Writer) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -type uint32Reader struct { - r io.Reader - byteOrder binary.ByteOrder - lenBuf []byte - buf []byte - maxSize int -} - -func NewUint32DelimitedReader(r io.Reader, byteOrder binary.ByteOrder, maxSize int) ReadCloser { - return &uint32Reader{r, byteOrder, make([]byte, 4), nil, maxSize} -} - -func (this *uint32Reader) ReadMsg(msg proto.Message) error { - if _, err := io.ReadFull(this.r, this.lenBuf); err != nil { - return err - } - length32 := this.byteOrder.Uint32(this.lenBuf) - length := int(length32) - if length < 0 || length > this.maxSize { - return io.ErrShortBuffer - } - if length >= len(this.buf) { - this.buf = make([]byte, length) - } - _, err := io.ReadFull(this.r, this.buf[:length]) - if err != nil { - return err - } - return proto.Unmarshal(this.buf[:length], msg) -} - -func (this *uint32Reader) Close() error { - if closer, ok := this.r.(io.Closer); ok { - return closer.Close() - } - return nil -} diff --git a/vendor/github.com/gogo/protobuf/io/varint.go b/vendor/github.com/gogo/protobuf/io/varint.go deleted file mode 100644 index a72e14a5..00000000 --- a/vendor/github.com/gogo/protobuf/io/varint.go +++ /dev/null @@ -1,134 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package io - -import ( - "bufio" - "encoding/binary" - "errors" - "github.com/gogo/protobuf/proto" - "io" -) - -var ( - errSmallBuffer = errors.New("Buffer Too Small") - errLargeValue = errors.New("Value is Larger than 64 bits") -) - -func NewDelimitedWriter(w io.Writer) WriteCloser { - return &varintWriter{w, make([]byte, 10), nil} -} - -type varintWriter struct { - w io.Writer - lenBuf []byte - buffer []byte -} - -func (this *varintWriter) WriteMsg(msg proto.Message) (err error) { - var data []byte - if m, ok := msg.(marshaler); ok { - n, ok := getSize(m) - if !ok { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - if n >= len(this.buffer) { - this.buffer = make([]byte, n) - } - _, err = m.MarshalTo(this.buffer) - if err != nil { - return err - } - data = this.buffer[:n] - } else { - data, err = proto.Marshal(msg) - if err != nil { - return err - } - } - length := uint64(len(data)) - n := binary.PutUvarint(this.lenBuf, length) - _, err = this.w.Write(this.lenBuf[:n]) - if err != nil { - return err - } - _, err = this.w.Write(data) - return err -} - -func (this *varintWriter) Close() error { - if closer, ok := this.w.(io.Closer); ok { - return closer.Close() - } - return nil -} - -func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser { - var closer io.Closer - if c, ok := r.(io.Closer); ok { - closer = c - } - return &varintReader{bufio.NewReader(r), nil, maxSize, closer} -} - -type varintReader struct { - r *bufio.Reader - buf []byte - maxSize int - closer io.Closer -} - -func (this *varintReader) ReadMsg(msg proto.Message) error { - length64, err := binary.ReadUvarint(this.r) - if err != nil { - return err - } - length := int(length64) - if length < 0 || length > this.maxSize { - return io.ErrShortBuffer - } - if len(this.buf) < length { - this.buf = make([]byte, length) - } - buf := this.buf[:length] - if _, err := io.ReadFull(this.r, buf); err != nil { - return err - } - return proto.Unmarshal(buf, msg) -} - -func (this *varintReader) Close() error { - if this.closer != nil { - return this.closer.Close() - } - return nil -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go deleted file mode 100644 index 3fe315cb..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go +++ /dev/null @@ -1,713 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON. -It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json. - -This package produces a different output than the standard "encoding/json" package, -which does not operate correctly on protocol buffers. -*/ -package jsonpb - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/gogo/protobuf/proto" -) - -// Marshaler is a configurable object for converting between -// protocol buffer objects and a JSON representation for them. -type Marshaler struct { - // Whether to render enum values as integers, as opposed to string values. - EnumsAsInts bool - - // Whether to render fields with zero values. - EmitDefaults bool - - // A string to indent each level by. The presence of this field will - // also cause a space to appear between the field separator and - // value, and for newlines to be appear between fields and array - // elements. - Indent string - - // Whether to use the original (.proto) name for fields. - OrigName bool -} - -// Marshal marshals a protocol buffer into JSON. -func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { - writer := &errWriter{writer: out} - return m.marshalObject(writer, pb, "") -} - -// MarshalToString converts a protocol buffer object to JSON string. -func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { - var buf bytes.Buffer - if err := m.Marshal(&buf, pb); err != nil { - return "", err - } - return buf.String(), nil -} - -type int32Slice []int32 - -// For sorting extensions ids to ensure stable output. -func (s int32Slice) Len() int { return len(s) } -func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } -func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// marshalObject writes a struct to the Writer. -func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent string) error { - out.write("{") - if m.Indent != "" { - out.write("\n") - } - - s := reflect.ValueOf(v).Elem() - firstField := true - for i := 0; i < s.NumField(); i++ { - value := s.Field(i) - valueField := s.Type().Field(i) - if strings.HasPrefix(valueField.Name, "XXX_") { - continue - } - - // IsNil will panic on most value kinds. - switch value.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - if value.IsNil() { - continue - } - } - - if !m.EmitDefaults { - switch value.Kind() { - case reflect.Bool: - if !value.Bool() { - continue - } - case reflect.Int32, reflect.Int64: - if value.Int() == 0 { - continue - } - case reflect.Uint32, reflect.Uint64: - if value.Uint() == 0 { - continue - } - case reflect.Float32, reflect.Float64: - if value.Float() == 0 { - continue - } - case reflect.String: - if value.Len() == 0 { - continue - } - } - } - - // Oneof fields need special handling. - if valueField.Tag.Get("protobuf_oneof") != "" { - // value is an interface containing &T{real_value}. - sv := value.Elem().Elem() // interface -> *T -> T - value = sv.Field(0) - valueField = sv.Type().Field(0) - } - prop := jsonProperties(valueField, m.OrigName) - if !firstField { - m.writeSep(out) - } - // If the map value is a cast type, it may not implement proto.Message, therefore - // allow the struct tag to declare the underlying message type. Instead of changing - // the signatures of the child types (and because prop.mvalue is not public), use - // CustomType as a passer. - if value.Kind() == reflect.Map { - if tag := valueField.Tag.Get("protobuf"); tag != "" { - for _, v := range strings.Split(tag, ",") { - if !strings.HasPrefix(v, "castvaluetype=") { - continue - } - v = strings.TrimPrefix(v, "castvaluetype=") - prop.CustomType = v - break - } - } - } - if err := m.marshalField(out, prop, value, indent); err != nil { - return err - } - firstField = false - } - - // Handle proto2 extensions. - if ep, ok := v.(proto.Message); ok { - extensions := proto.RegisteredExtensions(v) - // Sort extensions for stable output. - ids := make([]int32, 0, len(extensions)) - for id, desc := range extensions { - if !proto.HasExtension(ep, desc) { - continue - } - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) - for _, id := range ids { - desc := extensions[id] - if desc == nil { - // unknown extension - continue - } - ext, extErr := proto.GetExtension(ep, desc) - if extErr != nil { - return extErr - } - value := reflect.ValueOf(ext) - var prop proto.Properties - prop.Parse(desc.Tag) - prop.JSONName = fmt.Sprintf("[%s]", desc.Name) - if !firstField { - m.writeSep(out) - } - if err := m.marshalField(out, &prop, value, indent); err != nil { - return err - } - firstField = false - } - - } - - if m.Indent != "" { - out.write("\n") - out.write(indent) - } - out.write("}") - return out.err -} - -func (m *Marshaler) writeSep(out *errWriter) { - if m.Indent != "" { - out.write(",\n") - } else { - out.write(",") - } -} - -// marshalField writes field description and value to the Writer. -func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { - if m.Indent != "" { - out.write(indent) - out.write(m.Indent) - } - out.write(`"`) - out.write(prop.JSONName) - out.write(`":`) - if m.Indent != "" { - out.write(" ") - } - if err := m.marshalValue(out, prop, v, indent); err != nil { - return err - } - return nil -} - -// marshalValue writes the value to the Writer. -func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { - - v = reflect.Indirect(v) - - // Handle repeated elements. - if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { - out.write("[") - comma := "" - for i := 0; i < v.Len(); i++ { - sliceVal := v.Index(i) - out.write(comma) - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - out.write(m.Indent) - } - if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil { - return err - } - comma = "," - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - } - out.write("]") - return out.err - } - - // Handle enumerations. - if !m.EnumsAsInts && prop.Enum != "" { - // Unknown enum values will are stringified by the proto library as their - // value. Such values should _not_ be quoted or they will be interpreted - // as an enum string instead of their value. - enumStr := v.Interface().(fmt.Stringer).String() - var valStr string - if v.Kind() == reflect.Ptr { - valStr = strconv.Itoa(int(v.Elem().Int())) - } else { - valStr = strconv.Itoa(int(v.Int())) - } - - if m, ok := v.Interface().(interface { - MarshalJSON() ([]byte, error) - }); ok { - data, err := m.MarshalJSON() - if err != nil { - return err - } - enumStr = string(data) - enumStr, err = strconv.Unquote(enumStr) - if err != nil { - return err - } - } - - isKnownEnum := enumStr != valStr - - if isKnownEnum { - out.write(`"`) - } - out.write(enumStr) - if isKnownEnum { - out.write(`"`) - } - return out.err - } - - // Handle nested messages. - if v.Kind() == reflect.Struct { - i := v - if v.CanAddr() { - i = v.Addr() - } else { - i = reflect.New(v.Type()) - i.Elem().Set(v) - } - iface := i.Interface() - if iface == nil { - out.write(`null`) - return out.err - } - pm, ok := iface.(proto.Message) - if !ok { - if prop.CustomType == "" { - return fmt.Errorf("%v does not implement proto.Message", v.Type()) - } - t := proto.MessageType(prop.CustomType) - if t == nil || !i.Type().ConvertibleTo(t) { - return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) - } - pm = i.Convert(t).Interface().(proto.Message) - } - return m.marshalObject(out, pm, indent+m.Indent) - } - - // Handle maps. - // Since Go randomizes map iteration, we sort keys for stable output. - if v.Kind() == reflect.Map { - out.write(`{`) - keys := v.MapKeys() - sort.Sort(mapKeys(keys)) - for i, k := range keys { - if i > 0 { - out.write(`,`) - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - out.write(m.Indent) - } - - b, err := json.Marshal(k.Interface()) - if err != nil { - return err - } - s := string(b) - - // If the JSON is not a string value, encode it again to make it one. - if !strings.HasPrefix(s, `"`) { - b, err := json.Marshal(s) - if err != nil { - return err - } - s = string(b) - } - - out.write(s) - out.write(`:`) - if m.Indent != "" { - out.write(` `) - } - - if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil { - return err - } - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - } - out.write(`}`) - return out.err - } - - // Default handling defers to the encoding/json library. - b, err := json.Marshal(v.Interface()) - if err != nil { - return err - } - needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) - if needToQuote { - out.write(`"`) - } - out.write(string(b)) - if needToQuote { - out.write(`"`) - } - return out.err -} - -// Unmarshaler is a configurable object for converting from a JSON -// representation to a protocol buffer object. -type Unmarshaler struct { - // Whether to allow messages to contain unknown fields, as opposed to - // failing to unmarshal. - AllowUnknownFields bool -} - -// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. -// This function is lenient and will decode any options permutations of the -// related Marshaler. -func (u *Unmarshaler) UnmarshalNext(dec *json.Decoder, pb proto.Message) error { - inputValue := json.RawMessage{} - if err := dec.Decode(&inputValue); err != nil { - return err - } - return u.unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil) -} - -// Unmarshal unmarshals a JSON object stream into a protocol -// buffer. This function is lenient and will decode any options -// permutations of the related Marshaler. -func (u *Unmarshaler) Unmarshal(r io.Reader, pb proto.Message) error { - dec := json.NewDecoder(r) - return u.UnmarshalNext(dec, pb) -} - -// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. -// This function is lenient and will decode any options permutations of the -// related Marshaler. -func UnmarshalNext(dec *json.Decoder, pb proto.Message) error { - return new(Unmarshaler).UnmarshalNext(dec, pb) -} - -// Unmarshal unmarshals a JSON object stream into a protocol -// buffer. This function is lenient and will decode any options -// permutations of the related Marshaler. -func Unmarshal(r io.Reader, pb proto.Message) error { - return new(Unmarshaler).Unmarshal(r, pb) -} - -// UnmarshalString will populate the fields of a protocol buffer based -// on a JSON string. This function is lenient and will decode any options -// permutations of the related Marshaler. -func UnmarshalString(str string, pb proto.Message) error { - return new(Unmarshaler).Unmarshal(strings.NewReader(str), pb) -} - -// unmarshalValue converts/copies a value into the target. -// prop may be nil. -func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error { - targetType := target.Type() - - // Allocate memory for pointer fields. - if targetType.Kind() == reflect.Ptr { - target.Set(reflect.New(targetType.Elem())) - return u.unmarshalValue(target.Elem(), inputValue, prop) - } - - // Handle enums, which have an underlying type of int32, - // and may appear as strings. - // The case of an enum appearing as a number is handled - // at the bottom of this function. - if inputValue[0] == '"' && prop != nil && prop.Enum != "" { - vmap := proto.EnumValueMap(prop.Enum) - // Don't need to do unquoting; valid enum names - // are from a limited character set. - s := inputValue[1 : len(inputValue)-1] - n, ok := vmap[string(s)] - if !ok { - return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum) - } - if target.Kind() == reflect.Ptr { // proto2 - target.Set(reflect.New(targetType.Elem())) - target = target.Elem() - } - target.SetInt(int64(n)) - return nil - } - - // Handle nested messages. - if targetType.Kind() == reflect.Struct { - var jsonFields map[string]json.RawMessage - if err := json.Unmarshal(inputValue, &jsonFields); err != nil { - return err - } - - consumeField := func(prop *proto.Properties) (json.RawMessage, bool) { - // Be liberal in what names we accept; both orig_name and camelName are okay. - fieldNames := acceptedJSONFieldNames(prop) - - vOrig, okOrig := jsonFields[fieldNames.orig] - vCamel, okCamel := jsonFields[fieldNames.camel] - if !okOrig && !okCamel { - return nil, false - } - // If, for some reason, both are present in the data, favour the camelName. - var raw json.RawMessage - if okOrig { - raw = vOrig - delete(jsonFields, fieldNames.orig) - } - if okCamel { - raw = vCamel - delete(jsonFields, fieldNames.camel) - } - return raw, true - } - - sprops := proto.GetProperties(targetType) - for i := 0; i < target.NumField(); i++ { - ft := target.Type().Field(i) - if strings.HasPrefix(ft.Name, "XXX_") { - continue - } - valueForField, ok := consumeField(sprops.Prop[i]) - if !ok { - continue - } - - if err := u.unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil { - return err - } - } - // Check for any oneof fields. - if len(jsonFields) > 0 { - for _, oop := range sprops.OneofTypes { - raw, ok := consumeField(oop.Prop) - if !ok { - continue - } - nv := reflect.New(oop.Type.Elem()) - target.Field(oop.Field).Set(nv) - if err := u.unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil { - return err - } - } - } - if !u.AllowUnknownFields && len(jsonFields) > 0 { - // Pick any field to be the scapegoat. - var f string - for fname := range jsonFields { - f = fname - break - } - return fmt.Errorf("unknown field %q in %v", f, targetType) - } - return nil - } - - // Handle arrays - if targetType.Kind() == reflect.Slice { - if targetType.Elem().Kind() == reflect.Uint8 { - outRef := reflect.New(targetType) - outVal := outRef.Interface() - //CustomType with underlying type []byte - if _, ok := outVal.(interface { - UnmarshalJSON([]byte) error - }); ok { - if err := json.Unmarshal(inputValue, outVal); err != nil { - return err - } - target.Set(outRef.Elem()) - return nil - } - // Special case for encoded bytes. Pre-go1.5 doesn't support unmarshalling - // strings into aliased []byte types. - // https://github.com/golang/go/commit/4302fd0409da5e4f1d71471a6770dacdc3301197 - // https://github.com/golang/go/commit/c60707b14d6be26bf4213114d13070bff00d0b0a - var out []byte - if err := json.Unmarshal(inputValue, &out); err != nil { - return err - } - target.SetBytes(out) - return nil - } - - var slc []json.RawMessage - if err := json.Unmarshal(inputValue, &slc); err != nil { - return err - } - len := len(slc) - target.Set(reflect.MakeSlice(targetType, len, len)) - for i := 0; i < len; i++ { - if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil { - return err - } - } - return nil - } - - // Handle maps (whose keys are always strings) - if targetType.Kind() == reflect.Map { - var mp map[string]json.RawMessage - if err := json.Unmarshal(inputValue, &mp); err != nil { - return err - } - target.Set(reflect.MakeMap(targetType)) - var keyprop, valprop *proto.Properties - if prop != nil { - // These could still be nil if the protobuf metadata is broken somehow. - // TODO: This won't work because the fields are unexported. - // We should probably just reparse them. - //keyprop, valprop = prop.mkeyprop, prop.mvalprop - } - for ks, raw := range mp { - // Unmarshal map key. The core json library already decoded the key into a - // string, so we handle that specially. Other types were quoted post-serialization. - var k reflect.Value - if targetType.Key().Kind() == reflect.String { - k = reflect.ValueOf(ks) - } else { - k = reflect.New(targetType.Key()).Elem() - if err := u.unmarshalValue(k, json.RawMessage(ks), keyprop); err != nil { - return err - } - } - - if !k.Type().AssignableTo(targetType.Key()) { - k = k.Convert(targetType.Key()) - } - - // Unmarshal map value. - v := reflect.New(targetType.Elem()).Elem() - if err := u.unmarshalValue(v, raw, valprop); err != nil { - return err - } - target.SetMapIndex(k, v) - } - return nil - } - - // 64-bit integers can be encoded as strings. In this case we drop - // the quotes and proceed as normal. - isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 - if isNum && strings.HasPrefix(string(inputValue), `"`) { - inputValue = inputValue[1 : len(inputValue)-1] - } - - // Use the encoding/json for parsing other value types. - return json.Unmarshal(inputValue, target.Addr().Interface()) -} - -// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute. -func jsonProperties(f reflect.StructField, origName bool) *proto.Properties { - var prop proto.Properties - prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) - if origName || prop.JSONName == "" { - prop.JSONName = prop.OrigName - } - return &prop -} - -type fieldNames struct { - orig, camel string -} - -func acceptedJSONFieldNames(prop *proto.Properties) fieldNames { - opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName} - if prop.JSONName != "" { - opts.camel = prop.JSONName - } - return opts -} - -// Writer wrapper inspired by https://blog.golang.org/errors-are-values -type errWriter struct { - writer io.Writer - err error -} - -func (w *errWriter) write(str string) { - if w.err != nil { - return - } - _, w.err = w.writer.Write([]byte(str)) -} - -// Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. -// -// Numeric keys are sorted in numeric order per -// https://developers.google.com/protocol-buffers/docs/proto#maps. -type mapKeys []reflect.Value - -func (s mapKeys) Len() int { return len(s) } -func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s mapKeys) Less(i, j int) bool { - if k := s[i].Kind(); k == s[j].Kind() { - switch k { - case reflect.Int32, reflect.Int64: - return s[i].Int() < s[j].Int() - case reflect.Uint32, reflect.Uint64: - return s[i].Uint() < s[j].Uint() - } - } - return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) -} 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 0dcfcc57..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go +++ /dev/null @@ -1,482 +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" - "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" -) - -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, 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+08,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+08, - 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"` + - `}` -) - -func init() { - if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil { - panic(err) - } - if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil { - panic(err) - } -} - -var marshalingTests = []struct { - desc string - marshaler Marshaler - pb proto.Message - json string -}{ - {"simple flat object", marshaler, simpleObject, simpleObjectJSON}, - {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectPrettyJSON}, - {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON}, - {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON}, - {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON}, - {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON}, - {"enum-string flat object", Marshaler{}, - &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`}, - {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "}, - &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON}, - {"unknown enum value object", marshalerAllOptions, - &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON}, - {"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}`}, - {"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}, -} - -func TestMarshaling(t *testing.T) { - for _, tt := range marshalingTests { - json, err := tt.marshaler.MarshalToString(tt.pb) - if err != nil { - t.Errorf("%s: marshaling error: %v", tt.desc, err) - } else if tt.json != json { - t.Errorf("%s: got [%v] want [%v]", tt.desc, json, tt.json) - } - } -} - -var unmarshalingTests = []struct { - desc string - 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)}}, - {"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}}}}, - // 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"}}}, - {"orig_name input", Unmarshaler{}, `{"o_bool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, - {"camelName input", Unmarshaler{}, `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, -} - -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 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) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile deleted file mode 100644 index 079b3df7..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2015 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc-min-version --version="3.0.0" --gogo_out=. *.proto -I . -I ../../ -I ../../protobuf/ diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go deleted file mode 100644 index bee5f0ed..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go +++ /dev/null @@ -1,7 +0,0 @@ -package jsonpb - -// Byte is used to test that []byte type aliases are serialized to base64. -type Byte byte - -// Bytes is used to test that []byte type aliases are serialized to base64. -type Bytes []Byte diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go deleted file mode 100644 index 538584f8..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: more_test_objects.proto -// DO NOT EDIT! - -/* -Package jsonpb is a generated protocol buffer package. - -It is generated from these files: - more_test_objects.proto - test_objects.proto - -It has these top-level messages: - Simple3 - Mappy - Simple - Repeats - Widget - Maps - MsgWithOneof - Real - Complex -*/ -package jsonpb - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 Numeral int32 - -const ( - Numeral_UNKNOWN Numeral = 0 - Numeral_ARABIC Numeral = 1 - Numeral_ROMAN Numeral = 2 -) - -var Numeral_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ARABIC", - 2: "ROMAN", -} -var Numeral_value = map[string]int32{ - "UNKNOWN": 0, - "ARABIC": 1, - "ROMAN": 2, -} - -func (x Numeral) String() string { - return proto.EnumName(Numeral_name, int32(x)) -} -func (Numeral) EnumDescriptor() ([]byte, []int) { return fileDescriptorMoreTestObjects, []int{0} } - -type Simple3 struct { - Dub float64 `protobuf:"fixed64,1,opt,name=dub,proto3" json:"dub,omitempty"` -} - -func (m *Simple3) Reset() { *m = Simple3{} } -func (m *Simple3) String() string { return proto.CompactTextString(m) } -func (*Simple3) ProtoMessage() {} -func (*Simple3) Descriptor() ([]byte, []int) { return fileDescriptorMoreTestObjects, []int{0} } - -type Mappy struct { - Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Enumy map[string]Numeral `protobuf:"bytes,6,rep,name=enumy" json:"enumy,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=jsonpb.Numeral"` - S32Booly map[int32]bool `protobuf:"bytes,7,rep,name=s32booly" json:"s32booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - S64Booly map[int64]bool `protobuf:"bytes,8,rep,name=s64booly" json:"s64booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - U32Booly map[uint32]bool `protobuf:"bytes,9,rep,name=u32booly" json:"u32booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - U64Booly map[uint64]bool `protobuf:"bytes,10,rep,name=u64booly" json:"u64booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (m *Mappy) Reset() { *m = Mappy{} } -func (m *Mappy) String() string { return proto.CompactTextString(m) } -func (*Mappy) ProtoMessage() {} -func (*Mappy) Descriptor() ([]byte, []int) { return fileDescriptorMoreTestObjects, []int{1} } - -func (m *Mappy) GetNummy() map[int64]int32 { - if m != nil { - return m.Nummy - } - return nil -} - -func (m *Mappy) GetStrry() map[string]string { - if m != nil { - return m.Strry - } - return nil -} - -func (m *Mappy) GetObjjy() map[int32]*Simple3 { - if m != nil { - return m.Objjy - } - return nil -} - -func (m *Mappy) GetBuggy() map[int64]string { - if m != nil { - return m.Buggy - } - return nil -} - -func (m *Mappy) GetBooly() map[bool]bool { - if m != nil { - return m.Booly - } - return nil -} - -func (m *Mappy) GetEnumy() map[string]Numeral { - if m != nil { - return m.Enumy - } - return nil -} - -func (m *Mappy) GetS32Booly() map[int32]bool { - if m != nil { - return m.S32Booly - } - return nil -} - -func (m *Mappy) GetS64Booly() map[int64]bool { - if m != nil { - return m.S64Booly - } - return nil -} - -func (m *Mappy) GetU32Booly() map[uint32]bool { - if m != nil { - return m.U32Booly - } - return nil -} - -func (m *Mappy) GetU64Booly() map[uint64]bool { - if m != nil { - return m.U64Booly - } - return nil -} - -func init() { - proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") - proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy") - proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value) -} - -func init() { proto.RegisterFile("more_test_objects.proto", fileDescriptorMoreTestObjects) } - -var fileDescriptorMoreTestObjects = []byte{ - // 442 bytes of a gzipped FileDescriptorProto - 0x1f, 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0x1d, 0x52, 0x3c, 0xc6, - 0xf5, 0x3e, 0x50, 0x96, 0xa7, 0x7a, 0xeb, 0xfa, 0x43, 0x79, 0x77, 0xad, 0xf2, 0xfd, 0xff, 0xc8, - 0xd7, 0x2a, 0xdf, 0xdd, 0x90, 0xdf, 0xbd, 0x07, 0x4b, 0xbc, 0x04, 0x19, 0x83, 0xb5, 0x0b, 0xbe, - 0x05, 0x9b, 0xef, 0x81, 0xfb, 0x8c, 0x00, 0x98, 0xf3, 0x70, 0xbe, 0x58, 0x7d, 0x75, 0x35, 0xe2, - 0x80, 0x11, 0x6e, 0xd6, 0xf3, 0xc0, 0x1d, 0x45, 0x26, 0xff, 0x6b, 0x9b, 0xfd, 0x0b, 0x00, 0x00, - 0xff, 0xff, 0xa2, 0x4b, 0xe1, 0x77, 0xf5, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto deleted file mode 100644 index 43b440e2..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto +++ /dev/null @@ -1,57 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package jsonpb; - -message Simple3 { - double dub = 1; -} - -enum Numeral { - UNKNOWN = 0; - ARABIC = 1; - ROMAN = 2; -} - -message Mappy { - map nummy = 1; - map strry = 2; - map objjy = 3; - map buggy = 4; - map booly = 5; - map enumy = 6; - map s32booly = 7; - map s64booly = 8; - map u32booly = 9; - map u64booly = 10; -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go deleted file mode 100644 index fbf4fc9e..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go +++ /dev/null @@ -1,616 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: test_objects.proto -// DO NOT EDIT! - -package jsonpb - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// skipping weak import gogoproto "gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Widget_Color int32 - -const ( - Widget_RED Widget_Color = 0 - Widget_GREEN Widget_Color = 1 - Widget_BLUE Widget_Color = 2 -) - -var Widget_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Widget_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Widget_Color) Enum() *Widget_Color { - p := new(Widget_Color) - *p = x - return p -} -func (x Widget_Color) String() string { - return proto.EnumName(Widget_Color_name, int32(x)) -} -func (x *Widget_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") - if err != nil { - return err - } - *x = Widget_Color(value) - return nil -} -func (Widget_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{2, 0} } - -// Test message for holding primitive types. -type Simple struct { - OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"` - OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"` - OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"` - OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"` - OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"` - OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"` - OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"` - OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float,json=oFloat" json:"o_float,omitempty"` - ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double,json=oDouble" json:"o_double,omitempty"` - OString *string `protobuf:"bytes,10,opt,name=o_string,json=oString" json:"o_string,omitempty"` - OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"` - OCastBytes Bytes `protobuf:"bytes,12,opt,name=o_cast_bytes,json=oCastBytes,casttype=Bytes" json:"o_cast_bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Simple) Reset() { *m = Simple{} } -func (m *Simple) String() string { return proto.CompactTextString(m) } -func (*Simple) ProtoMessage() {} -func (*Simple) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{0} } - -func (m *Simple) GetOBool() bool { - if m != nil && m.OBool != nil { - return *m.OBool - } - return false -} - -func (m *Simple) GetOInt32() int32 { - if m != nil && m.OInt32 != nil { - return *m.OInt32 - } - return 0 -} - -func (m *Simple) GetOInt64() int64 { - if m != nil && m.OInt64 != nil { - return *m.OInt64 - } - return 0 -} - -func (m *Simple) GetOUint32() uint32 { - if m != nil && m.OUint32 != nil { - return *m.OUint32 - } - return 0 -} - -func (m *Simple) GetOUint64() uint64 { - if m != nil && m.OUint64 != nil { - return *m.OUint64 - } - return 0 -} - -func (m *Simple) GetOSint32() int32 { - if m != nil && m.OSint32 != nil { - return *m.OSint32 - } - return 0 -} - -func (m *Simple) GetOSint64() int64 { - if m != nil && m.OSint64 != nil { - return *m.OSint64 - } - return 0 -} - -func (m *Simple) GetOFloat() float32 { - if m != nil && m.OFloat != nil { - return *m.OFloat - } - return 0 -} - -func (m *Simple) GetODouble() float64 { - if m != nil && m.ODouble != nil { - return *m.ODouble - } - return 0 -} - -func (m *Simple) GetOString() string { - if m != nil && m.OString != nil { - return *m.OString - } - return "" -} - -func (m *Simple) GetOBytes() []byte { - if m != nil { - return m.OBytes - } - return nil -} - -func (m *Simple) GetOCastBytes() Bytes { - if m != nil { - return m.OCastBytes - } - return nil -} - -// Test message for holding repeated primitives. -type Repeats struct { - RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"` - RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"` - RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"` - RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"` - RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"` - RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"` - RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"` - RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"` - RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"` - RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"` - RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Repeats) Reset() { *m = Repeats{} } -func (m *Repeats) String() string { return proto.CompactTextString(m) } -func (*Repeats) ProtoMessage() {} -func (*Repeats) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{1} } - -func (m *Repeats) GetRBool() []bool { - if m != nil { - return m.RBool - } - return nil -} - -func (m *Repeats) GetRInt32() []int32 { - if m != nil { - return m.RInt32 - } - return nil -} - -func (m *Repeats) GetRInt64() []int64 { - if m != nil { - return m.RInt64 - } - return nil -} - -func (m *Repeats) GetRUint32() []uint32 { - if m != nil { - return m.RUint32 - } - return nil -} - -func (m *Repeats) GetRUint64() []uint64 { - if m != nil { - return m.RUint64 - } - return nil -} - -func (m *Repeats) GetRSint32() []int32 { - if m != nil { - return m.RSint32 - } - return nil -} - -func (m *Repeats) GetRSint64() []int64 { - if m != nil { - return m.RSint64 - } - return nil -} - -func (m *Repeats) GetRFloat() []float32 { - if m != nil { - return m.RFloat - } - return nil -} - -func (m *Repeats) GetRDouble() []float64 { - if m != nil { - return m.RDouble - } - return nil -} - -func (m *Repeats) GetRString() []string { - if m != nil { - return m.RString - } - return nil -} - -func (m *Repeats) GetRBytes() [][]byte { - if m != nil { - return m.RBytes - } - return nil -} - -// Test message for holding enums and nested messages. -type Widget struct { - Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"` - RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"` - Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"` - RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"` - Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"` - RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Widget) Reset() { *m = Widget{} } -func (m *Widget) String() string { return proto.CompactTextString(m) } -func (*Widget) ProtoMessage() {} -func (*Widget) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{2} } - -func (m *Widget) GetColor() Widget_Color { - if m != nil && m.Color != nil { - return *m.Color - } - return Widget_RED -} - -func (m *Widget) GetRColor() []Widget_Color { - if m != nil { - return m.RColor - } - return nil -} - -func (m *Widget) GetSimple() *Simple { - if m != nil { - return m.Simple - } - return nil -} - -func (m *Widget) GetRSimple() []*Simple { - if m != nil { - return m.RSimple - } - return nil -} - -func (m *Widget) GetRepeats() *Repeats { - if m != nil { - return m.Repeats - } - return nil -} - -func (m *Widget) GetRRepeats() []*Repeats { - if m != nil { - return m.RRepeats - } - return nil -} - -type Maps struct { - MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Maps) Reset() { *m = Maps{} } -func (m *Maps) String() string { return proto.CompactTextString(m) } -func (*Maps) ProtoMessage() {} -func (*Maps) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{3} } - -func (m *Maps) GetMInt64Str() map[int64]string { - if m != nil { - return m.MInt64Str - } - return nil -} - -func (m *Maps) GetMBoolSimple() map[bool]*Simple { - if m != nil { - return m.MBoolSimple - } - return nil -} - -type MsgWithOneof struct { - // Types that are valid to be assigned to Union: - // *MsgWithOneof_Title - // *MsgWithOneof_Salary - // *MsgWithOneof_Country - Union isMsgWithOneof_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} } -func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } -func (*MsgWithOneof) ProtoMessage() {} -func (*MsgWithOneof) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{4} } - -type isMsgWithOneof_Union interface { - isMsgWithOneof_Union() -} - -type MsgWithOneof_Title struct { - Title string `protobuf:"bytes,1,opt,name=title,oneof"` -} -type MsgWithOneof_Salary struct { - Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` -} -type MsgWithOneof_Country struct { - Country string `protobuf:"bytes,3,opt,name=Country,json=country,oneof"` -} - -func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} -func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} -func (*MsgWithOneof_Country) isMsgWithOneof_Union() {} - -func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *MsgWithOneof) GetTitle() string { - if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok { - return x.Title - } - return "" -} - -func (m *MsgWithOneof) GetSalary() int64 { - if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok { - return x.Salary - } - return 0 -} - -func (m *MsgWithOneof) GetCountry() string { - if x, ok := m.GetUnion().(*MsgWithOneof_Country); ok { - return x.Country - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{ - (*MsgWithOneof_Title)(nil), - (*MsgWithOneof_Salary)(nil), - (*MsgWithOneof_Country)(nil), - } -} - -func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*MsgWithOneof) - // union - switch x := m.Union.(type) { - case *MsgWithOneof_Title: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Title) - case *MsgWithOneof_Salary: - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Salary)) - case *MsgWithOneof_Country: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Country) - case nil: - default: - return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) - } - return nil -} - -func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*MsgWithOneof) - switch tag { - case 1: // union.title - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &MsgWithOneof_Title{x} - return true, err - case 2: // union.salary - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &MsgWithOneof_Salary{int64(x)} - return true, err - case 3: // union.Country - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &MsgWithOneof_Country{x} - return true, err - default: - return false, nil - } -} - -func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*MsgWithOneof) - // union - switch x := m.Union.(type) { - case *MsgWithOneof_Title: - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Title))) - n += len(x.Title) - case *MsgWithOneof_Salary: - n += proto.SizeVarint(2<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Salary)) - case *MsgWithOneof_Country: - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Country))) - n += len(x.Country) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Real struct { - Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Real) Reset() { *m = Real{} } -func (m *Real) String() string { return proto.CompactTextString(m) } -func (*Real) ProtoMessage() {} -func (*Real) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{5} } - -var extRange_Real = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*Real) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Real -} - -func (m *Real) GetValue() float64 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type Complex struct { - Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Complex) Reset() { *m = Complex{} } -func (m *Complex) String() string { return proto.CompactTextString(m) } -func (*Complex) ProtoMessage() {} -func (*Complex) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{6} } - -var extRange_Complex = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Complex -} - -func (m *Complex) GetImaginary() float64 { - if m != nil && m.Imaginary != nil { - return *m.Imaginary - } - return 0 -} - -var E_Complex_RealExtension = &proto.ExtensionDesc{ - ExtendedType: (*Real)(nil), - ExtensionType: (*Complex)(nil), - Field: 123, - Name: "jsonpb.Complex.real_extension", - Tag: "bytes,123,opt,name=real_extension,json=realExtension", -} - -var E_Name = &proto.ExtensionDesc{ - ExtendedType: (*Real)(nil), - ExtensionType: (*string)(nil), - Field: 124, - Name: "jsonpb.name", - Tag: "bytes,124,opt,name=name", -} - -func init() { - proto.RegisterType((*Simple)(nil), "jsonpb.Simple") - proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") - proto.RegisterType((*Widget)(nil), "jsonpb.Widget") - proto.RegisterType((*Maps)(nil), "jsonpb.Maps") - proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") - proto.RegisterType((*Real)(nil), "jsonpb.Real") - proto.RegisterType((*Complex)(nil), "jsonpb.Complex") - proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) - proto.RegisterExtension(E_Complex_RealExtension) - proto.RegisterExtension(E_Name) -} - -func init() { proto.RegisterFile("test_objects.proto", fileDescriptorTestObjects) } - -var fileDescriptorTestObjects = []byte{ - // 784 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x94, 0xdf, 0x6e, 0xd3, 0x48, - 0x14, 0xc6, 0x1b, 0x4f, 0x1c, 0xdb, 0x93, 0x34, 0x9b, 0x1d, 0xa5, 0xbb, 0xde, 0xec, 0xae, 0xb6, - 0x8a, 0x76, 0xab, 0xa5, 0x40, 0x90, 0x42, 0x55, 0xa1, 0xc2, 0x0d, 0x69, 0xc3, 0x1f, 0x89, 0x16, - 0x69, 0xaa, 0xaa, 0xdc, 0x45, 0x4e, 0xea, 0x06, 0x17, 0xc7, 0x13, 0x1d, 0x3b, 0xd0, 0x08, 0x2e, - 0x78, 0x08, 0x9e, 0x81, 0x47, 0xe0, 0x41, 0x78, 0x00, 0x1e, 0x84, 0x2b, 0xe6, 0xcc, 0xd8, 0x9e, - 0xb4, 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0xa7, 0xa7, 0x51, 0xf6, 0xfa, 0x65, 0x12, 0x8a, 0x73, 0xf6, 0x1b, 0xb5, 0xb3, - 0x28, 0x93, 0x17, 0xc3, 0x34, 0xef, 0xd9, 0x1a, 0xd7, 0x25, 0xf3, 0xe5, 0x44, 0x04, 0x71, 0x00, - 0x4b, 0x15, 0x49, 0xa4, 0x90, 0xd7, 0xac, 0x43, 0x9d, 0x7d, 0xb1, 0xc0, 0x83, 0xa8, 0x8f, 0x1a, - 0x7a, 0x9c, 0x89, 0xde, 0x18, 0x38, 0xd4, 0x5e, 0x24, 0x91, 0x48, 0xba, 0x5b, 0xb4, 0xca, 0xc3, - 0x20, 0x36, 0x17, 0xab, 0xa8, 0x0f, 0x8c, 0x2e, 0xb6, 0x5d, 0xf7, 0xac, 0xf5, 0x51, 0xfe, 0x59, - 0xdd, 0x77, 0x18, 0x86, 0x67, 0xbc, 0x64, 0x7f, 0x51, 0x2f, 0x9a, 0x05, 0xd3, 0x28, 0xc1, 0x1f, - 0xd5, 0xed, 0x66, 0xc3, 0x58, 0xfa, 0x07, 0xb4, 0x09, 0x32, 0x7a, 0x14, 0x5e, 0x66, 0x61, 0x92, - 0xca, 0x1f, 0x63, 0x0d, 0x33, 0x2c, 0x41, 0xec, 0xbf, 0xbf, 0x3a, 0x6d, 0x79, 0x3c, 0x5f, 0x47, - 0xd3, 0xb0, 0xf0, 0xec, 0x6d, 0xd2, 0x6a, 0x12, 0xcc, 0xc2, 0x6b, 0xde, 0x0f, 0x0a, 0xbf, 0x52, - 0x5e, 0xad, 0xfd, 0x08, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x95, 0x80, 0x0d, 0x2c, 0x06, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto deleted file mode 100644 index c1333ed1..00000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package jsonpb; - -import weak "gogoproto/gogo.proto"; - -// Test message for holding primitive types. -message Simple { - optional bool o_bool = 1; - optional int32 o_int32 = 2; - optional int64 o_int64 = 3; - optional uint32 o_uint32 = 4; - optional uint64 o_uint64 = 5; - optional sint32 o_sint32 = 6; - optional sint64 o_sint64 = 7; - optional float o_float = 8; - optional double o_double = 9; - optional string o_string = 10; - optional bytes o_bytes = 11; - optional bytes o_cast_bytes = 12 [(gogoproto.casttype) = "Bytes"]; -} - -// Test message for holding repeated primitives. -message Repeats { - repeated bool r_bool = 1; - repeated int32 r_int32 = 2; - repeated int64 r_int64 = 3; - repeated uint32 r_uint32 = 4; - repeated uint64 r_uint64 = 5; - repeated sint32 r_sint32 = 6; - repeated sint64 r_sint64 = 7; - repeated float r_float = 8; - repeated double r_double = 9; - repeated string r_string = 10; - repeated bytes r_bytes = 11; -} - -// Test message for holding enums and nested messages. -message Widget { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - }; - optional Color color = 1; - repeated Color r_color = 2; - - optional Simple simple = 10; - repeated Simple r_simple = 11; - - optional Repeats repeats = 20; - repeated Repeats r_repeats = 21; -} - -message Maps { - map m_int64_str = 1; - map m_bool_simple = 2; -} - -message MsgWithOneof { - oneof union { - string title = 1; - int64 salary = 2; - string Country = 3; - } -} - -message Real { - optional double value = 1; - extensions 100 to max; -} - -extend Real { - optional string name = 124; -} - -message Complex { - extend Real { - optional Complex real_extension = 123; - } - optional double imaginary = 1; - extensions 100 to max; -} diff --git a/vendor/github.com/gogo/protobuf/plugin/compare/compare.go b/vendor/github.com/gogo/protobuf/plugin/compare/compare.go deleted file mode 100644 index 75c0399a..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/compare/compare.go +++ /dev/null @@ -1,526 +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 compare - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" -) - -type plugin struct { - *generator.Generator - generator.PluginImports - fmtPkg generator.Single - bytesPkg generator.Single - sortkeysPkg generator.Single - protoPkg generator.Single -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "compare" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - p.fmtPkg = p.NewImport("fmt") - p.bytesPkg = p.NewImport("bytes") - p.sortkeysPkg = p.NewImport("github.com/gogo/protobuf/sortkeys") - p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") - - for _, msg := range file.Messages() { - if msg.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasCompare(file.FileDescriptorProto, msg.DescriptorProto) { - p.generateMessage(file, msg) - } - } -} - -func (p *plugin) generateNullableField(fieldname string) { - p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) - p.In() - p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) - p.In() - p.P(`if *this.`, fieldname, ` < *that1.`, fieldname, `{`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` != nil {`) - p.In() - p.P(`return 1`) - p.Out() - p.P(`} else if that1.`, fieldname, ` != nil {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) -} - -func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string) { - p.P(`if that == nil {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return 0`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - p.P(``) - p.P(`that1, ok := that.(*`, ccTypeName, `)`) - p.P(`if !ok {`) - p.In() - p.P(`that2, ok := that.(`, ccTypeName, `)`) - p.P(`if ok {`) - p.In() - p.P(`that1 = &that2`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`return 1`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(`if that1 == nil {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return 0`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`} else if this == nil {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) -} - -func (p *plugin) generateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - fieldname := p.GetOneOfFieldName(message, field) - repeated := field.IsRepeated() - ctype := gogoproto.IsCustomType(field) - nullable := gogoproto.IsNullable(field) - // oneof := field.OneofIndex != nil - if !repeated { - if ctype { - if nullable { - p.P(`if that1.`, fieldname, ` == nil {`) - p.In() - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`return 1`) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` == nil {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`} else if c := this.`, fieldname, `.Compare(*that1.`, fieldname, `); c != 0 {`) - } else { - p.P(`if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) - } - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else { - if field.IsMessage() || p.IsGroup(field) { - if nullable { - p.P(`if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) - } else { - p.P(`if c := this.`, fieldname, `.Compare(&that1.`, fieldname, `); c != 0 {`) - } - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else if field.IsBytes() { - p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else if field.IsString() { - if nullable && !proto3 { - p.generateNullableField(fieldname) - } else { - p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) - p.In() - p.P(`if this.`, fieldname, ` < that1.`, fieldname, `{`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } - } else if field.IsBool() { - if nullable && !proto3 { - p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) - p.In() - p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) - p.In() - p.P(`if !*this.`, fieldname, ` {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` != nil {`) - p.In() - p.P(`return 1`) - p.Out() - p.P(`} else if that1.`, fieldname, ` != nil {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - } else { - p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) - p.In() - p.P(`if !this.`, fieldname, ` {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } - } else { - if nullable && !proto3 { - p.generateNullableField(fieldname) - } else { - p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) - p.In() - p.P(`if this.`, fieldname, ` < that1.`, fieldname, `{`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } - } - } - } else { - p.P(`if len(this.`, fieldname, `) != len(that1.`, fieldname, `) {`) - p.In() - p.P(`if len(this.`, fieldname, `) < len(that1.`, fieldname, `) {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - p.P(`for i := range this.`, fieldname, ` {`) - p.In() - if ctype { - p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else { - if p.IsMap(field) { - m := p.GoMapType(nil, field) - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - mapValue := m.ValueAliasField - if mapValue.IsMessage() || p.IsGroup(mapValue) { - if nullable && valuegoTyp == valuegoAliasTyp { - p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) - } else { - // Compare() has a pointer receiver, but map value is a value type - a := `this.` + fieldname + `[i]` - b := `that1.` + fieldname + `[i]` - if valuegoTyp != valuegoAliasTyp { - // cast back to the type that has the generated methods on it - a = `(` + valuegoTyp + `)(` + a + `)` - b = `(` + valuegoTyp + `)(` + b + `)` - } - p.P(`a := `, a) - p.P(`b := `, b) - if nullable { - p.P(`if c := a.Compare(b); c != 0 {`) - } else { - p.P(`if c := (&a).Compare(&b); c != 0 {`) - } - } - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else if mapValue.IsBytes() { - p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `[i], that1.`, fieldname, `[i]); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else if mapValue.IsString() { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - p.In() - p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } else { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - p.In() - p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } - } else if field.IsMessage() || p.IsGroup(field) { - if nullable { - p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else { - p.P(`if c := this.`, fieldname, `[i].Compare(&that1.`, fieldname, `[i]); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } - } else if field.IsBytes() { - p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `[i], that1.`, fieldname, `[i]); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else if field.IsString() { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - p.In() - p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } else if field.IsBool() { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - p.In() - p.P(`if !this.`, fieldname, `[i] {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } else { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - p.In() - p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.P(`return 1`) - p.Out() - p.P(`}`) - } - } - p.Out() - p.P(`}`) - } -} - -func (p *plugin) generateMessage(file *generator.FileDescriptor, message *generator.Descriptor) { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) Compare(that interface{}) int {`) - p.In() - p.generateMsgNullAndTypeCheck(ccTypeName) - oneofs := make(map[string]struct{}) - - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if oneof { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P(`if that1.`, fieldname, ` == nil {`) - p.In() - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`return 1`) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` == nil {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`} else if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } else { - p.generateField(file, message, field) - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`thismap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(this)`) - p.P(`thatmap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(that1)`) - p.P(`extkeys := make([]int32, 0, len(thismap)+len(thatmap))`) - p.P(`for k, _ := range thismap {`) - p.In() - p.P(`extkeys = append(extkeys, k)`) - p.Out() - p.P(`}`) - p.P(`for k, _ := range thatmap {`) - p.In() - p.P(`if _, ok := thismap[k]; !ok {`) - p.In() - p.P(`extkeys = append(extkeys, k)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(p.sortkeysPkg.Use(), `.Int32s(extkeys)`) - p.P(`for _, k := range extkeys {`) - p.In() - p.P(`if v, ok := thismap[k]; ok {`) - p.In() - p.P(`if v2, ok := thatmap[k]; ok {`) - p.In() - p.P(`if c := v.Compare(&v2); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`return 1`) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`return -1`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } else { - fieldname := "XXX_extensions" - p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - fieldname := "XXX_unrecognized" - p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) - p.In() - p.P(`return c`) - p.Out() - p.P(`}`) - } - p.P(`return 0`) - p.Out() - p.P(`}`) - - //Generate Compare methods for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, field := range m.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - p.P(`func (this *`, ccTypeName, `) Compare(that interface{}) int {`) - p.In() - - p.generateMsgNullAndTypeCheck(ccTypeName) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) - p.generateField(file, message, field) - - p.P(`return 0`) - p.Out() - p.P(`}`) - } -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go b/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go deleted file mode 100644 index db1e38e1..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go +++ /dev/null @@ -1,107 +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 compare - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.HasCompare(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `Compare(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`if c := p.Compare(msg); c != 0 {`) - p.In() - p.P(`t.Fatalf("%#v !Compare %#v, since %d", msg, p, c)`) - p.Out() - p.P(`}`) - p.P(`p2 := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`c := p.Compare(p2)`) - p.P(`c2 := p2.Compare(p)`) - p.P(`if c != (-1 * c2) {`) - p.In() - p.P(`t.Errorf("p.Compare(p2) = %d", c)`) - p.P(`t.Errorf("p2.Compare(p) = %d", c2)`) - p.P(`t.Errorf("p = %#v", p)`) - p.P(`t.Errorf("p2 = %#v", p2)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go b/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go deleted file mode 100644 index 486f2877..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.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. - -/* -The defaultcheck plugin is used to check whether nullable is not used incorrectly. -For instance: -An error is caused if a nullable field: - - has a default value, - - is an enum which does not start at zero, - - is used for an extension, - - is used for a native proto3 type, - - is used for a repeated native type. - -An error is also caused if a field with a default value is used in a message: - - which is a face. - - without getters. - -It is enabled by the following extensions: - - - nullable - -For incorrect usage of nullable with tests see: - - github.com/gogo/protobuf/test/nullableconflict - -*/ -package defaultcheck - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "os" -) - -type plugin struct { - *generator.Generator -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "defaultcheck" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - for _, msg := range file.Messages() { - getters := gogoproto.HasGoGetters(file.FileDescriptorProto, msg.DescriptorProto) - face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) - for _, field := range msg.GetField() { - if len(field.GetDefaultValue()) > 0 { - if !getters { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value and not have a getter method", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if face { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value be in a face", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - } - if gogoproto.IsNullable(field) { - continue - } - if len(field.GetDefaultValue()) > 0 { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and have a default value", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if !field.IsMessage() && !gogoproto.IsCustomType(field) { - if field.IsRepeated() { - fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a repeated non-nullable native type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - } else if proto3 { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v is a native type and in proto3 syntax with nullable=false there exists conflicting implementations when encoding zero values", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if field.IsBytes() { - fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a non-nullable bytes type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - } - } - if !field.IsEnum() { - continue - } - enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) - if len(enum.Value) == 0 || enum.Value[0].GetNumber() != 0 { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and be an enum type %v which does not start with zero", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name), enum.GetName()) - os.Exit(1) - } - } - } - for _, e := range file.GetExtension() { - if !gogoproto.IsNullable(e) { - fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be nullable %v", generator.CamelCase(e.GetName()), generator.CamelCase(*e.Name)) - os.Exit(1) - } - } -} - -func (p *plugin) GenerateImports(*generator.FileDescriptor) {} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/description/description.go b/vendor/github.com/gogo/protobuf/plugin/description/description.go deleted file mode 100644 index f72efba6..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/description/description.go +++ /dev/null @@ -1,201 +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. - -/* -The description (experimental) plugin generates a Description method for each message. -The Description method returns a populated google_protobuf.FileDescriptorSet struct. -This contains the description of the files used to generate this message. - -It is enabled by the following extensions: - - - description - - description_all - -The description plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the description plugin, will generate the following code: - - func (this *B) Description() (desc *google_protobuf.FileDescriptorSet) { - return ExampleDescription() - } - -and the following test code: - - func TestDescription(t *testing9.T) { - ExampleDescription() - } - -The hope is to use this struct in some way instead of reflect. -This package is subject to change, since a use has not been figured out yet. - -*/ -package description - -import ( - "bytes" - "compress/gzip" - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type plugin struct { - *generator.Generator - generator.PluginImports -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "description" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - used := false - localName := generator.FileName(file) - - p.PluginImports = generator.NewPluginImports(p.Generator) - descriptorPkg := p.NewImport("github.com/gogo/protobuf/protoc-gen-gogo/descriptor") - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - gzipPkg := p.NewImport("compress/gzip") - bytesPkg := p.NewImport("bytes") - ioutilPkg := p.NewImport("io/ioutil") - - for _, message := range file.Messages() { - if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - used = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) Description() (desc *`, descriptorPkg.Use(), `.FileDescriptorSet) {`) - p.In() - p.P(`return `, localName, `Description()`) - p.Out() - p.P(`}`) - } - - if used { - - p.P(`func `, localName, `Description() (desc *`, descriptorPkg.Use(), `.FileDescriptorSet) {`) - p.In() - //Don't generate SourceCodeInfo, since it will create too much code. - - ss := make([]*descriptor.SourceCodeInfo, 0) - for _, f := range p.Generator.AllFiles().GetFile() { - ss = append(ss, f.SourceCodeInfo) - f.SourceCodeInfo = nil - } - b, err := proto.Marshal(p.Generator.AllFiles()) - if err != nil { - panic(err) - } - for i, f := range p.Generator.AllFiles().GetFile() { - f.SourceCodeInfo = ss[i] - } - p.P(`d := &`, descriptorPkg.Use(), `.FileDescriptorSet{}`) - var buf bytes.Buffer - w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) - w.Write(b) - w.Close() - b = buf.Bytes() - p.P("var gzipped = []byte{") - p.In() - p.P("// ", len(b), " bytes of a gzipped FileDescriptorSet") - for len(b) > 0 { - n := 16 - if n > len(b) { - n = len(b) - } - - s := "" - for _, c := range b[:n] { - s += fmt.Sprintf("0x%02x,", c) - } - p.P(s) - - b = b[n:] - } - p.Out() - p.P("}") - p.P(`r := `, bytesPkg.Use(), `.NewReader(gzipped)`) - p.P(`gzipr, err := `, gzipPkg.Use(), `.NewReader(r)`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`ungzipped, err := `, ioutilPkg.Use(), `.ReadAll(gzipr)`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(ungzipped, d); err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`return d`) - p.Out() - p.P(`}`) - } -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go b/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go deleted file mode 100644 index babcd311..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go +++ /dev/null @@ -1,73 +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 description - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - for _, message := range file.Messages() { - if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) || - !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - used = true - } - - if used { - localName := generator.FileName(file) - p.P(`func Test`, localName, `Description(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(localName, `Description()`) - p.Out() - p.P(`}`) - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go deleted file mode 100644 index 1cb77cac..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go +++ /dev/null @@ -1,199 +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. - -/* -The embedcheck plugin is used to check whether embed is not used incorrectly. -For instance: -An embedded message has a generated string method, but the is a member of a message which does not. -This causes a warning. -An error is caused by a namespace conflict. - -It is enabled by the following extensions: - - - embed - - embed_all - -For incorrect usage of embed with tests see: - - github.com/gogo/protobuf/test/embedconflict - -*/ -package embedcheck - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "os" -) - -type plugin struct { - *generator.Generator -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "embedcheck" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -var overwriters []map[string]gogoproto.EnableFunc = []map[string]gogoproto.EnableFunc{ - { - "stringer": gogoproto.IsStringer, - }, - { - "gostring": gogoproto.HasGoString, - }, - { - "equal": gogoproto.HasEqual, - }, - { - "verboseequal": gogoproto.HasVerboseEqual, - }, - { - "size": gogoproto.IsSizer, - "protosizer": gogoproto.IsProtoSizer, - }, - { - "unmarshaler": gogoproto.IsUnmarshaler, - "unsafe_unmarshaler": gogoproto.IsUnsafeUnmarshaler, - }, - { - "marshaler": gogoproto.IsMarshaler, - "unsafe_marshaler": gogoproto.IsUnsafeMarshaler, - }, -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - for _, msg := range file.Messages() { - for _, os := range overwriters { - possible := true - for _, overwriter := range os { - if overwriter(file.FileDescriptorProto, msg.DescriptorProto) { - possible = false - } - } - if possible { - p.checkOverwrite(msg, os) - } - } - p.checkNameSpace(msg) - for _, field := range msg.GetField() { - if gogoproto.IsEmbed(field) && gogoproto.IsCustomName(field) { - fmt.Fprintf(os.Stderr, "ERROR: field %v with custom name %v cannot be embedded", *field.Name, gogoproto.GetCustomName(field)) - os.Exit(1) - } - } - p.checkRepeated(msg) - } - for _, e := range file.GetExtension() { - if gogoproto.IsEmbed(e) { - fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be embedded", generator.CamelCase(*e.Name)) - os.Exit(1) - } - } -} - -func (p *plugin) checkNameSpace(message *generator.Descriptor) map[string]bool { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - names := make(map[string]bool) - for _, field := range message.Field { - fieldname := generator.CamelCase(*field.Name) - if field.IsMessage() && gogoproto.IsEmbed(field) { - desc := p.ObjectNamed(field.GetTypeName()) - moreNames := p.checkNameSpace(desc.(*generator.Descriptor)) - for another := range moreNames { - if names[another] { - fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) - os.Exit(1) - } - names[another] = true - } - } else { - if names[fieldname] { - fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) - os.Exit(1) - } - names[fieldname] = true - } - } - return names -} - -func (p *plugin) checkOverwrite(message *generator.Descriptor, enablers map[string]gogoproto.EnableFunc) { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - names := []string{} - for name := range enablers { - names = append(names, name) - } - for _, field := range message.Field { - if field.IsMessage() && gogoproto.IsEmbed(field) { - fieldname := generator.CamelCase(*field.Name) - desc := p.ObjectNamed(field.GetTypeName()) - msg := desc.(*generator.Descriptor) - for errStr, enabled := range enablers { - if enabled(msg.File(), msg.DescriptorProto) { - fmt.Fprintf(os.Stderr, "WARNING: found non-%v %v with embedded %v %v\n", names, ccTypeName, errStr, fieldname) - } - } - p.checkOverwrite(msg, enablers) - } - } -} - -func (p *plugin) checkRepeated(message *generator.Descriptor) { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - for _, field := range message.Field { - if !gogoproto.IsEmbed(field) { - continue - } - if field.IsBytes() { - fieldname := generator.CamelCase(*field.Name) - fmt.Fprintf(os.Stderr, "ERROR: found embedded bytes field %s in message %s\n", fieldname, ccTypeName) - os.Exit(1) - } - if !field.IsRepeated() { - continue - } - fieldname := generator.CamelCase(*field.Name) - fmt.Fprintf(os.Stderr, "ERROR: found repeated embedded field %s in message %s\n", fieldname, ccTypeName) - os.Exit(1) - } -} - -func (p *plugin) GenerateImports(*generator.FileDescriptor) {} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go b/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go deleted file mode 100644 index fba1d9b9..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go +++ /dev/null @@ -1,104 +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. - -/* -The enumstringer (experimental) plugin generates a String method for each enum. - -It is enabled by the following extensions: - - - enum_stringer - - enum_stringer_all - -This package is subject to change. - -*/ -package enumstringer - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type enumstringer struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewEnumStringer() *enumstringer { - return &enumstringer{} -} - -func (p *enumstringer) Name() string { - return "enumstringer" -} - -func (p *enumstringer) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *enumstringer) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - - p.localName = generator.FileName(file) - - strconvPkg := p.NewImport("strconv") - - for _, enum := range file.Enums() { - if !gogoproto.IsEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { - continue - } - if gogoproto.IsGoEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { - panic("old enum string method needs to be disabled, please use gogoproto.old_enum_stringer or gogoproto.old_enum_string_all and set it to false") - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(enum.TypeName()) - p.P("func (x ", ccTypeName, ") String() string {") - p.In() - p.P(`s, ok := `, ccTypeName, `_name[int32(x)]`) - p.P(`if ok {`) - p.In() - p.P(`return s`) - p.Out() - p.P(`}`) - p.P(`return `, strconvPkg.Use(), `.Itoa(int(x))`) - p.Out() - p.P(`}`) - } - - if !p.atleastOne { - return - } - -} - -func init() { - generator.RegisterPlugin(NewEnumStringer()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go deleted file mode 100644 index 37355aa0..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go +++ /dev/null @@ -1,609 +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. - -/* -The equal plugin generates an Equal and a VerboseEqual method for each message. -These equal methods are quite obvious. -The only difference is that VerboseEqual returns a non nil error if it is not equal. -This error contains more detail on exactly which part of the message was not equal to the other message. -The idea is that this is useful for debugging. - -Equal is enabled using the following extensions: - - - equal - - equal_all - -While VerboseEqual is enable dusing the following extensions: - - - verbose_equal - - verbose_equal_all - -The equal plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.equal_all) = true; - option (gogoproto.verbose_equal_all) = true; - - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the equal plugin, will generate the following code: - - func (this *B) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt2.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*B) - if !ok { - return fmt2.Errorf("that is not of type *B") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt2.Errorf("that is type *B but is nil && this != nil") - } else if this == nil { - return fmt2.Errorf("that is type *B but is not nil && this == nil") - } - if !this.A.Equal(&that1.A) { - return fmt2.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if len(this.G) != len(that1.G) { - return fmt2.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return fmt2.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt2.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil - } - - func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(&that1.A) { - return false - } - if len(this.G) != len(that1.G) { - return false - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true - } - -and the following test code: - - func TestBVerboseEqual(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto2.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } - -*/ -package equal - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" -) - -type plugin struct { - *generator.Generator - generator.PluginImports - fmtPkg generator.Single - bytesPkg generator.Single - protoPkg generator.Single -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "equal" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - p.fmtPkg = p.NewImport("fmt") - p.bytesPkg = p.NewImport("bytes") - p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") - - for _, msg := range file.Messages() { - if msg.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, msg.DescriptorProto) { - p.generateMessage(file, msg, true) - } - if gogoproto.HasEqual(file.FileDescriptorProto, msg.DescriptorProto) { - p.generateMessage(file, msg, false) - } - } -} - -func (p *plugin) generateNullableField(fieldname string, verbose bool) { - p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) - p.In() - p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", *this.`, fieldname, `, *that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` != nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that.`, fieldname, ` != nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`} else if that1.`, fieldname, ` != nil {`) -} - -func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) { - p.P(`if that == nil {`) - p.In() - p.P(`if this == nil {`) - p.In() - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that == nil && this != nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.P(``) - p.P(`that1, ok := that.(*`, ccTypeName, `)`) - p.P(`if !ok {`) - p.In() - p.P(`that2, ok := that.(`, ccTypeName, `)`) - p.P(`if ok {`) - p.In() - p.P(`that1 = &that2`) - p.Out() - p.P(`} else {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is not of type *`, ccTypeName, `")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(`if that1 == nil {`) - p.In() - p.P(`if this == nil {`) - p.In() - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is nil && this != nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`} else if this == nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is not nil && this == nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) -} - -func (p *plugin) generateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto, verbose bool) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - fieldname := p.GetOneOfFieldName(message, field) - repeated := field.IsRepeated() - ctype := gogoproto.IsCustomType(field) - nullable := gogoproto.IsNullable(field) - // oneof := field.OneofIndex != nil - if !repeated { - if ctype { - if nullable { - p.P(`if that1.`, fieldname, ` == nil {`) - p.In() - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if !this.`, fieldname, `.Equal(*that1.`, fieldname, `) {`) - } else { - p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) - } - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } else { - if field.IsMessage() || p.IsGroup(field) { - if nullable { - p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) - } else { - p.P(`if !this.`, fieldname, `.Equal(&that1.`, fieldname, `) {`) - } - } else if field.IsBytes() { - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) - } else if field.IsString() { - if nullable && !proto3 { - p.generateNullableField(fieldname, verbose) - } else { - p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) - } - } else { - if nullable && !proto3 { - p.generateNullableField(fieldname, verbose) - } else { - p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) - } - } - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } - } else { - p.P(`if len(this.`, fieldname, `) != len(that1.`, fieldname, `) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", len(this.`, fieldname, `), len(that1.`, fieldname, `))`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.P(`for i := range this.`, fieldname, ` {`) - p.In() - if ctype { - p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) - } else { - if p.IsMap(field) { - m := p.GoMapType(nil, field) - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - mapValue := m.ValueAliasField - if mapValue.IsMessage() || p.IsGroup(mapValue) { - if nullable && valuegoTyp == valuegoAliasTyp { - p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) - } else { - // Equal() has a pointer receiver, but map value is a value type - a := `this.` + fieldname + `[i]` - b := `that1.` + fieldname + `[i]` - if valuegoTyp != valuegoAliasTyp { - // cast back to the type that has the generated methods on it - a = `(` + valuegoTyp + `)(` + a + `)` - b = `(` + valuegoTyp + `)(` + b + `)` - } - p.P(`a := `, a) - p.P(`b := `, b) - if nullable { - p.P(`if !a.Equal(b) {`) - } else { - p.P(`if !(&a).Equal(&b) {`) - } - } - } else if mapValue.IsBytes() { - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) - } else if mapValue.IsString() { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } else { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } - } else if field.IsMessage() || p.IsGroup(field) { - if nullable { - p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) - } else { - p.P(`if !this.`, fieldname, `[i].Equal(&that1.`, fieldname, `[i]) {`) - } - } else if field.IsBytes() { - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) - } else if field.IsString() { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } else { - p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) - } - } - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", i, this.`, fieldname, `[i], i, that1.`, fieldname, `[i])`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } -} - -func (p *plugin) generateMessage(file *generator.FileDescriptor, message *generator.Descriptor, verbose bool) { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if verbose { - p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) - } else { - p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) - } - p.In() - p.generateMsgNullAndTypeCheck(ccTypeName, verbose) - oneofs := make(map[string]struct{}) - - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if oneof { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P(`if that1.`, fieldname, ` == nil {`) - p.In() - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if this.`, fieldname, ` == nil {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that1.`, fieldname, ` != nil")`) - } else { - p.P(`return false`) - } - p.Out() - if verbose { - p.P(`} else if err := this.`, fieldname, `.VerboseEqual(that1.`, fieldname, `); err != nil {`) - } else { - p.P(`} else if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) - } - p.In() - if verbose { - p.P(`return err`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } else { - p.generateField(file, message, field, verbose) - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - fieldname := "XXX_InternalExtensions" - p.P(`thismap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(this)`) - p.P(`thatmap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(that1)`) - p.P(`for k, v := range thismap {`) - p.In() - p.P(`if v2, ok := thatmap[k]; ok {`) - p.In() - p.P(`if !v.Equal(&v2) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k])`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`} else {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In that", k)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - - p.P(`for k, _ := range thatmap {`) - p.In() - p.P(`if _, ok := thismap[k]; !ok {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In this", k)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } else { - fieldname := "XXX_extensions" - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - fieldname := "XXX_unrecognized" - p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) - p.In() - if verbose { - p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) - } else { - p.P(`return false`) - } - p.Out() - p.P(`}`) - } - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - - //Generate Equal methods for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, field := range m.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - if verbose { - p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) - } else { - p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) - } - p.In() - - p.generateMsgNullAndTypeCheck(ccTypeName, verbose) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) - p.generateField(file, message, field, verbose) - - if verbose { - p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - } -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go b/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go deleted file mode 100644 index c2d62f45..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go +++ /dev/null @@ -1,96 +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 equal - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `VerboseEqual(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/face/face.go b/vendor/github.com/gogo/protobuf/plugin/face/face.go deleted file mode 100644 index a0293452..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/face/face.go +++ /dev/null @@ -1,233 +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. - -/* -The face plugin generates a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure. -This interface contains getters for each of the fields in the struct. -The specified struct is also generated with the getters. -This means that getters should be turned off so as not to conflict with face getters. -This allows it to satisfy its own face. - -It is enabled by the following extensions: - - - face - - face_all - -Turn off getters by using the following extensions: - - - getters - - getters_all - -The face plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - message A { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the face plugin, will generate the following code: - - type AFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDescription() string - GetNumber() int64 - GetId() github_com_gogo_protobuf_test_custom.Uuid - } - - func (this *A) Proto() github_com_gogo_protobuf_proto.Message { - return this - } - - func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAFromFace(this) - } - - func (this *A) GetDescription() string { - return this.Description - } - - func (this *A) GetNumber() int64 { - return this.Number - } - - func (this *A) GetId() github_com_gogo_protobuf_test_custom.Uuid { - return this.Id - } - - func NewAFromFace(that AFace) *A { - this := &A{} - this.Description = that.GetDescription() - this.Number = that.GetNumber() - this.Id = that.GetId() - return this - } - -and the following test code: - - func TestAFace(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) - p := NewPopulatedA(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } - } - -The struct A, representing the message, will also be generated just like always. -As you can see A satisfies its own Face, AFace. - -Creating another struct which satisfies AFace is very easy. -Simply create all these methods specified in AFace. -Implementing The Proto method is done with the helper function NewAFromFace: - - func (this *MyStruct) Proto() proto.Message { - return NewAFromFace(this) - } - -just the like TestProto method which is used to test the NewAFromFace function. - -*/ -package face - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type plugin struct { - *generator.Generator - generator.PluginImports -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "face" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if message.DescriptorProto.HasExtension() { - panic("face does not support message with extensions") - } - if gogoproto.HasGoGetters(file.FileDescriptorProto, message.DescriptorProto) { - panic("face requires getters to be disabled please use gogoproto.getters or gogoproto.getters_all and set it to false") - } - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`type `, ccTypeName, `Face interface{`) - p.In() - p.P(`Proto() `, protoPkg.Use(), `.Message`) - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - goTyp, _ := p.GoType(message, field) - if p.IsMap(field) { - m := p.GoMapType(nil, field) - goTyp = m.GoType - } - p.P(`Get`, fieldname, `() `, goTyp) - } - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (this *`, ccTypeName, `) Proto() `, protoPkg.Use(), `.Message {`) - p.In() - p.P(`return this`) - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (this *`, ccTypeName, `) TestProto() `, protoPkg.Use(), `.Message {`) - p.In() - p.P(`return New`, ccTypeName, `FromFace(this)`) - p.Out() - p.P(`}`) - p.P(``) - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - goTyp, _ := p.GoType(message, field) - if p.IsMap(field) { - m := p.GoMapType(nil, field) - goTyp = m.GoType - } - p.P(`func (this *`, ccTypeName, `) Get`, fieldname, `() `, goTyp, `{`) - p.In() - p.P(` return this.`, fieldname) - p.Out() - p.P(`}`) - p.P(``) - } - p.P(``) - p.P(`func New`, ccTypeName, `FromFace(that `, ccTypeName, `Face) *`, ccTypeName, ` {`) - p.In() - p.P(`this := &`, ccTypeName, `{}`) - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - p.P(`this.`, fieldname, ` = that.Get`, fieldname, `()`) - } - p.P(`return this`) - p.Out() - p.P(`}`) - p.P(``) - } -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/face/facetest.go b/vendor/github.com/gogo/protobuf/plugin/face/facetest.go deleted file mode 100644 index 467cc0a6..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/face/facetest.go +++ /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. - -package face - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - - p.P(`func Test`, ccTypeName, `Face(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`msg := p.TestProto()`) - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("%#v !Face Equal %#v", msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go deleted file mode 100644 index 1c13005a..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go +++ /dev/null @@ -1,363 +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. - -/* -The gostring plugin generates a GoString method for each message. -The GoString method is called whenever you use a fmt.Printf as such: - - fmt.Printf("%#v", mymessage) - -or whenever you actually call GoString() -The output produced by the GoString method can be copied from the output into code and used to set a variable. -It is totally valid Go Code and is populated exactly as the struct that was printed out. - -It is enabled by the following extensions: - - - gostring - - gostring_all - -The gostring plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.gostring_all) = true; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the gostring plugin, will generate the following code: - - func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := strings1.Join([]string{`&test.A{` + `Description:` + fmt1.Sprintf("%#v", this.Description), `Number:` + fmt1.Sprintf("%#v", this.Number), `Id:` + fmt1.Sprintf("%#v", this.Id), `XXX_unrecognized:` + fmt1.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s - } - -and the following test code: - - func TestAGoString(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt2.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } - } - -Typically fmt.Printf("%#v") will stop to print when it reaches a pointer and -not print their values, while the generated GoString method will always print all values, recursively. - -*/ -package gostring - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "strconv" - "strings" -) - -type gostring struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewGoString() *gostring { - return &gostring{} -} - -func (p *gostring) Name() string { - return "gostring" -} - -func (p *gostring) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *gostring) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - - p.localName = generator.FileName(file) - - fmtPkg := p.NewImport("fmt") - stringsPkg := p.NewImport("strings") - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - sortPkg := p.NewImport("sort") - strconvPkg := p.NewImport("strconv") - reflectPkg := p.NewImport("reflect") - sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") - - for _, message := range file.Messages() { - if !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - packageName := file.PackageName() - - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) GoString() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - - p.P(`s := make([]string, 0, `, strconv.Itoa(len(message.Field)+4), `)`) - p.P(`s = append(s, "&`, packageName, ".", ccTypeName, `{")`) - - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - fieldname := p.GetFieldName(message, field) - oneof := field.OneofIndex != nil - if oneof { - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - p.Out() - p.P(`}`) - } else if p.IsMap(field) { - m := p.GoMapType(nil, field) - mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField - keysName := `keysFor` + fieldname - keygoTyp, _ := p.GoType(nil, keyField) - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp, _ := p.GoType(nil, keyAliasField) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - keyCapTyp := generator.CamelCase(keygoTyp) - p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) - p.P(`for k, _ := range this.`, fieldname, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(keysName, ` = append(`, keysName, `, k)`) - } else { - p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) - } - p.Out() - p.P(`}`) - p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) - mapName := `mapStringFor` + fieldname - p.P(mapName, ` := "`, mapgoTyp, `{"`) - p.P(`for _, k := range `, keysName, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[k])`) - } else { - p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) - } - p.Out() - p.P(`}`) - p.P(mapName, ` += "}"`) - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`s = append(s, "`, fieldname, `: " + `, mapName, `+ ",\n")`) - p.Out() - p.P(`}`) - } else if field.IsMessage() || p.IsGroup(field) { - if nullable || repeated { - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - } - if nullable || repeated { - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - } else { - p.P(`s = append(s, "`, fieldname, `: " + `, stringsPkg.Use(), `.Replace(this.`, fieldname, `.GoString()`, ",`&`,``,1)", ` + ",\n")`) - } - if nullable || repeated { - p.Out() - p.P(`}`) - } - } else { - if !proto3 && (nullable || repeated) { - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - } - if field.IsEnum() { - if nullable && !repeated && !proto3 { - goTyp, _ := p.GoType(message, field) - p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, packageName, ".", generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) - } else { - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - } - } else { - if nullable && !repeated && !proto3 { - goTyp, _ := p.GoType(message, field) - p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) - } else { - p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) - } - } - if !proto3 && (nullable || repeated) { - p.Out() - p.P(`}`) - } - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`s = append(s, "XXX_InternalExtensions: " + extensionToGoString`, p.localName, `(this) + ",\n")`) - } else { - p.P(`if this.XXX_extensions != nil {`) - p.In() - p.P(`s = append(s, "XXX_extensions: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_extensions) + ",\n")`) - p.Out() - p.P(`}`) - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if this.XXX_unrecognized != nil {`) - p.In() - p.P(`s = append(s, "XXX_unrecognized:" + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_unrecognized) + ",\n")`) - p.Out() - p.P(`}`) - } - - p.P(`s = append(s, "}")`) - //outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") - p.P(`return `, stringsPkg.Use(), `.Join(s, "")`) - p.Out() - p.P(`}`) - - //Generate GoString methods for oneof fields - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - p.P(`func (this *`, ccTypeName, `) GoString() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - outFlds := []string{} - fieldname := p.GetOneOfFieldName(message, field) - if field.IsMessage() || p.IsGroup(field) { - tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") - tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `)`}, "") - outFlds = append(outFlds, tmp) - } else { - tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") - tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, ")"}, "") - outFlds = append(outFlds, tmp) - } - outStr := strings.Join([]string{"s := ", stringsPkg.Use(), ".Join([]string{`&", packageName, ".", ccTypeName, "{` + \n"}, "") - outStr += strings.Join(outFlds, ",\n") - outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") - p.P(outStr) - p.P(`return s`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.P(`func valueToGoString`, p.localName, `(v interface{}, typ string) string {`) - p.In() - p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) - p.P(`if rv.IsNil() {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) - p.P(`return `, fmtPkg.Use(), `.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)`) - p.Out() - p.P(`}`) - - p.P(`func extensionToGoString`, p.localName, `(m `, protoPkg.Use(), `.Message) string {`) - p.In() - p.P(`e := `, protoPkg.Use(), `.GetUnsafeExtensionsMap(m)`) - p.P(`if e == nil { return "nil" }`) - p.P(`s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{"`) - p.P(`keys := make([]int, 0, len(e))`) - p.P(`for k := range e {`) - p.In() - p.P(`keys = append(keys, int(k))`) - p.Out() - p.P(`}`) - p.P(sortPkg.Use(), `.Ints(keys)`) - p.P(`ss := []string{}`) - p.P(`for _, k := range keys {`) - p.In() - p.P(`ss = append(ss, `, strconvPkg.Use(), `.Itoa(k) + ": " + e[int32(k)].GoString())`) - p.Out() - p.P(`}`) - p.P(`s+=`, stringsPkg.Use(), `.Join(ss, ",") + "})"`) - p.P(`return s`) - p.Out() - p.P(`}`) - -} - -func init() { - generator.RegisterPlugin(NewGoString()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go deleted file mode 100644 index c7e6c169..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go +++ /dev/null @@ -1,90 +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 gostring - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - fmtPkg := imports.NewImport("fmt") - parserPkg := imports.NewImport("go/parser") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `GoString(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`s1 := p.GoString()`) - p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%#v", p)`) - p.P(`if s1 != s2 {`) - p.In() - p.P(`t.Fatalf("GoString want %v got %v", s1, s2)`) - p.Out() - p.P(`}`) - p.P(`_, err := `, parserPkg.Use(), `.ParseExpr(s1)`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go deleted file mode 100644 index 3d6a5682..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go +++ /dev/null @@ -1,1353 +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. - -/* -The marshalto plugin generates a Marshal and MarshalTo method for each message. -The `Marshal() ([]byte, error)` method results in the fact that the message -implements the Marshaler interface. -This allows proto.Marshal to be faster by calling the generated Marshal method rather than using reflect to Marshal the struct. - -If is enabled by the following extensions: - - - marshaler - - marshaler_all - -Or the following extensions: - - - unsafe_marshaler - - unsafe_marshaler_all - -That is if you want to use the unsafe package in your generated code. -The speed up using the unsafe package is not very significant. - -The generation of marshalling tests are enabled using one of the following extensions: - - - testgen - - testgen_all - -And benchmarks given it is enabled using one of the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - -option (gogoproto.marshaler_all) = true; - -message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -given to the marshalto plugin, will generate the following code: - - func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil - } - - func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(m.A.Size())) - n2, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.G) > 0 { - for _, msg := range m.G { - data[i] = 0x12 - i++ - i = encodeVarintExample(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil - } - -As shown above Marshal calculates the size of the not yet marshalled message -and allocates the appropriate buffer. -This is followed by calling the MarshalTo method which requires a preallocated buffer. -The MarshalTo method allows a user to rather preallocated a reusable buffer. - -The Size method is generated using the size plugin and the gogoproto.sizer, gogoproto.sizer_all extensions. -The user can also using the generated Size method to check that his reusable buffer is still big enough. - -The generated tests and benchmarks will keep you safe and show that this is really a significant speed improvement. - -An additional message-level option `stable_marshaler` (and the file-level -option `stable_marshaler_all`) exists which causes the generated marshalling -code to behave deterministically. Today, this only changes the serialization of -maps; they are serialized in sort order. -*/ -package marshalto - -import ( - "fmt" - "sort" - "strconv" - "strings" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" -) - -type NumGen interface { - Next() string - Current() string -} - -type numGen struct { - index int -} - -func NewNumGen() NumGen { - return &numGen{0} -} - -func (this *numGen) Next() string { - this.index++ - return this.Current() -} - -func (this *numGen) Current() string { - return strconv.Itoa(this.index) -} - -type marshalto struct { - *generator.Generator - generator.PluginImports - atleastOne bool - unsafePkg generator.Single - errorsPkg generator.Single - protoPkg generator.Single - sortKeysPkg generator.Single - mathPkg generator.Single - localName string - unsafe bool -} - -func NewMarshal() *marshalto { - return &marshalto{} -} - -func NewUnsafeMarshal() *marshalto { - return &marshalto{unsafe: true} -} - -func (p *marshalto) Name() string { - if p.unsafe { - return "unsafemarshaler" - } - return "marshalto" -} - -func (p *marshalto) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *marshalto) callFixed64(varName ...string) { - p.P(`i = encodeFixed64`, p.localName, `(data, i, uint64(`, strings.Join(varName, ""), `))`) -} - -func (p *marshalto) callFixed32(varName ...string) { - p.P(`i = encodeFixed32`, p.localName, `(data, i, uint32(`, strings.Join(varName, ""), `))`) -} - -func (p *marshalto) callVarint(varName ...string) { - p.P(`i = encodeVarint`, p.localName, `(data, i, uint64(`, strings.Join(varName, ""), `))`) -} - -func (p *marshalto) encodeVarint(varName string) { - p.P(`for `, varName, ` >= 1<<7 {`) - p.In() - p.P(`data[i] = uint8(uint64(`, varName, `)&0x7f|0x80)`) - p.P(varName, ` >>= 7`) - p.P(`i++`) - p.Out() - p.P(`}`) - p.P(`data[i] = uint8(`, varName, `)`) - p.P(`i++`) -} - -func (p *marshalto) encodeFixed64(varName string) { - p.P(`data[i] = uint8(`, varName, `)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 8)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 16)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 24)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 32)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 40)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 48)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 56)`) - p.P(`i++`) -} - -func (p *marshalto) unsafeFixed64(varName string, someType string) { - p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&data[i])) = `, varName) - p.P(`i+=8`) -} - -func (p *marshalto) encodeFixed32(varName string) { - p.P(`data[i] = uint8(`, varName, `)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 8)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 16)`) - p.P(`i++`) - p.P(`data[i] = uint8(`, varName, ` >> 24)`) - p.P(`i++`) -} - -func (p *marshalto) unsafeFixed32(varName string, someType string) { - p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&data[i])) = `, varName) - p.P(`i+=4`) -} - -func (p *marshalto) encodeKey(fieldNumber int32, wireType int) { - x := uint32(fieldNumber)<<3 | uint32(wireType) - i := 0 - keybuf := make([]byte, 0) - for i = 0; x > 127; i++ { - keybuf = append(keybuf, 0x80|uint8(x&0x7F)) - x >>= 7 - } - keybuf = append(keybuf, uint8(x)) - for _, b := range keybuf { - p.P(`data[i] = `, fmt.Sprintf("%#v", b)) - p.P(`i++`) - } -} - -func keySize(fieldNumber int32, wireType int) int { - x := uint32(fieldNumber)<<3 | uint32(wireType) - size := 0 - for size = 0; x > 127; size++ { - x >>= 7 - } - size++ - return size -} - -func wireToType(wire string) int { - switch wire { - case "fixed64": - return proto.WireFixed64 - case "fixed32": - return proto.WireFixed32 - case "varint": - return proto.WireVarint - case "bytes": - return proto.WireBytes - case "group": - return proto.WireBytes - case "zigzag32": - return proto.WireVarint - case "zigzag64": - return proto.WireVarint - } - panic("unreachable") -} - -func (p *marshalto) mapField(numGen NumGen, fieldTyp descriptor.FieldDescriptorProto_Type, varName string, protoSizer bool) { - switch fieldTyp { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(`, varName, `))`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(`, varName, `))`) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - p.callVarint(varName) - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - p.callFixed64(varName) - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - p.callFixed32(varName) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - p.P(`if `, varName, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - p.callVarint(`len(`, varName, `)`) - p.P(`i+=copy(data[i:], `, varName, `)`) - case descriptor.FieldDescriptorProto_TYPE_SINT32: - p.callVarint(`(uint32(`, varName, `) << 1) ^ uint32((`, varName, ` >> 31))`) - case descriptor.FieldDescriptorProto_TYPE_SINT64: - p.callVarint(`(uint64(`, varName, `) << 1) ^ uint64((`, varName, ` >> 63))`) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if protoSizer { - p.callVarint(varName, `.ProtoSize()`) - } else { - p.callVarint(varName, `.Size()`) - } - p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`, numGen.Current()) - } -} - -type orderFields []*descriptor.FieldDescriptorProto - -func (this orderFields) Len() int { - return len(this) -} - -func (this orderFields) Less(i, j int) bool { - return this[i].GetNumber() < this[j].GetNumber() -} - -func (this orderFields) Swap(i, j int) { - this[i], this[j] = this[j], this[i] -} - -func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { - fieldname := p.GetOneOfFieldName(message, field) - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - required := field.IsRequired() - - protoSizer := gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) - doNilCheck := gogoproto.NeedsNilCheck(proto3, field) - if required && nullable { - p.P(`if m.`, fieldname, `== nil {`) - p.In() - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - p.P(`return 0, new(`, p.protoPkg.Use(), `.RequiredNotSetError)`) - } else { - p.P(`return 0, `, p.protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) - } - p.Out() - p.P(`} else {`) - } else if repeated { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - } else if doNilCheck { - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - } - packed := field.IsPacked() - wireType := field.WireType() - fieldNumber := field.GetNumber() - if packed { - wireType = proto.WireBytes - } - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - if !p.unsafe || gogoproto.IsCastType(field) { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) - p.encodeFixed64("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) - p.encodeFixed64("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(*m.`+fieldname, `))`) - } - } else { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed64("num", "float64") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("num", "float64") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`m.`+fieldname, "float64") - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`m.`+fieldname, "float64") - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`*m.`+fieldname, `float64`) - } - } - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - if !p.unsafe || gogoproto.IsCastType(field) { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) - p.encodeFixed32("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) - p.encodeFixed32("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(*m.`+fieldname, `))`) - } - } else { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed32("num", "float32") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("num", "float32") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`m.`+fieldname, `float32`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`m.`+fieldname, `float32`) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`*m.`+fieldname, "float32") - } - } - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - if packed { - jvar := "j" + numGen.Next() - p.P(`data`, numGen.Next(), ` := make([]byte, len(m.`, fieldname, `)*10)`) - p.P(`var `, jvar, ` int`) - if *field.Type == descriptor.FieldDescriptorProto_TYPE_INT64 || - *field.Type == descriptor.FieldDescriptorProto_TYPE_INT32 { - p.P(`for _, num1 := range m.`, fieldname, ` {`) - p.In() - p.P(`num := uint64(num1)`) - } else { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - } - p.P(`for num >= 1<<7 {`) - p.In() - p.P(`data`, numGen.Current(), `[`, jvar, `] = uint8(uint64(num)&0x7f|0x80)`) - p.P(`num >>= 7`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.P(`data`, numGen.Current(), `[`, jvar, `] = uint8(num)`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.encodeKey(fieldNumber, wireType) - p.callVarint(jvar) - p.P(`i += copy(data[i:], data`, numGen.Current(), `[:`, jvar, `])`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`m.`, fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`m.`, fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`*m.`, fieldname) - } - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeFixed64("num") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.encodeFixed64("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed64("m." + fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed64("m." + fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed64("*m." + fieldname) - } - } else { - typeName := "int64" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED64 { - typeName = "uint64" - } - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed64("num", typeName) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("num", typeName) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("m."+fieldname, typeName) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("m."+fieldname, typeName) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("*m."+fieldname, typeName) - } - } - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeFixed32("num") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.encodeFixed32("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed32("m." + fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed32("m." + fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed32("*m." + fieldname) - } - } else { - typeName := "int32" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED32 { - typeName = "uint32" - } - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed32("num", typeName) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("num", typeName) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("m."+fieldname, typeName) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("m."+fieldname, typeName) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("*m."+fieldname, typeName) - } - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`for _, b := range m.`, fieldname, ` {`) - p.In() - p.P(`if b {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, b := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`if b {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`if m.`, fieldname, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.P(`if m.`, fieldname, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - } else { - p.encodeKey(fieldNumber, wireType) - p.P(`if *m.`, fieldname, ` {`) - p.In() - p.P(`data[i] = 1`) - p.Out() - p.P(`} else {`) - p.In() - p.P(`data[i] = 0`) - p.Out() - p.P(`}`) - p.P(`i++`) - } - case descriptor.FieldDescriptorProto_TYPE_STRING: - if repeated { - p.P(`for _, s := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`l = len(s)`) - p.encodeVarint("l") - p.P(`i+=copy(data[i:], s)`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(*m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], *m.`, fieldname, `)`) - } - case descriptor.FieldDescriptorProto_TYPE_GROUP: - panic(fmt.Errorf("marshaler does not support group %v", fieldname)) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if p.IsMap(field) { - m := p.GoMapType(nil, field) - keygoTyp, keywire := p.GoType(nil, m.KeyField) - keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) - // keys may not be pointers - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - keyCapTyp := generator.CamelCase(keygoTyp) - valuegoTyp, valuewire := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - keyKeySize := keySize(1, wireToType(keywire)) - valueKeySize := keySize(2, wireToType(valuewire)) - if gogoproto.IsStableMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - keysName := `keysFor` + fieldname - p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(m.`, fieldname, `))`) - p.P(`for k, _ := range m.`, fieldname, ` {`) - p.In() - p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) - p.Out() - p.P(`}`) - p.P(p.sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) - p.P(`for _, k := range `, keysName, ` {`) - } else { - p.P(`for k, _ := range m.`, fieldname, ` {`) - } - p.In() - p.encodeKey(fieldNumber, wireType) - sum := []string{strconv.Itoa(keyKeySize)} - switch m.KeyField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, `8`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, `4`) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, `sov`+p.localName+`(uint64(k))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, `soz`+p.localName+`(uint64(k))`) - } - if gogoproto.IsStableMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`v := m.`, fieldname, `[`, keygoAliasTyp, `(k)]`) - } else { - p.P(`v := m.`, fieldname, `[k]`) - } - accessor := `v` - switch m.ValueField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, strconv.Itoa(8)) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, strconv.Itoa(4)) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `sov`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - p.P(`byteSize := 0`) - if proto3 { - p.P(`if len(v) > 0 {`) - } else { - p.P(`if v != nil {`) - } - p.In() - p.P(`byteSize = `, strconv.Itoa(valueKeySize), ` + len(v)+sov`+p.localName+`(uint64(len(v)))`) - p.Out() - p.P(`}`) - sum = append(sum, `byteSize`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `soz`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if valuegoTyp != valuegoAliasTyp { - if nullable { - // cast back to the type that has the generated methods on it - accessor = `((` + valuegoTyp + `)(` + accessor + `))` - } else { - accessor = `((*` + valuegoTyp + `)(&` + accessor + `))` - } - } else if !nullable { - accessor = `(&v)` - } - p.P(`msgSize := 0`) - p.P(`if `, accessor, ` != nil {`) - p.In() - if protoSizer { - p.P(`msgSize = `, accessor, `.ProtoSize()`) - } else { - p.P(`msgSize = `, accessor, `.Size()`) - } - p.Out() - p.P(`msgSize += `, strconv.Itoa(valueKeySize), ` + sov`+p.localName+`(uint64(msgSize))`) - p.P(`}`) - sum = append(sum, `msgSize`) - } - p.P(`mapSize := `, strings.Join(sum, " + ")) - p.callVarint("mapSize") - p.encodeKey(1, wireToType(keywire)) - p.mapField(numGen, m.KeyField.GetType(), "k", protoSizer) - nullableMsg := m.ValueField.GetType() == descriptor.FieldDescriptorProto_TYPE_MESSAGE && nullable - if nullableMsg { - p.P(`if `, accessor, ` != nil {`) - p.In() - } - if m.ValueField.IsBytes() { - if proto3 { - p.P(`if len(`, accessor, `) > 0 {`) - } else { - p.P(`if `, accessor, ` != nil {`) - } - p.In() - } - p.encodeKey(2, wireToType(valuewire)) - p.mapField(numGen, m.ValueField.GetType(), accessor, protoSizer) - if nullableMsg || m.ValueField.IsBytes() { - p.Out() - p.P(`}`) - } - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, msg := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - if protoSizer { - p.callVarint("msg.ProtoSize()") - } else { - p.callVarint("msg.Size()") - } - p.P(`n, err := msg.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`) - p.Out() - p.P(`}`) - } else { - p.encodeKey(fieldNumber, wireType) - if protoSizer { - p.callVarint(`m.`, fieldname, `.ProtoSize()`) - } else { - p.callVarint(`m.`, fieldname, `.Size()`) - } - p.P(`n`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`, numGen.Current()) - } - case descriptor.FieldDescriptorProto_TYPE_BYTES: - if !gogoproto.IsCustomType(field) { - if repeated { - p.P(`for _, b := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint("len(b)") - p.P(`i+=copy(data[i:], b)`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - p.Out() - p.P(`}`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `)`) - p.P(`i+=copy(data[i:], m.`, fieldname, `)`) - } - } else { - if repeated { - p.P(`for _, msg := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - if protoSizer { - p.callVarint(`msg.ProtoSize()`) - } else { - p.callVarint(`msg.Size()`) - } - p.P(`n, err := msg.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`) - p.Out() - p.P(`}`) - } else { - p.encodeKey(fieldNumber, wireType) - if protoSizer { - p.callVarint(`m.`, fieldname, `.ProtoSize()`) - } else { - p.callVarint(`m.`, fieldname, `.Size()`) - } - p.P(`n`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`, numGen.Current()) - } - } - case descriptor.FieldDescriptorProto_TYPE_SINT32: - if packed { - datavar := "data" + numGen.Next() - jvar := "j" + numGen.Next() - p.P(datavar, ` := make([]byte, len(m.`, fieldname, ")*5)") - p.P(`var `, jvar, ` int`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - xvar := "x" + numGen.Next() - p.P(xvar, ` := (uint32(num) << 1) ^ uint32((num >> 31))`) - p.P(`for `, xvar, ` >= 1<<7 {`) - p.In() - p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) - p.P(jvar, `++`) - p.P(xvar, ` >>= 7`) - p.Out() - p.P(`}`) - p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.encodeKey(fieldNumber, wireType) - p.callVarint(jvar) - p.P(`i+=copy(data[i:], `, datavar, `[:`, jvar, `])`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`x`, numGen.Next(), ` := (uint32(num) << 1) ^ uint32((num >> 31))`) - p.encodeVarint("x" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint32(*m.`, fieldname, `) << 1) ^ uint32((*m.`, fieldname, ` >> 31))`) - } - case descriptor.FieldDescriptorProto_TYPE_SINT64: - if packed { - jvar := "j" + numGen.Next() - xvar := "x" + numGen.Next() - datavar := "data" + numGen.Next() - p.P(`var `, jvar, ` int`) - p.P(datavar, ` := make([]byte, len(m.`, fieldname, `)*10)`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(xvar, ` := (uint64(num) << 1) ^ uint64((num >> 63))`) - p.P(`for `, xvar, ` >= 1<<7 {`) - p.In() - p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) - p.P(jvar, `++`) - p.P(xvar, ` >>= 7`) - p.Out() - p.P(`}`) - p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) - p.P(jvar, `++`) - p.Out() - p.P(`}`) - p.encodeKey(fieldNumber, wireType) - p.callVarint(jvar) - p.P(`i+=copy(data[i:], `, datavar, `[:`, jvar, `])`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`x`, numGen.Next(), ` := (uint64(num) << 1) ^ uint64((num >> 63))`) - p.encodeVarint("x" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`(uint64(*m.`, fieldname, `) << 1) ^ uint64((*m.`, fieldname, ` >> 63))`) - } - default: - panic("not implemented") - } - if (required && nullable) || repeated || doNilCheck { - p.Out() - p.P(`}`) - } -} - -func (p *marshalto) Generate(file *generator.FileDescriptor) { - numGen := NewNumGen() - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - p.localName = generator.FileName(file) - - p.mathPkg = p.NewImport("math") - p.sortKeysPkg = p.NewImport("github.com/gogo/protobuf/sortkeys") - p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - p.protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - p.unsafePkg = p.NewImport("unsafe") - p.errorsPkg = p.NewImport("errors") - - for _, message := range file.Messages() { - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if p.unsafe { - if !gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) - } - } - if !p.unsafe { - if !gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) - } - } - p.atleastOne = true - - p.P(`func (m *`, ccTypeName, `) Marshal() (data []byte, err error) {`) - p.In() - if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`size := m.ProtoSize()`) - } else { - p.P(`size := m.Size()`) - } - p.P(`data = make([]byte, size)`) - p.P(`n, err := m.MarshalTo(data)`) - p.P(`if err != nil {`) - p.In() - p.P(`return nil, err`) - p.Out() - p.P(`}`) - p.P(`return data[:n], nil`) - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (m *`, ccTypeName, `) MarshalTo(data []byte) (int, error) {`) - p.In() - p.P(`var i int`) - p.P(`_ = i`) - p.P(`var l int`) - p.P(`_ = l`) - fields := orderFields(message.GetField()) - sort.Sort(fields) - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.generateField(proto3, numGen, file, message, field) - } else { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; !ok { - oneofs[fieldname] = struct{}{} - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - p.P(`nn`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=nn`, numGen.Current()) - p.Out() - p.P(`}`) - } - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`n, err := `, p.protoPkg.Use(), `.EncodeInternalExtension(m, data[i:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return 0, err`) - p.Out() - p.P(`}`) - p.P(`i+=n`) - } else { - p.P(`if m.XXX_extensions != nil {`) - p.In() - p.P(`i+=copy(data[i:], m.XXX_extensions)`) - p.Out() - p.P(`}`) - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if m.XXX_unrecognized != nil {`) - p.In() - p.P(`i+=copy(data[i:], m.XXX_unrecognized)`) - p.Out() - p.P(`}`) - } - - p.P(`return i, nil`) - p.Out() - p.P(`}`) - p.P() - - //Generate MarshalTo methods for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, field := range m.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - p.P(`func (m *`, ccTypeName, `) MarshalTo(data []byte) (int, error) {`) - p.In() - p.P(`i := 0`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) - p.generateField(false, numGen, file, message, field) - p.P(`return i, nil`) - p.Out() - p.P(`}`) - } - } - - if p.atleastOne { - p.P(`func encodeFixed64`, p.localName, `(data []byte, offset int, v uint64) int {`) - p.In() - p.P(`data[offset] = uint8(v)`) - p.P(`data[offset+1] = uint8(v >> 8)`) - p.P(`data[offset+2] = uint8(v >> 16)`) - p.P(`data[offset+3] = uint8(v >> 24)`) - p.P(`data[offset+4] = uint8(v >> 32)`) - p.P(`data[offset+5] = uint8(v >> 40)`) - p.P(`data[offset+6] = uint8(v >> 48)`) - p.P(`data[offset+7] = uint8(v >> 56)`) - p.P(`return offset+8`) - p.Out() - p.P(`}`) - - p.P(`func encodeFixed32`, p.localName, `(data []byte, offset int, v uint32) int {`) - p.In() - p.P(`data[offset] = uint8(v)`) - p.P(`data[offset+1] = uint8(v >> 8)`) - p.P(`data[offset+2] = uint8(v >> 16)`) - p.P(`data[offset+3] = uint8(v >> 24)`) - p.P(`return offset+4`) - p.Out() - p.P(`}`) - - p.P(`func encodeVarint`, p.localName, `(data []byte, offset int, v uint64) int {`) - p.In() - p.P(`for v >= 1<<7 {`) - p.In() - p.P(`data[offset] = uint8(v&0x7f|0x80)`) - p.P(`v >>= 7`) - p.P(`offset++`) - p.Out() - p.P(`}`) - p.P(`data[offset] = uint8(v)`) - p.P(`return offset+1`) - p.Out() - p.P(`}`) - } - -} - -func init() { - generator.RegisterPlugin(NewMarshal()) - generator.RegisterPlugin(NewUnsafeMarshal()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go b/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go deleted file mode 100644 index 0f822e8a..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go +++ /dev/null @@ -1,93 +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. - -/* -The oneofcheck plugin is used to check whether oneof is not used incorrectly. -For instance: -An error is caused if a oneof field: - - is used in a face - - is an embedded field - -*/ -package oneofcheck - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "os" -) - -type plugin struct { - *generator.Generator -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "oneofcheck" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - for _, msg := range file.Messages() { - face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) - for _, field := range msg.GetField() { - if field.OneofIndex == nil { - continue - } - if face { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in a face and oneof\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if gogoproto.IsEmbed(field) { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and an embedded field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if !gogoproto.IsNullable(field) { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and a non-nullable field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - if gogoproto.IsUnion(file.FileDescriptorProto, msg.DescriptorProto) { - fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and in an union (deprecated)\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) - os.Exit(1) - } - } - } -} - -func (p *plugin) GenerateImports(*generator.FileDescriptor) {} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go deleted file mode 100644 index 8d6ca15c..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go +++ /dev/null @@ -1,776 +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. - -/* -The populate plugin generates a NewPopulated function. -This function returns a newly populated structure. - -It is enabled by the following extensions: - - - populate - - populate_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.populate_all) = true; - - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the populate plugin, will generate code the following code: - - func NewPopulatedB(r randyExample, easy bool) *B { - this := &B{} - v2 := NewPopulatedA(r, easy) - this.A = *v2 - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) - for i := 0; i < v3; i++ { - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.G[i] = *v4 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 3) - } - return this - } - -The idea that is useful for testing. -Most of the other plugins' generated test code uses it. -You will still be able to use the generated test code of other packages -if you turn off the popluate plugin and write your own custom NewPopulated function. - -If the easy flag is not set the XXX_unrecognized and XXX_extensions fields are also populated. -These have caused problems with JSON marshalling and unmarshalling tests. - -*/ -package populate - -import ( - "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" - "math" - "strconv" - "strings" -) - -type VarGen interface { - Next() string - Current() string -} - -type varGen struct { - index int64 -} - -func NewVarGen() VarGen { - return &varGen{0} -} - -func (this *varGen) Next() string { - this.index++ - return fmt.Sprintf("v%d", this.index) -} - -func (this *varGen) Current() string { - return fmt.Sprintf("v%d", this.index) -} - -type plugin struct { - *generator.Generator - generator.PluginImports - varGen VarGen - atleastOne bool - localName string -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "populate" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g -} - -func value(typeName string, fieldType descriptor.FieldDescriptorProto_Type) string { - switch fieldType { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - return typeName + "(r.Float64())" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - return typeName + "(r.Float32())" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64, - descriptor.FieldDescriptorProto_TYPE_SINT64: - return typeName + "(r.Int63())" - case descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_FIXED64: - return typeName + "(uint64(r.Uint32()))" - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - return typeName + "(r.Int31())" - case descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_FIXED32: - return typeName + "(r.Uint32())" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - return typeName + `(bool(r.Intn(2) == 0))` - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE, - descriptor.FieldDescriptorProto_TYPE_BYTES: - } - panic(fmt.Errorf("unexpected type %v", typeName)) -} - -func negative(fieldType descriptor.FieldDescriptorProto_Type) bool { - switch fieldType { - case descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_BOOL: - return false - } - return true -} - -func getFuncName(goTypName string) string { - funcName := "NewPopulated" + goTypName - goTypNames := strings.Split(goTypName, ".") - if len(goTypNames) == 2 { - funcName = goTypNames[0] + ".NewPopulated" + goTypNames[1] - } else if len(goTypNames) != 1 { - panic(fmt.Errorf("unreachable: too many dots in %v", goTypName)) - } - return funcName -} - -func getFuncCall(goTypName string) string { - funcName := getFuncName(goTypName) - funcCall := funcName + "(r, easy)" - return funcCall -} - -func getCustomFuncCall(goTypName string) string { - funcName := getFuncName(goTypName) - funcCall := funcName + "(r)" - return funcCall -} - -func (p *plugin) getEnumVal(field *descriptor.FieldDescriptorProto, goTyp string) string { - enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) - l := len(enum.Value) - values := make([]string, l) - for i := range enum.Value { - values[i] = strconv.Itoa(int(*enum.Value[i].Number)) - } - arr := "[]int32{" + strings.Join(values, ",") + "}" - val := strings.Join([]string{generator.GoTypeToName(goTyp), `(`, arr, `[r.Intn(`, fmt.Sprintf("%d", l), `)])`}, "") - return val -} - -func (p *plugin) GenerateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - goTyp, _ := p.GoType(message, field) - fieldname := p.GetOneOfFieldName(message, field) - goTypName := generator.GoTypeToName(goTyp) - if p.IsMap(field) { - m := p.GoMapType(nil, field) - keygoTyp, _ := p.GoType(nil, m.KeyField) - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - keytypName := generator.GoTypeToName(keygoTyp) - keygoAliasTyp = generator.GoTypeToName(keygoAliasTyp) - valuetypAliasName := generator.GoTypeToName(valuegoAliasTyp) - - nullable, valuegoTyp, valuegoAliasTyp := generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, m.GoType, `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - keyval := "" - if m.KeyField.IsString() { - keyval = fmt.Sprintf("randString%v(r)", p.localName) - } else { - keyval = value(keytypName, m.KeyField.GetType()) - } - if keygoAliasTyp != keygoTyp { - keyval = keygoAliasTyp + `(` + keyval + `)` - } - if m.ValueField.IsMessage() || p.IsGroup(field) { - s := `this.` + fieldname + `[` + keyval + `] = ` - goTypName = generator.GoTypeToName(valuegoTyp) - funcCall := getFuncCall(goTypName) - if !nullable { - funcCall = `*` + funcCall - } - if valuegoTyp != valuegoAliasTyp { - funcCall = `(` + valuegoAliasTyp + `)(` + funcCall + `)` - } - s += funcCall - p.P(s) - } else if m.ValueField.IsEnum() { - s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + p.getEnumVal(m.ValueField, valuegoTyp) - p.P(s) - } else if m.ValueField.IsBytes() { - count := p.varGen.Next() - p.P(count, ` := r.Intn(100)`) - p.P(p.varGen.Next(), ` := `, keyval) - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = make(`, valuegoTyp, `, `, count, `)`) - p.P(`for i := 0; i < `, count, `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `][i] = byte(r.Intn(256))`) - p.Out() - p.P(`}`) - } else if m.ValueField.IsString() { - s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + fmt.Sprintf("randString%v(r)", p.localName) - p.P(s) - } else { - p.P(p.varGen.Next(), ` := `, keyval) - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = `, value(valuetypAliasName, m.ValueField.GetType())) - if negative(m.ValueField.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] *= -1`) - p.Out() - p.P(`}`) - } - } - p.Out() - p.P(`}`) - } else if field.IsMessage() || p.IsGroup(field) { - funcCall := getFuncCall(goTypName) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(5)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - if gogoproto.IsNullable(field) { - p.P(`this.`, fieldname, `[i] = `, funcCall) - } else { - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) - } - p.Out() - p.P(`}`) - } else { - if gogoproto.IsNullable(field) { - p.P(`this.`, fieldname, ` = `, funcCall) - } else { - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) - } - } - } else { - if field.IsEnum() { - val := p.getEnumVal(field, goTyp) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = `, val) - p.Out() - p.P(`}`) - } else if !gogoproto.IsNullable(field) || proto3 { - p.P(`this.`, fieldname, ` = `, val) - } else { - p.P(p.varGen.Next(), ` := `, val) - p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) - } - } else if gogoproto.IsCustomType(field) { - funcCall := getCustomFuncCall(goTypName) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) - p.Out() - p.P(`}`) - } else if gogoproto.IsNullable(field) { - p.P(`this.`, fieldname, ` = `, funcCall) - } else { - p.P(p.varGen.Next(), `:= `, funcCall) - p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) - } - } else if field.IsBytes() { - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`this.`, fieldname, `[i] = make([]byte,`, p.varGen.Current(), `)`) - p.P(`for j := 0; j < `, p.varGen.Current(), `; j++ {`) - p.In() - p.P(`this.`, fieldname, `[i][j] = byte(r.Intn(256))`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } else { - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = byte(r.Intn(256))`) - p.Out() - p.P(`}`) - } - } else if field.IsString() { - val := fmt.Sprintf("randString%v(r)", p.localName) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = `, val) - p.Out() - p.P(`}`) - } else if !gogoproto.IsNullable(field) || proto3 { - p.P(`this.`, fieldname, ` = `, val) - } else { - p.P(p.varGen.Next(), `:= `, val) - p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) - } - } else { - typName := generator.GoTypeToName(goTyp) - if field.IsRepeated() { - p.P(p.varGen.Next(), ` := r.Intn(10)`) - p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`this.`, fieldname, `[i] = `, value(typName, field.GetType())) - if negative(field.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(`this.`, fieldname, `[i] *= -1`) - p.Out() - p.P(`}`) - } - p.Out() - p.P(`}`) - } else if !gogoproto.IsNullable(field) || proto3 { - p.P(`this.`, fieldname, ` = `, value(typName, field.GetType())) - if negative(field.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(`this.`, fieldname, ` *= -1`) - p.Out() - p.P(`}`) - } - } else { - p.P(p.varGen.Next(), ` := `, value(typName, field.GetType())) - if negative(field.GetType()) { - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(p.varGen.Current(), ` *= -1`) - p.Out() - p.P(`}`) - } - p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) - } - } - } -} - -func (p *plugin) hasLoop(field *descriptor.FieldDescriptorProto, visited []*generator.Descriptor, excludes []*generator.Descriptor) *generator.Descriptor { - if field.IsMessage() || p.IsGroup(field) || p.IsMap(field) { - var fieldMessage *generator.Descriptor - if p.IsMap(field) { - m := p.GoMapType(nil, field) - if !m.ValueField.IsMessage() { - return nil - } - fieldMessage = p.ObjectNamed(m.ValueField.GetTypeName()).(*generator.Descriptor) - } else { - fieldMessage = p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) - } - fieldTypeName := generator.CamelCaseSlice(fieldMessage.TypeName()) - for _, message := range visited { - messageTypeName := generator.CamelCaseSlice(message.TypeName()) - if fieldTypeName == messageTypeName { - for _, e := range excludes { - if fieldTypeName == generator.CamelCaseSlice(e.TypeName()) { - return nil - } - } - return fieldMessage - } - } - for _, f := range fieldMessage.Field { - visited = append(visited, fieldMessage) - loopTo := p.hasLoop(f, visited, excludes) - if loopTo != nil { - return loopTo - } - } - } - return nil -} - -func (p *plugin) loops(field *descriptor.FieldDescriptorProto, message *generator.Descriptor) int { - //fmt.Fprintf(os.Stderr, "loops %v %v\n", field.GetTypeName(), generator.CamelCaseSlice(message.TypeName())) - excludes := []*generator.Descriptor{} - loops := 0 - for { - visited := []*generator.Descriptor{} - loopTo := p.hasLoop(field, visited, excludes) - if loopTo == nil { - break - } - //fmt.Fprintf(os.Stderr, "loopTo %v\n", generator.CamelCaseSlice(loopTo.TypeName())) - excludes = append(excludes, loopTo) - loops++ - } - return loops -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.atleastOne = false - p.PluginImports = generator.NewPluginImports(p.Generator) - p.varGen = NewVarGen() - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - - p.localName = generator.FileName(file) - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - - for _, message := range file.Messages() { - if !gogoproto.HasPopulate(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - loopLevels := make([]int, len(message.Field)) - maxLoopLevel := 0 - for i, field := range message.Field { - loopLevels[i] = p.loops(field, message) - if loopLevels[i] > maxLoopLevel { - maxLoopLevel = loopLevels[i] - } - } - ranTotal := 0 - for i := range loopLevels { - ranTotal += int(math.Pow10(maxLoopLevel - loopLevels[i])) - } - p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) - p.In() - p.P(`this := &`, ccTypeName, `{}`) - if gogoproto.IsUnion(message.File(), message.DescriptorProto) && len(message.Field) > 0 { - p.P(`fieldNum := r.Intn(`, fmt.Sprintf("%d", ranTotal), `)`) - p.P(`switch fieldNum {`) - k := 0 - for i, field := range message.Field { - is := []string{} - ran := int(math.Pow10(maxLoopLevel - loopLevels[i])) - for j := 0; j < ran; j++ { - is = append(is, fmt.Sprintf("%d", j+k)) - } - k += ran - p.P(`case `, strings.Join(is, ","), `:`) - p.In() - p.GenerateField(file, message, field) - p.Out() - } - p.P(`}`) - } else { - var maxFieldNumber int32 - oneofs := make(map[string]struct{}) - for fieldIndex, field := range message.Field { - if field.GetNumber() > maxFieldNumber { - maxFieldNumber = field.GetNumber() - } - oneof := field.OneofIndex != nil - if !oneof { - if field.IsRequired() || (!gogoproto.IsNullable(field) && !field.IsRepeated()) || (proto3 && !field.IsMessage()) { - p.GenerateField(file, message, field) - } else { - if loopLevels[fieldIndex] > 0 { - p.P(`if r.Intn(10) == 0 {`) - } else { - p.P(`if r.Intn(10) != 0 {`) - } - p.In() - p.GenerateField(file, message, field) - p.Out() - p.P(`}`) - } - } else { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - fieldNumbers := []int32{} - for _, f := range message.Field { - fname := p.GetFieldName(message, f) - if fname == fieldname { - fieldNumbers = append(fieldNumbers, f.GetNumber()) - } - } - - p.P(`oneofNumber_`, fieldname, ` := `, fmt.Sprintf("%#v", fieldNumbers), `[r.Intn(`, strconv.Itoa(len(fieldNumbers)), `)]`) - p.P(`switch oneofNumber_`, fieldname, ` {`) - for _, f := range message.Field { - fname := p.GetFieldName(message, f) - if fname != fieldname { - continue - } - p.P(`case `, strconv.Itoa(int(f.GetNumber())), `:`) - p.In() - ccTypeName := p.OneOfTypeName(message, f) - p.P(`this.`, fname, ` = NewPopulated`, ccTypeName, `(r, easy)`) - p.Out() - } - p.P(`}`) - } - } - if message.DescriptorProto.HasExtension() { - p.P(`if !easy && r.Intn(10) != 0 {`) - p.In() - p.P(`l := r.Intn(5)`) - p.P(`for i := 0; i < l; i++ {`) - p.In() - if len(message.DescriptorProto.GetExtensionRange()) > 1 { - p.P(`eIndex := r.Intn(`, strconv.Itoa(len(message.DescriptorProto.GetExtensionRange())), `)`) - p.P(`fieldNumber := 0`) - p.P(`switch eIndex {`) - for i, e := range message.DescriptorProto.GetExtensionRange() { - p.P(`case `, strconv.Itoa(i), `:`) - p.In() - p.P(`fieldNumber = r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) - p.Out() - if e.GetEnd() > maxFieldNumber { - maxFieldNumber = e.GetEnd() - } - } - p.P(`}`) - } else { - e := message.DescriptorProto.GetExtensionRange()[0] - p.P(`fieldNumber := r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) - if e.GetEnd() > maxFieldNumber { - maxFieldNumber = e.GetEnd() - } - } - p.P(`wire := r.Intn(4)`) - p.P(`if wire == 3 { wire = 5 }`) - p.P(`data := randField`, p.localName, `(nil, r, fieldNumber, wire)`) - p.P(protoPkg.Use(), `.SetRawExtension(this, int32(fieldNumber), data)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - if maxFieldNumber < (1 << 10) { - p.P(`if !easy && r.Intn(10) != 0 {`) - p.In() - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`this.XXX_unrecognized = randUnrecognized`, p.localName, `(r, `, strconv.Itoa(int(maxFieldNumber+1)), `)`) - } - p.Out() - p.P(`}`) - } - } - p.P(`return this`) - p.Out() - p.P(`}`) - p.P(``) - - //Generate NewPopulated functions for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, f := range m.Field { - oneof := f.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, f) - p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) - p.In() - p.P(`this := &`, ccTypeName, `{}`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) - p.GenerateField(file, message, f) - p.P(`return this`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.P(`type randy`, p.localName, ` interface {`) - p.In() - p.P(`Float32() float32`) - p.P(`Float64() float64`) - p.P(`Int63() int64`) - p.P(`Int31() int32`) - p.P(`Uint32() uint32`) - p.P(`Intn(n int) int`) - p.Out() - p.P(`}`) - - p.P(`func randUTF8Rune`, p.localName, `(r randy`, p.localName, `) rune {`) - p.In() - p.P(`ru := r.Intn(62)`) - p.P(`if ru < 10 {`) - p.In() - p.P(`return rune(ru+48)`) - p.Out() - p.P(`} else if ru < 36 {`) - p.In() - p.P(`return rune(ru+55)`) - p.Out() - p.P(`}`) - p.P(`return rune(ru+61)`) - p.Out() - p.P(`}`) - - p.P(`func randString`, p.localName, `(r randy`, p.localName, `) string {`) - p.In() - p.P(p.varGen.Next(), ` := r.Intn(100)`) - p.P(`tmps := make([]rune, `, p.varGen.Current(), `)`) - p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) - p.In() - p.P(`tmps[i] = randUTF8Rune`, p.localName, `(r)`) - p.Out() - p.P(`}`) - p.P(`return string(tmps)`) - p.Out() - p.P(`}`) - - p.P(`func randUnrecognized`, p.localName, `(r randy`, p.localName, `, maxFieldNumber int) (data []byte) {`) - p.In() - p.P(`l := r.Intn(5)`) - p.P(`for i := 0; i < l; i++ {`) - p.In() - p.P(`wire := r.Intn(4)`) - p.P(`if wire == 3 { wire = 5 }`) - p.P(`fieldNumber := maxFieldNumber + r.Intn(100)`) - p.P(`data = randField`, p.localName, `(data, r, fieldNumber, wire)`) - p.Out() - p.P(`}`) - p.P(`return data`) - p.Out() - p.P(`}`) - - p.P(`func randField`, p.localName, `(data []byte, r randy`, p.localName, `, fieldNumber int, wire int) []byte {`) - p.In() - p.P(`key := uint32(fieldNumber)<<3 | uint32(wire)`) - p.P(`switch wire {`) - p.P(`case 0:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(p.varGen.Next(), ` := r.Int63()`) - p.P(`if r.Intn(2) == 0 {`) - p.In() - p.P(p.varGen.Current(), ` *= -1`) - p.Out() - p.P(`}`) - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(`, p.varGen.Current(), `))`) - p.Out() - p.P(`case 1:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(`data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))`) - p.Out() - p.P(`case 2:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(`ll := r.Intn(100)`) - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(ll))`) - p.P(`for j := 0; j < ll; j++ {`) - p.In() - p.P(`data = append(data, byte(r.Intn(256)))`) - p.Out() - p.P(`}`) - p.Out() - p.P(`default:`) - p.In() - p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) - p.P(`data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))`) - p.Out() - p.P(`}`) - p.P(`return data`) - p.Out() - p.P(`}`) - - p.P(`func encodeVarintPopulate`, p.localName, `(data []byte, v uint64) []byte {`) - p.In() - p.P(`for v >= 1<<7 {`) - p.In() - p.P(`data = append(data, uint8(uint64(v)&0x7f|0x80))`) - p.P(`v >>= 7`) - p.Out() - p.P(`}`) - p.P(`data = append(data, uint8(v))`) - p.P(`return data`) - p.Out() - p.P(`}`) - -} - -func init() { - generator.RegisterPlugin(NewPlugin()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/size/size.go b/vendor/github.com/gogo/protobuf/plugin/size/size.go deleted file mode 100644 index 000c7e5d..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/size/size.go +++ /dev/null @@ -1,620 +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. - -/* -The size plugin generates a Size or ProtoSize method for each message. -This is useful with the MarshalTo method generated by the marshalto plugin and the -gogoproto.marshaler and gogoproto.marshaler_all extensions. - -It is enabled by the following extensions: - - - sizer - - sizer_all - - protosizer - - protosizer_all - -The size plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -And a benchmark given it is enabled using one of the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.sizer_all) = true; - - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the size plugin, will generate the following code: - - func (m *B) Size() (n int) { - var l int - _ = l - l = m.A.Size() - n += 1 + l + sovExample(uint64(l)) - if len(m.G) > 0 { - for _, e := range m.G { - l = e.Size() - n += 1 + l + sovExample(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n - } - -and the following test code: - - func TestBSize(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedB(popr, true) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) - } - } - - func BenchmarkBSize(b *testing5.B) { - popr := math_rand5.New(math_rand5.NewSource(616)) - total := 0 - pops := make([]*B, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedB(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) - } - -The sovExample function is a size of varint function for the example.pb.go file. - -*/ -package size - -import ( - "fmt" - "strconv" - "strings" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/gogo/protobuf/vanity" -) - -type size struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewSize() *size { - return &size{} -} - -func (p *size) Name() string { - return "size" -} - -func (p *size) Init(g *generator.Generator) { - p.Generator = g -} - -func wireToType(wire string) int { - switch wire { - case "fixed64": - return proto.WireFixed64 - case "fixed32": - return proto.WireFixed32 - case "varint": - return proto.WireVarint - case "bytes": - return proto.WireBytes - case "group": - return proto.WireBytes - case "zigzag32": - return proto.WireVarint - case "zigzag64": - return proto.WireVarint - } - panic("unreachable") -} - -func keySize(fieldNumber int32, wireType int) int { - x := uint32(fieldNumber)<<3 | uint32(wireType) - size := 0 - for size = 0; x > 127; size++ { - x >>= 7 - } - size++ - return size -} - -func (p *size) sizeVarint() { - p.P(` - func sov`, p.localName, `(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n - }`) -} - -func (p *size) sizeZigZag() { - p.P(`func soz`, p.localName, `(x uint64) (n int) { - return sov`, p.localName, `(uint64((x << 1) ^ uint64((int64(x) >> 63)))) - }`) -} - -func (p *size) generateField(proto3 bool, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto, sizeName string) { - fieldname := p.GetOneOfFieldName(message, field) - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - doNilCheck := gogoproto.NeedsNilCheck(proto3, field) - if repeated { - p.P(`if len(m.`, fieldname, `) > 0 {`) - p.In() - } else if doNilCheck { - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - } - packed := field.IsPacked() - _, wire := p.GoType(message, field) - wireType := wireToType(wire) - fieldNumber := field.GetNumber() - if packed { - wireType = proto.WireBytes - } - key := keySize(fieldNumber, wireType) - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if packed { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*8))`, `+len(m.`, fieldname, `)*8`) - } else if repeated { - p.P(`n+=`, strconv.Itoa(key+8), `*len(m.`, fieldname, `)`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key+8)) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key+8)) - } else { - p.P(`n+=`, strconv.Itoa(key+8)) - } - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if packed { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*4))`, `+len(m.`, fieldname, `)*4`) - } else if repeated { - p.P(`n+=`, strconv.Itoa(key+4), `*len(m.`, fieldname, `)`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key+4)) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key+4)) - } else { - p.P(`n+=`, strconv.Itoa(key+4)) - } - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - if packed { - p.P(`l = 0`) - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`l+=sov`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) - } else if repeated { - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(*m.`, fieldname, `))`) - } else { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - if packed { - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)))`, `+len(m.`, fieldname, `)*1`) - } else if repeated { - p.P(`n+=`, strconv.Itoa(key+1), `*len(m.`, fieldname, `)`) - } else if proto3 { - p.P(`if m.`, fieldname, ` {`) - p.In() - p.P(`n+=`, strconv.Itoa(key+1)) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key+1)) - } else { - p.P(`n+=`, strconv.Itoa(key+1)) - } - case descriptor.FieldDescriptorProto_TYPE_STRING: - if repeated { - p.P(`for _, s := range m.`, fieldname, ` { `) - p.In() - p.P(`l = len(s)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`if l > 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`l=len(*m.`, fieldname, `)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } else { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - case descriptor.FieldDescriptorProto_TYPE_GROUP: - panic(fmt.Errorf("size does not support group %v", fieldname)) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if p.IsMap(field) { - m := p.GoMapType(nil, field) - _, keywire := p.GoType(nil, m.KeyAliasField) - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, valuewire := p.GoType(nil, m.ValueAliasField) - _, fieldwire := p.GoType(nil, field) - - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - fieldKeySize := keySize(field.GetNumber(), wireToType(fieldwire)) - keyKeySize := keySize(1, wireToType(keywire)) - valueKeySize := keySize(2, wireToType(valuewire)) - p.P(`for k, v := range m.`, fieldname, ` { `) - p.In() - p.P(`_ = k`) - p.P(`_ = v`) - sum := []string{strconv.Itoa(keyKeySize)} - switch m.KeyField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, `8`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, `4`) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, `sov`+p.localName+`(uint64(k))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, `soz`+p.localName+`(uint64(k))`) - } - switch m.ValueField.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, strconv.Itoa(8)) - case descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, strconv.Itoa(4)) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_INT32: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `sov`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_BOOL: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `1`) - case descriptor.FieldDescriptorProto_TYPE_STRING: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - p.P(`l = 0`) - if proto3 { - p.P(`if len(v) > 0 {`) - } else { - p.P(`if v != nil {`) - } - p.In() - p.P(`l = `, strconv.Itoa(valueKeySize), ` + len(v)+sov`+p.localName+`(uint64(len(v)))`) - p.Out() - p.P(`}`) - sum = append(sum, `l`) - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `soz`+p.localName+`(uint64(v))`) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if nullable { - p.P(`l = 0`) - p.P(`if v != nil {`) - p.In() - if valuegoTyp != valuegoAliasTyp { - p.P(`l = ((`, valuegoTyp, `)(v)).`, sizeName, `()`) - } else { - p.P(`l = v.`, sizeName, `()`) - } - p.P(`l += `, strconv.Itoa(valueKeySize), ` + sov`+p.localName+`(uint64(l))`) - p.Out() - p.P(`}`) - sum = append(sum, `l`) - } else { - if valuegoTyp != valuegoAliasTyp { - p.P(`l = ((*`, valuegoTyp, `)(&v)).`, sizeName, `()`) - } else { - p.P(`l = v.`, sizeName, `()`) - } - sum = append(sum, strconv.Itoa(valueKeySize)) - sum = append(sum, `l+sov`+p.localName+`(uint64(l))`) - } - } - p.P(`mapEntrySize := `, strings.Join(sum, "+")) - p.P(`n+=mapEntrySize+`, fieldKeySize, `+sov`, p.localName, `(uint64(mapEntrySize))`) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, e := range m.`, fieldname, ` { `) - p.In() - p.P(`l=e.`, sizeName, `()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else { - p.P(`l=m.`, fieldname, `.`, sizeName, `()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - case descriptor.FieldDescriptorProto_TYPE_BYTES: - if !gogoproto.IsCustomType(field) { - if repeated { - p.P(`for _, b := range m.`, fieldname, ` { `) - p.In() - p.P(`l = len(b)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`if l > 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else { - p.P(`l=len(m.`, fieldname, `)`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - } else { - if repeated { - p.P(`for _, e := range m.`, fieldname, ` { `) - p.In() - p.P(`l=e.`, sizeName, `()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - p.Out() - p.P(`}`) - } else { - p.P(`l=m.`, fieldname, `.`, sizeName, `()`) - p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) - } - } - case descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - if packed { - p.P(`l = 0`) - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`l+=soz`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) - } else if repeated { - p.P(`for _, e := range m.`, fieldname, ` {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(e))`) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(*m.`, fieldname, `))`) - } else { - p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) - } - default: - panic("not implemented") - } - if repeated || doNilCheck { - p.Out() - p.P(`}`) - } -} - -func (p *size) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - p.localName = generator.FileName(file) - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - sizeName := "" - if gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { - sizeName = "Size" - } else if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { - sizeName = "ProtoSize" - } else { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) - p.In() - p.P(`var l int`) - p.P(`_ = l`) - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.generateField(proto3, file, message, field, sizeName) - } else { - fieldname := p.GetFieldName(message, field) - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P(`if m.`, fieldname, ` != nil {`) - p.In() - p.P(`n+=m.`, fieldname, `.`, sizeName, `()`) - p.Out() - p.P(`}`) - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`n += `, protoPkg.Use(), `.SizeOfInternalExtension(m)`) - } else { - p.P(`if m.XXX_extensions != nil {`) - p.In() - p.P(`n+=len(m.XXX_extensions)`) - p.Out() - p.P(`}`) - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if m.XXX_unrecognized != nil {`) - p.In() - p.P(`n+=len(m.XXX_unrecognized)`) - p.Out() - p.P(`}`) - } - p.P(`return n`) - p.Out() - p.P(`}`) - p.P() - - //Generate Size methods for oneof fields - m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) - for _, f := range m.Field { - oneof := f.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, f) - p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) - p.In() - p.P(`var l int`) - p.P(`_ = l`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) - p.generateField(false, file, message, f, sizeName) - p.P(`return n`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.sizeVarint() - p.sizeZigZag() - -} - -func init() { - generator.RegisterPlugin(NewSize()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go b/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go deleted file mode 100644 index edcd5430..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go +++ /dev/null @@ -1,134 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package size - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - sizeName := "" - if gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { - sizeName = "Size" - } else if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { - sizeName = "ProtoSize" - } else { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, sizeName, `(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`size2 := `, protoPkg.Use(), `.Size(p)`) - p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`size := p.`, sizeName, `()`) - p.P(`if len(data) != size {`) - p.In() - p.P(`t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data))`) - p.Out() - p.P(`}`) - p.P(`if size2 != size {`) - p.In() - p.P(`t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)`) - p.Out() - p.P(`}`) - p.P(`size3 := `, protoPkg.Use(), `.Size(p)`) - p.P(`if size3 != size {`) - p.In() - p.P(`t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - } - - if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Benchmark`, ccTypeName, sizeName, `(b *`, testingPkg.Use(), `.B) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) - p.P(`total := 0`) - p.P(`pops := make([]*`, ccTypeName, `, 1000)`) - p.P(`for i := 0; i < 1000; i++ {`) - p.In() - p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) - p.Out() - p.P(`}`) - p.P(`b.ResetTimer()`) - p.P(`for i := 0; i < b.N; i++ {`) - p.In() - p.P(`total += pops[i%1000].`, sizeName, `()`) - p.Out() - p.P(`}`) - p.P(`b.SetBytes(int64(total / b.N))`) - p.Out() - p.P(`}`) - p.P() - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go b/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go deleted file mode 100644 index aa5f022e..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go +++ /dev/null @@ -1,296 +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. - -/* -The stringer plugin generates a String method for each message. - -It is enabled by the following extensions: - - - stringer - - stringer_all - -The stringer plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.goproto_stringer_all) = false; - option (gogoproto.stringer_all) = true; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the stringer stringer, will generate the following code: - - func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Number:` + fmt.Sprintf("%v", this.Number) + `,`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s - } - -and the following test code: - - func TestAStringer(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt1.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } - } - -Typically fmt.Printf("%v") will stop to print when it reaches a pointer and -not print their values, while the generated String method will always print all values, recursively. - -*/ -package stringer - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "strings" -) - -type stringer struct { - *generator.Generator - generator.PluginImports - atleastOne bool - localName string -} - -func NewStringer() *stringer { - return &stringer{} -} - -func (p *stringer) Name() string { - return "stringer" -} - -func (p *stringer) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *stringer) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - - p.localName = generator.FileName(file) - - fmtPkg := p.NewImport("fmt") - stringsPkg := p.NewImport("strings") - reflectPkg := p.NewImport("reflect") - sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - for _, message := range file.Messages() { - if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.EnabledGoStringer(file.FileDescriptorProto, message.DescriptorProto) { - panic("old string method needs to be disabled, please use gogoproto.goproto_stringer or gogoproto.goproto_stringer_all and set it to false") - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) String() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - for _, field := range message.Field { - if !p.IsMap(field) { - continue - } - fieldname := p.GetFieldName(message, field) - - m := p.GoMapType(nil, field) - mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField - keysName := `keysFor` + fieldname - keygoTyp, _ := p.GoType(nil, keyField) - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp, _ := p.GoType(nil, keyAliasField) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - keyCapTyp := generator.CamelCase(keygoTyp) - p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) - p.P(`for k, _ := range this.`, fieldname, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(keysName, ` = append(`, keysName, `, k)`) - } else { - p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) - } - p.Out() - p.P(`}`) - p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) - mapName := `mapStringFor` + fieldname - p.P(mapName, ` := "`, mapgoTyp, `{"`) - p.P(`for _, k := range `, keysName, ` {`) - p.In() - if keygoAliasTyp == keygoTyp { - p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[k])`) - } else { - p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) - } - p.Out() - p.P(`}`) - p.P(mapName, ` += "}"`) - } - p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") - oneofs := make(map[string]struct{}) - for _, field := range message.Field { - nullable := gogoproto.IsNullable(field) - repeated := field.IsRepeated() - fieldname := p.GetFieldName(message, field) - oneof := field.OneofIndex != nil - if oneof { - if _, ok := oneofs[fieldname]; ok { - continue - } else { - oneofs[fieldname] = struct{}{} - } - p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") - } else if p.IsMap(field) { - mapName := `mapStringFor` + fieldname - p.P("`", fieldname, ":`", ` + `, mapName, " + `,", "`,") - } else if field.IsMessage() || p.IsGroup(field) { - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - msgnames := strings.Split(msgname, ".") - typeName := msgnames[len(msgnames)-1] - if nullable { - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") - } else if repeated { - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") - } else { - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(this.`, fieldname, `.String(), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") - } - } else { - if nullable && !repeated && !proto3 { - p.P("`", fieldname, ":`", ` + valueToString`, p.localName, `(this.`, fieldname, ") + `,", "`,") - } else { - p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") - } - } - } - if message.DescriptorProto.HasExtension() { - if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { - p.P("`XXX_InternalExtensions:` + ", protoPkg.Use(), ".StringFromInternalExtension(this) + `,`,") - } else { - p.P("`XXX_extensions:` + ", protoPkg.Use(), ".StringFromExtensionsBytes(this.XXX_extensions) + `,`,") - } - } - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P("`XXX_unrecognized:` + ", fmtPkg.Use(), `.Sprintf("%v", this.XXX_unrecognized) + `, "`,`,") - } - p.P("`}`,") - p.P(`}`, `,""`, ")") - p.P(`return s`) - p.Out() - p.P(`}`) - - //Generate String methods for oneof fields - for _, field := range message.Field { - oneof := field.OneofIndex != nil - if !oneof { - continue - } - ccTypeName := p.OneOfTypeName(message, field) - p.P(`func (this *`, ccTypeName, `) String() string {`) - p.In() - p.P(`if this == nil {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") - fieldname := p.GetOneOfFieldName(message, field) - if field.IsMessage() || p.IsGroup(field) { - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - msgnames := strings.Split(msgname, ".") - typeName := msgnames[len(msgnames)-1] - p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") - } else { - p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") - } - p.P("`}`,") - p.P(`}`, `,""`, ")") - p.P(`return s`) - p.Out() - p.P(`}`) - } - } - - if !p.atleastOne { - return - } - - p.P(`func valueToString`, p.localName, `(v interface{}) string {`) - p.In() - p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) - p.P(`if rv.IsNil() {`) - p.In() - p.P(`return "nil"`) - p.Out() - p.P(`}`) - p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) - p.P(`return `, fmtPkg.Use(), `.Sprintf("*%v", pv)`) - p.Out() - p.P(`}`) - -} - -func init() { - generator.RegisterPlugin(NewStringer()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go b/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go deleted file mode 100644 index 0912a22d..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go +++ /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. - -package stringer - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - fmtPkg := imports.NewImport("fmt") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `Stringer(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`s1 := p.String()`) - p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%v", p)`) - p.P(`if s1 != s2 {`) - p.In() - p.P(`t.Fatalf("String want %v got %v", s1, s2)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go b/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go deleted file mode 100644 index fc85b12d..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go +++ /dev/null @@ -1,608 +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. - -/* -The testgen plugin generates Test and Benchmark functions for each message. - -Tests are enabled using the following extensions: - - - testgen - - testgen_all - -Benchmarks are enabled using the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.testgen_all) = true; - option (gogoproto.benchgen_all) = true; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -given to the testgen plugin, will generate the following test code: - - func TestAProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) - } - } - - func BenchmarkAProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*A, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedA(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) - } - - func BenchmarkAProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &A{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) - } - - - func TestAJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedA(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } - } - - func TestAProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) - } - } - - func TestAProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) - } - } - -Other registered tests are also generated. -Tests are registered to this test plugin by calling the following function. - - func RegisterTestPlugin(newFunc NewTestPlugin) - -where NewTestPlugin is: - - type NewTestPlugin func(g *generator.Generator) TestPlugin - -and TestPlugin is an interface: - - type TestPlugin interface { - Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) - } - -Plugins that use this interface include: - - - populate - - gostring - - equal - - union - - and more - -Please look at these plugins as examples of how to create your own. -A good idea is to let each plugin generate its own tests. - -*/ -package testgen - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type TestPlugin interface { - Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) -} - -type NewTestPlugin func(g *generator.Generator) TestPlugin - -var testplugins = make([]NewTestPlugin, 0) - -func RegisterTestPlugin(newFunc NewTestPlugin) { - testplugins = append(testplugins, newFunc) -} - -type plugin struct { - *generator.Generator - generator.PluginImports - tests []TestPlugin -} - -func NewPlugin() *plugin { - return &plugin{} -} - -func (p *plugin) Name() string { - return "testgen" -} - -func (p *plugin) Init(g *generator.Generator) { - p.Generator = g - p.tests = make([]TestPlugin, 0, len(testplugins)) - for i := range testplugins { - p.tests = append(p.tests, testplugins[i](g)) - } -} - -func (p *plugin) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - atLeastOne := false - for i := range p.tests { - used := p.tests[i].Generate(p.PluginImports, file) - if used { - atLeastOne = true - } - } - if atLeastOne { - p.P(`//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) - } -} - -type testProto struct { - *generator.Generator -} - -func newProto(g *generator.Generator) TestPlugin { - return &testProto{g} -} - -func (p *testProto) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - - p.P(`func Test`, ccTypeName, `Proto(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`littlefuzz := make([]byte, len(data))`) - p.P(`copy(littlefuzz, data)`) - p.P(`for i := range data {`) - p.In() - p.P(`data[i] = byte(popr.Intn(256))`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.P(`if len(littlefuzz) > 0 {`) - p.In() - p.P(`fuzzamount := 100`) - p.P(`for i := 0; i < fuzzamount; i++ {`) - p.In() - p.P(`littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))`) - p.P(`littlefuzz = append(littlefuzz, byte(popr.Intn(256)))`) - p.Out() - p.P(`}`) - p.P(`// shouldn't panic`) - p.P(`_ = `, protoPkg.Use(), `.Unmarshal(littlefuzz, msg)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - } - - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) || gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`func Test`, ccTypeName, `MarshalTo(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) - if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`size := p.ProtoSize()`) - } else { - p.P(`size := p.Size()`) - } - p.P(`data := make([]byte, size)`) - p.P(`for i := range data {`) - p.In() - p.P(`data[i] = byte(popr.Intn(256))`) - p.Out() - p.P(`}`) - p.P(`_, err := p.MarshalTo(data)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`for i := range data {`) - p.In() - p.P(`data[i] = byte(popr.Intn(256))`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - } - } - - if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Benchmark`, ccTypeName, `ProtoMarshal(b *`, testingPkg.Use(), `.B) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) - p.P(`total := 0`) - p.P(`pops := make([]*`, ccTypeName, `, 10000)`) - p.P(`for i := 0; i < 10000; i++ {`) - p.In() - p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) - p.Out() - p.P(`}`) - p.P(`b.ResetTimer()`) - p.P(`for i := 0; i < b.N; i++ {`) - p.In() - p.P(`data, err := `, protoPkg.Use(), `.Marshal(pops[i%10000])`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`total += len(data)`) - p.Out() - p.P(`}`) - p.P(`b.SetBytes(int64(total / b.N))`) - p.Out() - p.P(`}`) - p.P() - - p.P(`func Benchmark`, ccTypeName, `ProtoUnmarshal(b *`, testingPkg.Use(), `.B) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) - p.P(`total := 0`) - p.P(`datas := make([][]byte, 10000)`) - p.P(`for i := 0; i < 10000; i++ {`) - p.In() - p.P(`data, err := `, protoPkg.Use(), `.Marshal(NewPopulated`, ccTypeName, `(popr, false))`) - p.P(`if err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.P(`datas[i] = data`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`b.ResetTimer()`) - p.P(`for i := 0; i < b.N; i++ {`) - p.In() - p.P(`total += len(datas[i%10000])`) - p.P(`if err := `, protoPkg.Use(), `.Unmarshal(datas[i%10000], msg); err != nil {`) - p.In() - p.P(`panic(err)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(`b.SetBytes(int64(total / b.N))`) - p.Out() - p.P(`}`) - p.P() - } - } - return used -} - -type testJson struct { - *generator.Generator -} - -func newJson(g *generator.Generator) TestPlugin { - return &testJson{g} -} - -func (p *testJson) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - jsonPkg := imports.NewImport("github.com/gogo/protobuf/jsonpb") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - p.P(`func Test`, ccTypeName, `JSON(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`marshaler := `, jsonPkg.Use(), `.Marshaler{}`) - p.P(`jsondata, err := marshaler.MarshalToString(p)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`err = `, jsonPkg.Use(), `.UnmarshalString(jsondata, msg)`) - p.P(`if err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - } - } - return used -} - -type testText struct { - *generator.Generator -} - -func newText(g *generator.Generator) TestPlugin { - return &testText{g} -} - -func (p *testText) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - testingPkg := imports.NewImport("testing") - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = imports.NewImport("github.com/golang/protobuf/proto") - } - //fmtPkg := imports.NewImport("fmt") - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - used = true - - p.P(`func Test`, ccTypeName, `ProtoText(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`data := `, protoPkg.Use(), `.MarshalTextString(p)`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - - p.P(`func Test`, ccTypeName, `ProtoCompactText(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`data := `, protoPkg.Use(), `.CompactTextString(p)`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(data, msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) - p.Out() - p.P(`}`) - if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`if err := p.VerboseEqual(msg); err != nil {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) - p.Out() - p.P(`}`) - } - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P() - - } - } - return used -} - -func init() { - RegisterTestPlugin(newProto) - RegisterTestPlugin(newJson) - RegisterTestPlugin(newText) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/union/union.go b/vendor/github.com/gogo/protobuf/plugin/union/union.go deleted file mode 100644 index 72edb249..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/union/union.go +++ /dev/null @@ -1,209 +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. - -/* -The onlyone plugin generates code for the onlyone extension. -All fields must be nullable and only one of the fields may be set, like a union. -Two methods are generated - - GetValue() interface{} - -and - - SetValue(v interface{}) (set bool) - -These provide easier interaction with a onlyone. - -The onlyone extension is not called union as this causes compile errors in the C++ generated code. -There can only be one ;) - -It is enabled by the following extensions: - - - onlyone - - onlyone_all - -The onlyone plugin also generates a test given it is enabled using one of the following extensions: - - - testgen - - testgen_all - -Lets look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - message U { - option (gogoproto.onlyone) = true; - optional A A = 1; - optional B B = 2; - } - -given to the onlyone plugin, will generate code which looks a lot like this: - - func (this *U) GetValue() interface{} { - if this.A != nil { - return this.A - } - if this.B != nil { - return this.B - } - return nil - } - - func (this *U) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *A: - this.A = vt - case *B: - this.B = vt - default: - return false - } - return true - } - -and the following test code: - - func TestUUnion(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr) - v := p.GetValue() - msg := &U{} - if !msg.SetValue(v) { - t.Fatalf("Union: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !Union Equal %#v", msg, p) - } - } - -*/ -package union - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type union struct { - *generator.Generator - generator.PluginImports -} - -func NewUnion() *union { - return &union{} -} - -func (p *union) Name() string { - return "union" -} - -func (p *union) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *union) Generate(file *generator.FileDescriptor) { - p.PluginImports = generator.NewPluginImports(p.Generator) - - for _, message := range file.Messages() { - if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.HasExtension() { - panic("onlyone does not currently support extensions") - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - p.P(`func (this *`, ccTypeName, `) GetValue() interface{} {`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - if fieldname == "Value" { - panic("cannot have a onlyone message " + ccTypeName + " with a field named Value") - } - p.P(`if this.`, fieldname, ` != nil {`) - p.In() - p.P(`return this.`, fieldname) - p.Out() - p.P(`}`) - } - p.P(`return nil`) - p.Out() - p.P(`}`) - p.P(``) - p.P(`func (this *`, ccTypeName, `) SetValue(value interface{}) bool {`) - p.In() - p.P(`switch vt := value.(type) {`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - goTyp, _ := p.GoType(message, field) - p.P(`case `, goTyp, `:`) - p.In() - p.P(`this.`, fieldname, ` = vt`) - p.Out() - } - p.P(`default:`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - if field.IsMessage() { - goTyp, _ := p.GoType(message, field) - obj := p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) - - if gogoproto.IsUnion(obj.File(), obj.DescriptorProto) { - p.P(`this.`, fieldname, ` = new(`, generator.GoTypeToName(goTyp), `)`) - p.P(`if set := this.`, fieldname, `.SetValue(value); set {`) - p.In() - p.P(`return true`) - p.Out() - p.P(`}`) - p.P(`this.`, fieldname, ` = nil`) - } - } - } - p.P(`return false`) - p.Out() - p.P(`}`) - p.P(`return true`) - p.Out() - p.P(`}`) - } -} - -func init() { - generator.RegisterPlugin(NewUnion()) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go b/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go deleted file mode 100644 index 949cf833..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go +++ /dev/null @@ -1,86 +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 union - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/plugin/testgen" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type test struct { - *generator.Generator -} - -func NewTest(g *generator.Generator) testgen.TestPlugin { - return &test{g} -} - -func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { - used := false - randPkg := imports.NewImport("math/rand") - timePkg := imports.NewImport("time") - testingPkg := imports.NewImport("testing") - for _, message := range file.Messages() { - if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) || - !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - used = true - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - - p.P(`func Test`, ccTypeName, `OnlyOne(t *`, testingPkg.Use(), `.T) {`) - p.In() - p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) - p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) - p.P(`v := p.GetValue()`) - p.P(`msg := &`, ccTypeName, `{}`) - p.P(`if !msg.SetValue(v) {`) - p.In() - p.P(`t.Fatalf("OnlyOne: Could not set Value")`) - p.Out() - p.P(`}`) - p.P(`if !p.Equal(msg) {`) - p.In() - p.P(`t.Fatalf("%#v !OnlyOne Equal %#v", msg, p)`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - - } - return used -} - -func init() { - testgen.RegisterTestPlugin(NewTest) -} diff --git a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go deleted file mode 100644 index 189b9e07..00000000 --- a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go +++ /dev/null @@ -1,1330 +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. - -/* -The unmarshal plugin generates a Unmarshal method for each message. -The `Unmarshal([]byte) error` method results in the fact that the message -implements the Unmarshaler interface. -The allows proto.Unmarshal to be faster by calling the generated Unmarshal method rather than using reflect. - -If is enabled by the following extensions: - - - unmarshaler - - unmarshaler_all - -Or the following extensions: - - - unsafe_unmarshaler - - unsafe_unmarshaler_all - -That is if you want to use the unsafe package in your generated code. -The speed up using the unsafe package is not very significant. - -The generation of unmarshalling tests are enabled using one of the following extensions: - - - testgen - - testgen_all - -And benchmarks given it is enabled using one of the following extensions: - - - benchgen - - benchgen_all - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -Btw all the output can be seen at: - - github.com/gogo/protobuf/test/example/* - -The following message: - - option (gogoproto.unmarshaler_all) = true; - - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -given to the unmarshal plugin, will generate the following code: - - func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return proto.ErrWrongType - } - var msglen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return proto.ErrWrongType - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.G = append(m.G, github_com_gogo_protobuf_test_custom.Uint128{}) - if err := m.G[len(m.G)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skip(data[iNdEx:]) - if err != nil { - return err - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - return nil - } - -Remember when using this code to call proto.Unmarshal. -This will call m.Reset and invoke the generated Unmarshal method for you. -If you call m.Unmarshal without m.Reset you could be merging protocol buffers. - -*/ -package unmarshal - -import ( - "fmt" - "strconv" - "strings" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -type unmarshal struct { - *generator.Generator - unsafe bool - generator.PluginImports - atleastOne bool - ioPkg generator.Single - mathPkg generator.Single - unsafePkg generator.Single - localName string -} - -func NewUnmarshal() *unmarshal { - return &unmarshal{} -} - -func NewUnsafeUnmarshal() *unmarshal { - return &unmarshal{unsafe: true} -} - -func (p *unmarshal) Name() string { - if p.unsafe { - return "unsafeunmarshaler" - } - return "unmarshal" -} - -func (p *unmarshal) Init(g *generator.Generator) { - p.Generator = g -} - -func (p *unmarshal) decodeVarint(varName string, typName string) { - p.P(`for shift := uint(0); ; shift += 7 {`) - p.In() - p.P(`if shift >= 64 {`) - p.In() - p.P(`return ErrIntOverflow` + p.localName) - p.Out() - p.P(`}`) - p.P(`if iNdEx >= l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`b := data[iNdEx]`) - p.P(`iNdEx++`) - p.P(varName, ` |= (`, typName, `(b) & 0x7F) << shift`) - p.P(`if b < 0x80 {`) - p.In() - p.P(`break`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) -} - -func (p *unmarshal) decodeFixed32(varName string, typeName string) { - p.P(`if (iNdEx+4) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`iNdEx += 4`) - p.P(varName, ` = `, typeName, `(data[iNdEx-4])`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-3]) << 8`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-2]) << 16`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-1]) << 24`) -} - -func (p *unmarshal) unsafeFixed32(varName string, typeName string) { - p.P(`if iNdEx + 4 > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&data[iNdEx]))`) - p.P(`iNdEx += 4`) -} - -func (p *unmarshal) decodeFixed64(varName string, typeName string) { - p.P(`if (iNdEx+8) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`iNdEx += 8`) - p.P(varName, ` = `, typeName, `(data[iNdEx-8])`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-7]) << 8`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-6]) << 16`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-5]) << 24`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-4]) << 32`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-3]) << 40`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-2]) << 48`) - p.P(varName, ` |= `, typeName, `(data[iNdEx-1]) << 56`) -} - -func (p *unmarshal) unsafeFixed64(varName string, typeName string) { - p.P(`if iNdEx + 8 > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&data[iNdEx]))`) - p.P(`iNdEx += 8`) -} - -func (p *unmarshal) mapField(varName string, field *descriptor.FieldDescriptorProto) { - switch field.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - p.P(`var `, varName, `temp uint64`) - p.decodeFixed64(varName+"temp", "uint64") - p.P(varName, ` := `, p.mathPkg.Use(), `.Float64frombits(`, varName, `temp)`) - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - p.P(`var `, varName, `temp uint32`) - p.decodeFixed32(varName+"temp", "uint32") - p.P(varName, ` := `, p.mathPkg.Use(), `.Float32frombits(`, varName, `temp)`) - case descriptor.FieldDescriptorProto_TYPE_INT64: - p.P(`var `, varName, ` int64`) - p.decodeVarint(varName, "int64") - case descriptor.FieldDescriptorProto_TYPE_UINT64: - p.P(`var `, varName, ` uint64`) - p.decodeVarint(varName, "uint64") - case descriptor.FieldDescriptorProto_TYPE_INT32: - p.P(`var `, varName, ` int32`) - p.decodeVarint(varName, "int32") - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - p.P(`var `, varName, ` uint64`) - p.decodeFixed64(varName, "uint64") - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - p.P(`var `, varName, ` uint32`) - p.decodeFixed32(varName, "uint32") - case descriptor.FieldDescriptorProto_TYPE_BOOL: - p.P(`var `, varName, `temp int`) - p.decodeVarint(varName+"temp", "int") - p.P(varName, ` := bool(`, varName, `temp != 0)`) - case descriptor.FieldDescriptorProto_TYPE_STRING: - p.P(`var stringLen`, varName, ` uint64`) - p.decodeVarint("stringLen"+varName, "uint64") - p.P(`intStringLen`, varName, ` := int(stringLen`, varName, `)`) - p.P(`if intStringLen`, varName, ` < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postStringIndex`, varName, ` := iNdEx + intStringLen`, varName) - p.P(`if postStringIndex`, varName, ` > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - cast, _ := p.GoType(nil, field) - cast = strings.Replace(cast, "*", "", 1) - p.P(varName, ` := `, cast, `(data[iNdEx:postStringIndex`, varName, `])`) - p.P(`iNdEx = postStringIndex`, varName) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - p.P(`var mapmsglen int`) - p.decodeVarint("mapmsglen", "int") - p.P(`if mapmsglen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postmsgIndex := iNdEx + mapmsglen`) - p.P(`if mapmsglen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`if postmsgIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - p.P(varName, ` := &`, msgname, `{}`) - p.P(`if err := `, varName, `.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`iNdEx = postmsgIndex`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - p.P(`var mapbyteLen uint64`) - p.decodeVarint("mapbyteLen", "uint64") - p.P(`intMapbyteLen := int(mapbyteLen)`) - p.P(`if intMapbyteLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postbytesIndex := iNdEx + intMapbyteLen`) - p.P(`if postbytesIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` := make([]byte, mapbyteLen)`) - p.P(`copy(`, varName, `, data[iNdEx:postbytesIndex])`) - p.P(`iNdEx = postbytesIndex`) - case descriptor.FieldDescriptorProto_TYPE_UINT32: - p.P(`var `, varName, ` uint32`) - p.decodeVarint(varName, "uint32") - case descriptor.FieldDescriptorProto_TYPE_ENUM: - typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) - p.P(`var `, varName, ` `, typName) - p.decodeVarint(varName, typName) - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - p.P(`var `, varName, ` int32`) - p.decodeFixed32(varName, "int32") - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - p.P(`var `, varName, ` int64`) - p.decodeFixed64(varName, "int64") - case descriptor.FieldDescriptorProto_TYPE_SINT32: - p.P(`var `, varName, `temp int32`) - p.decodeVarint(varName+"temp", "int32") - p.P(varName, `temp = int32((uint32(`, varName, `temp) >> 1) ^ uint32(((`, varName, `temp&1)<<31)>>31))`) - p.P(varName, ` := int32(`, varName, `temp)`) - case descriptor.FieldDescriptorProto_TYPE_SINT64: - p.P(`var `, varName, `temp uint64`) - p.decodeVarint(varName+"temp", "uint64") - p.P(varName, `temp = (`, varName, `temp >> 1) ^ uint64((int64(`, varName, `temp&1)<<63)>>63)`) - p.P(varName, ` := int64(`, varName, `temp)`) - } -} - -func (p *unmarshal) noStarOrSliceType(msg *generator.Descriptor, field *descriptor.FieldDescriptorProto) string { - typ, _ := p.GoType(msg, field) - if typ[0] == '*' { - return typ[1:] - } - if typ[0] == '[' && typ[1] == ']' { - return typ[2:] - } - return typ -} - -func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descriptor, field *descriptor.FieldDescriptorProto, fieldname string, proto3 bool) { - repeated := field.IsRepeated() - nullable := gogoproto.IsNullable(field) - typ := p.noStarOrSliceType(msg, field) - oneof := field.OneofIndex != nil - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - if !p.unsafe || gogoproto.IsCastType(field) { - p.P(`var v uint64`) - p.decodeFixed64("v", "uint64") - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))}`) - } else if repeated { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - } else { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - p.P(`m.`, fieldname, ` = &v2`) - } - } else { - if oneof { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64(`m.`+fieldname, "float64") - } else { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - if !p.unsafe || gogoproto.IsCastType(field) { - p.P(`var v uint32`) - p.decodeFixed32("v", "uint32") - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))}`) - } else if repeated { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - } else { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - p.P(`m.`, fieldname, ` = &v2`) - } - } else { - if oneof { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "float32") - } else { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_INT64: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_UINT64: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_INT32: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed64("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64("m."+fieldname, "uint64") - } else { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed32("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "uint32") - } else { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - p.P(`var v int`) - p.decodeVarint("v", "int") - if oneof { - p.P(`b := `, typ, `(v != 0)`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{b}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v != 0))`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, `(v != 0)`) - } else { - p.P(`b := `, typ, `(v != 0)`) - p.P(`m.`, fieldname, ` = &b`) - } - case descriptor.FieldDescriptorProto_TYPE_STRING: - p.P(`var stringLen uint64`) - p.decodeVarint("stringLen", "uint64") - p.P(`intStringLen := int(stringLen)`) - p.P(`if intStringLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + intStringLen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(data[iNdEx:postIndex])}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(data[iNdEx:postIndex]))`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, `(data[iNdEx:postIndex])`) - } else { - p.P(`s := `, typ, `(data[iNdEx:postIndex])`) - p.P(`m.`, fieldname, ` = &s`) - } - p.P(`iNdEx = postIndex`) - case descriptor.FieldDescriptorProto_TYPE_GROUP: - panic(fmt.Errorf("unmarshaler does not support group %v", fieldname)) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) - p.P(`var msglen int`) - p.decodeVarint("msglen", "int") - p.P(`if msglen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + msglen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if oneof { - p.P(`v := &`, msgname, `{}`) - p.P(`if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if p.IsMap(field) { - m := p.GoMapType(nil, field) - - keygoTyp, _ := p.GoType(nil, m.KeyField) - keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) - // keys may not be pointers - keygoTyp = strings.Replace(keygoTyp, "*", "", 1) - keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) - - valuegoTyp, _ := p.GoType(nil, m.ValueField) - valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) - - // if the map type is an alias and key or values are aliases (type Foo map[Bar]Baz), - // we need to explicitly record their use here. - p.RecordTypeUse(m.KeyAliasField.GetTypeName()) - p.RecordTypeUse(m.ValueAliasField.GetTypeName()) - - nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) - - p.P(`var keykey uint64`) - p.decodeVarint("keykey", "uint64") - p.mapField("mapkey", m.KeyAliasField) - p.P(`if m.`, fieldname, ` == nil {`) - p.In() - p.P(`m.`, fieldname, ` = make(`, m.GoType, `)`) - p.Out() - p.P(`}`) - s := `m.` + fieldname - if keygoTyp == keygoAliasTyp { - s += `[mapkey]` - } else { - s += `[` + keygoAliasTyp + `(mapkey)]` - } - v := `mapvalue` - if m.ValueField.IsMessage() && !nullable { - v = `*` + v - } - if valuegoTyp != valuegoAliasTyp { - v = `((` + valuegoAliasTyp + `)(` + v + `))` - } - p.P(`if iNdEx < postIndex {`) - p.In() - p.P(`var valuekey uint64`) - p.decodeVarint("valuekey", "uint64") - p.mapField("mapvalue", m.ValueAliasField) - p.P(s, ` = `, v) - p.Out() - p.P(`} else {`) - p.In() - p.P(`var mapvalue `, valuegoAliasTyp) - p.P(s, ` = mapvalue`) - p.Out() - p.P(`}`) - } else if repeated { - if nullable { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, &`, msgname, `{})`) - } else { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, msgname, `{})`) - } - p.P(`if err := m.`, fieldname, `[len(m.`, fieldname, `)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`if m.`, fieldname, ` == nil {`) - p.In() - p.P(`m.`, fieldname, ` = &`, msgname, `{}`) - p.Out() - p.P(`}`) - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else { - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } - p.P(`iNdEx = postIndex`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - p.P(`var byteLen int`) - p.decodeVarint("byteLen", "int") - p.P(`if byteLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + byteLen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if !gogoproto.IsCustomType(field) { - if oneof { - p.P(`v := make([]byte, postIndex-iNdEx)`) - p.P(`copy(v, data[iNdEx:postIndex])`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, make([]byte, postIndex-iNdEx))`) - p.P(`copy(m.`, fieldname, `[len(m.`, fieldname, `)-1], data[iNdEx:postIndex])`) - } else { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `[:0] , data[iNdEx:postIndex]...)`) - p.P(`if m.`, fieldname, ` == nil {`) - p.In() - p.P(`m.`, fieldname, ` = []byte{}`) - p.Out() - p.P(`}`) - } - } else { - _, ctyp, err := generator.GetCustomType(field) - if err != nil { - panic(err) - } - if oneof { - p.P(`var vv `, ctyp) - p.P(`v := &vv`) - p.P(`if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{*v}`) - } else if repeated { - p.P(`var v `, ctyp) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - p.P(`if err := m.`, fieldname, `[len(m.`, fieldname, `)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else if nullable { - p.P(`var v `, ctyp) - p.P(`m.`, fieldname, ` = &v`) - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } else { - p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - } - } - p.P(`iNdEx = postIndex`) - case descriptor.FieldDescriptorProto_TYPE_UINT32: - if oneof { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_ENUM: - typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) - if oneof { - p.P(`var v `, typName) - p.decodeVarint("v", typName) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typName) - p.decodeVarint("v", typName) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeVarint("m."+fieldname, typName) - } else { - p.P(`var v `, typName) - p.decodeVarint("v", typName) - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed32("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "int32") - } else { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed64("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } - } else { - if oneof { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64("m."+fieldname, "int64") - } else { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = &v`) - } - } - case descriptor.FieldDescriptorProto_TYPE_SINT32: - p.P(`var v `, typ) - p.decodeVarint("v", typ) - p.P(`v = `, typ, `((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))`) - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = v`) - } else { - p.P(`m.`, fieldname, ` = &v`) - } - case descriptor.FieldDescriptorProto_TYPE_SINT64: - p.P(`var v uint64`) - p.decodeVarint("v", "uint64") - p.P(`v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)`) - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(v)}`) - } else if repeated { - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v))`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, `(v)`) - } else { - p.P(`v2 := `, typ, `(v)`) - p.P(`m.`, fieldname, ` = &v2`) - } - default: - panic("not implemented") - } -} - -func (p *unmarshal) Generate(file *generator.FileDescriptor) { - proto3 := gogoproto.IsProto3(file.FileDescriptorProto) - p.PluginImports = generator.NewPluginImports(p.Generator) - p.atleastOne = false - p.localName = generator.FileName(file) - if p.unsafe { - p.localName += "Unsafe" - } - - p.ioPkg = p.NewImport("io") - p.mathPkg = p.NewImport("math") - p.unsafePkg = p.NewImport("unsafe") - fmtPkg := p.NewImport("fmt") - protoPkg := p.NewImport("github.com/gogo/protobuf/proto") - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - protoPkg = p.NewImport("github.com/golang/protobuf/proto") - } - - for _, message := range file.Messages() { - ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if p.unsafe { - if !gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) - } - } - if !p.unsafe { - if !gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) - } - } - if message.DescriptorProto.GetOptions().GetMapEntry() { - continue - } - p.atleastOne = true - - // build a map required field_id -> bitmask offset - rfMap := make(map[int32]uint) - rfNextId := uint(0) - for _, field := range message.Field { - if field.IsRequired() { - rfMap[field.GetNumber()] = rfNextId - rfNextId++ - } - } - rfCount := len(rfMap) - - p.P(`func (m *`, ccTypeName, `) Unmarshal(data []byte) error {`) - p.In() - if rfCount > 0 { - p.P(`var hasFields [`, strconv.Itoa(1+(rfCount-1)/64), `]uint64`) - } - p.P(`l := len(data)`) - p.P(`iNdEx := 0`) - p.P(`for iNdEx < l {`) - p.In() - p.P(`preIndex := iNdEx`) - p.P(`var wire uint64`) - p.decodeVarint("wire", "uint64") - p.P(`fieldNum := int32(wire >> 3)`) - if len(message.Field) > 0 || !message.IsGroup() { - p.P(`wireType := int(wire & 0x7)`) - } - if !message.IsGroup() { - p.P(`if wireType == `, strconv.Itoa(proto.WireEndGroup), ` {`) - p.In() - p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: wiretype end group for non-group")`) - p.Out() - p.P(`}`) - } - p.P(`if fieldNum <= 0 {`) - p.In() - p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: illegal tag %d (wire type %d)", fieldNum, wire)`) - p.Out() - p.P(`}`) - p.P(`switch fieldNum {`) - p.In() - for _, field := range message.Field { - fieldname := p.GetFieldName(message, field) - errFieldname := fieldname - if field.OneofIndex != nil { - errFieldname = p.GetOneOfFieldName(message, field) - } - packed := field.IsPacked() - p.P(`case `, strconv.Itoa(int(field.GetNumber())), `:`) - p.In() - wireType := field.WireType() - if packed { - p.P(`if wireType == `, strconv.Itoa(proto.WireBytes), `{`) - p.In() - p.P(`var packedLen int`) - p.decodeVarint("packedLen", "int") - p.P(`if packedLen < 0 {`) - p.In() - p.P(`return ErrInvalidLength` + p.localName) - p.Out() - p.P(`}`) - p.P(`postIndex := iNdEx + packedLen`) - p.P(`if postIndex > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`for iNdEx < postIndex {`) - p.In() - p.field(file, message, field, fieldname, false) - p.Out() - p.P(`}`) - p.Out() - p.P(`} else if wireType == `, strconv.Itoa(wireType), `{`) - p.In() - p.field(file, message, field, fieldname, false) - p.Out() - p.P(`} else {`) - p.In() - p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) - p.Out() - p.P(`}`) - } else { - p.P(`if wireType != `, strconv.Itoa(wireType), `{`) - p.In() - p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) - p.Out() - p.P(`}`) - p.field(file, message, field, fieldname, proto3) - } - - if field.IsRequired() { - fieldBit, ok := rfMap[field.GetNumber()] - if !ok { - panic("field is required, but no bit registered") - } - p.P(`hasFields[`, strconv.Itoa(int(fieldBit/64)), `] |= uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `)`) - } - } - p.Out() - p.P(`default:`) - p.In() - if message.DescriptorProto.HasExtension() { - c := []string{} - for _, erange := range message.GetExtensionRange() { - c = append(c, `((fieldNum >= `+strconv.Itoa(int(erange.GetStart()))+") && (fieldNum<"+strconv.Itoa(int(erange.GetEnd()))+`))`) - } - p.P(`if `, strings.Join(c, "||"), `{`) - p.In() - p.P(`var sizeOfWire int`) - p.P(`for {`) - p.In() - p.P(`sizeOfWire++`) - p.P(`wire >>= 7`) - p.P(`if wire == 0 {`) - p.In() - p.P(`break`) - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - p.P(`iNdEx-=sizeOfWire`) - p.P(`skippy, err := skip`, p.localName+`(data[iNdEx:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`if skippy < 0 {`) - p.In() - p.P(`return ErrInvalidLength`, p.localName) - p.Out() - p.P(`}`) - p.P(`if (iNdEx + skippy) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(protoPkg.Use(), `.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy])`) - p.P(`iNdEx += skippy`) - p.Out() - p.P(`} else {`) - p.In() - } - p.P(`iNdEx=preIndex`) - p.P(`skippy, err := skip`, p.localName, `(data[iNdEx:])`) - p.P(`if err != nil {`) - p.In() - p.P(`return err`) - p.Out() - p.P(`}`) - p.P(`if skippy < 0 {`) - p.In() - p.P(`return ErrInvalidLength`, p.localName) - p.Out() - p.P(`}`) - p.P(`if (iNdEx + skippy) > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { - p.P(`m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)`) - } - p.P(`iNdEx += skippy`) - p.Out() - if message.DescriptorProto.HasExtension() { - p.Out() - p.P(`}`) - } - p.Out() - p.P(`}`) - p.Out() - p.P(`}`) - - for _, field := range message.Field { - if !field.IsRequired() { - continue - } - - fieldBit, ok := rfMap[field.GetNumber()] - if !ok { - panic("field is required, but no bit registered") - } - - p.P(`if hasFields[`, strconv.Itoa(int(fieldBit/64)), `] & uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `) == 0 {`) - p.In() - if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - p.P(`return new(`, protoPkg.Use(), `.RequiredNotSetError)`) - } else { - p.P(`return `, protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) - } - p.Out() - p.P(`}`) - } - p.P() - p.P(`if iNdEx > l {`) - p.In() - p.P(`return ` + p.ioPkg.Use() + `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(`return nil`) - p.Out() - p.P(`}`) - } - if !p.atleastOne { - return - } - - p.P(`func skip` + p.localName + `(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLength` + p.localName + ` - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow` + p.localName + ` - } - if iNdEx >= l { - return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skip` + p.localName + `(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, ` + fmtPkg.Use() + `.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") - } - - var ( - ErrInvalidLength` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: integer overflow") - ) - `) -} - -func init() { - generator.RegisterPlugin(NewUnmarshal()) - generator.RegisterPlugin(NewUnsafeUnmarshal()) -} diff --git a/vendor/github.com/gogo/protobuf/proto/all_test.go b/vendor/github.com/gogo/protobuf/proto/all_test.go deleted file mode 100644 index 322f6c7c..00000000 --- a/vendor/github.com/gogo/protobuf/proto/all_test.go +++ /dev/null @@ -1,2269 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "math" - "math/rand" - "reflect" - "runtime/debug" - "strings" - "testing" - "time" - - . "github.com/gogo/protobuf/proto" - . "github.com/gogo/protobuf/proto/testdata" -) - -var globalO *Buffer - -func old() *Buffer { - if globalO == nil { - globalO = NewBuffer(nil) - } - globalO.Reset() - return globalO -} - -func equalbytes(b1, b2 []byte, t *testing.T) { - if len(b1) != len(b2) { - t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) - return - } - for i := 0; i < len(b1); i++ { - if b1[i] != b2[i] { - t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) - } - } -} - -func initGoTestField() *GoTestField { - f := new(GoTestField) - f.Label = String("label") - f.Type = String("type") - return f -} - -// These are all structurally equivalent but the tag numbers differ. -// (It's remarkable that required, optional, and repeated all have -// 8 letters.) -func initGoTest_RequiredGroup() *GoTest_RequiredGroup { - return &GoTest_RequiredGroup{ - RequiredField: String("required"), - } -} - -func initGoTest_OptionalGroup() *GoTest_OptionalGroup { - return &GoTest_OptionalGroup{ - RequiredField: String("optional"), - } -} - -func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { - return &GoTest_RepeatedGroup{ - RequiredField: String("repeated"), - } -} - -func initGoTest(setdefaults bool) *GoTest { - pb := new(GoTest) - if setdefaults { - pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) - pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) - pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) - pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) - pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) - pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) - pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) - pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) - pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) - pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) - pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted - pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) - pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) - } - - pb.Kind = GoTest_TIME.Enum() - pb.RequiredField = initGoTestField() - pb.F_BoolRequired = Bool(true) - pb.F_Int32Required = Int32(3) - pb.F_Int64Required = Int64(6) - pb.F_Fixed32Required = Uint32(32) - pb.F_Fixed64Required = Uint64(64) - pb.F_Uint32Required = Uint32(3232) - pb.F_Uint64Required = Uint64(6464) - pb.F_FloatRequired = Float32(3232) - pb.F_DoubleRequired = Float64(6464) - pb.F_StringRequired = String("string") - pb.F_BytesRequired = []byte("bytes") - pb.F_Sint32Required = Int32(-32) - pb.F_Sint64Required = Int64(-64) - pb.Requiredgroup = initGoTest_RequiredGroup() - - return pb -} - -func fail(msg string, b *bytes.Buffer, s string, t *testing.T) { - data := b.Bytes() - ld := len(data) - ls := len(s) / 2 - - fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls) - - // find the interesting spot - n - n := ls - if ld < ls { - n = ld - } - j := 0 - for i := 0; i < n; i++ { - bs := hex(s[j])*16 + hex(s[j+1]) - j += 2 - if data[i] == bs { - continue - } - n = i - break - } - l := n - 10 - if l < 0 { - l = 0 - } - h := n + 10 - - // find the interesting spot - n - fmt.Printf("is[%d]:", l) - for i := l; i < h; i++ { - if i >= ld { - fmt.Printf(" --") - continue - } - fmt.Printf(" %.2x", data[i]) - } - fmt.Printf("\n") - - fmt.Printf("sb[%d]:", l) - for i := l; i < h; i++ { - if i >= ls { - fmt.Printf(" --") - continue - } - bs := hex(s[j])*16 + hex(s[j+1]) - j += 2 - fmt.Printf(" %.2x", bs) - } - fmt.Printf("\n") - - t.Fail() - - // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes()) - // Print the output in a partially-decoded format; can - // be helpful when updating the test. It produces the output - // that is pasted, with minor edits, into the argument to verify(). - // data := b.Bytes() - // nesting := 0 - // for b.Len() > 0 { - // start := len(data) - b.Len() - // var u uint64 - // u, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on varint:", err) - // return - // } - // wire := u & 0x7 - // tag := u >> 3 - // switch wire { - // case WireVarint: - // v, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on varint:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireFixed32: - // v, err := DecodeFixed32(b) - // if err != nil { - // fmt.Printf("decode error on fixed32:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireFixed64: - // v, err := DecodeFixed64(b) - // if err != nil { - // fmt.Printf("decode error on fixed64:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireBytes: - // nb, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on bytes:", err) - // return - // } - // after_tag := len(data) - b.Len() - // str := make([]byte, nb) - // _, err = b.Read(str) - // if err != nil { - // fmt.Printf("decode error on bytes:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n", - // data[start:after_tag], str, tag, wire) - // case WireStartGroup: - // nesting++ - // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n", - // data[start:len(data)-b.Len()], tag, nesting) - // case WireEndGroup: - // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n", - // data[start:len(data)-b.Len()], tag, nesting) - // nesting-- - // default: - // fmt.Printf("unrecognized wire type %d\n", wire) - // return - // } - // } -} - -func hex(c uint8) uint8 { - if '0' <= c && c <= '9' { - return c - '0' - } - if 'a' <= c && c <= 'f' { - return 10 + c - 'a' - } - if 'A' <= c && c <= 'F' { - return 10 + c - 'A' - } - return 0 -} - -func equal(b []byte, s string, t *testing.T) bool { - if 2*len(b) != len(s) { - // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) - fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) - return false - } - for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { - x := hex(s[j])*16 + hex(s[j+1]) - if b[i] != x { - // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) - fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) - return false - } - } - return true -} - -func overify(t *testing.T, pb *GoTest, expected string) { - o := old() - err := o.Marshal(pb) - if err != nil { - fmt.Printf("overify marshal-1 err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("expected = %s", expected) - } - if !equal(o.Bytes(), expected, t) { - o.DebugPrint("overify neq 1", o.Bytes()) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = o.Unmarshal(pbd) - if err != nil { - t.Fatalf("overify unmarshal err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("string = %s", expected) - } - o.Reset() - err = o.Marshal(pbd) - if err != nil { - t.Errorf("overify marshal-2 err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("string = %s", expected) - } - if !equal(o.Bytes(), expected, t) { - o.DebugPrint("overify neq 2", o.Bytes()) - t.Fatalf("string = %s", expected) - } -} - -// Simple tests for numeric encode/decode primitives (varint, etc.) -func TestNumericPrimitives(t *testing.T) { - for i := uint64(0); i < 1e6; i += 111 { - o := old() - if o.EncodeVarint(i) != nil { - t.Error("EncodeVarint") - break - } - x, e := o.DecodeVarint() - if e != nil { - t.Fatal("DecodeVarint") - } - if x != i { - t.Fatal("varint decode fail:", i, x) - } - - o = old() - if o.EncodeFixed32(i) != nil { - t.Fatal("encFixed32") - } - x, e = o.DecodeFixed32() - if e != nil { - t.Fatal("decFixed32") - } - if x != i { - t.Fatal("fixed32 decode fail:", i, x) - } - - o = old() - if o.EncodeFixed64(i*1234567) != nil { - t.Error("encFixed64") - break - } - x, e = o.DecodeFixed64() - if e != nil { - t.Error("decFixed64") - break - } - if x != i*1234567 { - t.Error("fixed64 decode fail:", i*1234567, x) - break - } - - o = old() - i32 := int32(i - 12345) - if o.EncodeZigzag32(uint64(i32)) != nil { - t.Fatal("EncodeZigzag32") - } - x, e = o.DecodeZigzag32() - if e != nil { - t.Fatal("DecodeZigzag32") - } - if x != uint64(uint32(i32)) { - t.Fatal("zigzag32 decode fail:", i32, x) - } - - o = old() - i64 := int64(i - 12345) - if o.EncodeZigzag64(uint64(i64)) != nil { - t.Fatal("EncodeZigzag64") - } - x, e = o.DecodeZigzag64() - if e != nil { - t.Fatal("DecodeZigzag64") - } - if x != uint64(i64) { - t.Fatal("zigzag64 decode fail:", i64, x) - } - } -} - -// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. -type fakeMarshaler struct { - b []byte - err error -} - -func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } -func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } -func (f *fakeMarshaler) ProtoMessage() {} -func (f *fakeMarshaler) Reset() {} - -type msgWithFakeMarshaler struct { - M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` -} - -func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } -func (m *msgWithFakeMarshaler) ProtoMessage() {} -func (m *msgWithFakeMarshaler) Reset() {} - -// Simple tests for proto messages that implement the Marshaler interface. -func TestMarshalerEncoding(t *testing.T) { - tests := []struct { - name string - m Message - want []byte - wantErr error - }{ - { - name: "Marshaler that fails", - m: &fakeMarshaler{ - err: errors.New("some marshal err"), - b: []byte{5, 6, 7}, - }, - // Since there's an error, nothing should be written to buffer. - want: nil, - wantErr: errors.New("some marshal err"), - }, - { - name: "Marshaler that fails with RequiredNotSetError", - m: &msgWithFakeMarshaler{ - M: &fakeMarshaler{ - err: &RequiredNotSetError{}, - b: []byte{5, 6, 7}, - }, - }, - // Since there's an error that can be continued after, - // the buffer should be written. - want: []byte{ - 10, 3, // for &msgWithFakeMarshaler - 5, 6, 7, // for &fakeMarshaler - }, - wantErr: &RequiredNotSetError{}, - }, - { - name: "Marshaler that succeeds", - m: &fakeMarshaler{ - b: []byte{0, 1, 2, 3, 4, 127, 255}, - }, - want: []byte{0, 1, 2, 3, 4, 127, 255}, - wantErr: nil, - }, - } - for _, test := range tests { - b := NewBuffer(nil) - err := b.Marshal(test.m) - if _, ok := err.(*RequiredNotSetError); ok { - // We're not in package proto, so we can only assert the type in this case. - err = &RequiredNotSetError{} - } - if !reflect.DeepEqual(test.wantErr, err) { - t.Errorf("%s: got err %v wanted %v", test.name, err, test.wantErr) - } - if !reflect.DeepEqual(test.want, b.Bytes()) { - t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) - } - } -} - -// Simple tests for bytes -func TestBytesPrimitives(t *testing.T) { - o := old() - bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} - if o.EncodeRawBytes(bytes) != nil { - t.Error("EncodeRawBytes") - } - decb, e := o.DecodeRawBytes(false) - if e != nil { - t.Error("DecodeRawBytes") - } - equalbytes(bytes, decb, t) -} - -// Simple tests for strings -func TestStringPrimitives(t *testing.T) { - o := old() - s := "now is the time" - if o.EncodeStringBytes(s) != nil { - t.Error("enc_string") - } - decs, e := o.DecodeStringBytes() - if e != nil { - t.Error("dec_string") - } - if s != decs { - t.Error("string encode/decode fail:", s, decs) - } -} - -// Do we catch the "required bit not set" case? -func TestRequiredBit(t *testing.T) { - o := old() - pb := new(GoTest) - err := o.Marshal(pb) - if err == nil { - t.Error("did not catch missing required fields") - } else if strings.Index(err.Error(), "Kind") < 0 { - t.Error("wrong error type:", err) - } -} - -// Check that all fields are nil. -// Clearly silly, and a residue from a more interesting test with an earlier, -// different initialization property, but it once caught a compiler bug so -// it lives. -func checkInitialized(pb *GoTest, t *testing.T) { - if pb.F_BoolDefaulted != nil { - t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) - } - if pb.F_Int32Defaulted != nil { - t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) - } - if pb.F_Int64Defaulted != nil { - t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) - } - if pb.F_Fixed32Defaulted != nil { - t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) - } - if pb.F_Fixed64Defaulted != nil { - t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) - } - if pb.F_Uint32Defaulted != nil { - t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) - } - if pb.F_Uint64Defaulted != nil { - t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) - } - if pb.F_FloatDefaulted != nil { - t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) - } - if pb.F_DoubleDefaulted != nil { - t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) - } - if pb.F_StringDefaulted != nil { - t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) - } - if pb.F_BytesDefaulted != nil { - t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) - } - if pb.F_Sint32Defaulted != nil { - t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) - } - if pb.F_Sint64Defaulted != nil { - t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) - } -} - -// Does Reset() reset? -func TestReset(t *testing.T) { - pb := initGoTest(true) - // muck with some values - pb.F_BoolDefaulted = Bool(false) - pb.F_Int32Defaulted = Int32(237) - pb.F_Int64Defaulted = Int64(12346) - pb.F_Fixed32Defaulted = Uint32(32000) - pb.F_Fixed64Defaulted = Uint64(666) - pb.F_Uint32Defaulted = Uint32(323232) - pb.F_Uint64Defaulted = nil - pb.F_FloatDefaulted = nil - pb.F_DoubleDefaulted = Float64(0) - pb.F_StringDefaulted = String("gotcha") - pb.F_BytesDefaulted = []byte("asdfasdf") - pb.F_Sint32Defaulted = Int32(123) - pb.F_Sint64Defaulted = Int64(789) - pb.Reset() - checkInitialized(pb, t) -} - -// All required fields set, no defaults provided. -func TestEncodeDecode1(t *testing.T) { - pb := initGoTest(false) - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 0x20 - "714000000000000000"+ // field 14, encoding 1, value 0x40 - "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 - "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" - "b304"+ // field 70, encoding 3, start group - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // field 70, encoding 4, end group - "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f") // field 103, encoding 0, 0x7f zigzag64 -} - -// All required fields set, defaults provided. -func TestEncodeDecode2(t *testing.T) { - pb := initGoTest(true) - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All default fields set to their default value by hand -func TestEncodeDecode3(t *testing.T) { - pb := initGoTest(false) - pb.F_BoolDefaulted = Bool(true) - pb.F_Int32Defaulted = Int32(32) - pb.F_Int64Defaulted = Int64(64) - pb.F_Fixed32Defaulted = Uint32(320) - pb.F_Fixed64Defaulted = Uint64(640) - pb.F_Uint32Defaulted = Uint32(3200) - pb.F_Uint64Defaulted = Uint64(6400) - pb.F_FloatDefaulted = Float32(314159) - pb.F_DoubleDefaulted = Float64(271828) - pb.F_StringDefaulted = String("hello, \"world!\"\n") - pb.F_BytesDefaulted = []byte("Bignose") - pb.F_Sint32Defaulted = Int32(-32) - pb.F_Sint64Defaulted = Int64(-64) - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, defaults provided, all non-defaulted optional fields have values. -func TestEncodeDecode4(t *testing.T) { - pb := initGoTest(true) - pb.Table = String("hello") - pb.Param = Int32(7) - pb.OptionalField = initGoTestField() - pb.F_BoolOptional = Bool(true) - pb.F_Int32Optional = Int32(32) - pb.F_Int64Optional = Int64(64) - pb.F_Fixed32Optional = Uint32(3232) - pb.F_Fixed64Optional = Uint64(6464) - pb.F_Uint32Optional = Uint32(323232) - pb.F_Uint64Optional = Uint64(646464) - pb.F_FloatOptional = Float32(32.) - pb.F_DoubleOptional = Float64(64.) - pb.F_StringOptional = String("hello") - pb.F_BytesOptional = []byte("Bignose") - pb.F_Sint32Optional = Int32(-32) - pb.F_Sint64Optional = Int64(-64) - pb.Optionalgroup = initGoTest_OptionalGroup() - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" - "1807"+ // field 3, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "f00101"+ // field 30, encoding 0, value 1 - "f80120"+ // field 31, encoding 0, value 32 - "800240"+ // field 32, encoding 0, value 64 - "8d02a00c0000"+ // field 33, encoding 5, value 3232 - "91024019000000000000"+ // field 34, encoding 1, value 6464 - "9802a0dd13"+ // field 35, encoding 0, value 323232 - "a002c0ba27"+ // field 36, encoding 0, value 646464 - "ad0200000042"+ // field 37, encoding 5, value 32.0 - "b1020000000000005040"+ // field 38, encoding 1, value 64.0 - "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "d305"+ // start group field 90 level 1 - "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" - "d405"+ // end group field 90 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" - "f0123f"+ // field 302, encoding 0, value 63 - "f8127f"+ // field 303, encoding 0, value 127 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, defaults provided, all repeated fields given two values. -func TestEncodeDecode5(t *testing.T) { - pb := initGoTest(true) - pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} - pb.F_BoolRepeated = []bool{false, true} - pb.F_Int32Repeated = []int32{32, 33} - pb.F_Int64Repeated = []int64{64, 65} - pb.F_Fixed32Repeated = []uint32{3232, 3333} - pb.F_Fixed64Repeated = []uint64{6464, 6565} - pb.F_Uint32Repeated = []uint32{323232, 333333} - pb.F_Uint64Repeated = []uint64{646464, 656565} - pb.F_FloatRepeated = []float32{32., 33.} - pb.F_DoubleRepeated = []float64{64., 65.} - pb.F_StringRepeated = []string{"hello", "sailor"} - pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} - pb.F_Sint32Repeated = []int32{32, -32} - pb.F_Sint64Repeated = []int64{64, -64} - pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) - "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "a00100"+ // field 20, encoding 0, value 0 - "a00101"+ // field 20, encoding 0, value 1 - "a80120"+ // field 21, encoding 0, value 32 - "a80121"+ // field 21, encoding 0, value 33 - "b00140"+ // field 22, encoding 0, value 64 - "b00141"+ // field 22, encoding 0, value 65 - "bd01a00c0000"+ // field 23, encoding 5, value 3232 - "bd01050d0000"+ // field 23, encoding 5, value 3333 - "c1014019000000000000"+ // field 24, encoding 1, value 6464 - "c101a519000000000000"+ // field 24, encoding 1, value 6565 - "c801a0dd13"+ // field 25, encoding 0, value 323232 - "c80195ac14"+ // field 25, encoding 0, value 333333 - "d001c0ba27"+ // field 26, encoding 0, value 646464 - "d001b58928"+ // field 26, encoding 0, value 656565 - "dd0100000042"+ // field 27, encoding 5, value 32.0 - "dd0100000442"+ // field 27, encoding 5, value 33.0 - "e1010000000000005040"+ // field 28, encoding 1, value 64.0 - "e1010000000000405040"+ // field 28, encoding 1, value 65.0 - "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" - "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "8305"+ // start group field 80 level 1 - "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" - "8405"+ // end group field 80 level 1 - "8305"+ // start group field 80 level 1 - "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" - "8405"+ // end group field 80 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "ca0c03"+"626967"+ // field 201, encoding 2, string "big" - "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" - "d00c40"+ // field 202, encoding 0, value 32 - "d00c3f"+ // field 202, encoding 0, value -32 - "d80c8001"+ // field 203, encoding 0, value 64 - "d80c7f"+ // field 203, encoding 0, value -64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, all packed repeated fields given two values. -func TestEncodeDecode6(t *testing.T) { - pb := initGoTest(false) - pb.F_BoolRepeatedPacked = []bool{false, true} - pb.F_Int32RepeatedPacked = []int32{32, 33} - pb.F_Int64RepeatedPacked = []int64{64, 65} - pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} - pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} - pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} - pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} - pb.F_FloatRepeatedPacked = []float32{32., 33.} - pb.F_DoubleRepeatedPacked = []float64{64., 65.} - pb.F_Sint32RepeatedPacked = []int32{32, -32} - pb.F_Sint64RepeatedPacked = []int64{64, -64} - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 - "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 - "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 - "aa0308"+ // field 53, encoding 2, 8 bytes - "a00c0000050d0000"+ // value 3232, value 3333 - "b20310"+ // field 54, encoding 2, 16 bytes - "4019000000000000a519000000000000"+ // value 6464, value 6565 - "ba0306"+ // field 55, encoding 2, 6 bytes - "a0dd1395ac14"+ // value 323232, value 333333 - "c20306"+ // field 56, encoding 2, 6 bytes - "c0ba27b58928"+ // value 646464, value 656565 - "ca0308"+ // field 57, encoding 2, 8 bytes - "0000004200000442"+ // value 32.0, value 33.0 - "d20310"+ // field 58, encoding 2, 16 bytes - "00000000000050400000000000405040"+ // value 64.0, value 65.0 - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "b21f02"+ // field 502, encoding 2, 2 bytes - "403f"+ // value 32, value -32 - "ba1f03"+ // field 503, encoding 2, 3 bytes - "80017f") // value 64, value -64 -} - -// Test that we can encode empty bytes fields. -func TestEncodeDecodeBytes1(t *testing.T) { - pb := initGoTest(false) - - // Create our bytes - pb.F_BytesRequired = []byte{} - pb.F_BytesRepeated = [][]byte{{}} - pb.F_BytesOptional = []byte{} - - d, err := Marshal(pb) - if err != nil { - t.Error(err) - } - - pbd := new(GoTest) - if err := Unmarshal(d, pbd); err != nil { - t.Error(err) - } - - if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { - t.Error("required empty bytes field is incorrect") - } - if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { - t.Error("repeated empty bytes field is incorrect") - } - if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { - t.Error("optional empty bytes field is incorrect") - } -} - -// Test that we encode nil-valued fields of a repeated bytes field correctly. -// Since entries in a repeated field cannot be nil, nil must mean empty value. -func TestEncodeDecodeBytes2(t *testing.T) { - pb := initGoTest(false) - - // Create our bytes - pb.F_BytesRepeated = [][]byte{nil} - - d, err := Marshal(pb) - if err != nil { - t.Error(err) - } - - pbd := new(GoTest) - if err := Unmarshal(d, pbd); err != nil { - t.Error(err) - } - - if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { - t.Error("Unexpected value for repeated bytes field") - } -} - -// All required fields set, defaults provided, all repeated fields given two values. -func TestSkippingUnrecognizedFields(t *testing.T) { - o := old() - pb := initGoTestField() - - // Marshal it normally. - o.Marshal(pb) - - // Now new a GoSkipTest record. - skip := &GoSkipTest{ - SkipInt32: Int32(32), - SkipFixed32: Uint32(3232), - SkipFixed64: Uint64(6464), - SkipString: String("skipper"), - Skipgroup: &GoSkipTest_SkipGroup{ - GroupInt32: Int32(75), - GroupString: String("wxyz"), - }, - } - - // Marshal it into same buffer. - o.Marshal(skip) - - pbd := new(GoTestField) - o.Unmarshal(pbd) - - // The __unrecognized field should be a marshaling of GoSkipTest - skipd := new(GoSkipTest) - - o.SetBuf(pbd.XXX_unrecognized) - o.Unmarshal(skipd) - - if *skipd.SkipInt32 != *skip.SkipInt32 { - t.Error("skip int32", skipd.SkipInt32) - } - if *skipd.SkipFixed32 != *skip.SkipFixed32 { - t.Error("skip fixed32", skipd.SkipFixed32) - } - if *skipd.SkipFixed64 != *skip.SkipFixed64 { - t.Error("skip fixed64", skipd.SkipFixed64) - } - if *skipd.SkipString != *skip.SkipString { - t.Error("skip string", *skipd.SkipString) - } - if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { - t.Error("skip group int32", skipd.Skipgroup.GroupInt32) - } - if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { - t.Error("skip group string", *skipd.Skipgroup.GroupString) - } -} - -// Check that unrecognized fields of a submessage are preserved. -func TestSubmessageUnrecognizedFields(t *testing.T) { - nm := &NewMessage{ - Nested: &NewMessage_Nested{ - Name: String("Nigel"), - FoodGroup: String("carbs"), - }, - } - b, err := Marshal(nm) - if err != nil { - t.Fatalf("Marshal of NewMessage: %v", err) - } - - // Unmarshal into an OldMessage. - om := new(OldMessage) - if err = Unmarshal(b, om); err != nil { - t.Fatalf("Unmarshal to OldMessage: %v", err) - } - exp := &OldMessage{ - Nested: &OldMessage_Nested{ - Name: String("Nigel"), - // normal protocol buffer users should not do this - XXX_unrecognized: []byte("\x12\x05carbs"), - }, - } - if !Equal(om, exp) { - t.Errorf("om = %v, want %v", om, exp) - } - - // Clone the OldMessage. - om = Clone(om).(*OldMessage) - if !Equal(om, exp) { - t.Errorf("Clone(om) = %v, want %v", om, exp) - } - - // Marshal the OldMessage, then unmarshal it into an empty NewMessage. - if b, err = Marshal(om); err != nil { - t.Fatalf("Marshal of OldMessage: %v", err) - } - t.Logf("Marshal(%v) -> %q", om, b) - nm2 := new(NewMessage) - if err := Unmarshal(b, nm2); err != nil { - t.Fatalf("Unmarshal to NewMessage: %v", err) - } - if !Equal(nm, nm2) { - t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) - } -} - -// Check that an int32 field can be upgraded to an int64 field. -func TestNegativeInt32(t *testing.T) { - om := &OldMessage{ - Num: Int32(-1), - } - b, err := Marshal(om) - if err != nil { - t.Fatalf("Marshal of OldMessage: %v", err) - } - - // Check the size. It should be 11 bytes; - // 1 for the field/wire type, and 10 for the negative number. - if len(b) != 11 { - t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) - } - - // Unmarshal into a NewMessage. - nm := new(NewMessage) - if err := Unmarshal(b, nm); err != nil { - t.Fatalf("Unmarshal to NewMessage: %v", err) - } - want := &NewMessage{ - Num: Int64(-1), - } - if !Equal(nm, want) { - t.Errorf("nm = %v, want %v", nm, want) - } -} - -// Check that we can grow an array (repeated field) to have many elements. -// This test doesn't depend only on our encoding; for variety, it makes sure -// we create, encode, and decode the correct contents explicitly. It's therefore -// a bit messier. -// This test also uses (and hence tests) the Marshal/Unmarshal functions -// instead of the methods. -func TestBigRepeated(t *testing.T) { - pb := initGoTest(true) - - // Create the arrays - const N = 50 // Internally the library starts much smaller. - pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) - pb.F_Sint64Repeated = make([]int64, N) - pb.F_Sint32Repeated = make([]int32, N) - pb.F_BytesRepeated = make([][]byte, N) - pb.F_StringRepeated = make([]string, N) - pb.F_DoubleRepeated = make([]float64, N) - pb.F_FloatRepeated = make([]float32, N) - pb.F_Uint64Repeated = make([]uint64, N) - pb.F_Uint32Repeated = make([]uint32, N) - pb.F_Fixed64Repeated = make([]uint64, N) - pb.F_Fixed32Repeated = make([]uint32, N) - pb.F_Int64Repeated = make([]int64, N) - pb.F_Int32Repeated = make([]int32, N) - pb.F_BoolRepeated = make([]bool, N) - pb.RepeatedField = make([]*GoTestField, N) - - // Fill in the arrays with checkable values. - igtf := initGoTestField() - igtrg := initGoTest_RepeatedGroup() - for i := 0; i < N; i++ { - pb.Repeatedgroup[i] = igtrg - pb.F_Sint64Repeated[i] = int64(i) - pb.F_Sint32Repeated[i] = int32(i) - s := fmt.Sprint(i) - pb.F_BytesRepeated[i] = []byte(s) - pb.F_StringRepeated[i] = s - pb.F_DoubleRepeated[i] = float64(i) - pb.F_FloatRepeated[i] = float32(i) - pb.F_Uint64Repeated[i] = uint64(i) - pb.F_Uint32Repeated[i] = uint32(i) - pb.F_Fixed64Repeated[i] = uint64(i) - pb.F_Fixed32Repeated[i] = uint32(i) - pb.F_Int64Repeated[i] = int64(i) - pb.F_Int32Repeated[i] = int32(i) - pb.F_BoolRepeated[i] = i%2 == 0 - pb.RepeatedField[i] = igtf - } - - // Marshal. - buf, _ := Marshal(pb) - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - Unmarshal(buf, pbd) - - // Check the checkable values - for i := uint64(0); i < N; i++ { - if pbd.Repeatedgroup[i] == nil { // TODO: more checking? - t.Error("pbd.Repeatedgroup bad") - } - var x uint64 - x = uint64(pbd.F_Sint64Repeated[i]) - if x != i { - t.Error("pbd.F_Sint64Repeated bad", x, i) - } - x = uint64(pbd.F_Sint32Repeated[i]) - if x != i { - t.Error("pbd.F_Sint32Repeated bad", x, i) - } - s := fmt.Sprint(i) - equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) - if pbd.F_StringRepeated[i] != s { - t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) - } - x = uint64(pbd.F_DoubleRepeated[i]) - if x != i { - t.Error("pbd.F_DoubleRepeated bad", x, i) - } - x = uint64(pbd.F_FloatRepeated[i]) - if x != i { - t.Error("pbd.F_FloatRepeated bad", x, i) - } - x = pbd.F_Uint64Repeated[i] - if x != i { - t.Error("pbd.F_Uint64Repeated bad", x, i) - } - x = uint64(pbd.F_Uint32Repeated[i]) - if x != i { - t.Error("pbd.F_Uint32Repeated bad", x, i) - } - x = pbd.F_Fixed64Repeated[i] - if x != i { - t.Error("pbd.F_Fixed64Repeated bad", x, i) - } - x = uint64(pbd.F_Fixed32Repeated[i]) - if x != i { - t.Error("pbd.F_Fixed32Repeated bad", x, i) - } - x = uint64(pbd.F_Int64Repeated[i]) - if x != i { - t.Error("pbd.F_Int64Repeated bad", x, i) - } - x = uint64(pbd.F_Int32Repeated[i]) - if x != i { - t.Error("pbd.F_Int32Repeated bad", x, i) - } - if pbd.F_BoolRepeated[i] != (i%2 == 0) { - t.Error("pbd.F_BoolRepeated bad", x, i) - } - if pbd.RepeatedField[i] == nil { // TODO: more checking? - t.Error("pbd.RepeatedField bad") - } - } -} - -// Verify we give a useful message when decoding to the wrong structure type. -func TestTypeMismatch(t *testing.T) { - pb1 := initGoTest(true) - - // Marshal - o := old() - o.Marshal(pb1) - - // Now Unmarshal it to the wrong type. - pb2 := initGoTestField() - err := o.Unmarshal(pb2) - if err == nil { - t.Error("expected error, got no error") - } else if !strings.Contains(err.Error(), "bad wiretype") { - t.Error("expected bad wiretype error, got", err) - } -} - -func encodeDecode(t *testing.T, in, out Message, msg string) { - buf, err := Marshal(in) - if err != nil { - t.Fatalf("failed marshaling %v: %v", msg, err) - } - if err := Unmarshal(buf, out); err != nil { - t.Fatalf("failed unmarshaling %v: %v", msg, err) - } -} - -func TestPackedNonPackedDecoderSwitching(t *testing.T) { - np, p := new(NonPackedTest), new(PackedTest) - - // non-packed -> packed - np.A = []int32{0, 1, 1, 2, 3, 5} - encodeDecode(t, np, p, "non-packed -> packed") - if !reflect.DeepEqual(np.A, p.B) { - t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) - } - - // packed -> non-packed - np.Reset() - p.B = []int32{3, 1, 4, 1, 5, 9} - encodeDecode(t, p, np, "packed -> non-packed") - if !reflect.DeepEqual(p.B, np.A) { - t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) - } -} - -func TestProto1RepeatedGroup(t *testing.T) { - pb := &MessageList{ - Message: []*MessageList_Message{ - { - Name: String("blah"), - Count: Int32(7), - }, - // NOTE: pb.Message[1] is a nil - nil, - }, - } - - o := old() - err := o.Marshal(pb) - if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { - t.Fatalf("unexpected or no error when marshaling: %v", err) - } -} - -// Test that enums work. Checks for a bug introduced by making enums -// named types instead of int32: newInt32FromUint64 would crash with -// a type mismatch in reflect.PointTo. -func TestEnum(t *testing.T) { - pb := new(GoEnum) - pb.Foo = FOO_FOO1.Enum() - o := old() - if err := o.Marshal(pb); err != nil { - t.Fatal("error encoding enum:", err) - } - pb1 := new(GoEnum) - if err := o.Unmarshal(pb1); err != nil { - t.Fatal("error decoding enum:", err) - } - if *pb1.Foo != FOO_FOO1 { - t.Error("expected 7 but got ", *pb1.Foo) - } -} - -// Enum types have String methods. Check that enum fields can be printed. -// We don't care what the value actually is, just as long as it doesn't crash. -func TestPrintingNilEnumFields(t *testing.T) { - pb := new(GoEnum) - _ = fmt.Sprintf("%+v", pb) -} - -// Verify that absent required fields cause Marshal/Unmarshal to return errors. -func TestRequiredFieldEnforcement(t *testing.T) { - pb := new(GoTestField) - _, err := Marshal(pb) - if err == nil { - t.Error("marshal: expected error, got nil") - } else if _, 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{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{"Barry"}, - } - - // Round-trip. - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof: %v", err) - } - if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) - t.Errorf("Incorrect marshal of message with oneof: %v", b) - } - m.Reset() - if err = Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof: %v", err) - } - if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { - t.Errorf("After round trip, Union = %+v", m.Union) - } - if name := m.GetName(); name != "Barry" { - t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") - } - - // Let's try with a message in the oneof. - m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}} - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof set to message: %v", err) - } - if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) - t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) - } - m.Reset() - if err := Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof set to message: %v", err) - } - ss, ok := m.Union.(*Communique_Msg) - if !ok || ss.Msg.GetStringField() != "deep deep string" { - t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) - } -} - -func TestInefficientPackedBool(t *testing.T) { - // https://github.com/golang/protobuf/issues/76 - inp := []byte{ - 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes - // Usually a bool should take a single byte, - // but it is permitted to be any varint. - 0xb9, 0x30, - } - if err := Unmarshal(inp, new(MoreRepeated)); err != nil { - t.Error(err) - } -} - -// Benchmarks - -func testMsg() *GoTest { - pb := initGoTest(true) - const N = 1000 // Internally the library starts much smaller. - pb.F_Int32Repeated = make([]int32, N) - pb.F_DoubleRepeated = make([]float64, N) - for i := 0; i < N; i++ { - pb.F_Int32Repeated[i] = int32(i) - pb.F_DoubleRepeated[i] = float64(i) - } - return pb -} - -func bytesMsg() *GoTest { - pb := initGoTest(true) - buf := make([]byte, 4000) - for i := range buf { - buf[i] = byte(i) - } - pb.F_BytesDefaulted = buf - return pb -} - -func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { - d, _ := marshal(pb) - b.SetBytes(int64(len(d))) - b.ResetTimer() - for i := 0; i < b.N; i++ { - marshal(pb) - } -} - -func benchmarkBufferMarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - p.Reset() - err := p.Marshal(pb0) - return p.Bytes(), err - }) -} - -func benchmarkSize(b *testing.B, pb Message) { - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - Size(pb) - return nil, nil - }) -} - -func newOf(pb Message) Message { - in := reflect.ValueOf(pb) - if in.IsNil() { - return pb - } - return reflect.New(in.Type().Elem()).Interface().(Message) -} - -func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { - d, _ := Marshal(pb) - b.SetBytes(int64(len(d))) - pbd := newOf(pb) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - unmarshal(d, pbd) - } -} - -func benchmarkBufferUnmarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { - p.SetBuf(d) - return p.Unmarshal(pb0) - }) -} - -// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} - -func BenchmarkMarshal(b *testing.B) { - benchmarkMarshal(b, testMsg(), Marshal) -} - -func BenchmarkBufferMarshal(b *testing.B) { - benchmarkBufferMarshal(b, testMsg()) -} - -func BenchmarkSize(b *testing.B) { - benchmarkSize(b, testMsg()) -} - -func BenchmarkUnmarshal(b *testing.B) { - benchmarkUnmarshal(b, testMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshal(b *testing.B) { - benchmarkBufferUnmarshal(b, testMsg()) -} - -func BenchmarkMarshalBytes(b *testing.B) { - benchmarkMarshal(b, bytesMsg(), Marshal) -} - -func BenchmarkBufferMarshalBytes(b *testing.B) { - benchmarkBufferMarshal(b, bytesMsg()) -} - -func BenchmarkSizeBytes(b *testing.B) { - benchmarkSize(b, bytesMsg()) -} - -func BenchmarkUnmarshalBytes(b *testing.B) { - benchmarkUnmarshal(b, bytesMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshalBytes(b *testing.B) { - benchmarkBufferUnmarshal(b, bytesMsg()) -} - -func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { - b.StopTimer() - pb := initGoTestField() - skip := &GoSkipTest{ - SkipInt32: Int32(32), - SkipFixed32: Uint32(3232), - SkipFixed64: Uint64(6464), - SkipString: String("skipper"), - Skipgroup: &GoSkipTest_SkipGroup{ - GroupInt32: Int32(75), - GroupString: String("wxyz"), - }, - } - - pbd := new(GoTestField) - p := NewBuffer(nil) - p.Marshal(pb) - p.Marshal(skip) - p2 := NewBuffer(nil) - - b.StartTimer() - for i := 0; i < b.N; i++ { - p2.SetBuf(p.Bytes()) - p2.Unmarshal(pbd) - } -} diff --git a/vendor/github.com/gogo/protobuf/proto/clone_test.go b/vendor/github.com/gogo/protobuf/proto/clone_test.go deleted file mode 100644 index 1a16eb55..00000000 --- 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/equal_test.go b/vendor/github.com/gogo/protobuf/proto/equal_test.go deleted file mode 100644 index 02ecaf1b..00000000 --- a/vendor/github.com/gogo/protobuf/proto/equal_test.go +++ /dev/null @@ -1,212 +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" -) - -// Four identical base messages. -// The init function adds extensions to some of them. -var messageWithoutExtension = &pb.MyMessage{Count: Int32(7)} -var messageWithExtension1a = &pb.MyMessage{Count: Int32(7)} -var messageWithExtension1b = &pb.MyMessage{Count: Int32(7)} -var messageWithExtension2 = &pb.MyMessage{Count: Int32(7)} - -// Two messages with non-message extensions. -var messageWithInt32Extension1 = &pb.MyMessage{Count: Int32(8)} -var messageWithInt32Extension2 = &pb.MyMessage{Count: Int32(8)} - -func init() { - ext1 := &pb.Ext{Data: String("Kirk")} - ext2 := &pb.Ext{Data: String("Picard")} - - // messageWithExtension1a has ext1, but never marshals it. - if err := SetExtension(messageWithExtension1a, pb.E_Ext_More, ext1); err != nil { - panic("SetExtension on 1a failed: " + err.Error()) - } - - // messageWithExtension1b is the unmarshaled form of messageWithExtension1a. - if err := SetExtension(messageWithExtension1b, pb.E_Ext_More, ext1); err != nil { - panic("SetExtension on 1b failed: " + err.Error()) - } - buf, err := Marshal(messageWithExtension1b) - if err != nil { - panic("Marshal of 1b failed: " + err.Error()) - } - messageWithExtension1b.Reset() - if err := Unmarshal(buf, messageWithExtension1b); err != nil { - panic("Unmarshal of 1b failed: " + err.Error()) - } - - // messageWithExtension2 has ext2. - if err := SetExtension(messageWithExtension2, pb.E_Ext_More, ext2); err != nil { - panic("SetExtension on 2 failed: " + err.Error()) - } - - if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(23)); err != nil { - panic("SetExtension on Int32-1 failed: " + err.Error()) - } - if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(24)); err != nil { - panic("SetExtension on Int32-2 failed: " + err.Error()) - } -} - -var EqualTests = []struct { - desc string - a, b Message - exp bool -}{ - {"different types", &pb.GoEnum{}, &pb.GoTestField{}, false}, - {"equal empty", &pb.GoEnum{}, &pb.GoEnum{}, true}, - {"nil vs nil", nil, nil, true}, - {"typed nil vs typed nil", (*pb.GoEnum)(nil), (*pb.GoEnum)(nil), true}, - {"typed nil vs empty", (*pb.GoEnum)(nil), &pb.GoEnum{}, false}, - {"different typed nil", (*pb.GoEnum)(nil), (*pb.GoTestField)(nil), false}, - - {"one set field, one unset field", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{}, false}, - {"one set field zero, one unset field", &pb.GoTest{Param: Int32(0)}, &pb.GoTest{}, false}, - {"different set fields", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("bar")}, false}, - {"equal set", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("foo")}, true}, - - {"repeated, one set", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{}, false}, - {"repeated, different length", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{F_Int32Repeated: []int32{2}}, false}, - {"repeated, different value", &pb.GoTest{F_Int32Repeated: []int32{2}}, &pb.GoTest{F_Int32Repeated: []int32{3}}, false}, - {"repeated, equal", &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, true}, - {"repeated, nil equal nil", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: nil}, true}, - {"repeated, nil equal empty", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: []int32{}}, true}, - {"repeated, empty equal nil", &pb.GoTest{F_Int32Repeated: []int32{}}, &pb.GoTest{F_Int32Repeated: nil}, true}, - - { - "nested, different", - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("foo")}}, - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("bar")}}, - false, - }, - { - "nested, equal", - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, - &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, - true, - }, - - {"bytes", &pb.OtherMessage{Value: []byte("foo")}, &pb.OtherMessage{Value: []byte("foo")}, true}, - {"bytes, empty", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: []byte{}}, true}, - {"bytes, empty vs nil", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: nil}, false}, - { - "repeated bytes", - &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, - &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, - true, - }, - // In proto3, []byte{} and []byte(nil) are equal. - {"proto3 bytes, empty vs nil", &proto3pb.Message{Data: []byte{}}, &proto3pb.Message{Data: nil}, true}, - - {"extension vs. no extension", messageWithoutExtension, messageWithExtension1a, false}, - {"extension vs. same extension", messageWithExtension1a, messageWithExtension1b, true}, - {"extension vs. different extension", messageWithExtension1a, messageWithExtension2, false}, - - {"int32 extension vs. itself", messageWithInt32Extension1, messageWithInt32Extension1, true}, - {"int32 extension vs. a different int32", messageWithInt32Extension1, messageWithInt32Extension2, false}, - - { - "message with group", - &pb.MyMessage{ - Count: Int32(1), - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: Int32(5), - }, - }, - &pb.MyMessage{ - Count: Int32(1), - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: Int32(5), - }, - }, - true, - }, - - { - "map same", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - true, - }, - { - "map different entry", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{2: "Rob"}}, - false, - }, - { - "map different key only", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{2: "Ken"}}, - false, - }, - { - "map different value only", - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, - &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob"}}, - false, - }, - { - "oneof same", - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - true, - }, - { - "oneof one nil", - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - &pb.Communique{}, - false, - }, - { - "oneof different", - &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, - &pb.Communique{Union: &pb.Communique_Name{Name: "Bobby Tables"}}, - false, - }, -} - -func TestEqual(t *testing.T) { - for _, tc := range EqualTests { - if res := Equal(tc.a, tc.b); res != tc.exp { - t.Errorf("%v: Equal(%v, %v) = %v, want %v", tc.desc, tc.a, tc.b, res, tc.exp) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_test.go b/vendor/github.com/gogo/protobuf/proto/extensions_test.go deleted file mode 100644 index 42935ee9..00000000 --- a/vendor/github.com/gogo/protobuf/proto/extensions_test.go +++ /dev/null @@ -1,504 +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 ( - "bytes" - "fmt" - "reflect" - "sort" - "testing" - - "github.com/gogo/protobuf/proto" - pb "github.com/gogo/protobuf/proto/testdata" -) - -func TestGetExtensionsWithMissingExtensions(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Fatalf("Could not set ext1: %s", err) - } - exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ - pb.E_Ext_More, - pb.E_Ext_Text, - }) - if err != nil { - t.Fatalf("GetExtensions() failed: %s", err) - } - if exts[0] != ext1 { - t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) - } - if exts[1] != nil { - t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) - } -} - -func TestExtensionDescsWithMissingExtensions(t *testing.T) { - msg := &pb.MyMessage{Count: proto.Int32(0)} - extdesc1 := pb.E_Ext_More - ext1 := &pb.Ext{} - if err := proto.SetExtension(msg, extdesc1, ext1); err != nil { - t.Fatalf("Could not set ext1: %s", err) - } - extdesc2 := &proto.ExtensionDesc{ - ExtendedType: (*pb.MyMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 123456789, - Name: "a.b", - Tag: "varint,123456789,opt", - } - ext2 := proto.Bool(false) - if err := proto.SetExtension(msg, extdesc2, ext2); err != nil { - t.Fatalf("Could not set ext2: %s", err) - } - - b, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Could not marshal msg: %v", err) - } - if err = proto.Unmarshal(b, msg); err != nil { - t.Fatalf("Could not unmarshal into msg: %v", err) - } - - descs, err := proto.ExtensionDescs(msg) - if err != nil { - t.Fatalf("proto.ExtensionDescs: got error %v", err) - } - sortExtDescs(descs) - wantDescs := []*proto.ExtensionDesc{extdesc1, {Field: extdesc2.Field}} - if !reflect.DeepEqual(descs, wantDescs) { - t.Errorf("proto.ExtensionDescs(msg) sorted extension ids: got %+v, want %+v", descs, wantDescs) - } -} - -type ExtensionDescSlice []*proto.ExtensionDesc - -func (s ExtensionDescSlice) Len() int { return len(s) } -func (s ExtensionDescSlice) Less(i, j int) bool { return s[i].Field < s[j].Field } -func (s ExtensionDescSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -func sortExtDescs(s []*proto.ExtensionDesc) { - sort.Sort(ExtensionDescSlice(s)) -} - -func TestGetExtensionStability(t *testing.T) { - check := func(m *pb.MyMessage) bool { - ext1, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - ext2, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - return ext1 == ext2 - } - msg := &pb.MyMessage{Count: proto.Int32(4)} - ext0 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { - t.Fatalf("Could not set ext1: %s", ext0) - } - if !check(msg) { - t.Errorf("GetExtension() not stable before marshaling") - } - bb, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Marshal() failed: %s", err) - } - msg1 := &pb.MyMessage{} - err = proto.Unmarshal(bb, msg1) - if err != nil { - t.Fatalf("Unmarshal() failed: %s", err) - } - if !check(msg1) { - t.Errorf("GetExtension() not stable after unmarshaling") - } -} - -func TestGetExtensionDefaults(t *testing.T) { - var setFloat64 float64 = 1 - var setFloat32 float32 = 2 - var setInt32 int32 = 3 - var setInt64 int64 = 4 - var setUint32 uint32 = 5 - var setUint64 uint64 = 6 - var setBool = true - var setBool2 = false - var setString = "Goodnight string" - var setBytes = []byte("Goodnight bytes") - var setEnum = pb.DefaultsMessage_TWO - - type testcase struct { - ext *proto.ExtensionDesc // Extension we are testing. - want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). - def interface{} // Expected value of extension after ClearExtension(). - } - tests := []testcase{ - {pb.E_NoDefaultDouble, setFloat64, nil}, - {pb.E_NoDefaultFloat, setFloat32, nil}, - {pb.E_NoDefaultInt32, setInt32, nil}, - {pb.E_NoDefaultInt64, setInt64, nil}, - {pb.E_NoDefaultUint32, setUint32, nil}, - {pb.E_NoDefaultUint64, setUint64, nil}, - {pb.E_NoDefaultSint32, setInt32, nil}, - {pb.E_NoDefaultSint64, setInt64, nil}, - {pb.E_NoDefaultFixed32, setUint32, nil}, - {pb.E_NoDefaultFixed64, setUint64, nil}, - {pb.E_NoDefaultSfixed32, setInt32, nil}, - {pb.E_NoDefaultSfixed64, setInt64, nil}, - {pb.E_NoDefaultBool, setBool, nil}, - {pb.E_NoDefaultBool, setBool2, nil}, - {pb.E_NoDefaultString, setString, nil}, - {pb.E_NoDefaultBytes, setBytes, nil}, - {pb.E_NoDefaultEnum, setEnum, nil}, - {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, - {pb.E_DefaultFloat, setFloat32, float32(3.14)}, - {pb.E_DefaultInt32, setInt32, int32(42)}, - {pb.E_DefaultInt64, setInt64, int64(43)}, - {pb.E_DefaultUint32, setUint32, uint32(44)}, - {pb.E_DefaultUint64, setUint64, uint64(45)}, - {pb.E_DefaultSint32, setInt32, int32(46)}, - {pb.E_DefaultSint64, setInt64, int64(47)}, - {pb.E_DefaultFixed32, setUint32, uint32(48)}, - {pb.E_DefaultFixed64, setUint64, uint64(49)}, - {pb.E_DefaultSfixed32, setInt32, int32(50)}, - {pb.E_DefaultSfixed64, setInt64, int64(51)}, - {pb.E_DefaultBool, setBool, true}, - {pb.E_DefaultBool, setBool2, true}, - {pb.E_DefaultString, setString, "Hello, string"}, - {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, - {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, - } - - checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { - val, err := proto.GetExtension(msg, test.ext) - if err != nil { - if valWant != nil { - return fmt.Errorf("GetExtension(): %s", err) - } - if want := proto.ErrMissingExtension; err != want { - return fmt.Errorf("Unexpected error: got %v, want %v", err, want) - } - return nil - } - - // All proto2 extension values are either a pointer to a value or a slice of values. - ty := reflect.TypeOf(val) - tyWant := reflect.TypeOf(test.ext.ExtensionType) - if got, want := ty, tyWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) - } - tye := ty.Elem() - tyeWant := tyWant.Elem() - if got, want := tye, tyeWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) - } - - // Check the name of the type of the value. - // If it is an enum it will be type int32 with the name of the enum. - if got, want := tye.Name(), tye.Name(); got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) - } - - // Check that value is what we expect. - // If we have a pointer in val, get the value it points to. - valExp := val - if ty.Kind() == reflect.Ptr { - valExp = reflect.ValueOf(val).Elem().Interface() - } - if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { - return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) - } - - return nil - } - - setTo := func(test testcase) interface{} { - setTo := reflect.ValueOf(test.want) - if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { - setTo = reflect.New(typ).Elem() - setTo.Set(reflect.New(setTo.Type().Elem())) - setTo.Elem().Set(reflect.ValueOf(test.want)) - } - return setTo.Interface() - } - - for _, test := range tests { - msg := &pb.DefaultsMessage{} - name := test.ext.Name - - // Check the initial value. - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - - // Set the per-type value and check value. - name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) - if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { - t.Errorf("%s: SetExtension(): %v", name, err) - continue - } - if err := checkVal(test, msg, test.want); err != nil { - t.Errorf("%s: %v", name, err) - continue - } - - // Set and check the value. - name += " (cleared)" - proto.ClearExtension(msg, test.ext) - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - } -} - -func TestExtensionsRoundTrip(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{ - Data: proto.String("hi"), - } - ext2 := &pb.Ext{ - Data: proto.String("there"), - } - exists := proto.HasExtension(msg, pb.E_Ext_More) - if exists { - t.Error("Extension More present unexpectedly") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Error(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { - t.Error(err) - } - e, err := proto.GetExtension(msg, pb.E_Ext_More) - if err != nil { - t.Error(err) - } - x, ok := e.(*pb.Ext) - if !ok { - t.Errorf("e has type %T, expected testdata.Ext", e) - } else if *x.Data != "there" { - t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) - } - proto.ClearExtension(msg, pb.E_Ext_More) - if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { - t.Errorf("got %v, expected ErrMissingExtension", e) - } - if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { - t.Error("expected bad extension error, got nil") - } - if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { - t.Error("expected extension err") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { - t.Error("expected some sort of type mismatch error, got nil") - } -} - -func TestNilExtension(t *testing.T) { - msg := &pb.MyMessage{ - Count: proto.Int32(1), - } - if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { - t.Fatal(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { - t.Error("expected SetExtension to fail due to a nil extension") - } else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want { - t.Errorf("expected error %v, got %v", want, err) - } - // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update - // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal. -} - -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)) - } -} 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 353a3ea7..00000000 --- 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_proto/proto3.pb.go b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go deleted file mode 100644 index a95861d8..00000000 --- a/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3_proto/proto3.proto -// DO NOT EDIT! - -/* -Package proto3_proto is a generated protocol buffer package. - -It is generated from these files: - proto3_proto/proto3.proto - -It has these top-level messages: - Message - Nested - MessageWithMap -*/ -package proto3_proto - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import testdata "github.com/gogo/protobuf/proto/testdata" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type Message_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 fileDescriptorProto3, []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=proto3_proto.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,name=key" json:"key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - RFunny []Message_Humour `protobuf:"varint,16,rep,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,proto3" 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,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } - -func (m *Message) GetNested() *Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *Message) GetTerrain() map[string]*Nested { - if m != nil { - return m.Terrain - } - return nil -} - -func (m *Message) GetProto2Field() *testdata.SubDefaults { - if m != nil { - return m.Proto2Field - } - return nil -} - -func (m *Message) GetProto2Value() map[string]*testdata.SubDefaults { - if m != nil { - return m.Proto2Value - } - return nil -} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` - Cute bool `protobuf:"varint,2,opt,name=cute,proto3" 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 fileDescriptorProto3, []int{1} } - -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,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } -func (*MessageWithMap) ProtoMessage() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{2} } - -func (m *MessageWithMap) GetByteMapping() map[bool][]byte { - if m != nil { - return m.ByteMapping - } - return nil -} - -func init() { - proto.RegisterType((*Message)(nil), "proto3_proto.Message") - proto.RegisterType((*Nested)(nil), "proto3_proto.Nested") - proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap") - proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) -} - -func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptorProto3) } - -var fileDescriptorProto3 = []byte{ - // 580 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x53, 0xdd, 0x6a, 0xdb, 0x4c, - 0x10, 0xfd, 0xfc, 0x13, 0x59, 0x19, 0xc9, 0xf9, 0xc4, 0xe2, 0xc2, 0xd6, 0xf4, 0xc2, 0x75, 0xa1, - 0x84, 0xfe, 0xc8, 0xa0, 0x52, 0x08, 0xa5, 0xb4, 0xc4, 0x6e, 0x42, 0x4d, 0x6c, 0xd7, 0xac, 0xe3, - 0x86, 0x5e, 0x09, 0xc9, 0x5e, 0xcb, 0xa2, 0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, 0xfa, 0xf2, 0x7e, 0xd5, 0x3f, 0xdc, 0xfa, 0xae, 0x6c, 0xf7, 0x23, - 0x68, 0xca, 0x7d, 0x64, 0x40, 0x63, 0x3e, 0xb9, 0x9a, 0x7c, 0xb9, 0x99, 0x58, 0xff, 0x21, 0x1d, - 0xea, 0xd3, 0xf9, 0x64, 0x66, 0x55, 0x50, 0x13, 0x8e, 0x67, 0xa3, 0xf3, 0xe9, 0xec, 0x7a, 0x38, - 0xb8, 0xb2, 0xaa, 0xe8, 0x7f, 0x30, 0xfa, 0xc3, 0xd1, 0xc8, 0xed, 0x9f, 0x0f, 0x47, 0x17, 0xdf, - 0xac, 0x5a, 0xd7, 0x01, 0x4d, 0x0d, 0x2b, 0xde, 0x90, 0x2f, 0x77, 0xad, 0xe6, 0x51, 0x07, 0xf1, - 0x6a, 0x17, 0x39, 0x53, 0x03, 0xe9, 0x44, 0xc6, 0xdd, 0x5f, 0x15, 0x38, 0x29, 0x7c, 0xbc, 0xe1, - 0xff, 0xe0, 0xd8, 0xdb, 0x22, 0x6e, 0x98, 0xbf, 0x63, 0xd4, 0x8d, 0xbc, 0xed, 0x36, 0x8c, 0x03, - 0x5e, 0x43, 0x78, 0xff, 0xfa, 0xa0, 0xf7, 0x85, 0xc6, 0xee, 0x73, 0xc1, 0x58, 0xf1, 0x8b, 0x15, - 0xf8, 0x77, 0x48, 0xfb, 0x03, 0x58, 0x0f, 0x09, 0x65, 0xc3, 0x74, 0x65, 0x58, 0xab, 0x6c, 0x98, - 0x59, 0x72, 0xc6, 0xd7, 0x54, 0xeb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x75, 0x74, 0x87, 0xb4, - 0x50, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto deleted file mode 100644 index 5169d75c..00000000 --- a/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package proto3_proto; - -import "github.com/gogo/protobuf/proto/testdata/test.proto"; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - repeated Humour r_funny = 16; - - map terrain = 10; - testdata.SubDefaults proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; - bool cute = 2; -} - -message MessageWithMap { - map byte_mapping = 1; -} 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 6f9cddc3..00000000 --- a/vendor/github.com/gogo/protobuf/proto/proto3_test.go +++ /dev/null @@ -1,125 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "testing" - - "github.com/gogo/protobuf/proto" - pb "github.com/gogo/protobuf/proto/proto3_proto" - tpb "github.com/gogo/protobuf/proto/testdata" -) - -func TestProto3ZeroValues(t *testing.T) { - tests := []struct { - desc string - m proto.Message - }{ - {"zero message", &pb.Message{}}, - {"empty bytes field", &pb.Message{Data: []byte{}}}, - } - for _, test := range tests { - b, err := proto.Marshal(test.m) - if err != nil { - t.Errorf("%s: proto.Marshal: %v", test.desc, err) - continue - } - if len(b) > 0 { - t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) - } - } -} - -func TestRoundTripProto3(t *testing.T) { - m := &pb.Message{ - Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" - Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 - HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 - Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" - ResultCount: 47, // (0 | 7<<3): 0x38 0x2f - TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 - Score: 8.1, // (5 | 9<<3): 0x4d <8.1> - - Key: []uint64{1, 0xdeadbeef}, - Nested: &pb.Nested{ - Bunny: "Monty", - }, - } - t.Logf(" m: %v", m) - - b, err := proto.Marshal(m) - if err != nil { - t.Fatalf("proto.Marshal: %v", err) - } - t.Logf(" b: %q", b) - - m2 := new(pb.Message) - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatalf("proto.Unmarshal: %v", err) - } - t.Logf("m2: %v", m2) - - if !proto.Equal(m, m2) { - t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) - } -} - -func TestProto3SetDefaults(t *testing.T) { - in := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: new(tpb.SubDefaults), - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": new(tpb.SubDefaults), - }, - } - - got := proto.Clone(in).(*pb.Message) - proto.SetDefaults(got) - - // There are no defaults in proto3. Everything should be the zero value, but - // we need to remember to set defaults for nested proto2 messages. - want := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": {N: proto.Int64(7)}, - }, - } - - if !proto.Equal(got, want) { - t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) - } -} diff --git a/vendor/github.com/gogo/protobuf/proto/size2_test.go b/vendor/github.com/gogo/protobuf/proto/size2_test.go deleted file mode 100644 index a2729c39..00000000 --- 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 0a6c1772..00000000 --- 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/Makefile b/vendor/github.com/gogo/protobuf/proto/testdata/Makefile deleted file mode 100644 index 31d83277..00000000 --- a/vendor/github.com/gogo/protobuf/proto/testdata/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -all: regenerate - -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - protoc-min-version --version="3.0.0" --gogo_out=. test.proto - diff --git a/vendor/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 8e845153..00000000 --- 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/testdata/test.pb.go b/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go deleted file mode 100644 index 76cd9cec..00000000 --- a/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go +++ /dev/null @@ -1,4056 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: test.proto -// DO NOT EDIT! - -/* -Package testdata is a generated protocol buffer package. - -It is generated from these files: - test.proto - -It has these top-level messages: - GoEnum - GoTestField - GoTest - GoTestRequiredGroupField - GoSkipTest - NonPackedTest - PackedTest - MaxTag - OldMessage - NewMessage - InnerMessage - OtherMessage - RequiredInnerMessage - MyMessage - Ext - ComplexExtension - DefaultsMessage - MyMessageSet - Empty - MessageList - Strings - Defaults - SubDefaults - RepeatedEnum - MoreRepeated - GroupOld - GroupNew - FloatingPoint - MessageWithMap - Oneof - Communique -*/ -package testdata - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 int32 - -const ( - FOO_FOO1 FOO = 1 -) - -var FOO_name = map[int32]string{ - 1: "FOO1", -} -var FOO_value = map[string]int32{ - "FOO1": 1, -} - -func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p -} -func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) -} -func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") - if err != nil { - return err - } - *x = FOO(value) - return nil -} -func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } - -// An enum, for completeness. -type GoTest_KIND int32 - -const ( - GoTest_VOID GoTest_KIND = 0 - // Basic types - GoTest_BOOL GoTest_KIND = 1 - GoTest_BYTES GoTest_KIND = 2 - GoTest_FINGERPRINT GoTest_KIND = 3 - GoTest_FLOAT GoTest_KIND = 4 - GoTest_INT GoTest_KIND = 5 - GoTest_STRING GoTest_KIND = 6 - GoTest_TIME GoTest_KIND = 7 - // Groupings - GoTest_TUPLE GoTest_KIND = 8 - GoTest_ARRAY GoTest_KIND = 9 - GoTest_MAP GoTest_KIND = 10 - // Table types - GoTest_TABLE GoTest_KIND = 11 - // Functions - GoTest_FUNCTION GoTest_KIND = 12 -) - -var GoTest_KIND_name = map[int32]string{ - 0: "VOID", - 1: "BOOL", - 2: "BYTES", - 3: "FINGERPRINT", - 4: "FLOAT", - 5: "INT", - 6: "STRING", - 7: "TIME", - 8: "TUPLE", - 9: "ARRAY", - 10: "MAP", - 11: "TABLE", - 12: "FUNCTION", -} -var GoTest_KIND_value = map[string]int32{ - "VOID": 0, - "BOOL": 1, - "BYTES": 2, - "FINGERPRINT": 3, - "FLOAT": 4, - "INT": 5, - "STRING": 6, - "TIME": 7, - "TUPLE": 8, - "ARRAY": 9, - "MAP": 10, - "TABLE": 11, - "FUNCTION": 12, -} - -func (x GoTest_KIND) Enum() *GoTest_KIND { - p := new(GoTest_KIND) - *p = x - return p -} -func (x GoTest_KIND) String() string { - return proto.EnumName(GoTest_KIND_name, int32(x)) -} -func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") - if err != nil { - return err - } - *x = GoTest_KIND(value) - return nil -} -func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{2, 0} } - -type MyMessage_Color int32 - -const ( - MyMessage_RED MyMessage_Color = 0 - MyMessage_GREEN MyMessage_Color = 1 - MyMessage_BLUE MyMessage_Color = 2 -) - -var MyMessage_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var MyMessage_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x MyMessage_Color) Enum() *MyMessage_Color { - p := new(MyMessage_Color) - *p = x - return p -} -func (x MyMessage_Color) String() string { - return proto.EnumName(MyMessage_Color_name, int32(x)) -} -func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") - if err != nil { - return err - } - *x = MyMessage_Color(value) - return nil -} -func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{13, 0} } - -type DefaultsMessage_DefaultsEnum int32 - -const ( - DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 - DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 - DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 -) - -var DefaultsMessage_DefaultsEnum_name = map[int32]string{ - 0: "ZERO", - 1: "ONE", - 2: "TWO", -} -var DefaultsMessage_DefaultsEnum_value = map[string]int32{ - "ZERO": 0, - "ONE": 1, - "TWO": 2, -} - -func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { - p := new(DefaultsMessage_DefaultsEnum) - *p = x - return p -} -func (x DefaultsMessage_DefaultsEnum) String() string { - return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) -} -func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") - if err != nil { - return err - } - *x = DefaultsMessage_DefaultsEnum(value) - return nil -} -func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptorTest, []int{16, 0} -} - -type Defaults_Color int32 - -const ( - Defaults_RED Defaults_Color = 0 - Defaults_GREEN Defaults_Color = 1 - Defaults_BLUE Defaults_Color = 2 -) - -var Defaults_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Defaults_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Defaults_Color) Enum() *Defaults_Color { - p := new(Defaults_Color) - *p = x - return p -} -func (x Defaults_Color) String() string { - return proto.EnumName(Defaults_Color_name, int32(x)) -} -func (x *Defaults_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") - if err != nil { - return err - } - *x = Defaults_Color(value) - return nil -} -func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{21, 0} } - -type RepeatedEnum_Color int32 - -const ( - RepeatedEnum_RED RepeatedEnum_Color = 1 -) - -var RepeatedEnum_Color_name = map[int32]string{ - 1: "RED", -} -var RepeatedEnum_Color_value = map[string]int32{ - "RED": 1, -} - -func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { - p := new(RepeatedEnum_Color) - *p = x - return p -} -func (x RepeatedEnum_Color) String() string { - return proto.EnumName(RepeatedEnum_Color_name, int32(x)) -} -func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") - if err != nil { - return err - } - *x = RepeatedEnum_Color(value) - return nil -} -func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{23, 0} } - -type GoEnum struct { - Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoEnum) Reset() { *m = GoEnum{} } -func (m *GoEnum) String() string { return proto.CompactTextString(m) } -func (*GoEnum) ProtoMessage() {} -func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } - -func (m *GoEnum) GetFoo() FOO { - if m != nil && m.Foo != nil { - return *m.Foo - } - return FOO_FOO1 -} - -type GoTestField struct { - Label *string `protobuf:"bytes,1,req,name=Label,json=label" json:"Label,omitempty"` - Type *string `protobuf:"bytes,2,req,name=Type,json=type" json:"Type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestField) Reset() { *m = GoTestField{} } -func (m *GoTestField) String() string { return proto.CompactTextString(m) } -func (*GoTestField) ProtoMessage() {} -func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } - -func (m *GoTestField) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" -} - -func (m *GoTestField) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -type GoTest struct { - // Some typical parameters - Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,json=kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` - Table *string `protobuf:"bytes,2,opt,name=Table,json=table" json:"Table,omitempty"` - Param *int32 `protobuf:"varint,3,opt,name=Param,json=param" json:"Param,omitempty"` - // Required, repeated and optional foreign fields. - RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField,json=repeatedField" json:"RepeatedField,omitempty"` - OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField,json=optionalField" json:"OptionalField,omitempty"` - // Required fields of all basic types - F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=fBoolRequired" json:"F_Bool_required,omitempty"` - F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=fInt32Required" json:"F_Int32_required,omitempty"` - F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=fInt64Required" json:"F_Int64_required,omitempty"` - F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=fFixed32Required" json:"F_Fixed32_required,omitempty"` - F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=fFixed64Required" json:"F_Fixed64_required,omitempty"` - F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=fUint32Required" json:"F_Uint32_required,omitempty"` - F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=fUint64Required" json:"F_Uint64_required,omitempty"` - F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=fFloatRequired" json:"F_Float_required,omitempty"` - F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=fDoubleRequired" json:"F_Double_required,omitempty"` - F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=fStringRequired" json:"F_String_required,omitempty"` - F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=fBytesRequired" json:"F_Bytes_required,omitempty"` - F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=fSint32Required" json:"F_Sint32_required,omitempty"` - F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=fSint64Required" json:"F_Sint64_required,omitempty"` - // Repeated fields of all basic types - F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=fBoolRepeated" json:"F_Bool_repeated,omitempty"` - F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=fInt32Repeated" json:"F_Int32_repeated,omitempty"` - F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=fInt64Repeated" json:"F_Int64_repeated,omitempty"` - F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=fFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` - F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=fFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` - F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=fUint32Repeated" json:"F_Uint32_repeated,omitempty"` - F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=fUint64Repeated" json:"F_Uint64_repeated,omitempty"` - F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=fFloatRepeated" json:"F_Float_repeated,omitempty"` - F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=fDoubleRepeated" json:"F_Double_repeated,omitempty"` - F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=fStringRepeated" json:"F_String_repeated,omitempty"` - F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=fBytesRepeated" json:"F_Bytes_repeated,omitempty"` - F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=fSint32Repeated" json:"F_Sint32_repeated,omitempty"` - F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=fSint64Repeated" json:"F_Sint64_repeated,omitempty"` - // Optional fields of all basic types - F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=fBoolOptional" json:"F_Bool_optional,omitempty"` - F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=fInt32Optional" json:"F_Int32_optional,omitempty"` - F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=fInt64Optional" json:"F_Int64_optional,omitempty"` - F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=fFixed32Optional" json:"F_Fixed32_optional,omitempty"` - F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=fFixed64Optional" json:"F_Fixed64_optional,omitempty"` - F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=fUint32Optional" json:"F_Uint32_optional,omitempty"` - F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=fUint64Optional" json:"F_Uint64_optional,omitempty"` - F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=fFloatOptional" json:"F_Float_optional,omitempty"` - F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=fDoubleOptional" json:"F_Double_optional,omitempty"` - F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=fStringOptional" json:"F_String_optional,omitempty"` - F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=fBytesOptional" json:"F_Bytes_optional,omitempty"` - F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=fSint32Optional" json:"F_Sint32_optional,omitempty"` - F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=fSint64Optional" json:"F_Sint64_optional,omitempty"` - // Default-valued fields of all basic types - F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=fBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` - F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=fInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` - F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=fInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` - F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=fFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` - F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=fFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` - F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=fUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` - F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=fUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` - F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=fFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` - F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=fDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` - F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=fStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` - F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=fBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` - F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=fSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` - F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=fSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` - // Packed repeated fields (no string or bytes). - F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=fBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` - F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=fInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` - F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=fInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` - F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=fFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` - F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=fFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` - F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=fUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` - F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=fUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` - F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=fFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` - F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=fDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` - F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=fSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` - F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=fSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` - Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` - Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` - Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest) Reset() { *m = GoTest{} } -func (m *GoTest) String() string { return proto.CompactTextString(m) } -func (*GoTest) ProtoMessage() {} -func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2} } - -const Default_GoTest_F_BoolDefaulted bool = true -const Default_GoTest_F_Int32Defaulted int32 = 32 -const Default_GoTest_F_Int64Defaulted int64 = 64 -const Default_GoTest_F_Fixed32Defaulted uint32 = 320 -const Default_GoTest_F_Fixed64Defaulted uint64 = 640 -const Default_GoTest_F_Uint32Defaulted uint32 = 3200 -const Default_GoTest_F_Uint64Defaulted uint64 = 6400 -const Default_GoTest_F_FloatDefaulted float32 = 314159 -const Default_GoTest_F_DoubleDefaulted float64 = 271828 -const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" - -var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") - -const Default_GoTest_F_Sint32Defaulted int32 = -32 -const Default_GoTest_F_Sint64Defaulted int64 = -64 - -func (m *GoTest) GetKind() GoTest_KIND { - if m != nil && m.Kind != nil { - return *m.Kind - } - return GoTest_VOID -} - -func (m *GoTest) GetTable() string { - if m != nil && m.Table != nil { - return *m.Table - } - return "" -} - -func (m *GoTest) GetParam() int32 { - if m != nil && m.Param != nil { - return *m.Param - } - return 0 -} - -func (m *GoTest) GetRequiredField() *GoTestField { - if m != nil { - return m.RequiredField - } - return nil -} - -func (m *GoTest) GetRepeatedField() []*GoTestField { - if m != nil { - return m.RepeatedField - } - return nil -} - -func (m *GoTest) GetOptionalField() *GoTestField { - if m != nil { - return m.OptionalField - } - return nil -} - -func (m *GoTest) GetF_BoolRequired() bool { - if m != nil && m.F_BoolRequired != nil { - return *m.F_BoolRequired - } - return false -} - -func (m *GoTest) GetF_Int32Required() int32 { - if m != nil && m.F_Int32Required != nil { - return *m.F_Int32Required - } - return 0 -} - -func (m *GoTest) GetF_Int64Required() int64 { - if m != nil && m.F_Int64Required != nil { - return *m.F_Int64Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Required() uint32 { - if m != nil && m.F_Fixed32Required != nil { - return *m.F_Fixed32Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Required() uint64 { - if m != nil && m.F_Fixed64Required != nil { - return *m.F_Fixed64Required - } - return 0 -} - -func (m *GoTest) GetF_Uint32Required() uint32 { - if m != nil && m.F_Uint32Required != nil { - return *m.F_Uint32Required - } - return 0 -} - -func (m *GoTest) GetF_Uint64Required() uint64 { - if m != nil && m.F_Uint64Required != nil { - return *m.F_Uint64Required - } - return 0 -} - -func (m *GoTest) GetF_FloatRequired() float32 { - if m != nil && m.F_FloatRequired != nil { - return *m.F_FloatRequired - } - return 0 -} - -func (m *GoTest) GetF_DoubleRequired() float64 { - if m != nil && m.F_DoubleRequired != nil { - return *m.F_DoubleRequired - } - return 0 -} - -func (m *GoTest) GetF_StringRequired() string { - if m != nil && m.F_StringRequired != nil { - return *m.F_StringRequired - } - return "" -} - -func (m *GoTest) GetF_BytesRequired() []byte { - if m != nil { - return m.F_BytesRequired - } - return nil -} - -func (m *GoTest) GetF_Sint32Required() int32 { - if m != nil && m.F_Sint32Required != nil { - return *m.F_Sint32Required - } - return 0 -} - -func (m *GoTest) GetF_Sint64Required() int64 { - if m != nil && m.F_Sint64Required != nil { - return *m.F_Sint64Required - } - return 0 -} - -func (m *GoTest) GetF_BoolRepeated() []bool { - if m != nil { - return m.F_BoolRepeated - } - return nil -} - -func (m *GoTest) GetF_Int32Repeated() []int32 { - if m != nil { - return m.F_Int32Repeated - } - return nil -} - -func (m *GoTest) GetF_Int64Repeated() []int64 { - if m != nil { - return m.F_Int64Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed32Repeated() []uint32 { - if m != nil { - return m.F_Fixed32Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed64Repeated() []uint64 { - if m != nil { - return m.F_Fixed64Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint32Repeated() []uint32 { - if m != nil { - return m.F_Uint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint64Repeated() []uint64 { - if m != nil { - return m.F_Uint64Repeated - } - return nil -} - -func (m *GoTest) GetF_FloatRepeated() []float32 { - if m != nil { - return m.F_FloatRepeated - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeated() []float64 { - if m != nil { - return m.F_DoubleRepeated - } - return nil -} - -func (m *GoTest) GetF_StringRepeated() []string { - if m != nil { - return m.F_StringRepeated - } - return nil -} - -func (m *GoTest) GetF_BytesRepeated() [][]byte { - if m != nil { - return m.F_BytesRepeated - } - return nil -} - -func (m *GoTest) GetF_Sint32Repeated() []int32 { - if m != nil { - return m.F_Sint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Sint64Repeated() []int64 { - if m != nil { - return m.F_Sint64Repeated - } - return nil -} - -func (m *GoTest) GetF_BoolOptional() bool { - if m != nil && m.F_BoolOptional != nil { - return *m.F_BoolOptional - } - return false -} - -func (m *GoTest) GetF_Int32Optional() int32 { - if m != nil && m.F_Int32Optional != nil { - return *m.F_Int32Optional - } - return 0 -} - -func (m *GoTest) GetF_Int64Optional() int64 { - if m != nil && m.F_Int64Optional != nil { - return *m.F_Int64Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Optional() uint32 { - if m != nil && m.F_Fixed32Optional != nil { - return *m.F_Fixed32Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Optional() uint64 { - if m != nil && m.F_Fixed64Optional != nil { - return *m.F_Fixed64Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint32Optional() uint32 { - if m != nil && m.F_Uint32Optional != nil { - return *m.F_Uint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint64Optional() uint64 { - if m != nil && m.F_Uint64Optional != nil { - return *m.F_Uint64Optional - } - return 0 -} - -func (m *GoTest) GetF_FloatOptional() float32 { - if m != nil && m.F_FloatOptional != nil { - return *m.F_FloatOptional - } - return 0 -} - -func (m *GoTest) GetF_DoubleOptional() float64 { - if m != nil && m.F_DoubleOptional != nil { - return *m.F_DoubleOptional - } - return 0 -} - -func (m *GoTest) GetF_StringOptional() string { - if m != nil && m.F_StringOptional != nil { - return *m.F_StringOptional - } - return "" -} - -func (m *GoTest) GetF_BytesOptional() []byte { - if m != nil { - return m.F_BytesOptional - } - return nil -} - -func (m *GoTest) GetF_Sint32Optional() int32 { - if m != nil && m.F_Sint32Optional != nil { - return *m.F_Sint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Sint64Optional() int64 { - if m != nil && m.F_Sint64Optional != nil { - return *m.F_Sint64Optional - } - return 0 -} - -func (m *GoTest) GetF_BoolDefaulted() bool { - if m != nil && m.F_BoolDefaulted != nil { - return *m.F_BoolDefaulted - } - return Default_GoTest_F_BoolDefaulted -} - -func (m *GoTest) GetF_Int32Defaulted() int32 { - if m != nil && m.F_Int32Defaulted != nil { - return *m.F_Int32Defaulted - } - return Default_GoTest_F_Int32Defaulted -} - -func (m *GoTest) GetF_Int64Defaulted() int64 { - if m != nil && m.F_Int64Defaulted != nil { - return *m.F_Int64Defaulted - } - return Default_GoTest_F_Int64Defaulted -} - -func (m *GoTest) GetF_Fixed32Defaulted() uint32 { - if m != nil && m.F_Fixed32Defaulted != nil { - return *m.F_Fixed32Defaulted - } - return Default_GoTest_F_Fixed32Defaulted -} - -func (m *GoTest) GetF_Fixed64Defaulted() uint64 { - if m != nil && m.F_Fixed64Defaulted != nil { - return *m.F_Fixed64Defaulted - } - return Default_GoTest_F_Fixed64Defaulted -} - -func (m *GoTest) GetF_Uint32Defaulted() uint32 { - if m != nil && m.F_Uint32Defaulted != nil { - return *m.F_Uint32Defaulted - } - return Default_GoTest_F_Uint32Defaulted -} - -func (m *GoTest) GetF_Uint64Defaulted() uint64 { - if m != nil && m.F_Uint64Defaulted != nil { - return *m.F_Uint64Defaulted - } - return Default_GoTest_F_Uint64Defaulted -} - -func (m *GoTest) GetF_FloatDefaulted() float32 { - if m != nil && m.F_FloatDefaulted != nil { - return *m.F_FloatDefaulted - } - return Default_GoTest_F_FloatDefaulted -} - -func (m *GoTest) GetF_DoubleDefaulted() float64 { - if m != nil && m.F_DoubleDefaulted != nil { - return *m.F_DoubleDefaulted - } - return Default_GoTest_F_DoubleDefaulted -} - -func (m *GoTest) GetF_StringDefaulted() string { - if m != nil && m.F_StringDefaulted != nil { - return *m.F_StringDefaulted - } - return Default_GoTest_F_StringDefaulted -} - -func (m *GoTest) GetF_BytesDefaulted() []byte { - if m != nil && m.F_BytesDefaulted != nil { - return m.F_BytesDefaulted - } - return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) -} - -func (m *GoTest) GetF_Sint32Defaulted() int32 { - if m != nil && m.F_Sint32Defaulted != nil { - return *m.F_Sint32Defaulted - } - return Default_GoTest_F_Sint32Defaulted -} - -func (m *GoTest) GetF_Sint64Defaulted() int64 { - if m != nil && m.F_Sint64Defaulted != nil { - return *m.F_Sint64Defaulted - } - return Default_GoTest_F_Sint64Defaulted -} - -func (m *GoTest) GetF_BoolRepeatedPacked() []bool { - if m != nil { - return m.F_BoolRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { - if m != nil { - return m.F_Int32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { - if m != nil { - return m.F_Int64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Fixed32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Fixed64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Uint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Uint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { - if m != nil { - return m.F_FloatRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { - if m != nil { - return m.F_DoubleRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { - if m != nil { - return m.F_Sint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { - if m != nil { - return m.F_Sint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { - if m != nil { - return m.Requiredgroup - } - return nil -} - -func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { - if m != nil { - return m.Repeatedgroup - } - return nil -} - -func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil -} - -// Required, repeated, and optional groups. -type GoTest_RequiredGroup struct { - RequiredField *string `protobuf:"bytes,71,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } -func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RequiredGroup) ProtoMessage() {} -func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2, 0} } - -func (m *GoTest_RequiredGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_RepeatedGroup struct { - RequiredField *string `protobuf:"bytes,81,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } -func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RepeatedGroup) ProtoMessage() {} -func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2, 1} } - -func (m *GoTest_RepeatedGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,91,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } -func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_OptionalGroup) ProtoMessage() {} -func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2, 2} } - -func (m *GoTest_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -// For testing a group containing a required field. -type GoTestRequiredGroupField struct { - Group *GoTestRequiredGroupField_Group `protobuf:"group,1,req,name=Group,json=group" json:"group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestRequiredGroupField) Reset() { *m = GoTestRequiredGroupField{} } -func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) } -func (*GoTestRequiredGroupField) ProtoMessage() {} -func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{3} } - -func (m *GoTestRequiredGroupField) GetGroup() *GoTestRequiredGroupField_Group { - if m != nil { - return m.Group - } - return nil -} - -type GoTestRequiredGroupField_Group struct { - Field *int32 `protobuf:"varint,2,req,name=Field,json=field" json:"Field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestRequiredGroupField_Group) Reset() { *m = GoTestRequiredGroupField_Group{} } -func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) } -func (*GoTestRequiredGroupField_Group) ProtoMessage() {} -func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) { - return fileDescriptorTest, []int{3, 0} -} - -func (m *GoTestRequiredGroupField_Group) GetField() int32 { - if m != nil && m.Field != nil { - return *m.Field - } - return 0 -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -type GoSkipTest struct { - SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` - SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` - SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` - SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` - Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } -func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest) ProtoMessage() {} -func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{4} } - -func (m *GoSkipTest) GetSkipInt32() int32 { - if m != nil && m.SkipInt32 != nil { - return *m.SkipInt32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed32() uint32 { - if m != nil && m.SkipFixed32 != nil { - return *m.SkipFixed32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed64() uint64 { - if m != nil && m.SkipFixed64 != nil { - return *m.SkipFixed64 - } - return 0 -} - -func (m *GoSkipTest) GetSkipString() string { - if m != nil && m.SkipString != nil { - return *m.SkipString - } - return "" -} - -func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { - if m != nil { - return m.Skipgroup - } - return nil -} - -type GoSkipTest_SkipGroup struct { - GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` - GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } -func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest_SkipGroup) ProtoMessage() {} -func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{4, 0} } - -func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { - if m != nil && m.GroupInt32 != nil { - return *m.GroupInt32 - } - return 0 -} - -func (m *GoSkipTest_SkipGroup) GetGroupString() string { - if m != nil && m.GroupString != nil { - return *m.GroupString - } - return "" -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -type NonPackedTest struct { - A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } -func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } -func (*NonPackedTest) ProtoMessage() {} -func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{5} } - -func (m *NonPackedTest) GetA() []int32 { - if m != nil { - return m.A - } - return nil -} - -type PackedTest struct { - B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PackedTest) Reset() { *m = PackedTest{} } -func (m *PackedTest) String() string { return proto.CompactTextString(m) } -func (*PackedTest) ProtoMessage() {} -func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{6} } - -func (m *PackedTest) GetB() []int32 { - if m != nil { - return m.B - } - return nil -} - -type MaxTag struct { - // Maximum possible tag number. - LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MaxTag) Reset() { *m = MaxTag{} } -func (m *MaxTag) String() string { return proto.CompactTextString(m) } -func (*MaxTag) ProtoMessage() {} -func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{7} } - -func (m *MaxTag) GetLastField() string { - if m != nil && m.LastField != nil { - return *m.LastField - } - return "" -} - -type OldMessage struct { - Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage) Reset() { *m = OldMessage{} } -func (m *OldMessage) String() string { return proto.CompactTextString(m) } -func (*OldMessage) ProtoMessage() {} -func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{8} } - -func (m *OldMessage) GetNested() *OldMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *OldMessage) GetNum() int32 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type OldMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } -func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*OldMessage_Nested) ProtoMessage() {} -func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{8, 0} } - -func (m *OldMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -type NewMessage struct { - Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - // This is an int32 in OldMessage. - Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage) Reset() { *m = NewMessage{} } -func (m *NewMessage) String() string { return proto.CompactTextString(m) } -func (*NewMessage) ProtoMessage() {} -func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{9} } - -func (m *NewMessage) GetNested() *NewMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *NewMessage) GetNum() int64 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type NewMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } -func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*NewMessage_Nested) ProtoMessage() {} -func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{9, 0} } - -func (m *NewMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *NewMessage_Nested) GetFoodGroup() string { - if m != nil && m.FoodGroup != nil { - return *m.FoodGroup - } - return "" -} - -type InnerMessage struct { - Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` - Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` - Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *InnerMessage) Reset() { *m = InnerMessage{} } -func (m *InnerMessage) String() string { return proto.CompactTextString(m) } -func (*InnerMessage) ProtoMessage() {} -func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{10} } - -const Default_InnerMessage_Port int32 = 4000 - -func (m *InnerMessage) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *InnerMessage) GetPort() int32 { - if m != nil && m.Port != nil { - return *m.Port - } - return Default_InnerMessage_Port -} - -func (m *InnerMessage) GetConnected() bool { - if m != nil && m.Connected != nil { - return *m.Connected - } - return false -} - -type OtherMessage struct { - Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` - Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherMessage) Reset() { *m = OtherMessage{} } -func (m *OtherMessage) String() string { return proto.CompactTextString(m) } -func (*OtherMessage) ProtoMessage() {} -func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{11} } - -var extRange_OtherMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherMessage -} - -func (m *OtherMessage) GetKey() int64 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -func (m *OtherMessage) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *OtherMessage) GetWeight() float32 { - if m != nil && m.Weight != nil { - return *m.Weight - } - return 0 -} - -func (m *OtherMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -type RequiredInnerMessage struct { - LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} } -func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } -func (*RequiredInnerMessage) ProtoMessage() {} -func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{12} } - -func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage { - if m != nil { - return m.LeoFinallyWonAnOscar - } - return nil -} - -type MyMessage struct { - Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` - Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` - Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` - Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` - WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"` - RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` - Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` - Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` - // This field becomes [][]byte in the generated code. - RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` - Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - 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 fileDescriptorTest, []int{13} } - -var extRange_MyMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessage -} - -func (m *MyMessage) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *MyMessage) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MyMessage) GetQuote() string { - if m != nil && m.Quote != nil { - return *m.Quote - } - return "" -} - -func (m *MyMessage) GetPet() []string { - if m != nil { - return m.Pet - } - return nil -} - -func (m *MyMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -func (m *MyMessage) GetOthers() []*OtherMessage { - if m != nil { - return m.Others - } - return nil -} - -func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage { - if m != nil { - return m.WeMustGoDeeper - } - return nil -} - -func (m *MyMessage) GetRepInner() []*InnerMessage { - if m != nil { - return m.RepInner - } - return nil -} - -func (m *MyMessage) GetBikeshed() MyMessage_Color { - if m != nil && m.Bikeshed != nil { - return *m.Bikeshed - } - return MyMessage_RED -} - -func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *MyMessage) GetRepBytes() [][]byte { - if m != nil { - return m.RepBytes - } - return nil -} - -func (m *MyMessage) GetBigfloat() float64 { - if m != nil && m.Bigfloat != nil { - return *m.Bigfloat - } - return 0 -} - -type MyMessage_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } -func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*MyMessage_SomeGroup) ProtoMessage() {} -func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{13, 0} } - -func (m *MyMessage_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Ext struct { - Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Ext) Reset() { *m = Ext{} } -func (m *Ext) String() string { return proto.CompactTextString(m) } -func (*Ext) ProtoMessage() {} -func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{14} } - -func (m *Ext) GetData() string { - if m != nil && m.Data != nil { - return *m.Data - } - return "" -} - -var E_Ext_More = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*Ext)(nil), - Field: 103, - Name: "testdata.Ext.more", - Tag: "bytes,103,opt,name=more", -} - -var E_Ext_Text = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*string)(nil), - Field: 104, - Name: "testdata.Ext.text", - Tag: "bytes,104,opt,name=text", -} - -var E_Ext_Number = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 105, - Name: "testdata.Ext.number", - Tag: "varint,105,opt,name=number", -} - -type ComplexExtension struct { - First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` - Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` - Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } -func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } -func (*ComplexExtension) ProtoMessage() {} -func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{15} } - -func (m *ComplexExtension) GetFirst() int32 { - if m != nil && m.First != nil { - return *m.First - } - return 0 -} - -func (m *ComplexExtension) GetSecond() int32 { - if m != nil && m.Second != nil { - return *m.Second - } - return 0 -} - -func (m *ComplexExtension) GetThird() []int32 { - if m != nil { - return m.Third - } - return nil -} - -type DefaultsMessage struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } -func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } -func (*DefaultsMessage) ProtoMessage() {} -func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{16} } - -var extRange_DefaultsMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_DefaultsMessage -} - -type MyMessageSet struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } -func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } -func (*MyMessageSet) ProtoMessage() {} -func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{17} } - -func (m *MyMessageSet) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(&m.XXX_InternalExtensions) -} -func (m *MyMessageSet) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions) -} -func (m *MyMessageSet) MarshalJSON() ([]byte, error) { - return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) -} -func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { - return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) -} - -// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*MyMessageSet)(nil) -var _ proto.Unmarshaler = (*MyMessageSet)(nil) - -var extRange_MyMessageSet = []proto.ExtensionRange{ - {100, 2147483646}, -} - -func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessageSet -} - -type Empty struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{18} } - -type MessageList struct { - Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList) Reset() { *m = MessageList{} } -func (m *MessageList) String() string { return proto.CompactTextString(m) } -func (*MessageList) ProtoMessage() {} -func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{19} } - -func (m *MessageList) GetMessage() []*MessageList_Message { - if m != nil { - return m.Message - } - return nil -} - -type MessageList_Message struct { - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } -func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } -func (*MessageList_Message) ProtoMessage() {} -func (*MessageList_Message) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{19, 0} } - -func (m *MessageList_Message) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MessageList_Message) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -type Strings struct { - StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` - BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Strings) Reset() { *m = Strings{} } -func (m *Strings) String() string { return proto.CompactTextString(m) } -func (*Strings) ProtoMessage() {} -func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{20} } - -func (m *Strings) GetStringField() string { - if m != nil && m.StringField != nil { - return *m.StringField - } - return "" -} - -func (m *Strings) GetBytesField() []byte { - if m != nil { - return m.BytesField - } - return nil -} - -type Defaults struct { - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,def=1" json:"F_Bool,omitempty"` - F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,def=32" json:"F_Int32,omitempty"` - F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,def=64" json:"F_Int64,omitempty"` - F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,def=320" json:"F_Fixed32,omitempty"` - F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,def=640" json:"F_Fixed64,omitempty"` - F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,def=3200" json:"F_Uint32,omitempty"` - F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,def=6400" json:"F_Uint64,omitempty"` - F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,def=314159" json:"F_Float,omitempty"` - F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,def=271828" json:"F_Double,omitempty"` - F_String *string `protobuf:"bytes,10,opt,name=F_String,json=fString,def=hello, \"world!\"\n" json:"F_String,omitempty"` - F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,def=Bignose" json:"F_Bytes,omitempty"` - F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,def=-32" json:"F_Sint32,omitempty"` - F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,def=-64" json:"F_Sint64,omitempty"` - F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` - // More fields with crazy defaults. - F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=fPinf,def=inf" json:"F_Pinf,omitempty"` - F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=fNinf,def=-inf" json:"F_Ninf,omitempty"` - F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=fNan,def=nan" json:"F_Nan,omitempty"` - // Sub-message. - Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` - // Redundant but explicit defaults. - StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Defaults) Reset() { *m = Defaults{} } -func (m *Defaults) String() string { return proto.CompactTextString(m) } -func (*Defaults) ProtoMessage() {} -func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{21} } - -const Default_Defaults_F_Bool bool = true -const Default_Defaults_F_Int32 int32 = 32 -const Default_Defaults_F_Int64 int64 = 64 -const Default_Defaults_F_Fixed32 uint32 = 320 -const Default_Defaults_F_Fixed64 uint64 = 640 -const Default_Defaults_F_Uint32 uint32 = 3200 -const Default_Defaults_F_Uint64 uint64 = 6400 -const Default_Defaults_F_Float float32 = 314159 -const Default_Defaults_F_Double float64 = 271828 -const Default_Defaults_F_String string = "hello, \"world!\"\n" - -var Default_Defaults_F_Bytes []byte = []byte("Bignose") - -const Default_Defaults_F_Sint32 int32 = -32 -const Default_Defaults_F_Sint64 int64 = -64 -const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN - -var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) -var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) -var Default_Defaults_F_Nan float32 = float32(math.NaN()) - -func (m *Defaults) GetF_Bool() bool { - if m != nil && m.F_Bool != nil { - return *m.F_Bool - } - return Default_Defaults_F_Bool -} - -func (m *Defaults) GetF_Int32() int32 { - if m != nil && m.F_Int32 != nil { - return *m.F_Int32 - } - return Default_Defaults_F_Int32 -} - -func (m *Defaults) GetF_Int64() int64 { - if m != nil && m.F_Int64 != nil { - return *m.F_Int64 - } - return Default_Defaults_F_Int64 -} - -func (m *Defaults) GetF_Fixed32() uint32 { - if m != nil && m.F_Fixed32 != nil { - return *m.F_Fixed32 - } - return Default_Defaults_F_Fixed32 -} - -func (m *Defaults) GetF_Fixed64() uint64 { - if m != nil && m.F_Fixed64 != nil { - return *m.F_Fixed64 - } - return Default_Defaults_F_Fixed64 -} - -func (m *Defaults) GetF_Uint32() uint32 { - if m != nil && m.F_Uint32 != nil { - return *m.F_Uint32 - } - return Default_Defaults_F_Uint32 -} - -func (m *Defaults) GetF_Uint64() uint64 { - if m != nil && m.F_Uint64 != nil { - return *m.F_Uint64 - } - return Default_Defaults_F_Uint64 -} - -func (m *Defaults) GetF_Float() float32 { - if m != nil && m.F_Float != nil { - return *m.F_Float - } - return Default_Defaults_F_Float -} - -func (m *Defaults) GetF_Double() float64 { - if m != nil && m.F_Double != nil { - return *m.F_Double - } - return Default_Defaults_F_Double -} - -func (m *Defaults) GetF_String() string { - if m != nil && m.F_String != nil { - return *m.F_String - } - return Default_Defaults_F_String -} - -func (m *Defaults) GetF_Bytes() []byte { - if m != nil && m.F_Bytes != nil { - return m.F_Bytes - } - return append([]byte(nil), Default_Defaults_F_Bytes...) -} - -func (m *Defaults) GetF_Sint32() int32 { - if m != nil && m.F_Sint32 != nil { - return *m.F_Sint32 - } - return Default_Defaults_F_Sint32 -} - -func (m *Defaults) GetF_Sint64() int64 { - if m != nil && m.F_Sint64 != nil { - return *m.F_Sint64 - } - return Default_Defaults_F_Sint64 -} - -func (m *Defaults) GetF_Enum() Defaults_Color { - if m != nil && m.F_Enum != nil { - return *m.F_Enum - } - return Default_Defaults_F_Enum -} - -func (m *Defaults) GetF_Pinf() float32 { - if m != nil && m.F_Pinf != nil { - return *m.F_Pinf - } - return Default_Defaults_F_Pinf -} - -func (m *Defaults) GetF_Ninf() float32 { - if m != nil && m.F_Ninf != nil { - return *m.F_Ninf - } - return Default_Defaults_F_Ninf -} - -func (m *Defaults) GetF_Nan() float32 { - if m != nil && m.F_Nan != nil { - return *m.F_Nan - } - return Default_Defaults_F_Nan -} - -func (m *Defaults) GetSub() *SubDefaults { - if m != nil { - return m.Sub - } - return nil -} - -func (m *Defaults) GetStrZero() string { - if m != nil && m.StrZero != nil { - return *m.StrZero - } - return "" -} - -type SubDefaults struct { - N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubDefaults) Reset() { *m = SubDefaults{} } -func (m *SubDefaults) String() string { return proto.CompactTextString(m) } -func (*SubDefaults) ProtoMessage() {} -func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{22} } - -const Default_SubDefaults_N int64 = 7 - -func (m *SubDefaults) GetN() int64 { - if m != nil && m.N != nil { - return *m.N - } - return Default_SubDefaults_N -} - -type RepeatedEnum struct { - Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } -func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } -func (*RepeatedEnum) ProtoMessage() {} -func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{23} } - -func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { - if m != nil { - return m.Color - } - return nil -} - -type MoreRepeated struct { - Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` - BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` - Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` - IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` - Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` - Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` - Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } -func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } -func (*MoreRepeated) ProtoMessage() {} -func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{24} } - -func (m *MoreRepeated) GetBools() []bool { - if m != nil { - return m.Bools - } - return nil -} - -func (m *MoreRepeated) GetBoolsPacked() []bool { - if m != nil { - return m.BoolsPacked - } - return nil -} - -func (m *MoreRepeated) GetInts() []int32 { - if m != nil { - return m.Ints - } - return nil -} - -func (m *MoreRepeated) GetIntsPacked() []int32 { - if m != nil { - return m.IntsPacked - } - return nil -} - -func (m *MoreRepeated) GetInt64SPacked() []int64 { - if m != nil { - return m.Int64SPacked - } - return nil -} - -func (m *MoreRepeated) GetStrings() []string { - if m != nil { - return m.Strings - } - return nil -} - -func (m *MoreRepeated) GetFixeds() []uint32 { - if m != nil { - return m.Fixeds - } - return nil -} - -type GroupOld struct { - G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld) Reset() { *m = GroupOld{} } -func (m *GroupOld) String() string { return proto.CompactTextString(m) } -func (*GroupOld) ProtoMessage() {} -func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{25} } - -func (m *GroupOld) GetG() *GroupOld_G { - if m != nil { - return m.G - } - return nil -} - -type GroupOld_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } -func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } -func (*GroupOld_G) ProtoMessage() {} -func (*GroupOld_G) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{25, 0} } - -func (m *GroupOld_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -type GroupNew struct { - G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew) Reset() { *m = GroupNew{} } -func (m *GroupNew) String() string { return proto.CompactTextString(m) } -func (*GroupNew) ProtoMessage() {} -func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{26} } - -func (m *GroupNew) GetG() *GroupNew_G { - if m != nil { - return m.G - } - return nil -} - -type GroupNew_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } -func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } -func (*GroupNew_G) ProtoMessage() {} -func (*GroupNew_G) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{26, 0} } - -func (m *GroupNew_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *GroupNew_G) GetY() int32 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` - Exact *bool `protobuf:"varint,2,opt,name=exact" json:"exact,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } -func (*FloatingPoint) ProtoMessage() {} -func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{27} } - -func (m *FloatingPoint) GetF() float64 { - if m != nil && m.F != nil { - return *m.F - } - return 0 -} - -func (m *FloatingPoint) GetExact() bool { - if m != nil && m.Exact != nil { - return *m.Exact - } - return false -} - -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" protobuf_val:"bytes,2,opt,name=value"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } -func (*MessageWithMap) ProtoMessage() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{28} } - -func (m *MessageWithMap) GetNameMapping() map[int32]string { - if m != nil { - return m.NameMapping - } - return nil -} - -func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - if m != nil { - return m.MsgMapping - } - return nil -} - -func (m *MessageWithMap) GetByteMapping() map[bool][]byte { - if m != nil { - return m.ByteMapping - } - return nil -} - -func (m *MessageWithMap) GetStrToStr() map[string]string { - if m != nil { - return m.StrToStr - } - return nil -} - -type Oneof struct { - // Types that are valid to be assigned to Union: - // *Oneof_F_Bool - // *Oneof_F_Int32 - // *Oneof_F_Int64 - // *Oneof_F_Fixed32 - // *Oneof_F_Fixed64 - // *Oneof_F_Uint32 - // *Oneof_F_Uint64 - // *Oneof_F_Float - // *Oneof_F_Double - // *Oneof_F_String - // *Oneof_F_Bytes - // *Oneof_F_Sint32 - // *Oneof_F_Sint64 - // *Oneof_F_Enum - // *Oneof_F_Message - // *Oneof_FGroup - // *Oneof_F_Largest_Tag - Union isOneof_Union `protobuf_oneof:"union"` - // Types that are valid to be assigned to Tormato: - // *Oneof_Value - Tormato isOneof_Tormato `protobuf_oneof:"tormato"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Oneof) Reset() { *m = Oneof{} } -func (m *Oneof) String() string { return proto.CompactTextString(m) } -func (*Oneof) ProtoMessage() {} -func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{29} } - -type isOneof_Union interface { - isOneof_Union() -} -type isOneof_Tormato interface { - isOneof_Tormato() -} - -type Oneof_F_Bool struct { - F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,oneof"` -} -type Oneof_F_Int32 struct { - F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,oneof"` -} -type Oneof_F_Int64 struct { - F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,oneof"` -} -type Oneof_F_Fixed32 struct { - F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,oneof"` -} -type Oneof_F_Fixed64 struct { - F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,oneof"` -} -type Oneof_F_Uint32 struct { - F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,oneof"` -} -type Oneof_F_Uint64 struct { - F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,oneof"` -} -type Oneof_F_Float struct { - F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,oneof"` -} -type Oneof_F_Double struct { - F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,oneof"` -} -type Oneof_F_String struct { - F_String string `protobuf:"bytes,10,opt,name=F_String,json=fString,oneof"` -} -type Oneof_F_Bytes struct { - F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,oneof"` -} -type Oneof_F_Sint32 struct { - F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,oneof"` -} -type Oneof_F_Sint64 struct { - F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,oneof"` -} -type Oneof_F_Enum struct { - F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.MyMessage_Color,oneof"` -} -type Oneof_F_Message struct { - F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=fMessage,oneof"` -} -type Oneof_FGroup struct { - FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` -} -type Oneof_F_Largest_Tag struct { - F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=fLargestTag,oneof"` -} -type Oneof_Value struct { - Value int32 `protobuf:"varint,100,opt,name=value,oneof"` -} - -func (*Oneof_F_Bool) isOneof_Union() {} -func (*Oneof_F_Int32) isOneof_Union() {} -func (*Oneof_F_Int64) isOneof_Union() {} -func (*Oneof_F_Fixed32) isOneof_Union() {} -func (*Oneof_F_Fixed64) isOneof_Union() {} -func (*Oneof_F_Uint32) isOneof_Union() {} -func (*Oneof_F_Uint64) isOneof_Union() {} -func (*Oneof_F_Float) isOneof_Union() {} -func (*Oneof_F_Double) isOneof_Union() {} -func (*Oneof_F_String) isOneof_Union() {} -func (*Oneof_F_Bytes) isOneof_Union() {} -func (*Oneof_F_Sint32) isOneof_Union() {} -func (*Oneof_F_Sint64) isOneof_Union() {} -func (*Oneof_F_Enum) isOneof_Union() {} -func (*Oneof_F_Message) isOneof_Union() {} -func (*Oneof_FGroup) isOneof_Union() {} -func (*Oneof_F_Largest_Tag) isOneof_Union() {} -func (*Oneof_Value) isOneof_Tormato() {} - -func (m *Oneof) GetUnion() isOneof_Union { - if m != nil { - return m.Union - } - return nil -} -func (m *Oneof) GetTormato() isOneof_Tormato { - if m != nil { - return m.Tormato - } - return nil -} - -func (m *Oneof) GetF_Bool() bool { - if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { - return x.F_Bool - } - return false -} - -func (m *Oneof) GetF_Int32() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { - return x.F_Int32 - } - return 0 -} - -func (m *Oneof) GetF_Int64() int64 { - if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { - return x.F_Int64 - } - return 0 -} - -func (m *Oneof) GetF_Fixed32() uint32 { - if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { - return x.F_Fixed32 - } - return 0 -} - -func (m *Oneof) GetF_Fixed64() uint64 { - if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { - return x.F_Fixed64 - } - return 0 -} - -func (m *Oneof) GetF_Uint32() uint32 { - if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { - return x.F_Uint32 - } - return 0 -} - -func (m *Oneof) GetF_Uint64() uint64 { - if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { - return x.F_Uint64 - } - return 0 -} - -func (m *Oneof) GetF_Float() float32 { - if x, ok := m.GetUnion().(*Oneof_F_Float); ok { - return x.F_Float - } - return 0 -} - -func (m *Oneof) GetF_Double() float64 { - if x, ok := m.GetUnion().(*Oneof_F_Double); ok { - return x.F_Double - } - return 0 -} - -func (m *Oneof) GetF_String() string { - if x, ok := m.GetUnion().(*Oneof_F_String); ok { - return x.F_String - } - return "" -} - -func (m *Oneof) GetF_Bytes() []byte { - if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { - return x.F_Bytes - } - return nil -} - -func (m *Oneof) GetF_Sint32() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { - return x.F_Sint32 - } - return 0 -} - -func (m *Oneof) GetF_Sint64() int64 { - if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { - return x.F_Sint64 - } - return 0 -} - -func (m *Oneof) GetF_Enum() MyMessage_Color { - if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { - return x.F_Enum - } - return MyMessage_RED -} - -func (m *Oneof) GetF_Message() *GoTestField { - if x, ok := m.GetUnion().(*Oneof_F_Message); ok { - return x.F_Message - } - return nil -} - -func (m *Oneof) GetFGroup() *Oneof_F_Group { - if x, ok := m.GetUnion().(*Oneof_FGroup); ok { - return x.FGroup - } - return nil -} - -func (m *Oneof) GetF_Largest_Tag() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { - return x.F_Largest_Tag - } - return 0 -} - -func (m *Oneof) GetValue() int32 { - if x, ok := m.GetTormato().(*Oneof_Value); ok { - return x.Value - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Oneof) 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 _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ - (*Oneof_F_Bool)(nil), - (*Oneof_F_Int32)(nil), - (*Oneof_F_Int64)(nil), - (*Oneof_F_Fixed32)(nil), - (*Oneof_F_Fixed64)(nil), - (*Oneof_F_Uint32)(nil), - (*Oneof_F_Uint64)(nil), - (*Oneof_F_Float)(nil), - (*Oneof_F_Double)(nil), - (*Oneof_F_String)(nil), - (*Oneof_F_Bytes)(nil), - (*Oneof_F_Sint32)(nil), - (*Oneof_F_Sint64)(nil), - (*Oneof_F_Enum)(nil), - (*Oneof_F_Message)(nil), - (*Oneof_FGroup)(nil), - (*Oneof_F_Largest_Tag)(nil), - (*Oneof_Value)(nil), - } -} - -func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Oneof) - // union - switch x := m.Union.(type) { - case *Oneof_F_Bool: - t := uint64(0) - if x.F_Bool { - t = 1 - } - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *Oneof_F_Int32: - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.F_Int32)) - case *Oneof_F_Int64: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.F_Int64)) - case *Oneof_F_Fixed32: - _ = b.EncodeVarint(4<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(x.F_Fixed32)) - case *Oneof_F_Fixed64: - _ = b.EncodeVarint(5<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(uint64(x.F_Fixed64)) - case *Oneof_F_Uint32: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.F_Uint32)) - case *Oneof_F_Uint64: - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.F_Uint64)) - case *Oneof_F_Float: - _ = b.EncodeVarint(8<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) - case *Oneof_F_Double: - _ = b.EncodeVarint(9<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.F_Double)) - case *Oneof_F_String: - _ = b.EncodeVarint(10<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.F_String) - case *Oneof_F_Bytes: - _ = b.EncodeVarint(11<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.F_Bytes) - case *Oneof_F_Sint32: - _ = b.EncodeVarint(12<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.F_Sint32)) - case *Oneof_F_Sint64: - _ = b.EncodeVarint(13<<3 | proto.WireVarint) - _ = b.EncodeZigzag64(uint64(x.F_Sint64)) - case *Oneof_F_Enum: - _ = b.EncodeVarint(14<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.F_Enum)) - case *Oneof_F_Message: - _ = b.EncodeVarint(15<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.F_Message); err != nil { - return err - } - case *Oneof_FGroup: - _ = b.EncodeVarint(16<<3 | proto.WireStartGroup) - if err := b.Marshal(x.FGroup); err != nil { - return err - } - _ = b.EncodeVarint(16<<3 | proto.WireEndGroup) - case *Oneof_F_Largest_Tag: - _ = b.EncodeVarint(536870911<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.F_Largest_Tag)) - case nil: - default: - return fmt.Errorf("Oneof.Union has unexpected type %T", x) - } - // tormato - switch x := m.Tormato.(type) { - case *Oneof_Value: - _ = b.EncodeVarint(100<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Value)) - case nil: - default: - return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) - } - return nil -} - -func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Oneof) - switch tag { - case 1: // union.F_Bool - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Bool{x != 0} - return true, err - case 2: // union.F_Int32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Int32{int32(x)} - return true, err - case 3: // union.F_Int64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Int64{int64(x)} - return true, err - case 4: // union.F_Fixed32 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Oneof_F_Fixed32{uint32(x)} - return true, err - case 5: // union.F_Fixed64 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Oneof_F_Fixed64{x} - return true, err - case 6: // union.F_Uint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Uint32{uint32(x)} - return true, err - case 7: // union.F_Uint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Uint64{x} - return true, err - case 8: // union.F_Float - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} - return true, err - case 9: // union.F_Double - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Oneof_F_Double{math.Float64frombits(x)} - return true, err - case 10: // union.F_String - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Oneof_F_String{x} - return true, err - case 11: // union.F_Bytes - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Oneof_F_Bytes{x} - return true, err - case 12: // union.F_Sint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.Union = &Oneof_F_Sint32{int32(x)} - return true, err - case 13: // union.F_Sint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.Union = &Oneof_F_Sint64{int64(x)} - return true, err - case 14: // union.F_Enum - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Enum{MyMessage_Color(x)} - return true, err - case 15: // union.F_Message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GoTestField) - err := b.DecodeMessage(msg) - m.Union = &Oneof_F_Message{msg} - return true, err - case 16: // union.f_group - if wire != proto.WireStartGroup { - return true, proto.ErrInternalBadWireType - } - msg := new(Oneof_F_Group) - err := b.DecodeGroup(msg) - m.Union = &Oneof_FGroup{msg} - return true, err - case 536870911: // union.F_Largest_Tag - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Largest_Tag{int32(x)} - return true, err - case 100: // tormato.value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Tormato = &Oneof_Value{int32(x)} - return true, err - default: - return false, nil - } -} - -func _Oneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Oneof) - // union - switch x := m.Union.(type) { - case *Oneof_F_Bool: - n += proto.SizeVarint(1<<3 | proto.WireVarint) - n += 1 - case *Oneof_F_Int32: - n += proto.SizeVarint(2<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Int32)) - case *Oneof_F_Int64: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Int64)) - case *Oneof_F_Fixed32: - n += proto.SizeVarint(4<<3 | proto.WireFixed32) - n += 4 - case *Oneof_F_Fixed64: - n += proto.SizeVarint(5<<3 | proto.WireFixed64) - n += 8 - case *Oneof_F_Uint32: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Uint32)) - case *Oneof_F_Uint64: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Uint64)) - case *Oneof_F_Float: - n += proto.SizeVarint(8<<3 | proto.WireFixed32) - n += 4 - case *Oneof_F_Double: - n += proto.SizeVarint(9<<3 | proto.WireFixed64) - n += 8 - case *Oneof_F_String: - n += proto.SizeVarint(10<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.F_String))) - n += len(x.F_String) - case *Oneof_F_Bytes: - n += proto.SizeVarint(11<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.F_Bytes))) - n += len(x.F_Bytes) - case *Oneof_F_Sint32: - n += proto.SizeVarint(12<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) - case *Oneof_F_Sint64: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) - case *Oneof_F_Enum: - n += proto.SizeVarint(14<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Enum)) - case *Oneof_F_Message: - s := proto.Size(x.F_Message) - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Oneof_FGroup: - n += proto.SizeVarint(16<<3 | proto.WireStartGroup) - n += proto.Size(x.FGroup) - n += proto.SizeVarint(16<<3 | proto.WireEndGroup) - case *Oneof_F_Largest_Tag: - n += proto.SizeVarint(536870911<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Largest_Tag)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // tormato - switch x := m.Tormato.(type) { - case *Oneof_Value: - n += proto.SizeVarint(100<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Value)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Oneof_F_Group struct { - X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } -func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } -func (*Oneof_F_Group) ProtoMessage() {} -func (*Oneof_F_Group) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{29, 0} } - -func (m *Oneof_F_Group) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -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_Col - // *Communique_Msg - Union isCommunique_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique) Reset() { *m = Communique{} } -func (m *Communique) String() string { return proto.CompactTextString(m) } -func (*Communique) ProtoMessage() {} -func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{30} } - -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_Col struct { - Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"` -} -type Communique_Msg struct { - Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` -} - -func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Col) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} - -func (m *Communique) GetUnion() isCommunique_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *Communique) GetMakeMeCry() bool { - if m != nil && m.MakeMeCry != nil { - return *m.MakeMeCry - } - return false -} - -func (m *Communique) GetNumber() int32 { - if x, ok := m.GetUnion().(*Communique_Number); ok { - return x.Number - } - return 0 -} - -func (m *Communique) GetName() string { - if x, ok := m.GetUnion().(*Communique_Name); ok { - return x.Name - } - return "" -} - -func (m *Communique) GetData() []byte { - if x, ok := m.GetUnion().(*Communique_Data); ok { - return x.Data - } - return nil -} - -func (m *Communique) GetTempC() float64 { - if x, ok := m.GetUnion().(*Communique_TempC); ok { - return x.TempC - } - return 0 -} - -func (m *Communique) GetCol() MyMessage_Color { - if x, ok := m.GetUnion().(*Communique_Col); ok { - return x.Col - } - return MyMessage_RED -} - -func (m *Communique) GetMsg() *Strings { - if x, ok := m.GetUnion().(*Communique_Msg); ok { - return x.Msg - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), 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_Col)(nil), - (*Communique_Msg)(nil), - } -} - -func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Number)) - case *Communique_Name: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Name) - case *Communique_Data: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Data) - case *Communique_TempC: - _ = b.EncodeVarint(8<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.TempC)) - case *Communique_Col: - _ = b.EncodeVarint(9<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Col)) - case *Communique_Msg: - _ = b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Communique.Union has unexpected type %T", x) - } - return nil -} - -func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Communique) - switch tag { - case 5: // union.number - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Number{int32(x)} - return true, err - case 6: // union.name - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Communique_Name{x} - return true, err - case 7: // union.data - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Communique_Data{x} - return true, err - case 8: // union.temp_c - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Communique_TempC{math.Float64frombits(x)} - return true, err - case 9: // union.col - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Col{MyMessage_Color(x)} - return true, err - case 10: // union.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Strings) - err := b.DecodeMessage(msg) - m.Union = &Communique_Msg{msg} - return true, err - default: - return false, nil - } -} - -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_Col: - n += proto.SizeVarint(9<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Col)) - case *Communique_Msg: - s := proto.Size(x.Msg) - n += proto.SizeVarint(10<<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 -} - -var E_Greeting = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: ([]string)(nil), - Field: 106, - Name: "testdata.greeting", - Tag: "bytes,106,rep,name=greeting", -} - -var E_Complex = &proto.ExtensionDesc{ - ExtendedType: (*OtherMessage)(nil), - ExtensionType: (*ComplexExtension)(nil), - Field: 200, - Name: "testdata.complex", - Tag: "bytes,200,opt,name=complex", -} - -var E_RComplex = &proto.ExtensionDesc{ - ExtendedType: (*OtherMessage)(nil), - ExtensionType: ([]*ComplexExtension)(nil), - Field: 201, - Name: "testdata.r_complex", - Tag: "bytes,201,rep,name=r_complex,json=rComplex", -} - -var E_NoDefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 101, - Name: "testdata.no_default_double", - Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", -} - -var E_NoDefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 102, - Name: "testdata.no_default_float", - Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", -} - -var E_NoDefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 103, - Name: "testdata.no_default_int32", - Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", -} - -var E_NoDefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 104, - Name: "testdata.no_default_int64", - Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", -} - -var E_NoDefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 105, - Name: "testdata.no_default_uint32", - Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", -} - -var E_NoDefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 106, - Name: "testdata.no_default_uint64", - Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", -} - -var E_NoDefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 107, - Name: "testdata.no_default_sint32", - Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", -} - -var E_NoDefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 108, - Name: "testdata.no_default_sint64", - Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", -} - -var E_NoDefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 109, - Name: "testdata.no_default_fixed32", - Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", -} - -var E_NoDefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 110, - Name: "testdata.no_default_fixed64", - Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", -} - -var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 111, - Name: "testdata.no_default_sfixed32", - Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", -} - -var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 112, - Name: "testdata.no_default_sfixed64", - Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", -} - -var E_NoDefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 113, - Name: "testdata.no_default_bool", - Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", -} - -var E_NoDefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 114, - Name: "testdata.no_default_string", - Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", -} - -var E_NoDefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 115, - Name: "testdata.no_default_bytes", - Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", -} - -var E_NoDefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 116, - Name: "testdata.no_default_enum", - Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum", -} - -var E_DefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 201, - Name: "testdata.default_double", - Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", -} - -var E_DefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 202, - Name: "testdata.default_float", - Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", -} - -var E_DefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 203, - Name: "testdata.default_int32", - Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", -} - -var E_DefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 204, - Name: "testdata.default_int64", - Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", -} - -var E_DefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 205, - Name: "testdata.default_uint32", - Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", -} - -var E_DefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 206, - Name: "testdata.default_uint64", - Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", -} - -var E_DefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 207, - Name: "testdata.default_sint32", - Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", -} - -var E_DefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 208, - Name: "testdata.default_sint64", - Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", -} - -var E_DefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 209, - Name: "testdata.default_fixed32", - Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", -} - -var E_DefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 210, - Name: "testdata.default_fixed64", - Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", -} - -var E_DefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 211, - Name: "testdata.default_sfixed32", - Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", -} - -var E_DefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 212, - Name: "testdata.default_sfixed64", - Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", -} - -var E_DefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 213, - Name: "testdata.default_bool", - Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", -} - -var E_DefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 214, - Name: "testdata.default_string", - Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string", -} - -var E_DefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 215, - Name: "testdata.default_bytes", - Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", -} - -var E_DefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 216, - Name: "testdata.default_enum", - Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1", -} - -var E_X201 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 201, - Name: "testdata.x201", - Tag: "bytes,201,opt,name=x201", -} - -var E_X202 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 202, - Name: "testdata.x202", - Tag: "bytes,202,opt,name=x202", -} - -var E_X203 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 203, - Name: "testdata.x203", - Tag: "bytes,203,opt,name=x203", -} - -var E_X204 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 204, - Name: "testdata.x204", - Tag: "bytes,204,opt,name=x204", -} - -var E_X205 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 205, - Name: "testdata.x205", - Tag: "bytes,205,opt,name=x205", -} - -var E_X206 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 206, - Name: "testdata.x206", - Tag: "bytes,206,opt,name=x206", -} - -var E_X207 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 207, - Name: "testdata.x207", - Tag: "bytes,207,opt,name=x207", -} - -var E_X208 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 208, - Name: "testdata.x208", - Tag: "bytes,208,opt,name=x208", -} - -var E_X209 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 209, - Name: "testdata.x209", - Tag: "bytes,209,opt,name=x209", -} - -var E_X210 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 210, - Name: "testdata.x210", - Tag: "bytes,210,opt,name=x210", -} - -var E_X211 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 211, - Name: "testdata.x211", - Tag: "bytes,211,opt,name=x211", -} - -var E_X212 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 212, - Name: "testdata.x212", - Tag: "bytes,212,opt,name=x212", -} - -var E_X213 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 213, - Name: "testdata.x213", - Tag: "bytes,213,opt,name=x213", -} - -var E_X214 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 214, - Name: "testdata.x214", - Tag: "bytes,214,opt,name=x214", -} - -var E_X215 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 215, - Name: "testdata.x215", - Tag: "bytes,215,opt,name=x215", -} - -var E_X216 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 216, - Name: "testdata.x216", - Tag: "bytes,216,opt,name=x216", -} - -var E_X217 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 217, - Name: "testdata.x217", - Tag: "bytes,217,opt,name=x217", -} - -var E_X218 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 218, - Name: "testdata.x218", - Tag: "bytes,218,opt,name=x218", -} - -var E_X219 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 219, - Name: "testdata.x219", - Tag: "bytes,219,opt,name=x219", -} - -var E_X220 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 220, - Name: "testdata.x220", - Tag: "bytes,220,opt,name=x220", -} - -var E_X221 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 221, - Name: "testdata.x221", - Tag: "bytes,221,opt,name=x221", -} - -var E_X222 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 222, - Name: "testdata.x222", - Tag: "bytes,222,opt,name=x222", -} - -var E_X223 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 223, - Name: "testdata.x223", - Tag: "bytes,223,opt,name=x223", -} - -var E_X224 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 224, - Name: "testdata.x224", - Tag: "bytes,224,opt,name=x224", -} - -var E_X225 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 225, - Name: "testdata.x225", - Tag: "bytes,225,opt,name=x225", -} - -var E_X226 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 226, - Name: "testdata.x226", - Tag: "bytes,226,opt,name=x226", -} - -var E_X227 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 227, - Name: "testdata.x227", - Tag: "bytes,227,opt,name=x227", -} - -var E_X228 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 228, - Name: "testdata.x228", - Tag: "bytes,228,opt,name=x228", -} - -var E_X229 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 229, - Name: "testdata.x229", - Tag: "bytes,229,opt,name=x229", -} - -var E_X230 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 230, - Name: "testdata.x230", - Tag: "bytes,230,opt,name=x230", -} - -var E_X231 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 231, - Name: "testdata.x231", - Tag: "bytes,231,opt,name=x231", -} - -var E_X232 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 232, - Name: "testdata.x232", - Tag: "bytes,232,opt,name=x232", -} - -var E_X233 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 233, - Name: "testdata.x233", - Tag: "bytes,233,opt,name=x233", -} - -var E_X234 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 234, - Name: "testdata.x234", - Tag: "bytes,234,opt,name=x234", -} - -var E_X235 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 235, - Name: "testdata.x235", - Tag: "bytes,235,opt,name=x235", -} - -var E_X236 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 236, - Name: "testdata.x236", - Tag: "bytes,236,opt,name=x236", -} - -var E_X237 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 237, - Name: "testdata.x237", - Tag: "bytes,237,opt,name=x237", -} - -var E_X238 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 238, - Name: "testdata.x238", - Tag: "bytes,238,opt,name=x238", -} - -var E_X239 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 239, - Name: "testdata.x239", - Tag: "bytes,239,opt,name=x239", -} - -var E_X240 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 240, - Name: "testdata.x240", - Tag: "bytes,240,opt,name=x240", -} - -var E_X241 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 241, - Name: "testdata.x241", - Tag: "bytes,241,opt,name=x241", -} - -var E_X242 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 242, - Name: "testdata.x242", - Tag: "bytes,242,opt,name=x242", -} - -var E_X243 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 243, - Name: "testdata.x243", - Tag: "bytes,243,opt,name=x243", -} - -var E_X244 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 244, - Name: "testdata.x244", - Tag: "bytes,244,opt,name=x244", -} - -var E_X245 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 245, - Name: "testdata.x245", - Tag: "bytes,245,opt,name=x245", -} - -var E_X246 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 246, - Name: "testdata.x246", - Tag: "bytes,246,opt,name=x246", -} - -var E_X247 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 247, - Name: "testdata.x247", - Tag: "bytes,247,opt,name=x247", -} - -var E_X248 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 248, - Name: "testdata.x248", - Tag: "bytes,248,opt,name=x248", -} - -var E_X249 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 249, - Name: "testdata.x249", - Tag: "bytes,249,opt,name=x249", -} - -var E_X250 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 250, - Name: "testdata.x250", - Tag: "bytes,250,opt,name=x250", -} - -func init() { - proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum") - proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField") - proto.RegisterType((*GoTest)(nil), "testdata.GoTest") - proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup") - proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup") - proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup") - proto.RegisterType((*GoTestRequiredGroupField)(nil), "testdata.GoTestRequiredGroupField") - proto.RegisterType((*GoTestRequiredGroupField_Group)(nil), "testdata.GoTestRequiredGroupField.Group") - proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest") - proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup") - proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest") - proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest") - proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag") - proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage") - proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested") - proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage") - proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested") - proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage") - proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage") - proto.RegisterType((*RequiredInnerMessage)(nil), "testdata.RequiredInnerMessage") - proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage") - proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup") - proto.RegisterType((*Ext)(nil), "testdata.Ext") - proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension") - proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage") - proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet") - proto.RegisterType((*Empty)(nil), "testdata.Empty") - proto.RegisterType((*MessageList)(nil), "testdata.MessageList") - proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message") - proto.RegisterType((*Strings)(nil), "testdata.Strings") - proto.RegisterType((*Defaults)(nil), "testdata.Defaults") - proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults") - proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum") - proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated") - proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld") - proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G") - proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew") - proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G") - proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint") - proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap") - proto.RegisterType((*Oneof)(nil), "testdata.Oneof") - proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group") - proto.RegisterType((*Communique)(nil), "testdata.Communique") - proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) - proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) - proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) - proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) - proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) - proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) - proto.RegisterExtension(E_Ext_More) - proto.RegisterExtension(E_Ext_Text) - proto.RegisterExtension(E_Ext_Number) - proto.RegisterExtension(E_Greeting) - proto.RegisterExtension(E_Complex) - proto.RegisterExtension(E_RComplex) - proto.RegisterExtension(E_NoDefaultDouble) - proto.RegisterExtension(E_NoDefaultFloat) - proto.RegisterExtension(E_NoDefaultInt32) - proto.RegisterExtension(E_NoDefaultInt64) - proto.RegisterExtension(E_NoDefaultUint32) - proto.RegisterExtension(E_NoDefaultUint64) - proto.RegisterExtension(E_NoDefaultSint32) - proto.RegisterExtension(E_NoDefaultSint64) - proto.RegisterExtension(E_NoDefaultFixed32) - proto.RegisterExtension(E_NoDefaultFixed64) - proto.RegisterExtension(E_NoDefaultSfixed32) - proto.RegisterExtension(E_NoDefaultSfixed64) - proto.RegisterExtension(E_NoDefaultBool) - proto.RegisterExtension(E_NoDefaultString) - proto.RegisterExtension(E_NoDefaultBytes) - proto.RegisterExtension(E_NoDefaultEnum) - proto.RegisterExtension(E_DefaultDouble) - proto.RegisterExtension(E_DefaultFloat) - proto.RegisterExtension(E_DefaultInt32) - proto.RegisterExtension(E_DefaultInt64) - proto.RegisterExtension(E_DefaultUint32) - proto.RegisterExtension(E_DefaultUint64) - proto.RegisterExtension(E_DefaultSint32) - proto.RegisterExtension(E_DefaultSint64) - proto.RegisterExtension(E_DefaultFixed32) - proto.RegisterExtension(E_DefaultFixed64) - proto.RegisterExtension(E_DefaultSfixed32) - proto.RegisterExtension(E_DefaultSfixed64) - proto.RegisterExtension(E_DefaultBool) - proto.RegisterExtension(E_DefaultString) - proto.RegisterExtension(E_DefaultBytes) - proto.RegisterExtension(E_DefaultEnum) - proto.RegisterExtension(E_X201) - proto.RegisterExtension(E_X202) - proto.RegisterExtension(E_X203) - proto.RegisterExtension(E_X204) - proto.RegisterExtension(E_X205) - proto.RegisterExtension(E_X206) - proto.RegisterExtension(E_X207) - proto.RegisterExtension(E_X208) - proto.RegisterExtension(E_X209) - proto.RegisterExtension(E_X210) - proto.RegisterExtension(E_X211) - proto.RegisterExtension(E_X212) - proto.RegisterExtension(E_X213) - proto.RegisterExtension(E_X214) - proto.RegisterExtension(E_X215) - proto.RegisterExtension(E_X216) - proto.RegisterExtension(E_X217) - proto.RegisterExtension(E_X218) - proto.RegisterExtension(E_X219) - proto.RegisterExtension(E_X220) - proto.RegisterExtension(E_X221) - proto.RegisterExtension(E_X222) - proto.RegisterExtension(E_X223) - proto.RegisterExtension(E_X224) - proto.RegisterExtension(E_X225) - proto.RegisterExtension(E_X226) - proto.RegisterExtension(E_X227) - proto.RegisterExtension(E_X228) - proto.RegisterExtension(E_X229) - proto.RegisterExtension(E_X230) - proto.RegisterExtension(E_X231) - proto.RegisterExtension(E_X232) - proto.RegisterExtension(E_X233) - proto.RegisterExtension(E_X234) - proto.RegisterExtension(E_X235) - proto.RegisterExtension(E_X236) - proto.RegisterExtension(E_X237) - proto.RegisterExtension(E_X238) - proto.RegisterExtension(E_X239) - proto.RegisterExtension(E_X240) - proto.RegisterExtension(E_X241) - proto.RegisterExtension(E_X242) - proto.RegisterExtension(E_X243) - proto.RegisterExtension(E_X244) - proto.RegisterExtension(E_X245) - proto.RegisterExtension(E_X246) - proto.RegisterExtension(E_X247) - proto.RegisterExtension(E_X248) - proto.RegisterExtension(E_X249) - proto.RegisterExtension(E_X250) -} - -func init() { proto.RegisterFile("test.proto", fileDescriptorTest) } - -var fileDescriptorTest = []byte{ - // 4397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x5a, 0x4b, 0x77, 0x1b, 0x47, - 0x76, 0x76, 0xe3, 0x8d, 0x02, 0x48, 0x80, 0x2d, 0x59, 0x82, 0xa8, 0x87, 0x65, 0xcc, 0xd8, 0x96, - 0x64, 0x9b, 0x43, 0x36, 0x40, 0x52, 0x82, 0x27, 0x3e, 0x47, 0x94, 0x48, 0x0e, 0xcf, 0x88, 0x04, - 0xd3, 0xa4, 0xed, 0x33, 0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, - 0xe4, 0x9d, 0x26, 0xba, 0x38, 0x87, 0x85, 0x7b, 0xbc, 0x6e, 0xd6, 0x61, 0x35, 0x61, 0x59, 0xeb, - 0x3b, 0xeb, 0xb0, 0x96, 0xf0, 0xb0, 0xff, 0x41, 0xdd, 0xb7, 0x94, 0xd7, 0x44, 0xde, 0xf5, 0x7d, - 0xcf, 0x1a, 0x53, 0x0f, 0x26, 0x84, 0x74, 0x2d, 0x96, 0xd1, 0xca, 0x69, 0x91, 0x5c, 0xef, 0x0d, - 0xc6, 0xa7, 0xe5, 0x9f, 0x17, 0x39, 0x06, 0x3d, 0xea, 0x80, 0xb3, 0xab, 0x22, 0xdd, 0xe3, 0xf9, - 0x6a, 0x74, 0xdc, 0x53, 0x35, 0xe5, 0xe1, 0x9c, 0x67, 0xd3, 0x41, 0xcf, 0x57, 0x44, 0x5a, 0x89, - 0xa5, 0xbc, 0xd5, 0x63, 0xea, 0x56, 0x97, 0x41, 0x21, 0xae, 0x04, 0x85, 0xf2, 0xb6, 0x48, 0xcb, - 0x0c, 0x38, 0xa2, 0xac, 0x2e, 0x4b, 0x45, 0x29, 0x26, 0xf9, 0xe5, 0x73, 0xb2, 0x4d, 0x1e, 0x54, - 0x40, 0x6e, 0x24, 0x58, 0x46, 0xc8, 0xd0, 0x29, 0xa8, 0x49, 0xca, 0xed, 0xf7, 0x92, 0x22, 0xe3, - 0xac, 0x14, 0x48, 0x3c, 0x25, 0xeb, 0x33, 0x32, 0xe5, 0xdc, 0x1f, 0x24, 0xa9, 0x22, 0x83, 0xce, - 0x34, 0xd7, 0x60, 0x1c, 0xdd, 0xf1, 0xb2, 0x20, 0x25, 0x6b, 0x2e, 0xb7, 0x13, 0xce, 0x16, 0x71, - 0xf7, 0x66, 0x20, 0x25, 0xab, 0x2a, 0xfd, 0xa6, 0xc8, 0xba, 0x75, 0x14, 0xc5, 0x63, 0xbe, 0x06, - 0xc8, 0x38, 0x85, 0x93, 0x82, 0x00, 0x03, 0x49, 0xaf, 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xf6, 0x6d, 0xf8, - 0x9f, 0x34, 0x84, 0x1b, 0x93, 0x5e, 0xe7, 0xdf, 0x15, 0xc5, 0xe0, 0xfc, 0xd5, 0x13, 0x79, 0x72, - 0xca, 0x89, 0x3c, 0xcb, 0x27, 0xf2, 0x5a, 0xec, 0xae, 0x36, 0xff, 0xbe, 0x28, 0x04, 0xa6, 0xac, - 0xd2, 0x75, 0x49, 0x7f, 0x5b, 0xa5, 0xe7, 0x8c, 0xcb, 0xca, 0xcf, 0xd9, 0xea, 0x07, 0x57, 0xed, - 0x82, 0x5f, 0xc1, 0xe9, 0xab, 0x86, 0x33, 0x11, 0x95, 0x02, 0xf1, 0xdf, 0x11, 0x33, 0xbe, 0x29, - 0xab, 0xe4, 0xec, 0x19, 0x93, 0x2a, 0xff, 0x62, 0x52, 0x24, 0xeb, 0x7d, 0xcb, 0x6e, 0xe9, 0x97, - 0xfd, 0x79, 0xf2, 0x4b, 0x2f, 0x39, 0x39, 0xf2, 0x4a, 0x20, 0x47, 0x42, 0x8f, 0x93, 0x21, 0xaf, - 0x04, 0x32, 0xa4, 0xd3, 0x05, 0x61, 0xfc, 0xfa, 0x44, 0x7e, 0x84, 0x4e, 0x2f, 0x39, 0x5e, 0x9f, - 0x48, 0x8e, 0x5e, 0x37, 0xb0, 0xaf, 0x06, 0x33, 0x23, 0xf4, 0xba, 0x59, 0xf1, 0x6a, 0x30, 0x2b, - 0xba, 0x9d, 0xc0, 0xbc, 0x12, 0xc8, 0x88, 0xe4, 0x92, 0xcc, 0x85, 0x57, 0x83, 0xb9, 0x90, 0x78, - 0x9c, 0x05, 0xaf, 0x06, 0xb3, 0x20, 0x75, 0x72, 0xd6, 0xbb, 0x12, 0xc8, 0x7a, 0x64, 0x54, 0xa6, - 0xbb, 0xab, 0xc1, 0x74, 0x27, 0x79, 0x8a, 0xa7, 0x6a, 0xae, 0x73, 0x3b, 0xc1, 0x53, 0x23, 0x90, - 0xe8, 0xc2, 0x4f, 0xfb, 0xf4, 0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x3b, 0xc6, 0x21, - 0xf6, 0x91, 0x6c, 0x72, 0xc6, 0x9c, 0x72, 0x4e, 0x90, 0xa9, 0x09, 0x61, 0xd0, 0xef, 0xce, 0xfb, - 0x4e, 0x41, 0xc4, 0x37, 0xea, 0x75, 0xcc, 0xfd, 0xf0, 0xcf, 0x52, 0x51, 0xab, 0x7d, 0x41, 0x64, - 0xda, 0x43, 0xcb, 0xc2, 0xf0, 0x30, 0xbd, 0xe6, 0xf8, 0x90, 0x72, 0x9d, 0x0b, 0xaa, 0xc1, 0x81, - 0xf9, 0x50, 0x56, 0x1d, 0x7a, 0x48, 0x59, 0x5b, 0xfa, 0x03, 0x79, 0xa9, 0x32, 0xef, 0x75, 0x07, - 0xeb, 0x14, 0xd3, 0xb1, 0x51, 0xdb, 0x85, 0x32, 0xb0, 0x71, 0x96, 0xc1, 0x8f, 0x64, 0x76, 0x89, - 0x32, 0x98, 0x19, 0x72, 0x53, 0x6d, 0x5d, 0xcc, 0xf5, 0x6d, 0xe7, 0x37, 0x94, 0xc6, 0x91, 0xdc, - 0x63, 0x57, 0x26, 0x8f, 0x72, 0x8e, 0x71, 0x4b, 0xfe, 0x6e, 0xd9, 0xb7, 0xb9, 0x43, 0xee, 0xca, - 0xda, 0x03, 0x51, 0x54, 0xcc, 0x50, 0xe9, 0x19, 0x65, 0xa5, 0x25, 0x7f, 0x28, 0x75, 0xad, 0xd0, - 0xbe, 0x0f, 0x18, 0x91, 0x3b, 0x33, 0xc2, 0x48, 0x5b, 0xfe, 0xea, 0xec, 0x1a, 0xa1, 0x50, 0x37, - 0x69, 0x04, 0x63, 0x4d, 0xb8, 0x91, 0x63, 0xf9, 0x83, 0xb4, 0x6a, 0x64, 0xa5, 0x1a, 0x58, 0x95, - 0x93, 0x33, 0x5d, 0xe9, 0xc8, 0xdf, 0x93, 0x5d, 0x2b, 0x32, 0x00, 0x4e, 0x31, 0x13, 0xed, 0xcc, - 0x87, 0xf2, 0xa7, 0x66, 0x9f, 0x99, 0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, - 0xb8, 0xd6, 0xfe, 0x29, 0x82, 0xcd, 0x5a, 0xab, 0x84, 0x6b, 0xed, 0x9f, 0x23, 0xd8, 0xac, 0xb5, - 0x4a, 0xb8, 0xd6, 0xfe, 0x25, 0x82, 0xcd, 0x5a, 0xab, 0x84, 0x6b, 0xed, 0x5f, 0x23, 0xd8, 0xac, - 0xb5, 0x6a, 0xb8, 0xd6, 0xfe, 0x2d, 0x9c, 0x5d, 0x65, 0xad, 0x55, 0xc3, 0xb5, 0xf6, 0xef, 0x11, - 0x6c, 0xd6, 0x5a, 0x35, 0x5c, 0x6b, 0xff, 0x11, 0xc1, 0x66, 0xad, 0x55, 0xc3, 0xb5, 0xf6, 0x9f, - 0x11, 0x6c, 0xd6, 0x5a, 0x35, 0x5c, 0x6b, 0xff, 0x15, 0xc1, 0x66, 0xad, 0x55, 0xc3, 0xb5, 0xf6, - 0xdf, 0x11, 0x6c, 0xd6, 0x5a, 0x35, 0x5c, 0x6b, 0x3f, 0x8e, 0x60, 0xb3, 0xd6, 0xaa, 0xe1, 0x5a, - 0xfb, 0x2c, 0x82, 0xcd, 0x5a, 0xab, 0x86, 0x6b, 0xed, 0x7f, 0x22, 0xd8, 0xac, 0xb5, 0x6a, 0xb8, - 0xd6, 0xfe, 0x37, 0x82, 0xcd, 0x5a, 0x5b, 0x0e, 0xd7, 0xda, 0xff, 0x85, 0xb3, 0x97, 0x17, 0x7f, - 0x12, 0x00, 0x00, 0xff, 0xff, 0x40, 0x32, 0xb7, 0xac, 0x57, 0x39, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden b/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden deleted file mode 100644 index 0387853d..00000000 --- a/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden +++ /dev/null @@ -1,1737 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: test.proto -// DO NOT EDIT! - -package testdata - -import proto "github.com/gogo/protobuf/proto" -import json "encoding/json" -import math "math" - -import () - -// Reference proto, json, and math imports to suppress error if they are not otherwise used. -var _ = proto.Marshal -var _ = &json.SyntaxError{} -var _ = math.Inf - -type FOO int32 - -const ( - FOO_FOO1 FOO = 1 -) - -var FOO_name = map[int32]string{ - 1: "FOO1", -} -var FOO_value = map[string]int32{ - "FOO1": 1, -} - -func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p -} -func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) -} -func (x FOO) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") - if err != nil { - return err - } - *x = FOO(value) - return nil -} - -type GoTest_KIND int32 - -const ( - GoTest_VOID GoTest_KIND = 0 - GoTest_BOOL GoTest_KIND = 1 - GoTest_BYTES GoTest_KIND = 2 - GoTest_FINGERPRINT GoTest_KIND = 3 - GoTest_FLOAT GoTest_KIND = 4 - GoTest_INT GoTest_KIND = 5 - GoTest_STRING GoTest_KIND = 6 - GoTest_TIME GoTest_KIND = 7 - GoTest_TUPLE GoTest_KIND = 8 - GoTest_ARRAY GoTest_KIND = 9 - GoTest_MAP GoTest_KIND = 10 - GoTest_TABLE GoTest_KIND = 11 - GoTest_FUNCTION GoTest_KIND = 12 -) - -var GoTest_KIND_name = map[int32]string{ - 0: "VOID", - 1: "BOOL", - 2: "BYTES", - 3: "FINGERPRINT", - 4: "FLOAT", - 5: "INT", - 6: "STRING", - 7: "TIME", - 8: "TUPLE", - 9: "ARRAY", - 10: "MAP", - 11: "TABLE", - 12: "FUNCTION", -} -var GoTest_KIND_value = map[string]int32{ - "VOID": 0, - "BOOL": 1, - "BYTES": 2, - "FINGERPRINT": 3, - "FLOAT": 4, - "INT": 5, - "STRING": 6, - "TIME": 7, - "TUPLE": 8, - "ARRAY": 9, - "MAP": 10, - "TABLE": 11, - "FUNCTION": 12, -} - -func (x GoTest_KIND) Enum() *GoTest_KIND { - p := new(GoTest_KIND) - *p = x - return p -} -func (x GoTest_KIND) String() string { - return proto.EnumName(GoTest_KIND_name, int32(x)) -} -func (x GoTest_KIND) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") - if err != nil { - return err - } - *x = GoTest_KIND(value) - return nil -} - -type MyMessage_Color int32 - -const ( - MyMessage_RED MyMessage_Color = 0 - MyMessage_GREEN MyMessage_Color = 1 - MyMessage_BLUE MyMessage_Color = 2 -) - -var MyMessage_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var MyMessage_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x MyMessage_Color) Enum() *MyMessage_Color { - p := new(MyMessage_Color) - *p = x - return p -} -func (x MyMessage_Color) String() string { - return proto.EnumName(MyMessage_Color_name, int32(x)) -} -func (x MyMessage_Color) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") - if err != nil { - return err - } - *x = MyMessage_Color(value) - return nil -} - -type Defaults_Color int32 - -const ( - Defaults_RED Defaults_Color = 0 - Defaults_GREEN Defaults_Color = 1 - Defaults_BLUE Defaults_Color = 2 -) - -var Defaults_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Defaults_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Defaults_Color) Enum() *Defaults_Color { - p := new(Defaults_Color) - *p = x - return p -} -func (x Defaults_Color) String() string { - return proto.EnumName(Defaults_Color_name, int32(x)) -} -func (x Defaults_Color) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *Defaults_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") - if err != nil { - return err - } - *x = Defaults_Color(value) - return nil -} - -type RepeatedEnum_Color int32 - -const ( - RepeatedEnum_RED RepeatedEnum_Color = 1 -) - -var RepeatedEnum_Color_name = map[int32]string{ - 1: "RED", -} -var RepeatedEnum_Color_value = map[string]int32{ - "RED": 1, -} - -func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { - p := new(RepeatedEnum_Color) - *p = x - return p -} -func (x RepeatedEnum_Color) String() string { - return proto.EnumName(RepeatedEnum_Color_name, int32(x)) -} -func (x RepeatedEnum_Color) MarshalJSON() ([]byte, error) { - return json.Marshal(x.String()) -} -func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") - if err != nil { - return err - } - *x = RepeatedEnum_Color(value) - return nil -} - -type GoEnum struct { - Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoEnum) Reset() { *m = GoEnum{} } -func (m *GoEnum) String() string { return proto.CompactTextString(m) } -func (*GoEnum) ProtoMessage() {} - -func (m *GoEnum) GetFoo() FOO { - if m != nil && m.Foo != nil { - return *m.Foo - } - return 0 -} - -type GoTestField struct { - Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"` - Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestField) Reset() { *m = GoTestField{} } -func (m *GoTestField) String() string { return proto.CompactTextString(m) } -func (*GoTestField) ProtoMessage() {} - -func (m *GoTestField) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" -} - -func (m *GoTestField) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -type GoTest struct { - Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` - Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"` - Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"` - RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"` - RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"` - OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"` - F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"` - F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"` - F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"` - F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"` - F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"` - F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"` - F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"` - F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"` - F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"` - F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"` - F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"` - F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"` - F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"` - F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"` - F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"` - F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"` - F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"` - F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"` - F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"` - F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"` - F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"` - F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"` - F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"` - F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"` - F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"` - F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"` - F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"` - F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"` - F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"` - F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"` - F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"` - F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"` - F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"` - F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"` - F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"` - F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"` - F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"` - F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"` - F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"` - F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"` - F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"` - F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"` - F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` - F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` - F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` - F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` - F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"` - F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"` - F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` - F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` - F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` - F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` - F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"` - F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"` - F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"` - F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"` - F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"` - F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"` - F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"` - F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"` - F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"` - F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"` - F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"` - Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"` - Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"` - Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest) Reset() { *m = GoTest{} } -func (m *GoTest) String() string { return proto.CompactTextString(m) } -func (*GoTest) ProtoMessage() {} - -const Default_GoTest_F_BoolDefaulted bool = true -const Default_GoTest_F_Int32Defaulted int32 = 32 -const Default_GoTest_F_Int64Defaulted int64 = 64 -const Default_GoTest_F_Fixed32Defaulted uint32 = 320 -const Default_GoTest_F_Fixed64Defaulted uint64 = 640 -const Default_GoTest_F_Uint32Defaulted uint32 = 3200 -const Default_GoTest_F_Uint64Defaulted uint64 = 6400 -const Default_GoTest_F_FloatDefaulted float32 = 314159 -const Default_GoTest_F_DoubleDefaulted float64 = 271828 -const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" - -var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") - -const Default_GoTest_F_Sint32Defaulted int32 = -32 -const Default_GoTest_F_Sint64Defaulted int64 = -64 - -func (m *GoTest) GetKind() GoTest_KIND { - if m != nil && m.Kind != nil { - return *m.Kind - } - return 0 -} - -func (m *GoTest) GetTable() string { - if m != nil && m.Table != nil { - return *m.Table - } - return "" -} - -func (m *GoTest) GetParam() int32 { - if m != nil && m.Param != nil { - return *m.Param - } - return 0 -} - -func (m *GoTest) GetRequiredField() *GoTestField { - if m != nil { - return m.RequiredField - } - return nil -} - -func (m *GoTest) GetRepeatedField() []*GoTestField { - if m != nil { - return m.RepeatedField - } - return nil -} - -func (m *GoTest) GetOptionalField() *GoTestField { - if m != nil { - return m.OptionalField - } - return nil -} - -func (m *GoTest) GetF_BoolRequired() bool { - if m != nil && m.F_BoolRequired != nil { - return *m.F_BoolRequired - } - return false -} - -func (m *GoTest) GetF_Int32Required() int32 { - if m != nil && m.F_Int32Required != nil { - return *m.F_Int32Required - } - return 0 -} - -func (m *GoTest) GetF_Int64Required() int64 { - if m != nil && m.F_Int64Required != nil { - return *m.F_Int64Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Required() uint32 { - if m != nil && m.F_Fixed32Required != nil { - return *m.F_Fixed32Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Required() uint64 { - if m != nil && m.F_Fixed64Required != nil { - return *m.F_Fixed64Required - } - return 0 -} - -func (m *GoTest) GetF_Uint32Required() uint32 { - if m != nil && m.F_Uint32Required != nil { - return *m.F_Uint32Required - } - return 0 -} - -func (m *GoTest) GetF_Uint64Required() uint64 { - if m != nil && m.F_Uint64Required != nil { - return *m.F_Uint64Required - } - return 0 -} - -func (m *GoTest) GetF_FloatRequired() float32 { - if m != nil && m.F_FloatRequired != nil { - return *m.F_FloatRequired - } - return 0 -} - -func (m *GoTest) GetF_DoubleRequired() float64 { - if m != nil && m.F_DoubleRequired != nil { - return *m.F_DoubleRequired - } - return 0 -} - -func (m *GoTest) GetF_StringRequired() string { - if m != nil && m.F_StringRequired != nil { - return *m.F_StringRequired - } - return "" -} - -func (m *GoTest) GetF_BytesRequired() []byte { - if m != nil { - return m.F_BytesRequired - } - return nil -} - -func (m *GoTest) GetF_Sint32Required() int32 { - if m != nil && m.F_Sint32Required != nil { - return *m.F_Sint32Required - } - return 0 -} - -func (m *GoTest) GetF_Sint64Required() int64 { - if m != nil && m.F_Sint64Required != nil { - return *m.F_Sint64Required - } - return 0 -} - -func (m *GoTest) GetF_BoolRepeated() []bool { - if m != nil { - return m.F_BoolRepeated - } - return nil -} - -func (m *GoTest) GetF_Int32Repeated() []int32 { - if m != nil { - return m.F_Int32Repeated - } - return nil -} - -func (m *GoTest) GetF_Int64Repeated() []int64 { - if m != nil { - return m.F_Int64Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed32Repeated() []uint32 { - if m != nil { - return m.F_Fixed32Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed64Repeated() []uint64 { - if m != nil { - return m.F_Fixed64Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint32Repeated() []uint32 { - if m != nil { - return m.F_Uint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint64Repeated() []uint64 { - if m != nil { - return m.F_Uint64Repeated - } - return nil -} - -func (m *GoTest) GetF_FloatRepeated() []float32 { - if m != nil { - return m.F_FloatRepeated - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeated() []float64 { - if m != nil { - return m.F_DoubleRepeated - } - return nil -} - -func (m *GoTest) GetF_StringRepeated() []string { - if m != nil { - return m.F_StringRepeated - } - return nil -} - -func (m *GoTest) GetF_BytesRepeated() [][]byte { - if m != nil { - return m.F_BytesRepeated - } - return nil -} - -func (m *GoTest) GetF_Sint32Repeated() []int32 { - if m != nil { - return m.F_Sint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Sint64Repeated() []int64 { - if m != nil { - return m.F_Sint64Repeated - } - return nil -} - -func (m *GoTest) GetF_BoolOptional() bool { - if m != nil && m.F_BoolOptional != nil { - return *m.F_BoolOptional - } - return false -} - -func (m *GoTest) GetF_Int32Optional() int32 { - if m != nil && m.F_Int32Optional != nil { - return *m.F_Int32Optional - } - return 0 -} - -func (m *GoTest) GetF_Int64Optional() int64 { - if m != nil && m.F_Int64Optional != nil { - return *m.F_Int64Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Optional() uint32 { - if m != nil && m.F_Fixed32Optional != nil { - return *m.F_Fixed32Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Optional() uint64 { - if m != nil && m.F_Fixed64Optional != nil { - return *m.F_Fixed64Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint32Optional() uint32 { - if m != nil && m.F_Uint32Optional != nil { - return *m.F_Uint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint64Optional() uint64 { - if m != nil && m.F_Uint64Optional != nil { - return *m.F_Uint64Optional - } - return 0 -} - -func (m *GoTest) GetF_FloatOptional() float32 { - if m != nil && m.F_FloatOptional != nil { - return *m.F_FloatOptional - } - return 0 -} - -func (m *GoTest) GetF_DoubleOptional() float64 { - if m != nil && m.F_DoubleOptional != nil { - return *m.F_DoubleOptional - } - return 0 -} - -func (m *GoTest) GetF_StringOptional() string { - if m != nil && m.F_StringOptional != nil { - return *m.F_StringOptional - } - return "" -} - -func (m *GoTest) GetF_BytesOptional() []byte { - if m != nil { - return m.F_BytesOptional - } - return nil -} - -func (m *GoTest) GetF_Sint32Optional() int32 { - if m != nil && m.F_Sint32Optional != nil { - return *m.F_Sint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Sint64Optional() int64 { - if m != nil && m.F_Sint64Optional != nil { - return *m.F_Sint64Optional - } - return 0 -} - -func (m *GoTest) GetF_BoolDefaulted() bool { - if m != nil && m.F_BoolDefaulted != nil { - return *m.F_BoolDefaulted - } - return Default_GoTest_F_BoolDefaulted -} - -func (m *GoTest) GetF_Int32Defaulted() int32 { - if m != nil && m.F_Int32Defaulted != nil { - return *m.F_Int32Defaulted - } - return Default_GoTest_F_Int32Defaulted -} - -func (m *GoTest) GetF_Int64Defaulted() int64 { - if m != nil && m.F_Int64Defaulted != nil { - return *m.F_Int64Defaulted - } - return Default_GoTest_F_Int64Defaulted -} - -func (m *GoTest) GetF_Fixed32Defaulted() uint32 { - if m != nil && m.F_Fixed32Defaulted != nil { - return *m.F_Fixed32Defaulted - } - return Default_GoTest_F_Fixed32Defaulted -} - -func (m *GoTest) GetF_Fixed64Defaulted() uint64 { - if m != nil && m.F_Fixed64Defaulted != nil { - return *m.F_Fixed64Defaulted - } - return Default_GoTest_F_Fixed64Defaulted -} - -func (m *GoTest) GetF_Uint32Defaulted() uint32 { - if m != nil && m.F_Uint32Defaulted != nil { - return *m.F_Uint32Defaulted - } - return Default_GoTest_F_Uint32Defaulted -} - -func (m *GoTest) GetF_Uint64Defaulted() uint64 { - if m != nil && m.F_Uint64Defaulted != nil { - return *m.F_Uint64Defaulted - } - return Default_GoTest_F_Uint64Defaulted -} - -func (m *GoTest) GetF_FloatDefaulted() float32 { - if m != nil && m.F_FloatDefaulted != nil { - return *m.F_FloatDefaulted - } - return Default_GoTest_F_FloatDefaulted -} - -func (m *GoTest) GetF_DoubleDefaulted() float64 { - if m != nil && m.F_DoubleDefaulted != nil { - return *m.F_DoubleDefaulted - } - return Default_GoTest_F_DoubleDefaulted -} - -func (m *GoTest) GetF_StringDefaulted() string { - if m != nil && m.F_StringDefaulted != nil { - return *m.F_StringDefaulted - } - return Default_GoTest_F_StringDefaulted -} - -func (m *GoTest) GetF_BytesDefaulted() []byte { - if m != nil && m.F_BytesDefaulted != nil { - return m.F_BytesDefaulted - } - return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) -} - -func (m *GoTest) GetF_Sint32Defaulted() int32 { - if m != nil && m.F_Sint32Defaulted != nil { - return *m.F_Sint32Defaulted - } - return Default_GoTest_F_Sint32Defaulted -} - -func (m *GoTest) GetF_Sint64Defaulted() int64 { - if m != nil && m.F_Sint64Defaulted != nil { - return *m.F_Sint64Defaulted - } - return Default_GoTest_F_Sint64Defaulted -} - -func (m *GoTest) GetF_BoolRepeatedPacked() []bool { - if m != nil { - return m.F_BoolRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { - if m != nil { - return m.F_Int32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { - if m != nil { - return m.F_Int64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Fixed32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Fixed64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Uint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Uint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { - if m != nil { - return m.F_FloatRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { - if m != nil { - return m.F_DoubleRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { - if m != nil { - return m.F_Sint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { - if m != nil { - return m.F_Sint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { - if m != nil { - return m.Requiredgroup - } - return nil -} - -func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { - if m != nil { - return m.Repeatedgroup - } - return nil -} - -func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil -} - -type GoTest_RequiredGroup struct { - RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } - -func (m *GoTest_RequiredGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_RepeatedGroup struct { - RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } - -func (m *GoTest_RepeatedGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } - -func (m *GoTest_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoSkipTest struct { - SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"` - SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"` - SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"` - SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"` - Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } -func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest) ProtoMessage() {} - -func (m *GoSkipTest) GetSkipInt32() int32 { - if m != nil && m.SkipInt32 != nil { - return *m.SkipInt32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed32() uint32 { - if m != nil && m.SkipFixed32 != nil { - return *m.SkipFixed32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed64() uint64 { - if m != nil && m.SkipFixed64 != nil { - return *m.SkipFixed64 - } - return 0 -} - -func (m *GoSkipTest) GetSkipString() string { - if m != nil && m.SkipString != nil { - return *m.SkipString - } - return "" -} - -func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { - if m != nil { - return m.Skipgroup - } - return nil -} - -type GoSkipTest_SkipGroup struct { - GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"` - GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } - -func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { - if m != nil && m.GroupInt32 != nil { - return *m.GroupInt32 - } - return 0 -} - -func (m *GoSkipTest_SkipGroup) GetGroupString() string { - if m != nil && m.GroupString != nil { - return *m.GroupString - } - return "" -} - -type NonPackedTest struct { - A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } -func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } -func (*NonPackedTest) ProtoMessage() {} - -func (m *NonPackedTest) GetA() []int32 { - if m != nil { - return m.A - } - return nil -} - -type PackedTest struct { - B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PackedTest) Reset() { *m = PackedTest{} } -func (m *PackedTest) String() string { return proto.CompactTextString(m) } -func (*PackedTest) ProtoMessage() {} - -func (m *PackedTest) GetB() []int32 { - if m != nil { - return m.B - } - return nil -} - -type MaxTag struct { - LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MaxTag) Reset() { *m = MaxTag{} } -func (m *MaxTag) String() string { return proto.CompactTextString(m) } -func (*MaxTag) ProtoMessage() {} - -func (m *MaxTag) GetLastField() string { - if m != nil && m.LastField != nil { - return *m.LastField - } - return "" -} - -type OldMessage struct { - Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage) Reset() { *m = OldMessage{} } -func (m *OldMessage) String() string { return proto.CompactTextString(m) } -func (*OldMessage) ProtoMessage() {} - -func (m *OldMessage) GetNested() *OldMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -type OldMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } -func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*OldMessage_Nested) ProtoMessage() {} - -func (m *OldMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type NewMessage struct { - Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage) Reset() { *m = NewMessage{} } -func (m *NewMessage) String() string { return proto.CompactTextString(m) } -func (*NewMessage) ProtoMessage() {} - -func (m *NewMessage) GetNested() *NewMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -type NewMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - FoodGroup *string `protobuf:"bytes,2,opt,name=food_group" json:"food_group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } -func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*NewMessage_Nested) ProtoMessage() {} - -func (m *NewMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *NewMessage_Nested) GetFoodGroup() string { - if m != nil && m.FoodGroup != nil { - return *m.FoodGroup - } - return "" -} - -type InnerMessage struct { - Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` - Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` - Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *InnerMessage) Reset() { *m = InnerMessage{} } -func (m *InnerMessage) String() string { return proto.CompactTextString(m) } -func (*InnerMessage) ProtoMessage() {} - -const Default_InnerMessage_Port int32 = 4000 - -func (m *InnerMessage) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *InnerMessage) GetPort() int32 { - if m != nil && m.Port != nil { - return *m.Port - } - return Default_InnerMessage_Port -} - -func (m *InnerMessage) GetConnected() bool { - if m != nil && m.Connected != nil { - return *m.Connected - } - return false -} - -type OtherMessage struct { - Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` - Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherMessage) Reset() { *m = OtherMessage{} } -func (m *OtherMessage) String() string { return proto.CompactTextString(m) } -func (*OtherMessage) ProtoMessage() {} - -func (m *OtherMessage) GetKey() int64 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -func (m *OtherMessage) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *OtherMessage) GetWeight() float32 { - if m != nil && m.Weight != nil { - return *m.Weight - } - return 0 -} - -func (m *OtherMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -type MyMessage struct { - Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` - Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` - Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` - Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` - Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` - Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"` - RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"` - Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` - XXX_extensions map[int32]proto.Extension `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage) Reset() { *m = MyMessage{} } -func (m *MyMessage) String() string { return proto.CompactTextString(m) } -func (*MyMessage) ProtoMessage() {} - -var extRange_MyMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessage -} -func (m *MyMessage) ExtensionMap() map[int32]proto.Extension { - if m.XXX_extensions == nil { - m.XXX_extensions = make(map[int32]proto.Extension) - } - return m.XXX_extensions -} - -func (m *MyMessage) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *MyMessage) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MyMessage) GetQuote() string { - if m != nil && m.Quote != nil { - return *m.Quote - } - return "" -} - -func (m *MyMessage) GetPet() []string { - if m != nil { - return m.Pet - } - return nil -} - -func (m *MyMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -func (m *MyMessage) GetOthers() []*OtherMessage { - if m != nil { - return m.Others - } - return nil -} - -func (m *MyMessage) GetBikeshed() MyMessage_Color { - if m != nil && m.Bikeshed != nil { - return *m.Bikeshed - } - return 0 -} - -func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *MyMessage) GetRepBytes() [][]byte { - if m != nil { - return m.RepBytes - } - return nil -} - -func (m *MyMessage) GetBigfloat() float64 { - if m != nil && m.Bigfloat != nil { - return *m.Bigfloat - } - return 0 -} - -type MyMessage_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } - -func (m *MyMessage_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Ext struct { - Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Ext) Reset() { *m = Ext{} } -func (m *Ext) String() string { return proto.CompactTextString(m) } -func (*Ext) ProtoMessage() {} - -func (m *Ext) GetData() string { - if m != nil && m.Data != nil { - return *m.Data - } - return "" -} - -var E_Ext_More = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*Ext)(nil), - Field: 103, - Name: "testdata.Ext.more", - Tag: "bytes,103,opt,name=more", -} - -var E_Ext_Text = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*string)(nil), - Field: 104, - Name: "testdata.Ext.text", - Tag: "bytes,104,opt,name=text", -} - -var E_Ext_Number = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 105, - Name: "testdata.Ext.number", - Tag: "varint,105,opt,name=number", -} - -type MessageList struct { - Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList) Reset() { *m = MessageList{} } -func (m *MessageList) String() string { return proto.CompactTextString(m) } -func (*MessageList) ProtoMessage() {} - -func (m *MessageList) GetMessage() []*MessageList_Message { - if m != nil { - return m.Message - } - return nil -} - -type MessageList_Message struct { - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } - -func (m *MessageList_Message) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MessageList_Message) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -type Strings struct { - StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"` - BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Strings) Reset() { *m = Strings{} } -func (m *Strings) String() string { return proto.CompactTextString(m) } -func (*Strings) ProtoMessage() {} - -func (m *Strings) GetStringField() string { - if m != nil && m.StringField != nil { - return *m.StringField - } - return "" -} - -func (m *Strings) GetBytesField() []byte { - if m != nil { - return m.BytesField - } - return nil -} - -type Defaults struct { - F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"` - F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"` - F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"` - F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"` - F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"` - F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"` - F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"` - F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"` - F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"` - F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"` - F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"` - F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"` - F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"` - F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` - F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"` - F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"` - F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"` - Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Defaults) Reset() { *m = Defaults{} } -func (m *Defaults) String() string { return proto.CompactTextString(m) } -func (*Defaults) ProtoMessage() {} - -const Default_Defaults_F_Bool bool = true -const Default_Defaults_F_Int32 int32 = 32 -const Default_Defaults_F_Int64 int64 = 64 -const Default_Defaults_F_Fixed32 uint32 = 320 -const Default_Defaults_F_Fixed64 uint64 = 640 -const Default_Defaults_F_Uint32 uint32 = 3200 -const Default_Defaults_F_Uint64 uint64 = 6400 -const Default_Defaults_F_Float float32 = 314159 -const Default_Defaults_F_Double float64 = 271828 -const Default_Defaults_F_String string = "hello, \"world!\"\n" - -var Default_Defaults_F_Bytes []byte = []byte("Bignose") - -const Default_Defaults_F_Sint32 int32 = -32 -const Default_Defaults_F_Sint64 int64 = -64 -const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN - -var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) -var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) -var Default_Defaults_F_Nan float32 = float32(math.NaN()) - -func (m *Defaults) GetF_Bool() bool { - if m != nil && m.F_Bool != nil { - return *m.F_Bool - } - return Default_Defaults_F_Bool -} - -func (m *Defaults) GetF_Int32() int32 { - if m != nil && m.F_Int32 != nil { - return *m.F_Int32 - } - return Default_Defaults_F_Int32 -} - -func (m *Defaults) GetF_Int64() int64 { - if m != nil && m.F_Int64 != nil { - return *m.F_Int64 - } - return Default_Defaults_F_Int64 -} - -func (m *Defaults) GetF_Fixed32() uint32 { - if m != nil && m.F_Fixed32 != nil { - return *m.F_Fixed32 - } - return Default_Defaults_F_Fixed32 -} - -func (m *Defaults) GetF_Fixed64() uint64 { - if m != nil && m.F_Fixed64 != nil { - return *m.F_Fixed64 - } - return Default_Defaults_F_Fixed64 -} - -func (m *Defaults) GetF_Uint32() uint32 { - if m != nil && m.F_Uint32 != nil { - return *m.F_Uint32 - } - return Default_Defaults_F_Uint32 -} - -func (m *Defaults) GetF_Uint64() uint64 { - if m != nil && m.F_Uint64 != nil { - return *m.F_Uint64 - } - return Default_Defaults_F_Uint64 -} - -func (m *Defaults) GetF_Float() float32 { - if m != nil && m.F_Float != nil { - return *m.F_Float - } - return Default_Defaults_F_Float -} - -func (m *Defaults) GetF_Double() float64 { - if m != nil && m.F_Double != nil { - return *m.F_Double - } - return Default_Defaults_F_Double -} - -func (m *Defaults) GetF_String() string { - if m != nil && m.F_String != nil { - return *m.F_String - } - return Default_Defaults_F_String -} - -func (m *Defaults) GetF_Bytes() []byte { - if m != nil && m.F_Bytes != nil { - return m.F_Bytes - } - return append([]byte(nil), Default_Defaults_F_Bytes...) -} - -func (m *Defaults) GetF_Sint32() int32 { - if m != nil && m.F_Sint32 != nil { - return *m.F_Sint32 - } - return Default_Defaults_F_Sint32 -} - -func (m *Defaults) GetF_Sint64() int64 { - if m != nil && m.F_Sint64 != nil { - return *m.F_Sint64 - } - return Default_Defaults_F_Sint64 -} - -func (m *Defaults) GetF_Enum() Defaults_Color { - if m != nil && m.F_Enum != nil { - return *m.F_Enum - } - return Default_Defaults_F_Enum -} - -func (m *Defaults) GetF_Pinf() float32 { - if m != nil && m.F_Pinf != nil { - return *m.F_Pinf - } - return Default_Defaults_F_Pinf -} - -func (m *Defaults) GetF_Ninf() float32 { - if m != nil && m.F_Ninf != nil { - return *m.F_Ninf - } - return Default_Defaults_F_Ninf -} - -func (m *Defaults) GetF_Nan() float32 { - if m != nil && m.F_Nan != nil { - return *m.F_Nan - } - return Default_Defaults_F_Nan -} - -func (m *Defaults) GetSub() *SubDefaults { - if m != nil { - return m.Sub - } - return nil -} - -type SubDefaults struct { - N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubDefaults) Reset() { *m = SubDefaults{} } -func (m *SubDefaults) String() string { return proto.CompactTextString(m) } -func (*SubDefaults) ProtoMessage() {} - -const Default_SubDefaults_N int64 = 7 - -func (m *SubDefaults) GetN() int64 { - if m != nil && m.N != nil { - return *m.N - } - return Default_SubDefaults_N -} - -type RepeatedEnum struct { - Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } -func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } -func (*RepeatedEnum) ProtoMessage() {} - -func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { - if m != nil { - return m.Color - } - return nil -} - -type MoreRepeated struct { - Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` - BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed" json:"bools_packed,omitempty"` - Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` - IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed" json:"ints_packed,omitempty"` - Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } -func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } -func (*MoreRepeated) ProtoMessage() {} - -func (m *MoreRepeated) GetBools() []bool { - if m != nil { - return m.Bools - } - return nil -} - -func (m *MoreRepeated) GetBoolsPacked() []bool { - if m != nil { - return m.BoolsPacked - } - return nil -} - -func (m *MoreRepeated) GetInts() []int32 { - if m != nil { - return m.Ints - } - return nil -} - -func (m *MoreRepeated) GetIntsPacked() []int32 { - if m != nil { - return m.IntsPacked - } - return nil -} - -func (m *MoreRepeated) GetStrings() []string { - if m != nil { - return m.Strings - } - return nil -} - -type GroupOld struct { - G *GroupOld_G `protobuf:"group,1,opt" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld) Reset() { *m = GroupOld{} } -func (m *GroupOld) String() string { return proto.CompactTextString(m) } -func (*GroupOld) ProtoMessage() {} - -func (m *GroupOld) GetG() *GroupOld_G { - if m != nil { - return m.G - } - return nil -} - -type GroupOld_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } - -func (m *GroupOld_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -type GroupNew struct { - G *GroupNew_G `protobuf:"group,1,opt" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew) Reset() { *m = GroupNew{} } -func (m *GroupNew) String() string { return proto.CompactTextString(m) } -func (*GroupNew) ProtoMessage() {} - -func (m *GroupNew) GetG() *GroupNew_G { - if m != nil { - return m.G - } - return nil -} - -type GroupNew_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } - -func (m *GroupNew_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *GroupNew_G) GetY() int32 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -var E_Greeting = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: ([]string)(nil), - Field: 106, - Name: "testdata.greeting", - Tag: "bytes,106,rep,name=greeting", -} - -func init() { - proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) - proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) - proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) - proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) - proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) - proto.RegisterExtension(E_Ext_More) - proto.RegisterExtension(E_Ext_Text) - proto.RegisterExtension(E_Ext_Number) - proto.RegisterExtension(E_Greeting) -} diff --git a/vendor/github.com/gogo/protobuf/proto/testdata/test.proto b/vendor/github.com/gogo/protobuf/proto/testdata/test.proto deleted file mode 100644 index 70e3cfcd..00000000 --- a/vendor/github.com/gogo/protobuf/proto/testdata/test.proto +++ /dev/null @@ -1,548 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A feature-rich test file for the protocol compiler and libraries. - -syntax = "proto2"; - -package testdata; - -enum FOO { FOO1 = 1; }; - -message GoEnum { - required FOO foo = 1; -} - -message GoTestField { - required string Label = 1; - required string Type = 2; -} - -message GoTest { - // An enum, for completeness. - enum KIND { - VOID = 0; - - // Basic types - BOOL = 1; - BYTES = 2; - FINGERPRINT = 3; - FLOAT = 4; - INT = 5; - STRING = 6; - TIME = 7; - - // Groupings - TUPLE = 8; - ARRAY = 9; - MAP = 10; - - // Table types - TABLE = 11; - - // Functions - FUNCTION = 12; // last tag - }; - - // Some typical parameters - required KIND Kind = 1; - optional string Table = 2; - optional int32 Param = 3; - - // Required, repeated and optional foreign fields. - required GoTestField RequiredField = 4; - repeated GoTestField RepeatedField = 5; - optional GoTestField OptionalField = 6; - - // Required fields of all basic types - required bool F_Bool_required = 10; - required int32 F_Int32_required = 11; - required int64 F_Int64_required = 12; - required fixed32 F_Fixed32_required = 13; - required fixed64 F_Fixed64_required = 14; - required uint32 F_Uint32_required = 15; - required uint64 F_Uint64_required = 16; - required float F_Float_required = 17; - required double F_Double_required = 18; - required string F_String_required = 19; - required bytes F_Bytes_required = 101; - required sint32 F_Sint32_required = 102; - required sint64 F_Sint64_required = 103; - - // Repeated fields of all basic types - repeated bool F_Bool_repeated = 20; - repeated int32 F_Int32_repeated = 21; - repeated int64 F_Int64_repeated = 22; - repeated fixed32 F_Fixed32_repeated = 23; - repeated fixed64 F_Fixed64_repeated = 24; - repeated uint32 F_Uint32_repeated = 25; - repeated uint64 F_Uint64_repeated = 26; - repeated float F_Float_repeated = 27; - repeated double F_Double_repeated = 28; - repeated string F_String_repeated = 29; - repeated bytes F_Bytes_repeated = 201; - repeated sint32 F_Sint32_repeated = 202; - repeated sint64 F_Sint64_repeated = 203; - - // Optional fields of all basic types - optional bool F_Bool_optional = 30; - optional int32 F_Int32_optional = 31; - optional int64 F_Int64_optional = 32; - optional fixed32 F_Fixed32_optional = 33; - optional fixed64 F_Fixed64_optional = 34; - optional uint32 F_Uint32_optional = 35; - optional uint64 F_Uint64_optional = 36; - optional float F_Float_optional = 37; - optional double F_Double_optional = 38; - optional string F_String_optional = 39; - optional bytes F_Bytes_optional = 301; - optional sint32 F_Sint32_optional = 302; - optional sint64 F_Sint64_optional = 303; - - // Default-valued fields of all basic types - optional bool F_Bool_defaulted = 40 [default=true]; - optional int32 F_Int32_defaulted = 41 [default=32]; - optional int64 F_Int64_defaulted = 42 [default=64]; - optional fixed32 F_Fixed32_defaulted = 43 [default=320]; - optional fixed64 F_Fixed64_defaulted = 44 [default=640]; - optional uint32 F_Uint32_defaulted = 45 [default=3200]; - optional uint64 F_Uint64_defaulted = 46 [default=6400]; - optional float F_Float_defaulted = 47 [default=314159.]; - optional double F_Double_defaulted = 48 [default=271828.]; - optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; - optional sint32 F_Sint32_defaulted = 402 [default = -32]; - optional sint64 F_Sint64_defaulted = 403 [default = -64]; - - // Packed repeated fields (no string or bytes). - repeated bool F_Bool_repeated_packed = 50 [packed=true]; - repeated int32 F_Int32_repeated_packed = 51 [packed=true]; - repeated int64 F_Int64_repeated_packed = 52 [packed=true]; - repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; - repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; - repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; - repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; - repeated float F_Float_repeated_packed = 57 [packed=true]; - repeated double F_Double_repeated_packed = 58 [packed=true]; - repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; - repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; - - // Required, repeated, and optional groups. - required group RequiredGroup = 70 { - required string RequiredField = 71; - }; - - repeated group RepeatedGroup = 80 { - required string RequiredField = 81; - }; - - optional group OptionalGroup = 90 { - required string RequiredField = 91; - }; -} - -// For testing a group containing a required field. -message GoTestRequiredGroupField { - required group Group = 1 { - required int32 Field = 2; - }; -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -message GoSkipTest { - required int32 skip_int32 = 11; - required fixed32 skip_fixed32 = 12; - required fixed64 skip_fixed64 = 13; - required string skip_string = 14; - required group SkipGroup = 15 { - required int32 group_int32 = 16; - required string group_string = 17; - } -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -message NonPackedTest { - repeated int32 a = 1; -} - -message PackedTest { - repeated int32 b = 1 [packed=true]; -} - -message MaxTag { - // Maximum possible tag number. - optional string last_field = 536870911; -} - -message OldMessage { - message Nested { - optional string name = 1; - } - optional Nested nested = 1; - - optional int32 num = 2; -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -message NewMessage { - message Nested { - optional string name = 1; - optional string food_group = 2; - } - optional Nested nested = 1; - - // This is an int32 in OldMessage. - optional int64 num = 2; -} - -// Smaller tests for ASCII formatting. - -message InnerMessage { - required string host = 1; - optional int32 port = 2 [default=4000]; - optional bool connected = 3; -} - -message OtherMessage { - optional int64 key = 1; - optional bytes value = 2; - optional float weight = 3; - optional InnerMessage inner = 4; - - extensions 100 to max; -} - -message RequiredInnerMessage { - required InnerMessage leo_finally_won_an_oscar = 1; -} - -message MyMessage { - required int32 count = 1; - optional string name = 2; - optional string quote = 3; - repeated string pet = 4; - optional InnerMessage inner = 5; - repeated OtherMessage others = 6; - optional RequiredInnerMessage we_must_go_deeper = 13; - repeated InnerMessage rep_inner = 12; - - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - }; - optional Color bikeshed = 7; - - optional group SomeGroup = 8 { - optional int32 group_field = 9; - } - - // This field becomes [][]byte in the generated code. - repeated bytes rep_bytes = 10; - - optional double bigfloat = 11; - - extensions 100 to max; -} - -message Ext { - extend MyMessage { - optional Ext more = 103; - optional string text = 104; - optional int32 number = 105; - } - - optional string data = 1; -} - -extend MyMessage { - repeated string greeting = 106; -} - -message ComplexExtension { - optional int32 first = 1; - optional int32 second = 2; - repeated int32 third = 3; -} - -extend OtherMessage { - optional ComplexExtension complex = 200; - repeated ComplexExtension r_complex = 201; -} - -message DefaultsMessage { - enum DefaultsEnum { - ZERO = 0; - ONE = 1; - TWO = 2; - }; - extensions 100 to max; -} - -extend DefaultsMessage { - optional double no_default_double = 101; - optional float no_default_float = 102; - optional int32 no_default_int32 = 103; - optional int64 no_default_int64 = 104; - optional uint32 no_default_uint32 = 105; - optional uint64 no_default_uint64 = 106; - optional sint32 no_default_sint32 = 107; - optional sint64 no_default_sint64 = 108; - optional fixed32 no_default_fixed32 = 109; - optional fixed64 no_default_fixed64 = 110; - optional sfixed32 no_default_sfixed32 = 111; - optional sfixed64 no_default_sfixed64 = 112; - optional bool no_default_bool = 113; - optional string no_default_string = 114; - optional bytes no_default_bytes = 115; - optional DefaultsMessage.DefaultsEnum no_default_enum = 116; - - optional double default_double = 201 [default = 3.1415]; - optional float default_float = 202 [default = 3.14]; - optional int32 default_int32 = 203 [default = 42]; - optional int64 default_int64 = 204 [default = 43]; - optional uint32 default_uint32 = 205 [default = 44]; - optional uint64 default_uint64 = 206 [default = 45]; - optional sint32 default_sint32 = 207 [default = 46]; - optional sint64 default_sint64 = 208 [default = 47]; - optional fixed32 default_fixed32 = 209 [default = 48]; - optional fixed64 default_fixed64 = 210 [default = 49]; - optional sfixed32 default_sfixed32 = 211 [default = 50]; - optional sfixed64 default_sfixed64 = 212 [default = 51]; - optional bool default_bool = 213 [default = true]; - optional string default_string = 214 [default = "Hello, string"]; - optional bytes default_bytes = 215 [default = "Hello, bytes"]; - optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; -} - -message MyMessageSet { - option message_set_wire_format = true; - extensions 100 to max; -} - -message Empty { -} - -extend MyMessageSet { - optional Empty x201 = 201; - optional Empty x202 = 202; - optional Empty x203 = 203; - optional Empty x204 = 204; - optional Empty x205 = 205; - optional Empty x206 = 206; - optional Empty x207 = 207; - optional Empty x208 = 208; - optional Empty x209 = 209; - optional Empty x210 = 210; - optional Empty x211 = 211; - optional Empty x212 = 212; - optional Empty x213 = 213; - optional Empty x214 = 214; - optional Empty x215 = 215; - optional Empty x216 = 216; - optional Empty x217 = 217; - optional Empty x218 = 218; - optional Empty x219 = 219; - optional Empty x220 = 220; - optional Empty x221 = 221; - optional Empty x222 = 222; - optional Empty x223 = 223; - optional Empty x224 = 224; - optional Empty x225 = 225; - optional Empty x226 = 226; - optional Empty x227 = 227; - optional Empty x228 = 228; - optional Empty x229 = 229; - optional Empty x230 = 230; - optional Empty x231 = 231; - optional Empty x232 = 232; - optional Empty x233 = 233; - optional Empty x234 = 234; - optional Empty x235 = 235; - optional Empty x236 = 236; - optional Empty x237 = 237; - optional Empty x238 = 238; - optional Empty x239 = 239; - optional Empty x240 = 240; - optional Empty x241 = 241; - optional Empty x242 = 242; - optional Empty x243 = 243; - optional Empty x244 = 244; - optional Empty x245 = 245; - optional Empty x246 = 246; - optional Empty x247 = 247; - optional Empty x248 = 248; - optional Empty x249 = 249; - optional Empty x250 = 250; -} - -message MessageList { - repeated group Message = 1 { - required string name = 2; - required int32 count = 3; - } -} - -message Strings { - optional string string_field = 1; - optional bytes bytes_field = 2; -} - -message Defaults { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - } - - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - optional bool F_Bool = 1 [default=true]; - optional int32 F_Int32 = 2 [default=32]; - optional int64 F_Int64 = 3 [default=64]; - optional fixed32 F_Fixed32 = 4 [default=320]; - optional fixed64 F_Fixed64 = 5 [default=640]; - optional uint32 F_Uint32 = 6 [default=3200]; - optional uint64 F_Uint64 = 7 [default=6400]; - optional float F_Float = 8 [default=314159.]; - optional double F_Double = 9 [default=271828.]; - optional string F_String = 10 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes = 11 [default="Bignose"]; - optional sint32 F_Sint32 = 12 [default=-32]; - optional sint64 F_Sint64 = 13 [default=-64]; - optional Color F_Enum = 14 [default=GREEN]; - - // More fields with crazy defaults. - optional float F_Pinf = 15 [default=inf]; - optional float F_Ninf = 16 [default=-inf]; - optional float F_Nan = 17 [default=nan]; - - // Sub-message. - optional SubDefaults sub = 18; - - // Redundant but explicit defaults. - optional string str_zero = 19 [default=""]; -} - -message SubDefaults { - optional int64 n = 1 [default=7]; -} - -message RepeatedEnum { - enum Color { - RED = 1; - } - repeated Color color = 1; -} - -message MoreRepeated { - repeated bool bools = 1; - repeated bool bools_packed = 2 [packed=true]; - repeated int32 ints = 3; - repeated int32 ints_packed = 4 [packed=true]; - repeated int64 int64s_packed = 7 [packed=true]; - repeated string strings = 5; - repeated fixed32 fixeds = 6; -} - -// GroupOld and GroupNew have the same wire format. -// GroupNew has a new field inside a group. - -message GroupOld { - optional group G = 101 { - optional int32 x = 2; - } -} - -message GroupNew { - optional group G = 101 { - optional int32 x = 2; - optional int32 y = 3; - } -} - -message FloatingPoint { - required double f = 1; - optional bool exact = 2; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; - map str_to_str = 4; -} - -message Oneof { - oneof union { - bool F_Bool = 1; - int32 F_Int32 = 2; - int64 F_Int64 = 3; - fixed32 F_Fixed32 = 4; - fixed64 F_Fixed64 = 5; - uint32 F_Uint32 = 6; - uint64 F_Uint64 = 7; - float F_Float = 8; - double F_Double = 9; - string F_String = 10; - bytes F_Bytes = 11; - sint32 F_Sint32 = 12; - sint64 F_Sint64 = 13; - MyMessage.Color F_Enum = 14; - GoTestField F_Message = 15; - group F_Group = 16 { - optional int32 x = 17; - } - int32 F_Largest_Tag = 536870911; - } - - oneof tormato { - int32 value = 100; - } -} - -message Communique { - optional bool make_me_cry = 1; - - // This is a oneof, called "union". - oneof union { - int32 number = 5; - string name = 6; - bytes data = 7; - double temp_c = 8; - MyMessage.Color col = 9; - Strings msg = 10; - } -} diff --git a/vendor/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 2ba72534..00000000 --- a/vendor/github.com/gogo/protobuf/proto/text_parser_test.go +++ /dev/null @@ -1,573 +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"), - }, - }, - - // 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{"Shrek"}} - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } -} - -var benchInput string - -func init() { - benchInput = "count: 4\n" - for i := 0; i < 1000; i++ { - benchInput += "pet: \"fido\"\n" - } - - // Check it is valid input. - pb := new(MyMessage) - err := UnmarshalText(benchInput, pb) - if err != nil { - panic("Bad benchmark input: " + err.Error()) - } -} - -func BenchmarkUnmarshalText(b *testing.B) { - pb := new(MyMessage) - for i := 0; i < b.N; i++ { - UnmarshalText(benchInput, pb) - } - b.SetBytes(int64(len(benchInput))) -} diff --git a/vendor/github.com/gogo/protobuf/proto/text_test.go b/vendor/github.com/gogo/protobuf/proto/text_test.go deleted file mode 100644 index 65240484..00000000 --- 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. - pb := new(pb.Strings) - if err := proto.UnmarshalText(s, pb); err != nil { - t.Errorf("#%d: UnmarshalText: %v", i, err) - continue - } - if !proto.Equal(pb, tc.in) { - t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) - } - } -} - -// A limitedWriter accepts some output before it fails. -// This is a proxy for something like a nearly-full or imminently-failing disk, -// or a network connection that is about to die. -type limitedWriter struct { - b bytes.Buffer - limit int -} - -var outOfSpace = errors.New("proto: insufficient space") - -func (w *limitedWriter) Write(p []byte) (n int, err error) { - var avail = w.limit - w.b.Len() - if avail <= 0 { - return 0, outOfSpace - } - if len(p) <= avail { - return w.b.Write(p) - } - n, _ = w.b.Write(p[:avail]) - return n, outOfSpace -} - -func TestMarshalTextFailing(t *testing.T) { - // Try lots of different sizes to exercise more error code-paths. - for lim := 0; lim < len(text); lim++ { - buf := new(limitedWriter) - buf.limit = lim - err := proto.MarshalText(buf, newTestMessage()) - // We expect a certain error, but also some partial results in the buffer. - if err != outOfSpace { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) - } - s := buf.b.String() - x := text[:buf.limit] - if s != x { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) - } - } -} - -func TestFloats(t *testing.T) { - tests := []struct { - f float64 - want string - }{ - {0, "0"}, - {4.7, "4.7"}, - {math.Inf(1), "inf"}, - {math.Inf(-1), "-inf"}, - {math.NaN(), "nan"}, - } - for _, test := range tests { - msg := &pb.FloatingPoint{F: &test.f} - got := strings.TrimSpace(msg.String()) - want := `f:` + test.want - if got != want { - t.Errorf("f=%f: got %q, want %q", test.f, got, want) - } - } -} - -func TestRepeatedNilText(t *testing.T) { - m := &pb.MessageList{ - Message: []*pb.MessageList_Message{ - nil, - { - Name: proto.String("Horse"), - }, - nil, - }, - } - want := `Message -Message { - name: "Horse" -} -Message -` - if s := proto.MarshalTextString(m); s != want { - t.Errorf(" got: %s\nwant: %s", s, want) - } -} - -func TestProto3Text(t *testing.T) { - tests := []struct { - m proto.Message - want string - }{ - // zero message - {&proto3pb.Message{}, ``}, - // zero message except for an empty byte slice - {&proto3pb.Message{Data: []byte{}}, ``}, - // trivial case - {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, - // empty map - {&pb.MessageWithMap{}, ``}, - // non-empty map; map format is the same as a repeated struct, - // and they are sorted by key (numerically for numeric keys). - { - &pb.MessageWithMap{NameMapping: map[int32]string{ - -1: "Negatory", - 7: "Lucky", - 1234: "Feist", - 6345789: "Otis", - }}, - `name_mapping: ` + - `name_mapping: ` + - `name_mapping: ` + - `name_mapping:`, - }, - // map with nil value; not well-defined, but we shouldn't crash - { - &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, - `msg_mapping:`, - }, - } - for _, test := range tests { - got := strings.TrimSpace(test.m.String()) - if got != test.want { - t.Errorf("\n got %s\nwant %s", got, test.want) - } - } -} diff --git a/vendor/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 acaee1f4..00000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto +++ /dev/null @@ -1,150 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to -// change. -// -// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is -// just a program that reads a CodeGeneratorRequest from stdin and writes a -// CodeGeneratorResponse to stdout. -// -// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead -// of dealing with the raw protocol defined here. -// -// A plugin executable needs only to be placed somewhere in the path. The -// plugin should be named "protoc-gen-$NAME", and will then be used when the -// flag "--${NAME}_out" is passed to protoc. - -syntax = "proto2"; -package google.protobuf.compiler; -option java_package = "com.google.protobuf.compiler"; -option java_outer_classname = "PluginProtos"; - -option go_package = "plugin_go"; - -import "google/protobuf/descriptor.proto"; - -// An encoded CodeGeneratorRequest is written to the plugin's stdin. -message CodeGeneratorRequest { - // The .proto files that were explicitly listed on the command-line. The - // code generator should generate code only for these files. Each file's - // descriptor will be included in proto_file, below. - repeated string file_to_generate = 1; - - // The generator parameter passed on the command-line. - optional string parameter = 2; - - // FileDescriptorProtos for all files in files_to_generate and everything - // they import. The files will appear in topological order, so each file - // appears before any file that imports it. - // - // protoc guarantees that all proto_files will be written after - // the fields above, even though this is not technically guaranteed by the - // protobuf wire format. This theoretically could allow a plugin to stream - // in the FileDescriptorProtos and handle them one by one rather than read - // the entire set into memory at once. However, as of this writing, this - // is not similarly optimized on protoc's end -- it will store all fields in - // memory at once before sending them to the plugin. - repeated FileDescriptorProto proto_file = 15; -} - -// The plugin writes an encoded CodeGeneratorResponse to stdout. -message CodeGeneratorResponse { - // Error message. If non-empty, code generation failed. The plugin process - // should exit with status code zero even if it reports an error in this way. - // - // This should be used to indicate errors in .proto files which prevent the - // code generator from generating correct code. Errors which indicate a - // problem in protoc itself -- such as the input CodeGeneratorRequest being - // unparseable -- should be reported by writing a message to stderr and - // exiting with a non-zero status code. - optional string error = 1; - - // Represents a single generated file. - message File { - // The file name, relative to the output directory. The name must not - // contain "." or ".." components and must be relative, not be absolute (so, - // the file cannot lie outside the output directory). "/" must be used as - // the path separator, not "\". - // - // If the name is omitted, the content will be appended to the previous - // file. This allows the generator to break large files into small chunks, - // and allows the generated text to be streamed back to protoc so that large - // files need not reside completely in memory at one time. Note that as of - // this writing protoc does not optimize for this -- it will read the entire - // CodeGeneratorResponse before writing files to disk. - optional string name = 1; - - // If non-empty, indicates that the named file should already exist, and the - // content here is to be inserted into that file at a defined insertion - // point. This feature allows a code generator to extend the output - // produced by another code generator. The original generator may provide - // insertion points by placing special annotations in the file that look - // like: - // @@protoc_insertion_point(NAME) - // The annotation can have arbitrary text before and after it on the line, - // which allows it to be placed in a comment. NAME should be replaced with - // an identifier naming the point -- this is what other generators will use - // as the insertion_point. Code inserted at this point will be placed - // immediately above the line containing the insertion point (thus multiple - // insertions to the same point will come out in the order they were added). - // The double-@ is intended to make it unlikely that the generated code - // could contain things that look like insertion points by accident. - // - // For example, the C++ code generator places the following line in the - // .pb.h files that it generates: - // // @@protoc_insertion_point(namespace_scope) - // This line appears within the scope of the file's package namespace, but - // outside of any particular class. Another plugin can then specify the - // insertion_point "namespace_scope" to generate additional classes or - // other declarations that should be placed in this scope. - // - // Note that if the line containing the insertion point begins with - // whitespace, the same whitespace will be added to every line of the - // inserted text. This is useful for languages like Python, where - // indentation matters. In these languages, the insertion point comment - // should be indented the same amount as any inserted code will need to be - // in order to work correctly in that context. - // - // The code generator that generates the initial file and the one which - // inserts into it must both run as part of a single invocation of protoc. - // Code generators are executed in the order in which they appear on the - // command line. - // - // If |insertion_point| is present, |name| must also be present. - optional string insertion_point = 2; - - // The file contents. - optional string content = 15; - } - repeated File file = 15; -} 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 c59a6022..00000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto +++ /dev/null @@ -1,779 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - - -syntax = "proto2"; - -package google.protobuf; -option go_package = "descriptor"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; -option csharp_namespace = "Google.Protobuf.Reflection"; -option objc_class_prefix = "GPB"; - -// descriptor.proto must be optimized for speed because reflection-based -// algorithms don't work during bootstrapping. -option optimize_for = SPEED; - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -message FileDescriptorSet { - repeated FileDescriptorProto file = 1; -} - -// Describes a complete .proto file. -message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. - - // Names of files imported by this file. - repeated string dependency = 3; - // Indexes of the public imported files in the dependency list above. - repeated int32 public_dependency = 10; - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - repeated int32 weak_dependency = 11; - - // All top-level definitions in this file. - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - - optional FileOptions options = 8; - - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - optional SourceCodeInfo source_code_info = 9; - - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - optional string syntax = 12; -} - -// Describes a message type. -message DescriptorProto { - optional string name = 1; - - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - - message ExtensionRange { - optional int32 start = 1; - optional int32 end = 2; - } - repeated ExtensionRange extension_range = 5; - - repeated OneofDescriptorProto oneof_decl = 8; - - optional MessageOptions options = 7; - - // Range of reserved tag numbers. Reserved tag numbers may not be used by - // fields or extension ranges in the same message. Reserved ranges may - // not overlap. - message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - } - repeated ReservedRange reserved_range = 9; - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - repeated string reserved_name = 10; -} - -// Describes a field within a message. -message FieldDescriptorProto { - enum Type { - // 0 is reserved for errors. - // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - TYPE_GROUP = 10; // Tag-delimited aggregate. - TYPE_MESSAGE = 11; // Length-delimited aggregate. - - // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - }; - - enum Label { - // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - // TODO(sanjay): Should we add LABEL_MAP? - }; - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - optional Type type = 5; - - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - optional string type_name = 6; - - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - optional string extendee = 2; - - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - optional string default_value = 7; - - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - optional int32 oneof_index = 9; - - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - optional string json_name = 10; - - optional FieldOptions options = 8; -} - -// Describes a oneof. -message OneofDescriptorProto { - optional string name = 1; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; -} - -// Describes a value within an enum. -message EnumValueDescriptorProto { - optional string name = 1; - optional int32 number = 2; - - optional EnumValueOptions options = 3; -} - -// Describes a service. -message ServiceDescriptorProto { - optional string name = 1; - repeated MethodDescriptorProto method = 2; - - optional ServiceOptions options = 3; -} - -// Describes a method of a service. -message MethodDescriptorProto { - optional string name = 1; - - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - optional string input_type = 2; - optional string output_type = 3; - - optional MethodOptions options = 4; - - // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default=false]; - // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default=false]; -} - - -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail protobuf-global-extension-registry@google.com -// to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - - -message FileOptions { - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - optional string java_package = 1; - - - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - optional string java_outer_classname = 8; - - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default=false]; - - // If set true, then the Java code generator will generate equals() and - // hashCode() methods for all messages defined in the .proto file. - // This increases generated code size, potentially substantially for large - // protos, which may harm a memory-constrained application. - // - In the full runtime this is a speed optimization, as the - // AbstractMessage base class includes reflection-based implementations of - // these methods. - // - In the lite runtime, setting this option changes the semantics of - // equals() and hashCode() to more closely match those of the full runtime; - // the generated methods compute their results based on field values rather - // than object identity. (Implementations should not assume that hashcodes - // will be consistent across runtimes or versions of the protocol compiler.) - optional bool java_generate_equals_and_hash = 20 [default=false]; - - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default=false]; - - - // Generated classes can be optimized for speed or code size. - enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. - } - optional OptimizeMode optimize_for = 9 [default=SPEED]; - - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - optional string go_package = 11; - - - - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - optional bool cc_generic_services = 16 [default=false]; - optional bool java_generic_services = 17 [default=false]; - optional bool py_generic_services = 18 [default=false]; - - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default=false]; - - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default=false]; - - - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - optional string objc_class_prefix = 36; - - // Namespace for generated classes; defaults to the package. - optional string csharp_namespace = 37; - - // Whether the nano proto compiler should generate in the deprecated non-nano - // suffixed package. - optional bool javanano_use_deprecated_package = 38; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MessageOptions { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - optional bool message_set_wire_format = 1 [default=false]; - - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default=false]; - - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default=false]; - - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - optional bool map_entry = 7; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message FieldOptions { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; - enum CType { - // Default mode. - STRING = 0; - - CORD = 1; - - STRING_PIECE = 2; - } - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - optional bool packed = 2; - - - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). By default these types are - // represented as JavaScript strings. This avoids loss of precision that can - // happen when a large value is converted to a floating point JavaScript - // numbers. Specifying JS_NUMBER for the jstype causes the generated - // JavaScript code to use the JavaScript "number" type instead of strings. - // This option is an enum to permit additional types to be added, - // e.g. goog.math.Integer. - optional JSType jstype = 6 [default = JS_NORMAL]; - enum JSType { - // Use the default type. - JS_NORMAL = 0; - - // Use JavaScript strings. - JS_STRING = 1; - - // Use JavaScript numbers. - JS_NUMBER = 2; - } - - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outher message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - optional bool lazy = 5 [default=false]; - - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - optional bool deprecated = 3 [default=false]; - - // For Google-internal migration only. Do not use. - optional bool weak = 10 [default=false]; - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumOptions { - - // Set this option to true to allow mapping different tag names to the same - // value. - optional bool allow_alias = 2; - - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - optional bool deprecated = 3 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumValueOptions { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message ServiceOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - optional bool deprecated = 33 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MethodOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -message UninterpretedOption { - // The name of the uninterpreted option. Each string represents a segment in - // a dot-separated name. is_extension is true iff a segment represents an - // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". - message NamePart { - required string name_part = 1; - required bool is_extension = 2; - } - repeated NamePart name = 2; - - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; -} - -// =================================================================== -// Optional source code info - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -message SourceCodeInfo { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - repeated Location location = 1; - message Location { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - repeated int32 path = 1 [packed=true]; - - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - repeated int32 span = 2 [packed=true]; - - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - optional string leading_comments = 3; - optional string trailing_comments = 4; - repeated string leading_detached_comments = 6; - } -} 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 9fd93382..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go +++ /dev/null @@ -1,174 +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 - Plugins string -} - -func (this MixMatch) Gen(folder string, news []string) { - if err := os.MkdirAll(folder, 0777); err != nil { - panic(err) - } - data, err := ioutil.ReadFile(this.Filename) - if err != nil { - panic(err) - } - content := string(data) - for i, old := range this.Old { - if !strings.Contains(content, old) { - panic(fmt.Errorf("could not find string {%s} to replace with {%s}", old, news[i])) - } - content = strings.Replace(content, old, news[i], 1) - if strings.Contains(content, old) && old != news[i] { - panic(fmt.Errorf("found another string {%s} after it was replaced with {%s}", old, news[i])) - } - } - if err = ioutil.WriteFile(filepath.Join(folder, this.Filename), []byte(content), 0666); err != nil { - panic(err) - } - args := append([]string{"--gogo_out=" + this.Plugins + "."}, this.Args...) - args = append(args, filepath.Join(folder, this.Filename)) - var regenerate = exec.Command("protoc", args...) - out, err := regenerate.CombinedOutput() - - failed := false - scanner := bufio.NewScanner(bytes.NewReader(out)) - for scanner.Scan() { - text := scanner.Text() - fmt.Println("protoc-gen-combo: ", text) - if !strings.Contains(text, "WARNING") { - failed = true - } - } - - if err != nil { - fmt.Print("protoc-gen-combo: error: ", err) - failed = true - } - - if failed { - os.Exit(1) - } -} - -var min = flag.String("version", "2.3.0", "minimum protoc version") -var proto_path = flag.String("proto_path", ".", "") -var def = flag.Bool("default", true, "generate the case where everything is false") -var plugins = flag.String("plugins", "", "--gogo_out=plugins=:.") - -func main() { - flag.Parse() - if !version.AtLeast(*min) { - fmt.Printf("protoc version not high enough to parse this proto file\n") - return - } - args := flag.Args() - filename := args[0] - args = append([]string{"--proto_path=" + *proto_path}) - if _, err := exec.LookPath("protoc"); err != nil { - panic("cannot find protoc in PATH") - } - pluginStr := "" - if len(*plugins) > 0 { - pluginStr = "plugins=" + *plugins + ":" - } - m := MixMatch{ - Old: []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }, - Filename: filename, - Args: args, - Plugins: pluginStr, - } - if *def { - m.Gen("./combos/neither/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - } - m.Gen("./combos/marshaler/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = true;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/unmarshaler/", []string{ - "option (gogoproto.unmarshaler_all) = true;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/both/", []string{ - "option (gogoproto.unmarshaler_all) = true;", - "option (gogoproto.marshaler_all) = true;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/unsafemarshaler/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = false;", - "option (gogoproto.unsafe_marshaler_all) = true;", - }) - m.Gen("./combos/unsafeunmarshaler/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = true;", - "option (gogoproto.unsafe_marshaler_all) = false;", - }) - m.Gen("./combos/unsafeboth/", []string{ - "option (gogoproto.unmarshaler_all) = false;", - "option (gogoproto.marshaler_all) = false;", - "option (gogoproto.unsafe_unmarshaler_all) = true;", - "option (gogoproto.unsafe_marshaler_all) = true;", - }) -} diff --git a/vendor/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 3562a81e..00000000 --- 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/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile deleted file mode 100644 index a42cc371..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -test: - cd testdata && make test diff --git a/vendor/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 15c7cf43..00000000 --- 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/generator.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go deleted file mode 100644 index 99dfe5a6..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go +++ /dev/null @@ -1,3154 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* - The code generator for the plugin for the Google protocol buffer compiler. - It generates Go code from the protocol buffer description files read by the - main routine. -*/ -package generator - -import ( - "bufio" - "bytes" - "compress/gzip" - "fmt" - "go/parser" - "go/printer" - "go/token" - "log" - "os" - "path" - "sort" - "strconv" - "strings" - "unicode" - "unicode/utf8" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" -) - -// generatedCodeVersion indicates a version of the generated code. -// It is incremented whenever an incompatibility between the generated code and -// proto package is introduced; the generated code references -// a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion). -const generatedCodeVersion = 2 - -// A Plugin provides functionality to add to the output during Go code generation, -// such as to produce RPC stubs. -type Plugin interface { - // Name identifies the plugin. - Name() string - // Init is called once after data structures are built but before - // code generation begins. - Init(g *Generator) - // Generate produces the code generated by the plugin for this file, - // except for the imports, by calling the generator's methods P, In, and Out. - Generate(file *FileDescriptor) - // GenerateImports produces the import declarations for this file. - // It is called after Generate. - GenerateImports(file *FileDescriptor) -} - -type pluginSlice []Plugin - -func (ps pluginSlice) Len() int { - return len(ps) -} - -func (ps pluginSlice) Less(i, j int) bool { - return ps[i].Name() < ps[j].Name() -} - -func (ps pluginSlice) Swap(i, j int) { - ps[i], ps[j] = ps[j], ps[i] -} - -var plugins pluginSlice - -// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated. -// It is typically called during initialization. -func RegisterPlugin(p Plugin) { - plugins = append(plugins, p) -} - -// Each type we import as a protocol buffer (other than FileDescriptorProto) needs -// a pointer to the FileDescriptorProto that represents it. These types achieve that -// wrapping by placing each Proto inside a struct with the pointer to its File. The -// structs have the same names as their contents, with "Proto" removed. -// FileDescriptor is used to store the things that it points to. - -// The file and package name method are common to messages and enums. -type common struct { - file *descriptor.FileDescriptorProto // File this object comes from. -} - -// PackageName is name in the package clause in the generated file. -func (c *common) PackageName() string { return uniquePackageOf(c.file) } - -func (c *common) File() *descriptor.FileDescriptorProto { return c.file } - -func fileIsProto3(file *descriptor.FileDescriptorProto) bool { - return file.GetSyntax() == "proto3" -} - -func (c *common) proto3() bool { return fileIsProto3(c.file) } - -// Descriptor represents a protocol buffer message. -type Descriptor struct { - common - *descriptor.DescriptorProto - parent *Descriptor // The containing message, if any. - nested []*Descriptor // Inner messages, if any. - enums []*EnumDescriptor // Inner enums, if any. - ext []*ExtensionDescriptor // Extensions, if any. - typename []string // Cached typename vector. - index int // The index into the container, whether the file or another message. - path string // The SourceCodeInfo path as comma-separated integers. - group bool -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (d *Descriptor) TypeName() []string { - if d.typename != nil { - return d.typename - } - n := 0 - for parent := d; parent != nil; parent = parent.parent { - n++ - } - s := make([]string, n, n) - for parent := d; parent != nil; parent = parent.parent { - n-- - s[n] = parent.GetName() - } - d.typename = s - return s -} - -func (d *Descriptor) allowOneof() bool { - return true -} - -// EnumDescriptor describes an enum. If it's at top level, its parent will be nil. -// Otherwise it will be the descriptor of the message in which it is defined. -type EnumDescriptor struct { - common - *descriptor.EnumDescriptorProto - parent *Descriptor // The containing message, if any. - typename []string // Cached typename vector. - index int // The index into the container, whether the file or a message. - path string // The SourceCodeInfo path as comma-separated integers. -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (e *EnumDescriptor) TypeName() (s []string) { - if e.typename != nil { - return e.typename - } - name := e.GetName() - if e.parent == nil { - s = make([]string, 1) - } else { - pname := e.parent.TypeName() - s = make([]string, len(pname)+1) - copy(s, pname) - } - s[len(s)-1] = name - e.typename = s - return s -} - -// alias provides the TypeName corrected for the application of any naming -// extensions on the enum type. It should be used for generating references to -// the Go types and for calculating prefixes. -func (e *EnumDescriptor) alias() (s []string) { - s = e.TypeName() - if gogoproto.IsEnumCustomName(e.EnumDescriptorProto) { - s[len(s)-1] = gogoproto.GetEnumCustomName(e.EnumDescriptorProto) - } - - return -} - -// Everything but the last element of the full type name, CamelCased. -// The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... . -func (e *EnumDescriptor) prefix() string { - typeName := e.alias() - if e.parent == nil { - // If the enum is not part of a message, the prefix is just the type name. - return CamelCase(typeName[len(typeName)-1]) + "_" - } - return CamelCaseSlice(typeName[0:len(typeName)-1]) + "_" -} - -// The integer value of the named constant in this enumerated type. -func (e *EnumDescriptor) integerValueAsString(name string) string { - for _, c := range e.Value { - if c.GetName() == name { - return fmt.Sprint(c.GetNumber()) - } - } - log.Fatal("cannot find value for enum constant") - return "" -} - -// ExtensionDescriptor describes an extension. If it's at top level, its parent will be nil. -// Otherwise it will be the descriptor of the message in which it is defined. -type ExtensionDescriptor struct { - common - *descriptor.FieldDescriptorProto - parent *Descriptor // The containing message, if any. -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (e *ExtensionDescriptor) TypeName() (s []string) { - name := e.GetName() - if e.parent == nil { - // top-level extension - s = make([]string, 1) - } else { - pname := e.parent.TypeName() - s = make([]string, len(pname)+1) - copy(s, pname) - } - s[len(s)-1] = name - return s -} - -// DescName returns the variable name used for the generated descriptor. -func (e *ExtensionDescriptor) DescName() string { - // The full type name. - typeName := e.TypeName() - // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix. - for i, s := range typeName { - typeName[i] = CamelCase(s) - } - return "E_" + strings.Join(typeName, "_") -} - -// ImportedDescriptor describes a type that has been publicly imported from another file. -type ImportedDescriptor struct { - common - o Object -} - -func (id *ImportedDescriptor) TypeName() []string { return id.o.TypeName() } - -// FileDescriptor describes an protocol buffer descriptor file (.proto). -// It includes slices of all the messages and enums defined within it. -// Those slices are constructed by WrapTypes. -type FileDescriptor struct { - *descriptor.FileDescriptorProto - desc []*Descriptor // All the messages defined in this file. - enum []*EnumDescriptor // All the enums defined in this file. - ext []*ExtensionDescriptor // All the top-level extensions defined in this file. - imp []*ImportedDescriptor // All types defined in files publicly imported by this file. - - // Comments, stored as a map of path (comma-separated integers) to the comment. - comments map[string]*descriptor.SourceCodeInfo_Location - - // The full list of symbols that are exported, - // as a map from the exported object to its symbols. - // This is used for supporting public imports. - exported map[Object][]symbol - - index int // The index of this file in the list of files to generate code for - - proto3 bool // whether to generate proto3 code for this file -} - -// PackageName is the package name we'll use in the generated code to refer to this file. -func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) } - -// VarName is the variable name we'll use in the generated code to refer -// to the compressed bytes of this descriptor. It is not exported, so -// it is only valid inside the generated package. -func (d *FileDescriptor) VarName() string { return fmt.Sprintf("fileDescriptor%v", FileName(d)) } - -// goPackageOption interprets the file's go_package option. -// If there is no go_package, it returns ("", "", false). -// If there's a simple name, it returns ("", pkg, true). -// If the option implies an import path, it returns (impPath, pkg, true). -func (d *FileDescriptor) goPackageOption() (impPath, pkg string, ok bool) { - pkg = d.GetOptions().GetGoPackage() - if pkg == "" { - return - } - ok = true - // The presence of a slash implies there's an import path. - slash := strings.LastIndex(pkg, "/") - if slash < 0 { - return - } - impPath, pkg = pkg, pkg[slash+1:] - // A semicolon-delimited suffix overrides the package name. - sc := strings.IndexByte(impPath, ';') - if sc < 0 { - return - } - impPath, pkg = impPath[:sc], impPath[sc+1:] - return -} - -// goPackageName returns the Go package name to use in the -// generated Go file. The result explicit reports whether the name -// came from an option go_package statement. If explicit is false, -// the name was derived from the protocol buffer's package statement -// or the input file name. -func (d *FileDescriptor) goPackageName() (name string, explicit bool) { - // Does the file have a "go_package" option? - if _, pkg, ok := d.goPackageOption(); ok { - return pkg, true - } - - // Does the file have a package clause? - if pkg := d.GetPackage(); pkg != "" { - return pkg, false - } - // Use the file base name. - return baseName(d.GetName()), false -} - -// goFileName returns the output name for the generated Go file. -func (d *FileDescriptor) goFileName() string { - name := *d.Name - if ext := path.Ext(name); ext == ".proto" || ext == ".protodevel" { - name = name[:len(name)-len(ext)] - } - name += ".pb.go" - - // Does the file have a "go_package" option? - // If it does, it may override the filename. - if impPath, _, ok := d.goPackageOption(); ok && impPath != "" { - // Replace the existing dirname with the declared import path. - _, name = path.Split(name) - name = path.Join(impPath, name) - return name - } - - return name -} - -func (d *FileDescriptor) addExport(obj Object, sym symbol) { - d.exported[obj] = append(d.exported[obj], sym) -} - -// symbol is an interface representing an exported Go symbol. -type symbol interface { - // GenerateAlias should generate an appropriate alias - // for the symbol from the named package. - GenerateAlias(g *Generator, pkg string) -} - -type messageSymbol struct { - sym string - hasExtensions, isMessageSet bool - hasOneof bool - getters []getterSymbol -} - -type getterSymbol struct { - name string - typ string - typeName string // canonical name in proto world; empty for proto.Message and similar - genType bool // whether typ contains a generated type (message/group/enum) -} - -func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) { - remoteSym := pkg + "." + ms.sym - - g.P("type ", ms.sym, " ", remoteSym) - g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }") - g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }") - g.P("func (*", ms.sym, ") ProtoMessage() {}") - if ms.hasExtensions { - g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ", - "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }") - if ms.isMessageSet { - g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ", - "{ return (*", remoteSym, ")(m).Marshal() }") - g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ", - "{ return (*", remoteSym, ")(m).Unmarshal(buf) }") - } - } - if ms.hasOneof { - // Oneofs and public imports do not mix well. - // We can make them work okay for the binary format, - // but they're going to break weirdly for text/JSON. - enc := "_" + ms.sym + "_OneofMarshaler" - dec := "_" + ms.sym + "_OneofUnmarshaler" - size := "_" + ms.sym + "_OneofSizer" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - sizeSig := "(msg " + g.Pkg["proto"] + ".Message) int" - g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", ", size, ", nil") - g.P("}") - - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("enc, _, _, _ := m0.XXX_OneofFuncs()") - g.P("return enc(m0, b)") - g.P("}") - - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("_, dec, _, _ := m0.XXX_OneofFuncs()") - g.P("return dec(m0, tag, wire, b)") - g.P("}") - - g.P("func ", size, sizeSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("_, _, size, _ := m0.XXX_OneofFuncs()") - g.P("return size(m0)") - g.P("}") - } - for _, get := range ms.getters { - - if get.typeName != "" { - g.RecordTypeUse(get.typeName) - } - typ := get.typ - val := "(*" + remoteSym + ")(m)." + get.name + "()" - if get.genType { - // typ will be "*pkg.T" (message/group) or "pkg.T" (enum) - // or "map[t]*pkg.T" (map to message/enum). - // The first two of those might have a "[]" prefix if it is repeated. - // Drop any package qualifier since we have hoisted the type into this package. - rep := strings.HasPrefix(typ, "[]") - if rep { - typ = typ[2:] - } - isMap := strings.HasPrefix(typ, "map[") - star := typ[0] == '*' - if !isMap { // map types handled lower down - typ = typ[strings.Index(typ, ".")+1:] - } - if star { - typ = "*" + typ - } - if rep { - // Go does not permit conversion between slice types where both - // element types are named. That means we need to generate a bit - // of code in this situation. - // typ is the element type. - // val is the expression to get the slice from the imported type. - - ctyp := typ // conversion type expression; "Foo" or "(*Foo)" - if star { - ctyp = "(" + typ + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {") - g.In() - g.P("o := ", val) - g.P("if o == nil {") - g.In() - g.P("return nil") - g.Out() - g.P("}") - g.P("s := make([]", typ, ", len(o))") - g.P("for i, x := range o {") - g.In() - g.P("s[i] = ", ctyp, "(x)") - g.Out() - g.P("}") - g.P("return s") - g.Out() - g.P("}") - continue - } - if isMap { - // Split map[keyTyp]valTyp. - bra, ket := strings.Index(typ, "["), strings.Index(typ, "]") - keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:] - // Drop any package qualifier. - // Only the value type may be foreign. - star := valTyp[0] == '*' - valTyp = valTyp[strings.Index(valTyp, ".")+1:] - if star { - valTyp = "*" + valTyp - } - - maptyp := "map[" + keyTyp + "]" + valTyp - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {") - g.P("o := ", val) - g.P("if o == nil { return nil }") - g.P("s := make(", maptyp, ", len(o))") - g.P("for k, v := range o {") - g.P("s[k] = (", valTyp, ")(v)") - g.P("}") - g.P("return s") - g.P("}") - continue - } - // Convert imported type into the forwarding type. - val = "(" + typ + ")(" + val + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }") - } - -} - -type enumSymbol struct { - name string - proto3 bool // Whether this came from a proto3 file. -} - -func (es enumSymbol) GenerateAlias(g *Generator, pkg string) { - s := es.name - g.P("type ", s, " ", pkg, ".", s) - g.P("var ", s, "_name = ", pkg, ".", s, "_name") - g.P("var ", s, "_value = ", pkg, ".", s, "_value") - g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }") - if !es.proto3 { - g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }") - g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }") - } -} - -type constOrVarSymbol struct { - sym string - typ string // either "const" or "var" - cast string // if non-empty, a type cast is required (used for enums) -} - -func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) { - v := pkg + "." + cs.sym - if cs.cast != "" { - v = cs.cast + "(" + v + ")" - } - g.P(cs.typ, " ", cs.sym, " = ", v) -} - -// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects. -type Object interface { - PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness. - TypeName() []string - File() *descriptor.FileDescriptorProto -} - -// Each package name we generate must be unique. The package we're generating -// gets its own name but every other package must have a unique name that does -// not conflict in the code we generate. These names are chosen globally (although -// they don't have to be, it simplifies things to do them globally). -func uniquePackageOf(fd *descriptor.FileDescriptorProto) string { - s, ok := uniquePackageName[fd] - if !ok { - log.Fatal("internal error: no package name defined for " + fd.GetName()) - } - return s -} - -// Generator is the type whose methods generate the output, stored in the associated response structure. -type Generator struct { - *bytes.Buffer - - Request *plugin.CodeGeneratorRequest // The input. - Response *plugin.CodeGeneratorResponse // The output. - - Param map[string]string // Command-line parameters. - PackageImportPath string // Go import path of the package we're generating code for - ImportPrefix string // String to prefix to imported package file names. - ImportMap map[string]string // Mapping from .proto file name to import path - - Pkg map[string]string // The names under which we import support packages - - packageName string // What we're calling ourselves. - allFiles []*FileDescriptor // All files in the tree - allFilesByName map[string]*FileDescriptor // All files by filename. - genFiles []*FileDescriptor // Those files we will generate output for. - file *FileDescriptor // The file we are compiling now. - usedPackages map[string]bool // Names of packages used in current file. - typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. - init []string // Lines to emit in the init function. - indent string - writeOutput bool - - customImports []string - writtenImports map[string]bool // For de-duplicating written imports -} - -// New creates a new generator and allocates the request and response protobufs. -func New() *Generator { - g := new(Generator) - g.Buffer = new(bytes.Buffer) - g.Request = new(plugin.CodeGeneratorRequest) - g.Response = new(plugin.CodeGeneratorResponse) - g.writtenImports = make(map[string]bool) - uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) - pkgNamesInUse = make(map[string][]*FileDescriptor) - return g -} - -// Error reports a problem, including an error, and exits the program. -func (g *Generator) Error(err error, msgs ...string) { - s := strings.Join(msgs, " ") + ":" + err.Error() - log.Print("protoc-gen-gogo: error:", s) - os.Exit(1) -} - -// Fail reports a problem and exits the program. -func (g *Generator) Fail(msgs ...string) { - s := strings.Join(msgs, " ") - log.Print("protoc-gen-gogo: error:", s) - os.Exit(1) -} - -// CommandLineParameters breaks the comma-separated list of key=value pairs -// in the parameter (a member of the request protobuf) into a key/value map. -// It then sets file name mappings defined by those entries. -func (g *Generator) CommandLineParameters(parameter string) { - g.Param = make(map[string]string) - for _, p := range strings.Split(parameter, ",") { - if i := strings.Index(p, "="); i < 0 { - g.Param[p] = "" - } else { - g.Param[p[0:i]] = p[i+1:] - } - } - - g.ImportMap = make(map[string]string) - pluginList := "none" // Default list of plugin names to enable (empty means all). - for k, v := range g.Param { - switch k { - case "import_prefix": - g.ImportPrefix = v - case "import_path": - g.PackageImportPath = v - case "plugins": - pluginList = v - default: - if len(k) > 0 && k[0] == 'M' { - g.ImportMap[k[1:]] = v - } - } - } - - if pluginList == "" { - return - } - if pluginList == "none" { - pluginList = "" - } - gogoPluginNames := []string{"unmarshal", "unsafeunmarshaler", "union", "stringer", "size", "protosizer", "populate", "marshalto", "unsafemarshaler", "gostring", "face", "equal", "enumstringer", "embedcheck", "description", "defaultcheck", "oneofcheck", "compare"} - pluginList = strings.Join(append(gogoPluginNames, pluginList), "+") - if pluginList != "" { - // Amend the set of plugins. - enabled := make(map[string]bool) - for _, name := range strings.Split(pluginList, "+") { - enabled[name] = true - } - var nplugins pluginSlice - for _, p := range plugins { - if enabled[p.Name()] { - nplugins = append(nplugins, p) - } - } - sort.Sort(nplugins) - plugins = nplugins - } -} - -// DefaultPackageName returns the package name printed for the object. -// If its file is in a different package, it returns the package name we're using for this file, plus ".". -// Otherwise it returns the empty string. -func (g *Generator) DefaultPackageName(obj Object) string { - pkg := obj.PackageName() - if pkg == g.packageName { - return "" - } - return pkg + "." -} - -// For each input file, the unique package name to use, underscored. -var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) - -// Package names already registered. Key is the name from the .proto file; -// value is the name that appears in the generated code. -var pkgNamesInUse = make(map[string][]*FileDescriptor) - -// Create and remember a guaranteed unique package name for this file descriptor. -// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and -// has no file descriptor. -func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { - // Convert dots to underscores before finding a unique alias. - pkg = strings.Map(badToUnderscore, pkg) - - var i = -1 - var ptr *FileDescriptor = nil - for i, ptr = range pkgNamesInUse[pkg] { - if ptr == f { - if i == 0 { - return pkg - } - return pkg + strconv.Itoa(i) - } - } - - pkgNamesInUse[pkg] = append(pkgNamesInUse[pkg], f) - i += 1 - - if i > 0 { - pkg = pkg + strconv.Itoa(i) - } - - if f != nil { - uniquePackageName[f.FileDescriptorProto] = pkg - } - return pkg -} - -var isGoKeyword = map[string]bool{ - "break": true, - "case": true, - "chan": true, - "const": true, - "continue": true, - "default": true, - "else": true, - "defer": true, - "fallthrough": true, - "for": true, - "func": true, - "go": true, - "goto": true, - "if": true, - "import": true, - "interface": true, - "map": true, - "package": true, - "range": true, - "return": true, - "select": true, - "struct": true, - "switch": true, - "type": true, - "var": true, -} - -// defaultGoPackage returns the package name to use, -// derived from the import path of the package we're building code for. -func (g *Generator) defaultGoPackage() string { - p := g.PackageImportPath - if i := strings.LastIndex(p, "/"); i >= 0 { - p = p[i+1:] - } - if p == "" { - return "" - } - - p = strings.Map(badToUnderscore, p) - // Identifier must not be keyword: insert _. - if isGoKeyword[p] { - p = "_" + p - } - // Identifier must not begin with digit: insert _. - if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) { - p = "_" + p - } - return p -} - -// SetPackageNames sets the package name for this run. -// The package name must agree across all files being generated. -// It also defines unique package names for all imported files. -func (g *Generator) SetPackageNames() { - // Register the name for this package. It will be the first name - // registered so is guaranteed to be unmodified. - pkg, explicit := g.genFiles[0].goPackageName() - - // Check all files for an explicit go_package option. - for _, f := range g.genFiles { - thisPkg, thisExplicit := f.goPackageName() - if thisExplicit { - if !explicit { - // Let this file's go_package option serve for all input files. - pkg, explicit = thisPkg, true - } else if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } - } - } - - // If we don't have an explicit go_package option but we have an - // import path, use that. - if !explicit { - p := g.defaultGoPackage() - if p != "" { - pkg, explicit = p, true - } - } - - // If there was no go_package and no import path to use, - // double-check that all the inputs have the same implicit - // Go package name. - if !explicit { - for _, f := range g.genFiles { - thisPkg, _ := f.goPackageName() - if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } - } - } - - g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0]) - - // Register the support package names. They might collide with the - // name of a package we import. - g.Pkg = map[string]string{ - "fmt": RegisterUniquePackageName("fmt", nil), - "math": RegisterUniquePackageName("math", nil), - "proto": RegisterUniquePackageName("proto", nil), - } - -AllFiles: - for _, f := range g.allFiles { - for _, genf := range g.genFiles { - if f == genf { - // In this package already. - uniquePackageName[f.FileDescriptorProto] = g.packageName - continue AllFiles - } - } - // The file is a dependency, so we want to ignore its go_package option - // because that is only relevant for its specific generated output. - pkg := f.GetPackage() - if pkg == "" { - pkg = baseName(*f.Name) - } - RegisterUniquePackageName(pkg, f) - } -} - -// WrapTypes walks the incoming data, wrapping DescriptorProtos, EnumDescriptorProtos -// and FileDescriptorProtos into file-referenced objects within the Generator. -// It also creates the list of files to generate and so should be called before GenerateAllFiles. -func (g *Generator) WrapTypes() { - g.allFiles = make([]*FileDescriptor, 0, len(g.Request.ProtoFile)) - g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles)) - for _, f := range g.Request.ProtoFile { - // We must wrap the descriptors before we wrap the enums - descs := wrapDescriptors(f) - g.buildNestedDescriptors(descs) - enums := wrapEnumDescriptors(f, descs) - g.buildNestedEnums(descs, enums) - exts := wrapExtensions(f) - fd := &FileDescriptor{ - FileDescriptorProto: f, - desc: descs, - enum: enums, - ext: exts, - exported: make(map[Object][]symbol), - proto3: fileIsProto3(f), - } - extractComments(fd) - g.allFiles = append(g.allFiles, fd) - g.allFilesByName[f.GetName()] = fd - } - for _, fd := range g.allFiles { - fd.imp = wrapImported(fd.FileDescriptorProto, g) - } - - g.genFiles = make([]*FileDescriptor, 0, len(g.Request.FileToGenerate)) - for _, fileName := range g.Request.FileToGenerate { - fd := g.allFilesByName[fileName] - if fd == nil { - g.Fail("could not find file named", fileName) - } - fd.index = len(g.genFiles) - g.genFiles = append(g.genFiles, fd) - } -} - -// Scan the descriptors in this file. For each one, build the slice of nested descriptors -func (g *Generator) buildNestedDescriptors(descs []*Descriptor) { - for _, desc := range descs { - if len(desc.NestedType) != 0 { - for _, nest := range descs { - if nest.parent == desc { - desc.nested = append(desc.nested, nest) - } - } - if len(desc.nested) != len(desc.NestedType) { - g.Fail("internal error: nesting failure for", desc.GetName()) - } - } - } -} - -func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescriptor) { - for _, desc := range descs { - if len(desc.EnumType) != 0 { - for _, enum := range enums { - if enum.parent == desc { - desc.enums = append(desc.enums, enum) - } - } - if len(desc.enums) != len(desc.EnumType) { - g.Fail("internal error: enum nesting failure for", desc.GetName()) - } - } - } -} - -// Construct the Descriptor -func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor { - d := &Descriptor{ - common: common{file}, - DescriptorProto: desc, - parent: parent, - index: index, - } - if parent == nil { - d.path = fmt.Sprintf("%d,%d", messagePath, index) - } else { - d.path = fmt.Sprintf("%s,%d,%d", parent.path, messageMessagePath, index) - } - - // The only way to distinguish a group from a message is whether - // the containing message has a TYPE_GROUP field that matches. - if parent != nil { - parts := d.TypeName() - if file.Package != nil { - parts = append([]string{*file.Package}, parts...) - } - exp := "." + strings.Join(parts, ".") - for _, field := range parent.Field { - if field.GetType() == descriptor.FieldDescriptorProto_TYPE_GROUP && field.GetTypeName() == exp { - d.group = true - break - } - } - } - - for _, field := range desc.Extension { - d.ext = append(d.ext, &ExtensionDescriptor{common{file}, field, d}) - } - - return d -} - -// Return a slice of all the Descriptors defined within this file -func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor { - sl := make([]*Descriptor, 0, len(file.MessageType)+10) - for i, desc := range file.MessageType { - sl = wrapThisDescriptor(sl, desc, nil, file, i) - } - return sl -} - -// Wrap this Descriptor, recursively -func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor { - sl = append(sl, newDescriptor(desc, parent, file, index)) - me := sl[len(sl)-1] - for i, nested := range desc.NestedType { - sl = wrapThisDescriptor(sl, nested, me, file, i) - } - return sl -} - -// Construct the EnumDescriptor -func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor { - ed := &EnumDescriptor{ - common: common{file}, - EnumDescriptorProto: desc, - parent: parent, - index: index, - } - if parent == nil { - ed.path = fmt.Sprintf("%d,%d", enumPath, index) - } else { - ed.path = fmt.Sprintf("%s,%d,%d", parent.path, messageEnumPath, index) - } - return ed -} - -// Return a slice of all the EnumDescriptors defined within this file -func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor { - sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10) - // Top-level enums. - for i, enum := range file.EnumType { - sl = append(sl, newEnumDescriptor(enum, nil, file, i)) - } - // Enums within messages. Enums within embedded messages appear in the outer-most message. - for _, nested := range descs { - for i, enum := range nested.EnumType { - sl = append(sl, newEnumDescriptor(enum, nested, file, i)) - } - } - return sl -} - -// Return a slice of all the top-level ExtensionDescriptors defined within this file. -func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor { - var sl []*ExtensionDescriptor - for _, field := range file.Extension { - sl = append(sl, &ExtensionDescriptor{common{file}, field, nil}) - } - return sl -} - -// Return a slice of all the types that are publicly imported into this file. -func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) { - for _, index := range file.PublicDependency { - df := g.fileByName(file.Dependency[index]) - for _, d := range df.desc { - if d.GetOptions().GetMapEntry() { - continue - } - sl = append(sl, &ImportedDescriptor{common{file}, d}) - } - for _, e := range df.enum { - sl = append(sl, &ImportedDescriptor{common{file}, e}) - } - for _, ext := range df.ext { - sl = append(sl, &ImportedDescriptor{common{file}, ext}) - } - } - return -} - -func extractComments(file *FileDescriptor) { - file.comments = make(map[string]*descriptor.SourceCodeInfo_Location) - for _, loc := range file.GetSourceCodeInfo().GetLocation() { - if loc.LeadingComments == nil { - continue - } - var p []string - for _, n := range loc.Path { - p = append(p, strconv.Itoa(int(n))) - } - file.comments[strings.Join(p, ",")] = loc - } -} - -// BuildTypeNameMap builds the map from fully qualified type names to objects. -// The key names for the map come from the input data, which puts a period at the beginning. -// It should be called after SetPackageNames and before GenerateAllFiles. -func (g *Generator) BuildTypeNameMap() { - g.typeNameToObject = make(map[string]Object) - for _, f := range g.allFiles { - // The names in this loop are defined by the proto world, not us, so the - // package name may be empty. If so, the dotted package name of X will - // be ".X"; otherwise it will be ".pkg.X". - dottedPkg := "." + f.GetPackage() - if dottedPkg != "." { - dottedPkg += "." - } - for _, enum := range f.enum { - name := dottedPkg + dottedSlice(enum.TypeName()) - g.typeNameToObject[name] = enum - } - for _, desc := range f.desc { - name := dottedPkg + dottedSlice(desc.TypeName()) - g.typeNameToObject[name] = desc - } - } -} - -// ObjectNamed, given a fully-qualified input type name as it appears in the input data, -// returns the descriptor for the message or enum with that name. -func (g *Generator) ObjectNamed(typeName string) Object { - o, ok := g.typeNameToObject[typeName] - if !ok { - g.Fail("can't find object with type", typeName) - } - - // If the file of this object isn't a direct dependency of the current file, - // or in the current file, then this object has been publicly imported into - // a dependency of the current file. - // We should return the ImportedDescriptor object for it instead. - direct := *o.File().Name == *g.file.Name - if !direct { - for _, dep := range g.file.Dependency { - if *g.fileByName(dep).Name == *o.File().Name { - direct = true - break - } - } - } - if !direct { - found := false - Loop: - for _, dep := range g.file.Dependency { - df := g.fileByName(*g.fileByName(dep).Name) - for _, td := range df.imp { - if td.o == o { - // Found it! - o = td - found = true - break Loop - } - } - } - if !found { - log.Printf("protoc-gen-gogo: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name) - } - } - - return o -} - -// P prints the arguments to the generated output. It handles strings and int32s, plus -// handling indirections because they may be *string, etc. -func (g *Generator) P(str ...interface{}) { - if !g.writeOutput { - return - } - g.WriteString(g.indent) - for _, v := range str { - switch s := v.(type) { - case string: - g.WriteString(s) - case *string: - g.WriteString(*s) - case bool: - fmt.Fprintf(g, "%t", s) - case *bool: - fmt.Fprintf(g, "%t", *s) - case int: - fmt.Fprintf(g, "%d", s) - case *int32: - fmt.Fprintf(g, "%d", *s) - case *int64: - fmt.Fprintf(g, "%d", *s) - case float64: - fmt.Fprintf(g, "%g", s) - case *float64: - fmt.Fprintf(g, "%g", *s) - default: - g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) - } - } - g.WriteByte('\n') -} - -// addInitf stores the given statement to be printed inside the file's init function. -// The statement is given as a format specifier and arguments. -func (g *Generator) addInitf(stmt string, a ...interface{}) { - g.init = append(g.init, fmt.Sprintf(stmt, a...)) -} - -func (g *Generator) PrintImport(alias, pkg string) { - statement := "import " + alias + " " + strconv.Quote(pkg) - if g.writtenImports[statement] { - return - } - g.P(statement) - g.writtenImports[statement] = true -} - -// In Indents the output one tab stop. -func (g *Generator) In() { g.indent += "\t" } - -// Out unindents the output one tab stop. -func (g *Generator) Out() { - if len(g.indent) > 0 { - g.indent = g.indent[1:] - } -} - -// GenerateAllFiles generates the output for all the files we're outputting. -func (g *Generator) GenerateAllFiles() { - // Initialize the plugins - for _, p := range plugins { - p.Init(g) - } - // Generate the output. The generator runs for every file, even the files - // that we don't generate output for, so that we can collate the full list - // of exported symbols to support public imports. - genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) - for _, file := range g.genFiles { - genFileMap[file] = true - } - for _, file := range g.allFiles { - g.Reset() - g.writeOutput = genFileMap[file] - g.generate(file) - if !g.writeOutput { - continue - } - g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ - Name: proto.String(file.goFileName()), - Content: proto.String(g.String()), - }) - } -} - -// Run all the plugins associated with the file. -func (g *Generator) runPlugins(file *FileDescriptor) { - for _, p := range plugins { - p.Generate(file) - } -} - -// FileOf return the FileDescriptor for this FileDescriptorProto. -func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor { - for _, file := range g.allFiles { - if file.FileDescriptorProto == fd { - return file - } - } - g.Fail("could not find file in table:", fd.GetName()) - return nil -} - -// Fill the response protocol buffer with the generated output for all the files we're -// supposed to generate. -func (g *Generator) generate(file *FileDescriptor) { - g.customImports = make([]string, 0) - g.file = g.FileOf(file.FileDescriptorProto) - g.usedPackages = make(map[string]bool) - - if g.file.index == 0 { - // For one file in the package, assert version compatibility. - g.P("// This is a compile-time assertion to ensure that this generated file") - g.P("// is compatible with the proto package it is being compiled against.") - g.P("// A compilation error at this line likely means your copy of the") - g.P("// proto package needs to be updated.") - if gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - g.P("const _ = ", g.Pkg["proto"], ".GoGoProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") - } else { - g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") - } - g.P() - } - - // Reset on each file - g.writtenImports = make(map[string]bool) - - for _, td := range g.file.imp { - g.generateImported(td) - } - for _, enum := range g.file.enum { - g.generateEnum(enum) - } - for _, desc := range g.file.desc { - // Don't generate virtual messages for maps. - if desc.GetOptions().GetMapEntry() { - continue - } - g.generateMessage(desc) - } - for _, ext := range g.file.ext { - g.generateExtension(ext) - } - g.generateInitFunction() - - // Run the plugins before the imports so we know which imports are necessary. - g.runPlugins(file) - - g.generateFileDescriptor(file) - - // Generate header and imports last, though they appear first in the output. - rem := g.Buffer - g.Buffer = new(bytes.Buffer) - g.generateHeader() - g.generateImports() - if !g.writeOutput { - return - } - g.Write(rem.Bytes()) - - // Reformat generated code. - fset := token.NewFileSet() - raw := g.Bytes() - ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) - if err != nil { - // Print out the bad code with line numbers. - // This should never happen in practice, but it can while changing generated code, - // so consider this a debugging aid. - var src bytes.Buffer - s := bufio.NewScanner(bytes.NewReader(raw)) - for line := 1; s.Scan(); line++ { - fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes()) - } - if serr := s.Err(); serr != nil { - g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(raw)) - } else { - g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) - } - } - g.Reset() - err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) - if err != nil { - g.Fail("generated Go source code could not be reformatted:", err.Error()) - } -} - -// Generate the header, including package definition -func (g *Generator) generateHeader() { - g.P("// Code generated by protoc-gen-gogo.") - g.P("// source: ", *g.file.Name) - g.P("// DO NOT EDIT!") - g.P() - - name := g.file.PackageName() - - if g.file.index == 0 { - // Generate package docs for the first file in the package. - g.P("/*") - g.P("Package ", name, " is a generated protocol buffer package.") - g.P() - if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { - // not using g.PrintComments because this is a /* */ comment block. - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - line = strings.TrimPrefix(line, " ") - // ensure we don't escape from the block comment - line = strings.Replace(line, "*/", "* /", -1) - g.P(line) - } - g.P() - } - var topMsgs []string - g.P("It is generated from these files:") - for _, f := range g.genFiles { - g.P("\t", f.Name) - for _, msg := range f.desc { - if msg.parent != nil { - continue - } - topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName())) - } - } - g.P() - g.P("It has these top-level messages:") - for _, msg := range topMsgs { - g.P("\t", msg) - } - g.P("*/") - } - - g.P("package ", name) - g.P() -} - -// PrintComments prints any comments from the source .proto file. -// The path is a comma-separated list of integers. -// It returns an indication of whether any comments were printed. -// See descriptor.proto for its format. -func (g *Generator) PrintComments(path string) bool { - if !g.writeOutput { - return false - } - if loc, ok := g.file.comments[path]; ok { - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - g.P("// ", strings.TrimPrefix(line, " ")) - } - return true - } - return false -} - -// Comments returns any comments from the source .proto file and empty string if comments not found. -// The path is a comma-separated list of intergers. -// See descriptor.proto for its format. -func (g *Generator) Comments(path string) string { - loc, ok := g.file.comments[path] - if !ok { - return "" - } - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - return text -} - -func (g *Generator) fileByName(filename string) *FileDescriptor { - return g.allFilesByName[filename] -} - -// weak returns whether the ith import of the current file is a weak import. -func (g *Generator) weak(i int32) bool { - for _, j := range g.file.WeakDependency { - if j == i { - return true - } - } - return false -} - -// Generate the imports -func (g *Generator) generateImports() { - // We almost always need a proto import. Rather than computing when we - // do, which is tricky when there's a plugin, just import it and - // reference it later. The same argument applies to the fmt and math packages. - if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) { - g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/gogo/protobuf/proto") - } else { - g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/golang/protobuf/proto") - } - g.PrintImport(g.Pkg["fmt"], "fmt") - g.PrintImport(g.Pkg["math"], "math") - - for i, s := range g.file.Dependency { - fd := g.fileByName(s) - // Do not import our own package. - if fd.PackageName() == g.packageName { - continue - } - filename := fd.goFileName() - // By default, import path is the dirname of the Go filename. - importPath := path.Dir(filename) - if substitution, ok := g.ImportMap[s]; ok { - importPath = substitution - } - importPath = g.ImportPrefix + importPath - // Skip weak imports. - if g.weak(int32(i)) { - g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath)) - continue - } - // We need to import all the dependencies, even if we don't reference them, - // because other code and tools depend on having the full transitive closure - // of protocol buffer types in the binary. - if _, ok := g.usedPackages[fd.PackageName()]; ok { - g.PrintImport(fd.PackageName(), importPath) - } else { - g.P("import _ ", strconv.Quote(importPath)) - } - } - g.P() - for _, s := range g.customImports { - s1 := strings.Map(badToUnderscore, s) - g.PrintImport(s1, s) - } - g.P() - // TODO: may need to worry about uniqueness across plugins - for _, p := range plugins { - p.GenerateImports(g.file) - g.P() - } - g.P("// Reference imports to suppress errors if they are not otherwise used.") - g.P("var _ = ", g.Pkg["proto"], ".Marshal") - g.P("var _ = ", g.Pkg["fmt"], ".Errorf") - g.P("var _ = ", g.Pkg["math"], ".Inf") - g.P() -} - -func (g *Generator) generateImported(id *ImportedDescriptor) { - // Don't generate public import symbols for files that we are generating - // code for, since those symbols will already be in this package. - // We can't simply avoid creating the ImportedDescriptor objects, - // because g.genFiles isn't populated at that stage. - tn := id.TypeName() - sn := tn[len(tn)-1] - df := g.FileOf(id.o.File()) - filename := *df.Name - for _, fd := range g.genFiles { - if *fd.Name == filename { - g.P("// Ignoring public import of ", sn, " from ", filename) - g.P() - return - } - } - g.P("// ", sn, " from public import ", filename) - g.usedPackages[df.PackageName()] = true - - for _, sym := range df.exported[id.o] { - sym.GenerateAlias(g, df.PackageName()) - } - - g.P() -} - -// Generate the enum definitions for this EnumDescriptor. -func (g *Generator) generateEnum(enum *EnumDescriptor) { - // The full type name - typeName := enum.alias() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - ccPrefix := enum.prefix() - - g.PrintComments(enum.path) - if !gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { - ccPrefix = "" - } - g.P("type ", ccTypeName, " int32") - g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) - g.P("const (") - g.In() - for i, e := range enum.Value { - g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)) - name := *e.Name - if gogoproto.IsEnumValueCustomName(e) { - name = gogoproto.GetEnumValueCustomName(e) - } - name = ccPrefix + name - - g.P(name, " ", ccTypeName, " = ", e.Number) - g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) - } - g.Out() - g.P(")") - g.P("var ", ccTypeName, "_name = map[int32]string{") - g.In() - generated := make(map[int32]bool) // avoid duplicate values - for _, e := range enum.Value { - duplicate := "" - if _, present := generated[*e.Number]; present { - duplicate = "// Duplicate value: " - } - g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",") - generated[*e.Number] = true - } - g.Out() - g.P("}") - g.P("var ", ccTypeName, "_value = map[string]int32{") - g.In() - for _, e := range enum.Value { - g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") - } - g.Out() - g.P("}") - - if !enum.proto3() { - g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") - g.In() - g.P("p := new(", ccTypeName, ")") - g.P("*p = x") - g.P("return p") - g.Out() - g.P("}") - } - - if gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { - g.P("func (x ", ccTypeName, ") String() string {") - g.In() - g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") - g.Out() - g.P("}") - } - - if !enum.proto3() && !gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { - g.P("func (x ", ccTypeName, ") MarshalJSON() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalJSONEnum(", ccTypeName, "_name, int32(x))") - g.Out() - g.P("}") - } - if !enum.proto3() { - g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") - g.In() - g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`) - g.P("if err != nil {") - g.In() - g.P("return err") - g.Out() - g.P("}") - g.P("*x = ", ccTypeName, "(value)") - g.P("return nil") - g.Out() - g.P("}") - } - - var indexes []string - for m := enum.parent; m != nil; m = m.parent { - // XXX: skip groups? - indexes = append([]string{strconv.Itoa(m.index)}, indexes...) - } - indexes = append(indexes, strconv.Itoa(enum.index)) - g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") - - g.P() -} - -// The tag is a string like "varint,2,opt,name=fieldname,def=7" that -// identifies details of the field for the protocol buffer marshaling and unmarshaling -// code. The fields are: -// wire encoding -// protocol tag number -// opt,req,rep for optional, required, or repeated -// packed whether the encoding is "packed" (optional; repeated primitives only) -// name= the original declared name -// enum= the name of the enum type if it is an enum-typed field. -// proto3 if this field is in a proto3 message -// def= string representation of the default value, if any. -// The default value must be in a representation that can be used at run-time -// to generate the default value. Thus bools become 0 and 1, for instance. -func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string { - optrepreq := "" - switch { - case isOptional(field): - optrepreq = "opt" - case isRequired(field): - optrepreq = "req" - case isRepeated(field): - optrepreq = "rep" - } - var defaultValue string - if dv := field.DefaultValue; dv != nil { // set means an explicit default - defaultValue = *dv - // Some types need tweaking. - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - if defaultValue == "true" { - defaultValue = "1" - } else { - defaultValue = "0" - } - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - // Nothing to do. Quoting is done for the whole tag. - case descriptor.FieldDescriptorProto_TYPE_ENUM: - // For enums we need to provide the integer constant. - obj := g.ObjectNamed(field.GetTypeName()) - if id, ok := obj.(*ImportedDescriptor); ok { - // It is an enum that was publicly imported. - // We need the underlying type. - obj = id.o - } - enum, ok := obj.(*EnumDescriptor) - if !ok { - log.Printf("obj is a %T", obj) - if id, ok := obj.(*ImportedDescriptor); ok { - log.Printf("id.o is a %T", id.o) - } - g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName())) - } - defaultValue = enum.integerValueAsString(defaultValue) - } - defaultValue = ",def=" + defaultValue - } - enum := "" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM { - // We avoid using obj.PackageName(), because we want to use the - // original (proto-world) package name. - obj := g.ObjectNamed(field.GetTypeName()) - if id, ok := obj.(*ImportedDescriptor); ok { - obj = id.o - } - enum = ",enum=" - if pkg := obj.File().GetPackage(); pkg != "" { - enum += pkg + "." - } - enum += CamelCaseSlice(obj.TypeName()) - } - packed := "" - if field.Options != nil && field.Options.GetPacked() { - packed = ",packed" - } - fieldName := field.GetName() - name := fieldName - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - // We must use the type name for groups instead of - // the field name to preserve capitalization. - // type_name in FieldDescriptorProto is fully-qualified, - // but we only want the local part. - name = *field.TypeName - if i := strings.LastIndex(name, "."); i >= 0 { - name = name[i+1:] - } - } - if json := field.GetJsonName(); json != "" && json != name { - // TODO: escaping might be needed, in which case - // perhaps this should be in its own "json" tag. - name += ",json=" + json - } - name = ",name=" + name - - embed := "" - if gogoproto.IsEmbed(field) { - embed = ",embedded=" + fieldName - } - - ctype := "" - if gogoproto.IsCustomType(field) { - ctype = ",customtype=" + gogoproto.GetCustomType(field) - } - - casttype := "" - if gogoproto.IsCastType(field) { - casttype = ",casttype=" + gogoproto.GetCastType(field) - } - - castkey := "" - if gogoproto.IsCastKey(field) { - castkey = ",castkey=" + gogoproto.GetCastKey(field) - } - - castvalue := "" - if gogoproto.IsCastValue(field) { - castvalue = ",castvalue=" + gogoproto.GetCastValue(field) - // record the original message type for jsonpb reconstruction - desc := g.ObjectNamed(field.GetTypeName()) - if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { - valueField := d.Field[1] - if valueField.IsMessage() { - castvalue += ",castvaluetype=" + strings.TrimPrefix(valueField.GetTypeName(), ".") - } - } - } - - if message.proto3() { - // We only need the extra tag for []byte fields; - // no need to add noise for the others. - if *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && - *field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP && - !field.IsRepeated() { - name += ",proto3" - } - } - oneof := "" - if field.OneofIndex != nil { - oneof = ",oneof" - } - return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s%s%s%s%s%s", - wiretype, - field.GetNumber(), - optrepreq, - packed, - name, - enum, - oneof, - defaultValue, - embed, - ctype, - casttype, - castkey, - castvalue)) -} - -func needsStar(field *descriptor.FieldDescriptorProto, proto3 bool, allowOneOf bool) bool { - if isRepeated(field) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { - return false - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && !gogoproto.IsCustomType(field) { - return false - } - if !gogoproto.IsNullable(field) { - return false - } - if field.OneofIndex != nil && allowOneOf && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { - return false - } - if proto3 && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) && - !gogoproto.IsCustomType(field) { - return false - } - return true -} - -// TypeName is the printed name appropriate for an item. If the object is in the current file, -// TypeName drops the package name and underscores the rest. -// Otherwise the object is from another package; and the result is the underscored -// package name followed by the item name. -// The result always has an initial capital. -func (g *Generator) TypeName(obj Object) string { - return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName()) -} - -// TypeNameWithPackage is like TypeName, but always includes the package -// name even if the object is in our own package. -func (g *Generator) TypeNameWithPackage(obj Object) string { - return obj.PackageName() + CamelCaseSlice(obj.TypeName()) -} - -// GoType returns a string representing the type name, and the wire type -func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) { - // TODO: Options. - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - typ, wire = "float64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - typ, wire = "float32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_INT64: - typ, wire = "int64", "varint" - case descriptor.FieldDescriptorProto_TYPE_UINT64: - typ, wire = "uint64", "varint" - case descriptor.FieldDescriptorProto_TYPE_INT32: - typ, wire = "int32", "varint" - case descriptor.FieldDescriptorProto_TYPE_UINT32: - typ, wire = "uint32", "varint" - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - typ, wire = "uint64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - typ, wire = "uint32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - typ, wire = "bool", "varint" - case descriptor.FieldDescriptorProto_TYPE_STRING: - typ, wire = "string", "bytes" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = g.TypeName(desc), "group" - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = g.TypeName(desc), "bytes" - case descriptor.FieldDescriptorProto_TYPE_BYTES: - typ, wire = "[]byte", "bytes" - case descriptor.FieldDescriptorProto_TYPE_ENUM: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = g.TypeName(desc), "varint" - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - typ, wire = "int32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - typ, wire = "int64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - typ, wire = "int32", "zigzag32" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - typ, wire = "int64", "zigzag64" - default: - g.Fail("unknown type for", field.GetName()) - } - switch { - case gogoproto.IsCustomType(field) && gogoproto.IsCastType(field): - g.Fail(field.GetName() + " cannot be custom type and cast type") - case gogoproto.IsCustomType(field): - var packageName string - var err error - packageName, typ, err = getCustomType(field) - if err != nil { - g.Fail(err.Error()) - } - if len(packageName) > 0 { - g.customImports = append(g.customImports, packageName) - } - case gogoproto.IsCastType(field): - var packageName string - var err error - packageName, typ, err = getCastType(field) - if err != nil { - g.Fail(err.Error()) - } - if len(packageName) > 0 { - g.customImports = append(g.customImports, packageName) - } - } - if needsStar(field, g.file.proto3, message != nil && message.allowOneof()) { - typ = "*" + typ - } - if isRepeated(field) { - typ = "[]" + typ - } - return -} - -// GoMapDescriptor is a full description of the map output struct. -type GoMapDescriptor struct { - GoType string - - KeyField *descriptor.FieldDescriptorProto - KeyAliasField *descriptor.FieldDescriptorProto - KeyTag string - - ValueField *descriptor.FieldDescriptorProto - ValueAliasField *descriptor.FieldDescriptorProto - ValueTag string -} - -func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorProto) *GoMapDescriptor { - if d == nil { - byName := g.ObjectNamed(field.GetTypeName()) - desc, ok := byName.(*Descriptor) - if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { - g.Fail(fmt.Sprintf("field %s is not a map", field.GetTypeName())) - return nil - } - d = desc - } - - m := &GoMapDescriptor{ - KeyField: d.Field[0], - ValueField: d.Field[1], - } - - // Figure out the Go types and tags for the key and value types. - m.KeyAliasField, m.ValueAliasField = g.GetMapKeyField(field, m.KeyField), g.GetMapValueField(field, m.ValueField) - keyType, keyWire := g.GoType(d, m.KeyAliasField) - valType, valWire := g.GoType(d, m.ValueAliasField) - - m.KeyTag, m.ValueTag = g.goTag(d, m.KeyField, keyWire), g.goTag(d, m.ValueField, valWire) - - if gogoproto.IsCastType(field) { - var packageName string - var err error - packageName, typ, err := getCastType(field) - if err != nil { - g.Fail(err.Error()) - } - if len(packageName) > 0 { - g.customImports = append(g.customImports, packageName) - } - m.GoType = typ - return m - } - - // We don't use stars, except for message-typed values. - // Message and enum types are the only two possibly foreign types used in maps, - // so record their use. They are not permitted as map keys. - keyType = strings.TrimPrefix(keyType, "*") - switch *m.ValueAliasField.Type { - case descriptor.FieldDescriptorProto_TYPE_ENUM: - valType = strings.TrimPrefix(valType, "*") - g.RecordTypeUse(m.ValueAliasField.GetTypeName()) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if !gogoproto.IsNullable(m.ValueAliasField) { - valType = strings.TrimPrefix(valType, "*") - } - g.RecordTypeUse(m.ValueAliasField.GetTypeName()) - default: - valType = strings.TrimPrefix(valType, "*") - } - - m.GoType = fmt.Sprintf("map[%s]%s", keyType, valType) - return m -} - -func (g *Generator) RecordTypeUse(t string) { - if obj, ok := g.typeNameToObject[t]; ok { - // Call ObjectNamed to get the true object to record the use. - obj = g.ObjectNamed(t) - g.usedPackages[obj.PackageName()] = true - } -} - -// Method names that may be generated. Fields with these names get an -// underscore appended. Any change to this set is a potential incompatible -// API change because it changes generated field names. -var methodNames = [...]string{ - "Reset", - "String", - "ProtoMessage", - "Marshal", - "Unmarshal", - "ExtensionRangeArray", - "ExtensionMap", - "Descriptor", - "MarshalTo", - "Equal", - "VerboseEqual", - "GoString", - "ProtoSize", -} - -// Generate the type and default constant definitions for this Descriptor. -func (g *Generator) generateMessage(message *Descriptor) { - // The full type name - typeName := message.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - - usedNames := make(map[string]bool) - for _, n := range methodNames { - usedNames[n] = true - } - if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { - usedNames["Size"] = true - } - fieldNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - - oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto - oneofDisc := make(map[int32]string) // name of discriminator method - oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star - oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer - - g.PrintComments(message.path) - g.P("type ", ccTypeName, " struct {") - g.In() - - // allocNames finds a conflict-free variation of the given strings, - // consistently mutating their suffixes. - // It returns the same number of strings. - allocNames := func(ns ...string) []string { - Loop: - for { - for _, n := range ns { - if usedNames[n] { - for i := range ns { - ns[i] += "_" - } - continue Loop - } - } - for _, n := range ns { - usedNames[n] = true - } - return ns - } - } - - for i, field := range message.Field { - // Allocate the getter and the field at the same time so name - // collisions create field/method consistent names. - // TODO: This allocation occurs based on the order of the fields - // in the proto file, meaning that a change in the field - // ordering can change generated Method/Field names. - base := CamelCase(*field.Name) - if gogoproto.IsCustomName(field) { - base = gogoproto.GetCustomName(field) - } - ns := allocNames(base, "Get"+base) - fieldName, fieldGetterName := ns[0], ns[1] - typename, wiretype := g.GoType(message, field) - jsonName := *field.Name - jsonTag := jsonName + ",omitempty" - repeatedNativeType := (!field.IsMessage() && !gogoproto.IsCustomType(field) && field.IsRepeated()) - if !gogoproto.IsNullable(field) && !repeatedNativeType { - jsonTag = jsonName - } - gogoJsonTag := gogoproto.GetJsonTag(field) - if gogoJsonTag != nil { - jsonTag = *gogoJsonTag - } - gogoMoreTags := gogoproto.GetMoreTags(field) - moreTags := "" - if gogoMoreTags != nil { - moreTags = " " + *gogoMoreTags - } - tag := fmt.Sprintf("protobuf:%s json:%q%s", g.goTag(message, field, wiretype), jsonTag, moreTags) - fieldNames[field] = fieldName - fieldGetterNames[field] = fieldGetterName - if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE && gogoproto.IsEmbed(field) { - fieldName = "" - } - - oneof := field.OneofIndex != nil && message.allowOneof() - if oneof && oneofFieldName[*field.OneofIndex] == "" { - odp := message.OneofDecl[int(*field.OneofIndex)] - fname := allocNames(CamelCase(odp.GetName()))[0] - - // This is the first field of a oneof we haven't seen before. - // Generate the union field. - com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)) - if com { - g.P("//") - } - g.P("// Types that are valid to be assigned to ", fname, ":") - // Generate the rest of this comment later, - // when we've computed any disambiguation. - oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len() - - dname := "is" + ccTypeName + "_" + fname - oneofFieldName[*field.OneofIndex] = fname - oneofDisc[*field.OneofIndex] = dname - otag := `protobuf_oneof:"` + odp.GetName() + `"` - g.P(fname, " ", dname, " `", otag, "`") - } - - if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { - desc := g.ObjectNamed(field.GetTypeName()) - if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { - m := g.GoMapType(d, field) - typename = m.GoType - mapFieldTypes[field] = typename // record for the getter generation - - tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", m.KeyTag, m.ValueTag) - } - } - - fieldTypes[field] = typename - - if oneof { - tname := ccTypeName + "_" + fieldName - // It is possible for this to collide with a message or enum - // nested in this message. Check for collisions. - for { - ok := true - for _, desc := range message.nested { - if CamelCaseSlice(desc.TypeName()) == tname { - ok = false - break - } - } - for _, enum := range message.enums { - if CamelCaseSlice(enum.TypeName()) == tname { - ok = false - break - } - } - if !ok { - tname += "_" - continue - } - break - } - - oneofTypeName[field] = tname - continue - } - - g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)) - g.P(fieldName, "\t", typename, "\t`", tag, "`") - g.RecordTypeUse(field.GetTypeName()) - } - if len(message.ExtensionRange) > 0 { - if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(g.Pkg["proto"], ".XXX_InternalExtensions `json:\"-\"`") - } else { - g.P("XXX_extensions\t\t[]byte `protobuf:\"bytes,0,opt\" json:\"-\"`") - } - } - if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, message.DescriptorProto) && !message.proto3() { - g.P("XXX_unrecognized\t[]byte `json:\"-\"`") - } - g.Out() - g.P("}") - - // Update g.Buffer to list valid oneof types. - // We do this down here, after we've disambiguated the oneof type names. - // We go in reverse order of insertion point to avoid invalidating offsets. - for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- { - ip := oneofInsertPoints[oi] - all := g.Buffer.Bytes() - rem := all[ip:] - g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem - for _, field := range message.Field { - if field.OneofIndex == nil || *field.OneofIndex != oi { - continue - } - g.P("//\t*", oneofTypeName[field]) - } - g.Buffer.Write(rem) - } - - // Reset, String and ProtoMessage methods. - g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }") - if gogoproto.EnabledGoStringer(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") - } - g.P("func (*", ccTypeName, ") ProtoMessage() {}") - var indexes []string - for m := message; m != nil; m = m.parent { - indexes = append([]string{strconv.Itoa(m.index)}, indexes...) - } - g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") - - // Extension support methods - var hasExtensions, isMessageSet bool - if len(message.ExtensionRange) > 0 { - hasExtensions = true - // message_set_wire_format only makes sense when extensions are defined. - if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { - isMessageSet = true - g.P() - g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(&m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler") - g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)") - g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)") - } - - g.P() - g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{") - g.In() - for _, r := range message.ExtensionRange { - end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends - g.P("{", r.Start, ", ", end, "},") - } - g.Out() - g.P("}") - g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") - g.In() - g.P("return extRange_", ccTypeName) - g.Out() - g.P("}") - if !gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P("func (m *", ccTypeName, ") GetExtensions() *[]byte {") - g.In() - g.P("if m.XXX_extensions == nil {") - g.In() - g.P("m.XXX_extensions = make([]byte, 0)") - g.Out() - g.P("}") - g.P("return &m.XXX_extensions") - g.Out() - g.P("}") - } - } - - // Default constants - defNames := make(map[*descriptor.FieldDescriptorProto]string) - for _, field := range message.Field { - def := field.GetDefaultValue() - if def == "" { - continue - } - if !gogoproto.IsNullable(field) { - g.Fail("illegal default value: ", field.GetName(), " in ", message.GetName(), " is not nullable and is thus not allowed to have a default value") - } - fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name) - defNames[field] = fieldname - typename, _ := g.GoType(message, field) - if typename[0] == '*' { - typename = typename[1:] - } - kind := "const " - switch { - case typename == "bool": - case typename == "string": - def = strconv.Quote(def) - case typename == "[]byte": - def = "[]byte(" + strconv.Quote(def) + ")" - kind = "var " - case def == "inf", def == "-inf", def == "nan": - // These names are known to, and defined by, the protocol language. - switch def { - case "inf": - def = "math.Inf(1)" - case "-inf": - def = "math.Inf(-1)" - case "nan": - def = "math.NaN()" - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT { - def = "float32(" + def + ")" - } - kind = "var " - case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM: - // Must be an enum. Need to construct the prefixed name. - obj := g.ObjectNamed(field.GetTypeName()) - var enum *EnumDescriptor - if id, ok := obj.(*ImportedDescriptor); ok { - // The enum type has been publicly imported. - enum, _ = id.o.(*EnumDescriptor) - } else { - enum, _ = obj.(*EnumDescriptor) - } - if enum == nil { - log.Printf("don't know how to generate constant for %s", fieldname) - continue - } - - // hunt down the actual enum corresponding to the default - var enumValue *descriptor.EnumValueDescriptorProto - for _, ev := range enum.Value { - if def == ev.GetName() { - enumValue = ev - } - } - - if enumValue != nil { - if gogoproto.IsEnumValueCustomName(enumValue) { - def = gogoproto.GetEnumValueCustomName(enumValue) - } - } else { - g.Fail(fmt.Sprintf("could not resolve default enum value for %v.%v", - g.DefaultPackageName(obj), def)) - - } - - if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { - def = g.DefaultPackageName(obj) + enum.prefix() + def - } else { - def = g.DefaultPackageName(obj) + def - } - } - g.P(kind, fieldname, " ", typename, " = ", def) - g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""}) - } - g.P() - - // Oneof per-field types, discriminants and getters. - if message.allowOneof() { - // Generate unexported named types for the discriminant interfaces. - // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug - // that was triggered by using anonymous interfaces here. - // TODO: Revisit this and consider reverting back to anonymous interfaces. - for oi := range message.OneofDecl { - dname := oneofDisc[int32(oi)] - g.P("type ", dname, " interface {") - g.In() - g.P(dname, "()") - if gogoproto.HasEqual(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`Equal(interface{}) bool`) - } - if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`VerboseEqual(interface{}) error`) - } - if gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || - gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`MarshalTo([]byte) (int, error)`) - } - if gogoproto.IsSizer(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`Size() int`) - } - if gogoproto.IsProtoSizer(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`ProtoSize() int`) - } - g.Out() - g.P("}") - } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - _, wiretype := g.GoType(message, field) - tag := "protobuf:" + g.goTag(message, field, wiretype) - g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }") - g.RecordTypeUse(field.GetTypeName()) - } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") - } - g.P() - for oi := range message.OneofDecl { - fname := oneofFieldName[int32(oi)] - g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {") - g.P("if m != nil { return m.", fname, " }") - g.P("return nil") - g.P("}") - } - g.P() - } - - // Field getters - var getters []getterSymbol - for _, field := range message.Field { - oneof := field.OneofIndex != nil && message.allowOneof() - if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsEmbed(field) || gogoproto.IsCustomType(field) { - continue - } - fname := fieldNames[field] - typename, _ := g.GoType(message, field) - if t, ok := mapFieldTypes[field]; ok { - typename = t - } - mname := fieldGetterNames[field] - star := "" - if (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && - (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) && - needsStar(field, g.file.proto3, message != nil && message.allowOneof()) && typename[0] == '*' { - typename = typename[1:] - star = "*" - } - - // In proto3, only generate getters for message fields and oneof fields. - if message.proto3() && *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && !oneof { - continue - } - - // Only export getter symbols for basic types, - // and for messages and enums in the same package. - // Groups are not exported. - // Foreign types can't be hoisted through a public import because - // the importer may not already be importing the defining .proto. - // As an example, imagine we have an import tree like this: - // A.proto -> B.proto -> C.proto - // If A publicly imports B, we need to generate the getters from B in A's output, - // but if one such getter returns something from C then we cannot do that - // because A is not importing C already. - var getter, genType bool - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_GROUP: - getter = false - case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM: - // Only export getter if its return type is in this package. - getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName() - genType = true - default: - getter = true - } - if getter { - getters = append(getters, getterSymbol{ - name: mname, - typ: typename, - typeName: field.GetTypeName(), - genType: genType, - }) - } - - g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {") - g.In() - def, hasDef := defNames[field] - typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BYTES: - typeDefaultIsNil = !hasDef - case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: - typeDefaultIsNil = gogoproto.IsNullable(field) - } - if isRepeated(field) { - typeDefaultIsNil = true - } - if typeDefaultIsNil && !oneof { - // A bytes field with no explicit default needs less generated code, - // as does a message or group field, or a repeated field. - g.P("if m != nil {") - g.In() - g.P("return m." + fname) - g.Out() - g.P("}") - g.P("return nil") - g.Out() - g.P("}") - g.P() - continue - } - if !gogoproto.IsNullable(field) { - g.P("if m != nil {") - g.In() - g.P("return m." + fname) - g.Out() - g.P("}") - } else if !oneof { - g.P("if m != nil && m." + fname + " != nil {") - g.In() - g.P("return " + star + "m." + fname) - g.Out() - g.P("}") - } else { - uname := oneofFieldName[*field.OneofIndex] - tname := oneofTypeName[field] - g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {") - g.P("return x.", fname) - g.P("}") - } - if hasDef { - if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { - g.P("return " + def) - } else { - // The default is a []byte var. - // Make a copy when returning it to be safe. - g.P("return append([]byte(nil), ", def, "...)") - } - } else { - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if field.OneofIndex != nil { - g.P(`return nil`) - } else { - goTyp, _ := g.GoType(message, field) - goTypName := GoTypeToName(goTyp) - g.P("return ", goTypName, "{}") - } - case descriptor.FieldDescriptorProto_TYPE_BOOL: - g.P("return false") - case descriptor.FieldDescriptorProto_TYPE_STRING: - g.P(`return ""`) - case descriptor.FieldDescriptorProto_TYPE_BYTES: - // This is only possible for oneof fields. - g.P("return nil") - case descriptor.FieldDescriptorProto_TYPE_ENUM: - // The default default for an enum is the first value in the enum, - // not zero. - obj := g.ObjectNamed(field.GetTypeName()) - var enum *EnumDescriptor - if id, ok := obj.(*ImportedDescriptor); ok { - // The enum type has been publicly imported. - enum, _ = id.o.(*EnumDescriptor) - } else { - enum, _ = obj.(*EnumDescriptor) - } - if enum == nil { - log.Printf("don't know how to generate getter for %s", field.GetName()) - continue - } - if len(enum.Value) == 0 { - g.P("return 0 // empty enum") - } else { - first := enum.Value[0].GetName() - if gogoproto.IsEnumValueCustomName(enum.Value[0]) { - first = gogoproto.GetEnumValueCustomName(enum.Value[0]) - } - - if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { - g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first) - } else { - g.P("return ", g.DefaultPackageName(obj)+first) - } - } - default: - g.P("return 0") - } - } - g.Out() - g.P("}") - g.P() - } - - if !message.group { - ms := &messageSymbol{ - sym: ccTypeName, - hasExtensions: hasExtensions, - isMessageSet: isMessageSet, - hasOneof: len(message.OneofDecl) > 0, - getters: getters, - } - g.file.addExport(message, ms) - } - - // Oneof functions - if len(message.OneofDecl) > 0 && message.allowOneof() { - fieldWire := make(map[*descriptor.FieldDescriptorProto]string) - - // method - enc := "_" + ccTypeName + "_OneofMarshaler" - dec := "_" + ccTypeName + "_OneofUnmarshaler" - size := "_" + ccTypeName + "_OneofSizer" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" - - g.P("// XXX_OneofFuncs is for the internal use of the proto package.") - g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("(*", oneofTypeName[field], ")(nil),") - } - g.P("}") - g.P("}") - g.P() - - // marshaler - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - for oi, odp := range message.OneofDecl { - g.P("// ", odp.GetName()) - fname := oneofFieldName[int32(oi)] - g.P("switch x := m.", fname, ".(type) {") - for _, field := range message.Field { - if field.OneofIndex == nil || int(*field.OneofIndex) != oi { - continue - } - g.P("case *", oneofTypeName[field], ":") - var wire, pre, post string - val := "x." + fieldNames[field] // overridden for TYPE_BOOL - canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - wire = "WireFixed64" - pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" - post = "))" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - wire = "WireFixed32" - pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" - post = ")))" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - wire = "WireFixed64" - pre, post = "b.EncodeFixed64(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - wire = "WireFixed32" - pre, post = "b.EncodeFixed32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - // bool needs special handling. - g.P("t := uint64(0)") - g.P("if ", val, " { t = 1 }") - val = "t" - wire = "WireVarint" - pre, post = "b.EncodeVarint(", ")" - case descriptor.FieldDescriptorProto_TYPE_STRING: - wire = "WireBytes" - pre, post = "b.EncodeStringBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - wire = "WireStartGroup" - pre, post = "b.Marshal(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - wire = "WireBytes" - pre, post = "b.EncodeMessage(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_BYTES: - wire = "WireBytes" - pre, post = "b.EncodeRawBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - wire = "WireVarint" - pre, post = "b.EncodeZigzag32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - wire = "WireVarint" - pre, post = "b.EncodeZigzag64(uint64(", "))" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - fieldWire[field] = wire - g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") - if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) { - g.P(`data, err := `, val, `.Marshal()`) - g.P(`if err != nil {`) - g.In() - g.P(`return err`) - g.Out() - g.P(`}`) - val = "data" - } - if !canFail { - g.P("_ = ", pre, val, post) - } else { - g.P("if err := ", pre, val, post, "; err != nil {") - g.In() - g.P("return err") - g.Out() - g.P("}") - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") - } - } - g.P("case nil:") - g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`) - g.P("}") - } - g.P("return nil") - g.P("}") - g.P() - - // unmarshaler - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - g.P("switch tag {") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - odp := message.OneofDecl[int(*field.OneofIndex)] - g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name) - g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {") - g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") - g.P("}") - lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP - var dec, cast, cast2 string - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" - case descriptor.FieldDescriptorProto_TYPE_INT64: - dec, cast = "b.DecodeVarint()", "int64" - case descriptor.FieldDescriptorProto_TYPE_UINT64: - dec = "b.DecodeVarint()" - case descriptor.FieldDescriptorProto_TYPE_INT32: - dec, cast = "b.DecodeVarint()", "int32" - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - dec = "b.DecodeFixed64()" - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - dec, cast = "b.DecodeFixed32()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - dec = "b.DecodeVarint()" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_STRING: - dec = "b.DecodeStringBytes()" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeGroup(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeMessage(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_BYTES: - dec = "b.DecodeRawBytes(true)" - case descriptor.FieldDescriptorProto_TYPE_UINT32: - dec, cast = "b.DecodeVarint()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_ENUM: - dec, cast = "b.DecodeVarint()", fieldTypes[field] - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - dec, cast = "b.DecodeFixed32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - dec, cast = "b.DecodeFixed64()", "int64" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - dec, cast = "b.DecodeZigzag32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - dec, cast = "b.DecodeZigzag64()", "int64" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - g.P(lhs, " := ", dec) - val := "x" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) { - g.P(`if err != nil {`) - g.In() - g.P(`return true, err`) - g.Out() - g.P(`}`) - _, ctyp, err := GetCustomType(field) - if err != nil { - panic(err) - } - g.P(`var cc `, ctyp) - g.P(`c := &cc`) - g.P(`err = c.Unmarshal(`, val, `)`) - val = "*c" - } - if cast != "" { - val = cast + "(" + val + ")" - } - if cast2 != "" { - val = cast2 + "(" + val + ")" - } - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - val += " != 0" - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE: - val = "msg" - } - if gogoproto.IsCastType(field) { - _, typ, err := getCastType(field) - if err != nil { - g.Fail(err.Error()) - } - val = typ + "(" + val + ")" - } - g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}") - g.P("return true, err") - } - g.P("default: return false, nil") - g.P("}") - g.P("}") - g.P() - - // sizer - g.P("func ", size, sizeSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - for oi, odp := range message.OneofDecl { - g.P("// ", odp.GetName()) - fname := oneofFieldName[int32(oi)] - g.P("switch x := m.", fname, ".(type) {") - for _, field := range message.Field { - if field.OneofIndex == nil || int(*field.OneofIndex) != oi { - continue - } - g.P("case *", oneofTypeName[field], ":") - val := "x." + fieldNames[field] - var wire, varint, fixed string - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - wire = "WireFixed64" - fixed = "8" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - wire = "WireFixed32" - fixed = "4" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - wire = "WireVarint" - varint = val - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - wire = "WireFixed64" - fixed = "8" - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - wire = "WireFixed32" - fixed = "4" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - wire = "WireVarint" - fixed = "1" - case descriptor.FieldDescriptorProto_TYPE_STRING: - wire = "WireBytes" - fixed = "len(" + val + ")" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_GROUP: - wire = "WireStartGroup" - fixed = g.Pkg["proto"] + ".Size(" + val + ")" - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - wire = "WireBytes" - g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") - fixed = "s" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_BYTES: - wire = "WireBytes" - if gogoproto.IsCustomType(field) { - fixed = val + ".Size()" - } else { - fixed = "len(" + val + ")" - } - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_SINT32: - wire = "WireVarint" - varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - wire = "WireVarint" - varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") - if varint != "" { - g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") - } - if fixed != "" { - g.P("n += ", fixed) - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") - } - } - g.P("case nil:") - g.P("default:") - g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") - g.P("}") - } - g.P("return n") - g.P("}") - g.P() - } - - for _, ext := range message.ext { - g.generateExtension(ext) - } - - fullName := strings.Join(message.TypeName(), ".") - if g.file.Package != nil { - fullName = *g.file.Package + "." + fullName - } - - g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName) -} - -func (g *Generator) generateExtension(ext *ExtensionDescriptor) { - ccTypeName := ext.DescName() - - extObj := g.ObjectNamed(*ext.Extendee) - var extDesc *Descriptor - if id, ok := extObj.(*ImportedDescriptor); ok { - // This is extending a publicly imported message. - // We need the underlying type for goTag. - extDesc = id.o.(*Descriptor) - } else { - extDesc = extObj.(*Descriptor) - } - extendedType := "*" + g.TypeName(extObj) // always use the original - field := ext.FieldDescriptorProto - fieldType, wireType := g.GoType(ext.parent, field) - tag := g.goTag(extDesc, field, wireType) - g.RecordTypeUse(*ext.Extendee) - if n := ext.FieldDescriptorProto.TypeName; n != nil { - // foreign extension type - g.RecordTypeUse(*n) - } - - typeName := ext.TypeName() - - // Special case for proto2 message sets: If this extension is extending - // proto2_bridge.MessageSet, and its final name component is "message_set_extension", - // then drop that last component. - mset := false - if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" { - typeName = typeName[:len(typeName)-1] - mset = true - } - - // For text formatting, the package must be exactly what the .proto file declares, - // ignoring overrides such as the go_package option, and with no dot/underscore mapping. - extName := strings.Join(typeName, ".") - if g.file.Package != nil { - extName = *g.file.Package + "." + extName - } - - g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{") - g.In() - g.P("ExtendedType: (", extendedType, ")(nil),") - g.P("ExtensionType: (", fieldType, ")(nil),") - g.P("Field: ", field.Number, ",") - g.P(`Name: "`, extName, `",`) - g.P("Tag: ", tag, ",") - - g.Out() - g.P("}") - g.P() - - if mset { - // Generate a bit more code to register with message_set.go. - g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName) - } - - g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""}) -} - -func (g *Generator) generateInitFunction() { - for _, enum := range g.file.enum { - g.generateEnumRegistration(enum) - } - for _, d := range g.file.desc { - for _, ext := range d.ext { - g.generateExtensionRegistration(ext) - } - } - for _, ext := range g.file.ext { - g.generateExtensionRegistration(ext) - } - if len(g.init) == 0 { - return - } - g.P("func init() {") - g.In() - for _, l := range g.init { - g.P(l) - } - g.Out() - g.P("}") - g.init = nil -} - -func (g *Generator) generateFileDescriptor(file *FileDescriptor) { - // Make a copy and trim source_code_info data. - // TODO: Trim this more when we know exactly what we need. - pb := proto.Clone(file.FileDescriptorProto).(*descriptor.FileDescriptorProto) - pb.SourceCodeInfo = nil - - b, err := proto.Marshal(pb) - if err != nil { - g.Fail(err.Error()) - } - - var buf bytes.Buffer - w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) - w.Write(b) - w.Close() - b = buf.Bytes() - - v := file.VarName() - g.P() - g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }") - g.P("var ", v, " = []byte{") - g.In() - g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto") - for len(b) > 0 { - n := 16 - if n > len(b) { - n = len(b) - } - - s := "" - for _, c := range b[:n] { - s += fmt.Sprintf("0x%02x,", c) - } - g.P(s) - - b = b[n:] - } - g.Out() - g.P("}") -} - -func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) { - // // We always print the full (proto-world) package name here. - pkg := enum.File().GetPackage() - if pkg != "" { - pkg += "." - } - // The full type name - typeName := enum.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) -} - -func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) { - g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) -} - -// And now lots of helper functions. - -// Is c an ASCII lower-case letter? -func isASCIILower(c byte) bool { - return 'a' <= c && c <= 'z' -} - -// Is c an ASCII digit? -func isASCIIDigit(c byte) bool { - return '0' <= c && c <= '9' -} - -// CamelCase returns the CamelCased name. -// If there is an interior underscore followed by a lower case letter, -// drop the underscore and convert the letter to upper case. -// There is a remote possibility of this rewrite causing a name collision, -// but it's so remote we're prepared to pretend it's nonexistent - since the -// C++ generator lowercases names, it's extremely unlikely to have two fields -// with different capitalizations. -// In short, _my_field_name_2 becomes XMyFieldName_2. -func CamelCase(s string) string { - if s == "" { - return "" - } - t := make([]byte, 0, 32) - i := 0 - if s[0] == '_' { - // Need a capital letter; drop the '_'. - t = append(t, 'X') - i++ - } - // Invariant: if the next letter is lower case, it must be converted - // to upper case. - // That is, we process a word at a time, where words are marked by _ or - // upper case letter. Digits are treated as words. - for ; i < len(s); i++ { - c := s[i] - if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) { - continue // Skip the underscore in s. - } - if isASCIIDigit(c) { - t = append(t, c) - continue - } - // Assume we have a letter now - if not, it's a bogus identifier. - // The next word is a sequence of characters that must start upper case. - if isASCIILower(c) { - c ^= ' ' // Make it a capital letter. - } - t = append(t, c) // Guaranteed not lower case. - // Accept lower case sequence that follows. - for i+1 < len(s) && isASCIILower(s[i+1]) { - i++ - t = append(t, s[i]) - } - } - return string(t) -} - -// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to -// be joined with "_". -func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) } - -// dottedSlice turns a sliced name into a dotted name. -func dottedSlice(elem []string) string { return strings.Join(elem, ".") } - -// Is this field optional? -func isOptional(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_OPTIONAL -} - -// Is this field required? -func isRequired(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REQUIRED -} - -// Is this field repeated? -func isRepeated(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REPEATED -} - -// badToUnderscore is the mapping function used to generate Go names from package names, -// which can be dotted in the input .proto file. It replaces non-identifier characters such as -// dot or dash with underscore. -func badToUnderscore(r rune) rune { - if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { - return r - } - return '_' -} - -// baseName returns the last path element of the name, with the last dotted suffix removed. -func baseName(name string) string { - // First, find the last element - if i := strings.LastIndex(name, "/"); i >= 0 { - name = name[i+1:] - } - // Now drop the suffix - if i := strings.LastIndex(name, "."); i >= 0 { - name = name[0:i] - } - return name -} - -// The SourceCodeInfo message describes the location of elements of a parsed -// .proto file by way of a "path", which is a sequence of integers that -// describe the route from a FileDescriptorProto to the relevant submessage. -// The path alternates between a field number of a repeated field, and an index -// into that repeated field. The constants below define the field numbers that -// are used. -// -// See descriptor.proto for more information about this. -const ( - // tag numbers in FileDescriptorProto - packagePath = 2 // package - messagePath = 4 // message_type - enumPath = 5 // enum_type - // tag numbers in DescriptorProto - messageFieldPath = 2 // field - messageMessagePath = 3 // nested_type - messageEnumPath = 4 // enum_type - messageOneofPath = 8 // oneof_decl - // tag numbers in EnumDescriptorProto - enumValuePath = 2 // value -) diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go deleted file mode 100644 index c3139911..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go +++ /dev/null @@ -1,446 +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 generator - -import ( - "bytes" - "go/parser" - "go/printer" - "go/token" - "path" - "strings" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" -) - -func (d *FileDescriptor) Messages() []*Descriptor { - return d.desc -} - -func (d *FileDescriptor) Enums() []*EnumDescriptor { - return d.enum -} - -func (d *Descriptor) IsGroup() bool { - return d.group -} - -func (g *Generator) IsGroup(field *descriptor.FieldDescriptorProto) bool { - if d, ok := g.typeNameToObject[field.GetTypeName()].(*Descriptor); ok { - return d.IsGroup() - } - return false -} - -func (g *Generator) TypeNameByObject(typeName string) Object { - o, ok := g.typeNameToObject[typeName] - if !ok { - g.Fail("can't find object with type", typeName) - } - return o -} - -func (g *Generator) OneOfTypeName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { - typeName := message.TypeName() - ccTypeName := CamelCaseSlice(typeName) - fieldName := g.GetOneOfFieldName(message, field) - tname := ccTypeName + "_" + fieldName - // It is possible for this to collide with a message or enum - // nested in this message. Check for collisions. - ok := true - for _, desc := range message.nested { - if strings.Join(desc.TypeName(), "_") == tname { - ok = false - break - } - } - for _, enum := range message.enums { - if strings.Join(enum.TypeName(), "_") == tname { - ok = false - break - } - } - if !ok { - tname += "_" - } - return tname -} - -type PluginImports interface { - NewImport(pkg string) Single - GenerateImports(file *FileDescriptor) -} - -type pluginImports struct { - generator *Generator - singles []Single -} - -func NewPluginImports(generator *Generator) *pluginImports { - return &pluginImports{generator, make([]Single, 0)} -} - -func (this *pluginImports) NewImport(pkg string) Single { - imp := newImportedPackage(this.generator.ImportPrefix, pkg) - this.singles = append(this.singles, imp) - return imp -} - -func (this *pluginImports) GenerateImports(file *FileDescriptor) { - for _, s := range this.singles { - if s.IsUsed() { - this.generator.PrintImport(s.Name(), s.Location()) - } - } -} - -type Single interface { - Use() string - IsUsed() bool - Name() string - Location() string -} - -type importedPackage struct { - used bool - pkg string - name string - importPrefix string -} - -func newImportedPackage(importPrefix, pkg string) *importedPackage { - return &importedPackage{ - pkg: pkg, - importPrefix: importPrefix, - } -} - -func (this *importedPackage) Use() string { - if !this.used { - this.name = RegisterUniquePackageName(this.pkg, nil) - this.used = true - } - return this.name -} - -func (this *importedPackage) IsUsed() bool { - return this.used -} - -func (this *importedPackage) Name() string { - return this.name -} - -func (this *importedPackage) Location() string { - return this.importPrefix + this.pkg -} - -func (g *Generator) GetFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { - goTyp, _ := g.GoType(message, field) - fieldname := CamelCase(*field.Name) - if gogoproto.IsCustomName(field) { - fieldname = gogoproto.GetCustomName(field) - } - if gogoproto.IsEmbed(field) { - fieldname = EmbedFieldName(goTyp) - } - if field.OneofIndex != nil { - fieldname = message.OneofDecl[int(*field.OneofIndex)].GetName() - fieldname = CamelCase(fieldname) - } - for _, f := range methodNames { - if f == fieldname { - return fieldname + "_" - } - } - if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { - if fieldname == "Size" { - return fieldname + "_" - } - } - return fieldname -} - -func (g *Generator) GetOneOfFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { - goTyp, _ := g.GoType(message, field) - fieldname := CamelCase(*field.Name) - if gogoproto.IsCustomName(field) { - fieldname = gogoproto.GetCustomName(field) - } - if gogoproto.IsEmbed(field) { - fieldname = EmbedFieldName(goTyp) - } - for _, f := range methodNames { - if f == fieldname { - return fieldname + "_" - } - } - if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { - if fieldname == "Size" { - return fieldname + "_" - } - } - return fieldname -} - -func (g *Generator) IsMap(field *descriptor.FieldDescriptorProto) bool { - if !field.IsMessage() { - return false - } - byName := g.ObjectNamed(field.GetTypeName()) - desc, ok := byName.(*Descriptor) - if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { - return false - } - return true -} - -func (g *Generator) GetMapKeyField(field, keyField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { - if !gogoproto.IsCastKey(field) { - return keyField - } - keyField = proto.Clone(keyField).(*descriptor.FieldDescriptorProto) - if keyField.Options == nil { - keyField.Options = &descriptor.FieldOptions{} - } - keyType := gogoproto.GetCastKey(field) - if err := proto.SetExtension(keyField.Options, gogoproto.E_Casttype, &keyType); err != nil { - g.Fail(err.Error()) - } - return keyField -} - -func (g *Generator) GetMapValueField(field, valField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { - if !gogoproto.IsCastValue(field) && gogoproto.IsNullable(field) { - return valField - } - valField = proto.Clone(valField).(*descriptor.FieldDescriptorProto) - if valField.Options == nil { - valField.Options = &descriptor.FieldOptions{} - } - if valType := gogoproto.GetCastValue(field); len(valType) > 0 { - if err := proto.SetExtension(valField.Options, gogoproto.E_Casttype, &valType); err != nil { - g.Fail(err.Error()) - } - } - - nullable := gogoproto.IsNullable(field) - if err := proto.SetExtension(valField.Options, gogoproto.E_Nullable, &nullable); err != nil { - g.Fail(err.Error()) - } - return valField -} - -// GoMapValueTypes returns the map value Go type and the alias map value Go type (for casting), taking into -// account whether the map is nullable or the value is a message. -func GoMapValueTypes(mapField, valueField *descriptor.FieldDescriptorProto, goValueType, goValueAliasType string) (nullable bool, outGoType string, outGoAliasType string) { - nullable = gogoproto.IsNullable(mapField) && valueField.IsMessage() - if nullable { - // ensure the non-aliased Go value type is a pointer for consistency - if strings.HasPrefix(goValueType, "*") { - outGoType = goValueType - } else { - outGoType = "*" + goValueType - } - outGoAliasType = goValueAliasType - } else { - outGoType = strings.Replace(goValueType, "*", "", 1) - outGoAliasType = strings.Replace(goValueAliasType, "*", "", 1) - } - return -} - -func GoTypeToName(goTyp string) string { - return strings.Replace(strings.Replace(goTyp, "*", "", -1), "[]", "", -1) -} - -func EmbedFieldName(goTyp string) string { - goTyp = GoTypeToName(goTyp) - goTyps := strings.Split(goTyp, ".") - if len(goTyps) == 1 { - return goTyp - } - if len(goTyps) == 2 { - return goTyps[1] - } - panic("unreachable") -} - -func (g *Generator) GeneratePlugin(p Plugin) { - p.Init(g) - // Generate the output. The generator runs for every file, even the files - // that we don't generate output for, so that we can collate the full list - // of exported symbols to support public imports. - genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) - for _, file := range g.genFiles { - genFileMap[file] = true - } - for _, file := range g.allFiles { - g.Reset() - g.writeOutput = genFileMap[file] - g.generatePlugin(file, p) - if !g.writeOutput { - continue - } - g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ - Name: proto.String(file.goFileName()), - Content: proto.String(g.String()), - }) - } -} - -func (g *Generator) SetFile(file *descriptor.FileDescriptorProto) { - g.file = g.FileOf(file) -} - -func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) { - g.writtenImports = make(map[string]bool) - g.file = g.FileOf(file.FileDescriptorProto) - g.usedPackages = make(map[string]bool) - - // Run the plugins before the imports so we know which imports are necessary. - p.Generate(file) - - // Generate header and imports last, though they appear first in the output. - rem := g.Buffer - g.Buffer = new(bytes.Buffer) - g.generateHeader() - p.GenerateImports(g.file) - g.generateImports() - if !g.writeOutput { - return - } - g.Write(rem.Bytes()) - - // Reformat generated code. - contents := string(g.Buffer.Bytes()) - fset := token.NewFileSet() - ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) - if err != nil { - g.Fail("bad Go source code was generated:", contents, err.Error()) - return - } - g.Reset() - err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) - if err != nil { - g.Fail("generated Go source code could not be reformatted:", err.Error()) - } -} - -func GetCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - return getCustomType(field) -} - -func getCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Customtype) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func splitCPackageType(ctype string) (packageName string, typ string) { - ss := strings.Split(ctype, ".") - if len(ss) == 1 { - return "", ctype - } - packageName = strings.Join(ss[0:len(ss)-1], ".") - typeName := ss[len(ss)-1] - importStr := strings.Map(badToUnderscore, packageName) - typ = importStr + "." + typeName - return packageName, typ -} - -func getCastType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Casttype) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func getCastKey(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Castkey) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func getCastValue(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { - if field.Options != nil { - var v interface{} - v, err = proto.GetExtension(field.Options, gogoproto.E_Castvalue) - if err == nil && v.(*string) != nil { - ctype := *(v.(*string)) - packageName, typ = splitCPackageType(ctype) - return packageName, typ, nil - } - } - return "", "", err -} - -func FileName(file *FileDescriptor) string { - fname := path.Base(file.FileDescriptorProto.GetName()) - fname = strings.Replace(fname, ".proto", "", -1) - fname = strings.Replace(fname, "-", "_", -1) - fname = strings.Replace(fname, ".", "_", -1) - return CamelCase(fname) -} - -func (g *Generator) AllFiles() *descriptor.FileDescriptorSet { - set := &descriptor.FileDescriptorSet{} - set.File = make([]*descriptor.FileDescriptorProto, len(g.allFiles)) - for i := range g.allFiles { - set.File[i] = g.allFiles[i].FileDescriptorProto - } - return set -} - -func (d *Descriptor) Path() string { - return d.path -} diff --git a/vendor/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 fde3b046..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go +++ /dev/null @@ -1,85 +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) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go deleted file mode 100644 index 4b8c9dd2..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go +++ /dev/null @@ -1,463 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Package grpc outputs gRPC service descriptions in Go code. -// It runs as a plugin for the Go protocol buffer compiler plugin. -// It is linked in to protoc-gen-go. -package grpc - -import ( - "fmt" - "path" - "strconv" - "strings" - - pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" -) - -// generatedCodeVersion indicates a version of the generated code. -// It is incremented whenever an incompatibility between the generated code and -// the grpc package is introduced; the generated code references -// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion). -const generatedCodeVersion = 3 - -// Paths for packages used by code generated in this file, -// relative to the import_prefix of the generator.Generator. -const ( - contextPkgPath = "golang.org/x/net/context" - grpcPkgPath = "google.golang.org/grpc" -) - -func init() { - generator.RegisterPlugin(new(grpc)) -} - -// grpc is an implementation of the Go protocol buffer compiler's -// plugin architecture. It generates bindings for gRPC support. -type grpc struct { - gen *generator.Generator -} - -// Name returns the name of this plugin, "grpc". -func (g *grpc) Name() string { - return "grpc" -} - -// The names for packages imported in the generated code. -// They may vary from the final path component of the import path -// if the name is used by other packages. -var ( - contextPkg string - grpcPkg string -) - -// Init initializes the plugin. -func (g *grpc) Init(gen *generator.Generator) { - g.gen = gen - contextPkg = generator.RegisterUniquePackageName("context", nil) - grpcPkg = generator.RegisterUniquePackageName("grpc", nil) -} - -// Given a type name defined in a .proto, return its object. -// Also record that we're using it, to guarantee the associated import. -func (g *grpc) objectNamed(name string) generator.Object { - g.gen.RecordTypeUse(name) - return g.gen.ObjectNamed(name) -} - -// Given a type name defined in a .proto, return its name as we will print it. -func (g *grpc) typeName(str string) string { - return g.gen.TypeName(g.objectNamed(str)) -} - -// P forwards to g.gen.P. -func (g *grpc) P(args ...interface{}) { g.gen.P(args...) } - -// Generate generates code for the services in the given file. -func (g *grpc) Generate(file *generator.FileDescriptor) { - if len(file.FileDescriptorProto.Service) == 0 { - return - } - - g.P("// Reference imports to suppress errors if they are not otherwise used.") - g.P("var _ ", contextPkg, ".Context") - g.P("var _ ", grpcPkg, ".ClientConn") - g.P() - - // Assert version compatibility. - g.P("// This is a compile-time assertion to ensure that this generated file") - g.P("// is compatible with the grpc package it is being compiled against.") - g.P("const _ = ", grpcPkg, ".SupportPackageIsVersion", generatedCodeVersion) - g.P() - - for i, service := range file.FileDescriptorProto.Service { - g.generateService(file, service, i) - } -} - -// GenerateImports generates the import declaration for this file. -func (g *grpc) GenerateImports(file *generator.FileDescriptor) { - if len(file.FileDescriptorProto.Service) == 0 { - return - } - g.P("import (") - g.P(contextPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, contextPkgPath))) - g.P(grpcPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, grpcPkgPath))) - g.P(")") - g.P() -} - -// reservedClientName records whether a client name is reserved on the client side. -var reservedClientName = map[string]bool{ -// TODO: do we need any in gRPC? -} - -func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } - -// generateService generates all the code for the named service. -func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) { - path := fmt.Sprintf("6,%d", index) // 6 means service. - - origServName := service.GetName() - fullServName := origServName - if pkg := file.GetPackage(); pkg != "" { - fullServName = pkg + "." + fullServName - } - servName := generator.CamelCase(origServName) - - g.P() - g.P("// Client API for ", servName, " service") - g.P() - - // Client interface. - g.P("type ", servName, "Client interface {") - for i, method := range service.Method { - g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. - g.P(g.generateClientSignature(servName, method)) - } - g.P("}") - g.P() - - // Client structure. - g.P("type ", unexport(servName), "Client struct {") - g.P("cc *", grpcPkg, ".ClientConn") - g.P("}") - g.P() - - // NewClient factory. - g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {") - g.P("return &", unexport(servName), "Client{cc}") - g.P("}") - g.P() - - var methodIndex, streamIndex int - serviceDescVar := "_" + servName + "_serviceDesc" - // Client method implementations. - for _, method := range service.Method { - var descExpr string - if !method.GetServerStreaming() && !method.GetClientStreaming() { - // Unary RPC method - descExpr = fmt.Sprintf("&%s.Methods[%d]", serviceDescVar, methodIndex) - methodIndex++ - } else { - // Streaming RPC method - descExpr = fmt.Sprintf("&%s.Streams[%d]", serviceDescVar, streamIndex) - streamIndex++ - } - g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr) - } - - g.P("// Server API for ", servName, " service") - g.P() - - // Server interface. - serverType := servName + "Server" - g.P("type ", serverType, " interface {") - for i, method := range service.Method { - g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. - g.P(g.generateServerSignature(servName, method)) - } - g.P("}") - g.P() - - // Server registration. - g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {") - g.P("s.RegisterService(&", serviceDescVar, `, srv)`) - g.P("}") - g.P() - - // Server handler implementations. - var handlerNames []string - for _, method := range service.Method { - hname := g.generateServerMethod(servName, fullServName, method) - handlerNames = append(handlerNames, hname) - } - - // Service descriptor. - g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {") - g.P("ServiceName: ", strconv.Quote(fullServName), ",") - g.P("HandlerType: (*", serverType, ")(nil),") - g.P("Methods: []", grpcPkg, ".MethodDesc{") - for i, method := range service.Method { - if method.GetServerStreaming() || method.GetClientStreaming() { - continue - } - g.P("{") - g.P("MethodName: ", strconv.Quote(method.GetName()), ",") - g.P("Handler: ", handlerNames[i], ",") - g.P("},") - } - g.P("},") - g.P("Streams: []", grpcPkg, ".StreamDesc{") - for i, method := range service.Method { - if !method.GetServerStreaming() && !method.GetClientStreaming() { - continue - } - g.P("{") - g.P("StreamName: ", strconv.Quote(method.GetName()), ",") - g.P("Handler: ", handlerNames[i], ",") - if method.GetServerStreaming() { - g.P("ServerStreams: true,") - } - if method.GetClientStreaming() { - g.P("ClientStreams: true,") - } - g.P("},") - } - g.P("},") - g.P("Metadata: ", file.VarName(), ",") - g.P("}") - g.P() -} - -// generateClientSignature returns the client-side signature for a method. -func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string { - origMethName := method.GetName() - methName := generator.CamelCase(origMethName) - if reservedClientName[methName] { - methName += "_" - } - reqArg := ", in *" + g.typeName(method.GetInputType()) - if method.GetClientStreaming() { - reqArg = "" - } - respName := "*" + g.typeName(method.GetOutputType()) - if method.GetServerStreaming() || method.GetClientStreaming() { - respName = servName + "_" + generator.CamelCase(origMethName) + "Client" - } - return fmt.Sprintf("%s(ctx %s.Context%s, opts ...%s.CallOption) (%s, error)", methName, contextPkg, reqArg, grpcPkg, respName) -} - -func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) { - sname := fmt.Sprintf("/%s/%s", fullServName, method.GetName()) - methName := generator.CamelCase(method.GetName()) - inType := g.typeName(method.GetInputType()) - outType := g.typeName(method.GetOutputType()) - - g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{") - if !method.GetServerStreaming() && !method.GetClientStreaming() { - g.P("out := new(", outType, ")") - // TODO: Pass descExpr to Invoke. - g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`) - g.P("if err != nil { return nil, err }") - g.P("return out, nil") - g.P("}") - g.P() - return - } - streamType := unexport(servName) + methName + "Client" - g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`) - g.P("if err != nil { return nil, err }") - g.P("x := &", streamType, "{stream}") - if !method.GetClientStreaming() { - g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }") - g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") - } - g.P("return x, nil") - g.P("}") - g.P() - - genSend := method.GetClientStreaming() - genRecv := method.GetServerStreaming() - genCloseAndRecv := !method.GetServerStreaming() - - // Stream auxiliary types and methods. - g.P("type ", servName, "_", methName, "Client interface {") - if genSend { - g.P("Send(*", inType, ") error") - } - if genRecv { - g.P("Recv() (*", outType, ", error)") - } - if genCloseAndRecv { - g.P("CloseAndRecv() (*", outType, ", error)") - } - g.P(grpcPkg, ".ClientStream") - g.P("}") - g.P() - - g.P("type ", streamType, " struct {") - g.P(grpcPkg, ".ClientStream") - g.P("}") - g.P() - - if genSend { - g.P("func (x *", streamType, ") Send(m *", inType, ") error {") - g.P("return x.ClientStream.SendMsg(m)") - g.P("}") - g.P() - } - if genRecv { - g.P("func (x *", streamType, ") Recv() (*", outType, ", error) {") - g.P("m := new(", outType, ")") - g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } - if genCloseAndRecv { - g.P("func (x *", streamType, ") CloseAndRecv() (*", outType, ", error) {") - g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") - g.P("m := new(", outType, ")") - g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } -} - -// generateServerSignature returns the server-side signature for a method. -func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string { - origMethName := method.GetName() - methName := generator.CamelCase(origMethName) - if reservedClientName[methName] { - methName += "_" - } - - var reqArgs []string - ret := "error" - if !method.GetServerStreaming() && !method.GetClientStreaming() { - reqArgs = append(reqArgs, contextPkg+".Context") - ret = "(*" + g.typeName(method.GetOutputType()) + ", error)" - } - if !method.GetClientStreaming() { - reqArgs = append(reqArgs, "*"+g.typeName(method.GetInputType())) - } - if method.GetServerStreaming() || method.GetClientStreaming() { - reqArgs = append(reqArgs, servName+"_"+generator.CamelCase(origMethName)+"Server") - } - - return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret -} - -func (g *grpc) generateServerMethod(servName, fullServName string, method *pb.MethodDescriptorProto) string { - methName := generator.CamelCase(method.GetName()) - hname := fmt.Sprintf("_%s_%s_Handler", servName, methName) - inType := g.typeName(method.GetInputType()) - outType := g.typeName(method.GetOutputType()) - - if !method.GetServerStreaming() && !method.GetClientStreaming() { - g.P("func ", hname, "(srv interface{}, ctx ", contextPkg, ".Context, dec func(interface{}) error, interceptor ", grpcPkg, ".UnaryServerInterceptor) (interface{}, error) {") - g.P("in := new(", inType, ")") - g.P("if err := dec(in); err != nil { return nil, err }") - g.P("if interceptor == nil { return srv.(", servName, "Server).", methName, "(ctx, in) }") - g.P("info := &", grpcPkg, ".UnaryServerInfo{") - g.P("Server: srv,") - g.P("FullMethod: ", strconv.Quote(fmt.Sprintf("/%s/%s", fullServName, methName)), ",") - g.P("}") - g.P("handler := func(ctx ", contextPkg, ".Context, req interface{}) (interface{}, error) {") - g.P("return srv.(", servName, "Server).", methName, "(ctx, req.(*", inType, "))") - g.P("}") - g.P("return interceptor(ctx, in, info, handler)") - g.P("}") - g.P() - return hname - } - streamType := unexport(servName) + methName + "Server" - g.P("func ", hname, "(srv interface{}, stream ", grpcPkg, ".ServerStream) error {") - if !method.GetClientStreaming() { - g.P("m := new(", inType, ")") - g.P("if err := stream.RecvMsg(m); err != nil { return err }") - g.P("return srv.(", servName, "Server).", methName, "(m, &", streamType, "{stream})") - } else { - g.P("return srv.(", servName, "Server).", methName, "(&", streamType, "{stream})") - } - g.P("}") - g.P() - - genSend := method.GetServerStreaming() - genSendAndClose := !method.GetServerStreaming() - genRecv := method.GetClientStreaming() - - // Stream auxiliary types and methods. - g.P("type ", servName, "_", methName, "Server interface {") - if genSend { - g.P("Send(*", outType, ") error") - } - if genSendAndClose { - g.P("SendAndClose(*", outType, ") error") - } - if genRecv { - g.P("Recv() (*", inType, ", error)") - } - g.P(grpcPkg, ".ServerStream") - g.P("}") - g.P() - - g.P("type ", streamType, " struct {") - g.P(grpcPkg, ".ServerStream") - g.P("}") - g.P() - - if genSend { - g.P("func (x *", streamType, ") Send(m *", outType, ") error {") - g.P("return x.ServerStream.SendMsg(m)") - g.P("}") - g.P() - } - if genSendAndClose { - g.P("func (x *", streamType, ") SendAndClose(m *", outType, ") error {") - g.P("return x.ServerStream.SendMsg(m)") - g.P("}") - g.P() - } - if genRecv { - g.P("func (x *", streamType, ") Recv() (*", inType, ", error) {") - g.P("m := new(", inType, ")") - g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } - - return hname -} diff --git a/vendor/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 dd8e7950..00000000 --- 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/plugin/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile deleted file mode 100644 index 546287ce..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Not stored here, but plugin.proto is in https://github.com/google/protobuf/ -# at src/google/protobuf/compiler/plugin.proto -# Also we need to fix an import. -regenerate: - protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. -I=../../protobuf/google/protobuf/compiler/:../../protobuf/ ../../protobuf/google/protobuf/compiler/plugin.proto - diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go deleted file mode 100644 index 46035939..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go +++ /dev/null @@ -1,230 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: plugin.proto -// DO NOT EDIT! - -/* -Package plugin_go is a generated protocol buffer package. - -It is generated from these files: - plugin.proto - -It has these top-level messages: - CodeGeneratorRequest - CodeGeneratorResponse -*/ -package plugin_go - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// An encoded CodeGeneratorRequest is written to the plugin's stdin. -type CodeGeneratorRequest struct { - // The .proto files that were explicitly listed on the command-line. The - // code generator should generate code only for these files. Each file's - // descriptor will be included in proto_file, below. - FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"` - // The generator parameter passed on the command-line. - Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` - // FileDescriptorProtos for all files in files_to_generate and everything - // they import. The files will appear in topological order, so each file - // appears before any file that imports it. - // - // protoc guarantees that all proto_files will be written after - // the fields above, even though this is not technically guaranteed by the - // protobuf wire format. This theoretically could allow a plugin to stream - // in the FileDescriptorProtos and handle them one by one rather than read - // the entire set into memory at once. However, as of this writing, this - // is not similarly optimized on protoc's end -- it will store all fields in - // memory at once before sending them to the plugin. - ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } -func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorRequest) ProtoMessage() {} -func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} } - -func (m *CodeGeneratorRequest) GetFileToGenerate() []string { - if m != nil { - return m.FileToGenerate - } - return nil -} - -func (m *CodeGeneratorRequest) GetParameter() string { - if m != nil && m.Parameter != nil { - return *m.Parameter - } - return "" -} - -func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto { - if m != nil { - return m.ProtoFile - } - return nil -} - -// The plugin writes an encoded CodeGeneratorResponse to stdout. -type CodeGeneratorResponse struct { - // Error message. If non-empty, code generation failed. The plugin process - // should exit with status code zero even if it reports an error in this way. - // - // This should be used to indicate errors in .proto files which prevent the - // code generator from generating correct code. Errors which indicate a - // problem in protoc itself -- such as the input CodeGeneratorRequest being - // unparseable -- should be reported by writing a message to stderr and - // exiting with a non-zero status code. - Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } -func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorResponse) ProtoMessage() {} -func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} } - -func (m *CodeGeneratorResponse) GetError() string { - if m != nil && m.Error != nil { - return *m.Error - } - return "" -} - -func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File { - if m != nil { - return m.File - } - return nil -} - -// Represents a single generated file. -type CodeGeneratorResponse_File struct { - // The file name, relative to the output directory. The name must not - // contain "." or ".." components and must be relative, not be absolute (so, - // the file cannot lie outside the output directory). "/" must be used as - // the path separator, not "\". - // - // If the name is omitted, the content will be appended to the previous - // file. This allows the generator to break large files into small chunks, - // and allows the generated text to be streamed back to protoc so that large - // files need not reside completely in memory at one time. Note that as of - // this writing protoc does not optimize for this -- it will read the entire - // CodeGeneratorResponse before writing files to disk. - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // If non-empty, indicates that the named file should already exist, and the - // content here is to be inserted into that file at a defined insertion - // point. This feature allows a code generator to extend the output - // produced by another code generator. The original generator may provide - // insertion points by placing special annotations in the file that look - // like: - // @@protoc_insertion_point(NAME) - // The annotation can have arbitrary text before and after it on the line, - // which allows it to be placed in a comment. NAME should be replaced with - // an identifier naming the point -- this is what other generators will use - // as the insertion_point. Code inserted at this point will be placed - // immediately above the line containing the insertion point (thus multiple - // insertions to the same point will come out in the order they were added). - // The double-@ is intended to make it unlikely that the generated code - // could contain things that look like insertion points by accident. - // - // For example, the C++ code generator places the following line in the - // .pb.h files that it generates: - // // @@protoc_insertion_point(namespace_scope) - // This line appears within the scope of the file's package namespace, but - // outside of any particular class. Another plugin can then specify the - // insertion_point "namespace_scope" to generate additional classes or - // other declarations that should be placed in this scope. - // - // Note that if the line containing the insertion point begins with - // whitespace, the same whitespace will be added to every line of the - // inserted text. This is useful for languages like Python, where - // indentation matters. In these languages, the insertion point comment - // should be indented the same amount as any inserted code will need to be - // in order to work correctly in that context. - // - // The code generator that generates the initial file and the one which - // inserts into it must both run as part of a single invocation of protoc. - // Code generators are executed in the order in which they appear on the - // command line. - // - // If |insertion_point| is present, |name| must also be present. - InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"` - // The file contents. - Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} } -func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorResponse_File) ProtoMessage() {} -func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { - return fileDescriptorPlugin, []int{1, 0} -} - -func (m *CodeGeneratorResponse_File) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *CodeGeneratorResponse_File) GetInsertionPoint() string { - if m != nil && m.InsertionPoint != nil { - return *m.InsertionPoint - } - return "" -} - -func (m *CodeGeneratorResponse_File) GetContent() string { - if m != nil && m.Content != nil { - return *m.Content - } - return "" -} - -func init() { - proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest") - proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse") - proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File") -} - -func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) } - -var fileDescriptorPlugin = []byte{ - // 304 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x51, 0x4f, 0x4b, 0xfb, 0x40, - 0x14, 0x24, 0xbf, 0x5f, 0x44, 0xf2, 0x2c, 0x8d, 0x2c, 0x15, 0x42, 0xe9, 0x21, 0x14, 0xc1, 0x9e, - 0x52, 0x10, 0xc1, 0x7b, 0x2b, 0xea, 0x31, 0x04, 0x4f, 0x82, 0x84, 0x98, 0xbe, 0x86, 0x85, 0x74, - 0xdf, 0xba, 0xd9, 0x7c, 0x22, 0xbf, 0x93, 0x9f, 0xc7, 0xfd, 0x93, 0x56, 0x29, 0xf6, 0x94, 0xbc, - 0x99, 0xd9, 0x99, 0xd9, 0x7d, 0x30, 0x92, 0x6d, 0xdf, 0x70, 0x91, 0x49, 0x45, 0x9a, 0x58, 0xd2, - 0x10, 0x35, 0x2d, 0xfa, 0xe9, 0xbd, 0xdf, 0x66, 0x35, 0xed, 0x24, 0x6f, 0x51, 0x4d, 0x53, 0xcf, - 0x2c, 0xf7, 0xcc, 0x72, 0x83, 0x5d, 0xad, 0xb8, 0xd4, 0xa4, 0xbc, 0x7a, 0xfe, 0x19, 0xc0, 0x64, - 0x4d, 0x1b, 0x7c, 0x42, 0x81, 0xaa, 0x32, 0x78, 0x81, 0x1f, 0x3d, 0x76, 0x9a, 0x2d, 0xe0, 0x72, - 0x6b, 0x3c, 0x4a, 0x4d, 0x65, 0xe3, 0x39, 0x4c, 0x82, 0xf4, 0xff, 0x22, 0x2a, 0xc6, 0x16, 0x7f, - 0xa1, 0xe1, 0x04, 0xb2, 0x19, 0x44, 0xb2, 0x52, 0xd5, 0x0e, 0x35, 0xaa, 0xe4, 0x5f, 0x1a, 0x18, - 0xc9, 0x0f, 0xc0, 0xd6, 0x00, 0x2e, 0xa9, 0xb4, 0xa7, 0x92, 0xd8, 0x38, 0x5c, 0xdc, 0x5e, 0x67, - 0xc7, 0x8d, 0x1f, 0x0d, 0xf9, 0x70, 0xe8, 0x96, 0x5b, 0xd8, 0x98, 0xd8, 0x8f, 0x65, 0xe6, 0x5f, - 0x01, 0x5c, 0x1d, 0xb5, 0xec, 0x24, 0x89, 0x0e, 0xd9, 0x04, 0xce, 0x50, 0x29, 0x52, 0xa6, 0x9b, - 0x0d, 0xf6, 0x03, 0x7b, 0x86, 0xf0, 0x57, 0xdc, 0x5d, 0x76, 0xea, 0x81, 0xb2, 0x3f, 0x4d, 0x5d, - 0x9b, 0xc2, 0x39, 0x4c, 0xdf, 0x20, 0xb4, 0x13, 0x63, 0x10, 0x0a, 0x73, 0xa3, 0x21, 0xc6, 0xfd, - 0xb3, 0x1b, 0x88, 0xb9, 0x91, 0x2b, 0xcd, 0x49, 0x94, 0x92, 0xb8, 0xd0, 0xc3, 0xf5, 0xc7, 0x07, - 0x38, 0xb7, 0x28, 0x4b, 0xe0, 0xbc, 0x26, 0xa1, 0xd1, 0x08, 0x62, 0x27, 0xd8, 0x8f, 0xab, 0x7b, - 0x98, 0x99, 0x2e, 0x27, 0xfb, 0xad, 0x46, 0xb9, 0x5b, 0xb4, 0x7b, 0x90, 0xee, 0x35, 0xf2, 0x6b, - 0x2f, 0x1b, 0xfa, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x70, 0xa2, 0xbd, 0x30, 0x02, 0x02, 0x00, 0x00, -} 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 c65a2ead..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile +++ /dev/null @@ -1,67 +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 - -my_test/test.pb.go: my_test/test.proto - protoc --gogo_out=Mmulti/multi1.proto=github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi:. $< - -regenerate: my_test/test.pb.go - go install github.com/gogo/protobuf/protoc-min-version - protoc-min-version --version="3.0.0" --gogo_out=. ./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/multi{1,2,3}.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 94acfc1b..00000000 --- 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 fca7f600..00000000 --- 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 86e9c118..00000000 --- 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 ff65873d..00000000 --- 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 b8bc41ac..00000000 --- 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 784a4f86..00000000 --- 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 156e078d..00000000 --- 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 3bb0632b..00000000 --- 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 58fc7598..00000000 --- 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 271d9639..00000000 --- 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 c61a5e8b..00000000 --- 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 0da6e0af..00000000 --- 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 e6bfc71b..00000000 --- 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 146c255b..00000000 --- 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 c95d46c5..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go +++ /dev/null @@ -1,948 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: my_test/test.proto -// DO NOT EDIT! - -/* -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 _ "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{ - {100, 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{ - {100, 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", -} - -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", -} - -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", -} - -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{ - {100, 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", -} - -var E_Donut = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*OtherReplyExtensions)(nil), - Field: 106, - Name: "my.test.donut", - Tag: "bytes,106,opt,name=donut", -} - -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{ - // 970 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x54, 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8e, 0x87, 0x57, 0x96, 0xd6, 0xc6, 0xfd, - 0xee, 0x75, 0xc0, 0x90, 0xc1, 0xfc, 0x60, 0x5e, 0xe7, 0x14, 0x86, 0x32, 0xf5, 0x06, 0xff, 0x8d, - 0xe4, 0x3e, 0xe6, 0x27, 0xaa, 0xce, 0xd3, 0x87, 0x83, 0xfa, 0xfe, 0x99, 0xfc, 0x37, 0x00, 0x00, - 0xff, 0xff, 0xc7, 0xad, 0x0f, 0xe3, 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 8e709463..00000000 --- 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 c994914e..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto +++ /dev/null @@ -1,52 +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; -} - -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 97eedb9b..00000000 --- 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.NotInPackageGoogleProtobuf) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/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 b58a36bb..00000000 --- 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.NotInPackageGoogleProtobuf) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) - vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/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 e0828a41..00000000 --- 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.NotInPackageGoogleProtobuf) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) - vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) - - vanity.ForEachFile(files, vanity.TurnOffGoEnumPrefixAll) - vanity.ForEachFile(files, vanity.TurnOffGoEnumStringerAll) - vanity.ForEachFile(files, vanity.TurnOnEnumStringerAll) - - vanity.ForEachFile(files, vanity.TurnOnEqualAll) - vanity.ForEachFile(files, vanity.TurnOnGoStringAll) - vanity.ForEachFile(files, vanity.TurnOffGoStringerAll) - vanity.ForEachFile(files, vanity.TurnOnStringerAll) - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/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 b8434d50..00000000 --- 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/sortkeys/sortkeys.go b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go deleted file mode 100644 index ceadde6a..00000000 --- a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go +++ /dev/null @@ -1,101 +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 sortkeys - -import ( - "sort" -) - -func Strings(l []string) { - sort.Strings(l) -} - -func Float64s(l []float64) { - sort.Float64s(l) -} - -func Float32s(l []float32) { - sort.Sort(Float32Slice(l)) -} - -func Int64s(l []int64) { - sort.Sort(Int64Slice(l)) -} - -func Int32s(l []int32) { - sort.Sort(Int32Slice(l)) -} - -func Uint64s(l []uint64) { - sort.Sort(Uint64Slice(l)) -} - -func Uint32s(l []uint32) { - sort.Sort(Uint32Slice(l)) -} - -func Bools(l []bool) { - sort.Sort(BoolSlice(l)) -} - -type BoolSlice []bool - -func (p BoolSlice) Len() int { return len(p) } -func (p BoolSlice) Less(i, j int) bool { return p[j] } -func (p BoolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Int64Slice []int64 - -func (p Int64Slice) Len() int { return len(p) } -func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Int32Slice []int32 - -func (p Int32Slice) Len() int { return len(p) } -func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Int32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Uint64Slice []uint64 - -func (p Uint64Slice) Len() int { return len(p) } -func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Uint32Slice []uint32 - -func (p Uint32Slice) Len() int { return len(p) } -func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Uint32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Float32Slice []float32 - -func (p Float32Slice) Len() int { return len(p) } -func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Float32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/github.com/gogo/protobuf/test/.gitignore b/vendor/github.com/gogo/protobuf/test/.gitignore deleted file mode 100644 index 773a6df9..00000000 --- a/vendor/github.com/gogo/protobuf/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.dat diff --git a/vendor/github.com/gogo/protobuf/test/Makefile b/vendor/github.com/gogo/protobuf/test/Makefile deleted file mode 100644 index f56c7fa0..00000000 --- a/vendor/github.com/gogo/protobuf/test/Makefile +++ /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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - protoc --gogo_out=. --proto_path=../:../../../../:../protobuf/:. thetest.proto - protoc-gen-combo --default=false --proto_path=../:../../../../:../protobuf/:. thetest.proto - cp uuid.go ./combos/both/ - cp uuid.go ./combos/marshaler/ - cp uuid.go ./combos/unmarshaler/ - cp uuid.go ./combos/unsafeboth/ - cp uuid.go ./combos/unsafemarshaler/ - cp uuid.go ./combos/unsafeunmarshaler/ - cp bug_test.go ./combos/both/ - cp bug_test.go ./combos/marshaler/ - cp bug_test.go ./combos/unmarshaler/ - cp bug_test.go ./combos/unsafeboth/ - cp bug_test.go ./combos/unsafemarshaler/ - cp bug_test.go ./combos/unsafeunmarshaler/ diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile deleted file mode 100644 index c42b8cf6..00000000 --- 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 e7eac1c8..00000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go +++ /dev/null @@ -1,625 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: asym.proto -// DO NOT EDIT! - -/* -Package asym is a generated protocol buffer package. - -It is generated from these files: - asym.proto - -It has these top-level messages: - M - MyType -*/ -package asym - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*M) - if !ok { - that2, ok := that.(M) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Arr) != len(that1.Arr) { - return false - } - for i := range this.Arr { - if !this.Arr[i].Equal(that1.Arr[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyType) - if !ok { - that2, ok := that.(MyType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyType but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *MyType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyType) - if !ok { - that2, ok := that.(MyType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *M) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *M) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Arr) > 0 { - for _, msg := range m.Arr { - data[i] = 0xa - i++ - i = encodeVarintAsym(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Asym(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Asym(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintAsym(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedM(r randyAsym, easy bool) *M { - this := &M{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.Arr = make([]MyType, v1) - for i := 0; i < v1; i++ { - v2 := NewPopulatedMyType(r) - this.Arr[i] = *v2 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAsym(r, 2) - } - return this -} - -type randyAsym interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAsym(r randyAsym) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAsym(r randyAsym) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneAsym(r) - } - return string(tmps) -} -func randUnrecognizedAsym(r randyAsym, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldAsym(data, r, fieldNumber, wire) - } - return data -} -func randFieldAsym(data []byte, r randyAsym, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateAsym(data, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - data = encodeVarintPopulateAsym(data, uint64(v4)) - case 1: - data = encodeVarintPopulateAsym(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateAsym(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateAsym(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateAsym(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateAsym(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *M) Size() (n int) { - var l int - _ = l - if len(m.Arr) > 0 { - for _, e := range m.Arr { - l = e.Size() - n += 1 + l + sovAsym(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAsym(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAsym(x uint64) (n int) { - return sovAsym(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *M) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsym - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: M: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Arr", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsym - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAsym - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v MyType - m.Arr = append(m.Arr, v) - if err := m.Arr[len(m.Arr)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsym(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAsym - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsym - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAsym(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAsym - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAsym(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthAsym - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsym - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAsym(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthAsym = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAsym = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("asym.proto", fileDescriptorAsym) } - -var fileDescriptorAsym = []byte{ - // 151 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x07, 0x10, 0x77, 0x2c, 0x94, 0x67, 0x58, - 0x00, 0xc4, 0x4e, 0x32, 0x0f, 0x1e, 0xca, 0x31, 0xfe, 0x00, 0xe2, 0x15, 0x8f, 0xe4, 0x18, 0x77, - 0x00, 0xf1, 0x09, 0x20, 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0x18, 0x10, 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 eb3ab956..00000000 --- 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 c99b7cad..00000000 --- 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 39a886bb..00000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: asym.proto -// DO NOT EDIT! - -/* -Package asym is a generated protocol buffer package. - -It is generated from these files: - asym.proto - -It has these top-level messages: - M - MyType -*/ -package asym - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &M{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &M{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 26cad838..00000000 --- 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 53f720e9..00000000 --- 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/Makefile b/vendor/github.com/gogo/protobuf/test/casttype/Makefile deleted file mode 100644 index d8a3120d..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/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-combo - protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. casttype.proto diff --git a/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto deleted file mode 100644 index e8cd18d4..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto +++ /dev/null @@ -1,79 +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]; -} - -message Wilson { - optional int64 Int64 = 1; -} 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 815d9a90..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go +++ /dev/null @@ -1,2449 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/both/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=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,json=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,json=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,json=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,json=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,json=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,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=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,json=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,json=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,json=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,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3791 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, - 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4,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, 0x7f, - 0x10, 0x85, 0xf1, 0x3e, 0xa3, 0x8a, 0x02, 0x51, 0x4b, 0xaf, 0x13, 0x63, 0xe8, 0x74, 0x42, 0x65, - 0xdf, 0x95, 0x2c, 0x0c, 0x37, 0xf4, 0xf2, 0x2d, 0xbd, 0x6a, 0x64, 0xc3, 0x4c, 0x2c, 0x2f, 0x95, - 0x29, 0x80, 0x8a, 0xd1, 0x30, 0xac, 0x8a, 0x61, 0x95, 0x77, 0xb2, 0x11, 0xb4, 0x22, 0xa1, 0xfa, - 0x24, 0xca, 0x57, 0x60, 0xac, 0xd1, 0xda, 0x34, 0x6b, 0x65, 0xcd, 0xa7, 0x06, 0xa8, 0x16, 0x53, - 0x33, 0x7c, 0x60, 0xa1, 0xad, 0xfc, 0x28, 0x8c, 0xde, 0x31, 0xf4, 0x5b, 0x7e, 0xd5, 0x24, 0x53, - 0x4d, 0x93, 0xd8, 0xa7, 0x38, 0x0f, 0xa9, 0xba, 0xe1, 0x38, 0x68, 0x80, 0xe6, 0xee, 0x34, 0x8c, - 0x6c, 0x94, 0x3d, 0xfd, 0x89, 0x9e, 0xa7, 0xef, 0x7e, 0xf2, 0xa4, 0x40, 0x6d, 0x20, 0x48, 0x99, - 0x83, 0x84, 0x61, 0xb5, 0xea, 0x9c, 0x21, 0xb6, 0x8b, 0xff, 0x0a, 0xa8, 0xd1, 0xcd, 0x12, 0x27, - 0x98, 0xa0, 0x18, 0x76, 0x8c, 0xe6, 0xed, 0x5a, 0xd9, 0xc8, 0x0e, 0x31, 0x82, 0x47, 0x7b, 0x08, - 0xd6, 0xf9, 0x78, 0x37, 0x87, 0xc4, 0xe1, 0xa3, 0x24, 0x8c, 0xbb, 0xae, 0x61, 0x39, 0x35, 0xdb, - 0xca, 0x0e, 0x33, 0x92, 0x87, 0xfb, 0xcc, 0xa2, 0x61, 0x56, 0xba, 0x29, 0xda, 0x38, 0xe5, 0x02, - 0x0c, 0xdb, 0x0d, 0x17, 0xbf, 0x39, 0xd9,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a9, 0x49, 0x2e, 0xe3, 0x2a, 0x8f, 0xc2, 0xa8, 0x5e, 0xad, 0x36, 0x89, 0x5c, 0x12, - 0xf1, 0x36, 0x34, 0xed, 0x89, 0x99, 0xe2, 0xe4, 0x55, 0x88, 0x4b, 0x3f, 0x50, 0x61, 0x21, 0x4f, - 0x60, 0xcd, 0x67, 0xe7, 0x28, 0x61, 0xda, 0xd4, 0x5b, 0x72, 0x10, 0x6f, 0x5a, 0x73, 0xb4, 0xf6, - 0x81, 0x5e, 0x18, 0xc7, 0xe3, 0x6a, 0xb2, 0xe6, 0x78, 0x27, 0x38, 0xd3, 0x2f, 0x62, 0x79, 0xed, - 0x3c, 0x90, 0x54, 0x16, 0x20, 0x6e, 0xda, 0x18, 0x1f, 0x84, 0xe0, 0xa7, 0xe1, 0xa7, 0x03, 0xce, - 0x30, 0x67, 0x96, 0x84, 0xbe, 0xea, 0x21, 0x27, 0xff, 0x36, 0x04, 0x71, 0x29, 0xc6, 0x42, 0x11, - 0x6d, 0xe8, 0xee, 0x36, 0xa3, 0x8b, 0xe5, 0xc3, 0x99, 0x90, 0xca, 0xae, 0x49, 0x8e, 0xdd, 0x8c, - 0xc5, 0x42, 0x40, 0xc8, 0xe9, 0x9a, 0xe6, 0xd5, 0x34, 0xf4, 0x0a, 0x6b, 0x70, 0xed, 0x7a, 0x1d, - 0x67, 0xd2, 0x91, 0xf3, 0x2a, 0xe4, 0xf3, 0x42, 0x4c, 0xe7, 0xe2, 0x6e, 0x53, 0xaf, 0x99, 0x1d, - 0xba, 0x51, 0xa6, 0x9b, 0x91, 0x03, 0x9e, 0x72, 0x0e, 0x8e, 0x4a, 0xde, 0x8a, 0xe1, 0xea, 0xd8, - 0x3c, 0x57, 0xda, 0xa0, 0x21, 0x76, 0xda, 0x75, 0x44, 0x28, 0x2c, 0x88, 0x71, 0x89, 0xcd, 0x5f, - 0xc7, 0x46, 0xd6, 0xae, 0x77, 0x7b, 0x22, 0x9f, 0xe9, 0xda, 0x77, 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 0xef, 0x18, 0xb2, 0xdf, 0xfb, 0xa8, 0x73, 0x26, 0x16, 0x39, 0x72, 0xce, 0x34, 0x73, 0x25, - 0x38, 0xd2, 0x67, 0x66, 0x07, 0xe0, 0x7c, 0x56, 0x70, 0x4e, 0xf4, 0xcc, 0x2e, 0xd1, 0xae, 0x81, - 0x94, 0x7b, 0xf3, 0x31, 0x00, 0xe7, 0xf7, 0x05, 0xa7, 0x22, 0xb0, 0x72, 0x5a, 0x88, 0xf1, 0x2a, - 0x8c, 0xe1, 0x4e, 0x7d, 0xd3, 0x76, 0xc4, 0xbe, 0x77, 0x00, 0xba, 0xe7, 0x04, 0xdd, 0xa8, 0x00, - 0xb2, 0x5d, 0x30, 0x71, 0x3d, 0x01, 0xf1, 0x2d, 0xdc, 0x00, 0x0d, 0x40, 0xf1, 0x03, 0x41, 0x31, - 0x4c, 0xfa, 0x04, 0x9d, 0x83, 0x54, 0xd5, 0x16, 0x69, 0x38, 0x18, 0xfe, 0x43, 0x01, 0x4f, 0x4a, - 0x8c, 0xa0, 0x68, 0xd8, 0x8d, 0x96, 0x49, 0x39, 0x3a, 0x98, 0xe2, 0xb7, 0x24, 0x85, 0xc4, 0x08, - 0x8a, 0x7d, 0xb8, 0xf5, 0xb7, 0x25, 0x85, 0xe3, 0xf3, 0xe7, 0x37, 0xe8, 0xac, 0xd7, 0xdc, 0xb1, - 0xad, 0x41, 0x8c, 0x78, 0x5e, 0x30, 0x80, 0x80, 0x10, 0xc1, 0x65, 0x48, 0x0c, 0x3a, 0x11, 0xbf, - 0x23, 0xe0, 0x71, 0x43, 0xce, 0x00, 0xae, 0x33, 0x99, 0x64, 0xe8, 0xdd, 0x4a, 0x30, 0xc5, 0xef, - 0x0a, 0x8a, 0xb4, 0x0f, 0x26, 0x1e, 0xc3, 0x35, 0x1c, 0x17, 0xb7, 0xea, 0x03, 0x90, 0xbc, 0x28, - 0x1f, 0x43, 0x40, 0x84, 0x2b, 0x37, 0x0d, 0xab, 0xbc, 0x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 0x47, 0xfc, 0x0c, - 0xc9, 0x73, 0x99, 0xb6, 0x8b, 0xae, 0xd5, 0x4c, 0xac, 0xd6, 0x3d, 0x9c, 0xdd, 0xee, 0xfa, 0x6c, - 0x9c, 0xd3, 0x53, 0x30, 0xc4, 0x85, 0xf4, 0x2c, 0x45, 0x96, 0xed, 0x59, 0x51, 0x62, 0x15, 0xe6, - 0xc2, 0xf9, 0xfc, 0xd2, 0x9b, 0xef, 0x4d, 0x1d, 0x7a, 0x0b, 0x3f, 0xff, 0x80, 0x9f, 0x77, 0xdf, - 0x9b, 0x0a, 0x7d, 0x88, 0x9f, 0x8f, 0xf1, 0xf3, 0x09, 0x7e, 0x9e, 0x7e, 0x7f, 0x2a, 0xf4, 0x12, - 0x7e, 0x5e, 0xc1, 0xcf, 0x5f, 0xe0, 0xe7, 0x75, 0xfc, 0xbc, 0x89, 0x9f, 0xb7, 0xf0, 0xf3, 0x2e, - 0x7e, 0x3e, 0x7c, 0x7f, 0xea, 0xd0, 0xc7, 0xf8, 0xff, 0x13, 0xfc, 0xff, 0xf4, 0x3f, 0x4d, 0x1d, - 0xfa, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x74, 0xfe, 0x5d, 0xcb, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - 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 -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) 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 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() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - 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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) - } - data[i] = 0x35 - i++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) - if m.MyFloat64Ptr != nil { - data[i] = 0x39 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) - } - data[i] = 0x41 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) - 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.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := 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 !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v14 := int64(r.Int63()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Int64 = &v14 - } - 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 { - v15 := r.Intn(100) - tmps := make([]rune, v15) - for i := 0; i < v15; 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)) - v16 := r.Int63() - if r.Intn(2) == 0 { - v16 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v16)) - 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.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `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 + `,`, - `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 - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := 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 - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := 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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.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 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyMap[mapkey] = mapvalue - } else { - var mapvalue uint64 - 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - } else { - var mapvalue github_com_gogo_protobuf_test_casttype.MyUint64Type - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } else { - var mapvalue *Wilson - 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - } else { - var mapvalue Wilson - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttype(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttype - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttype(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/both/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 668 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x4f, 0xd4, 0x4e, - 0x18, 0xc7, 0xb7, 0x2c, 0x85, 0x76, 0xba, 0xfb, 0xfb, 0x91, 0x89, 0x87, 0x66, 0x13, 0x0b, 0x81, - 0x60, 0x3c, 0xe8, 0x2e, 0x59, 0x36, 0x48, 0xd0, 0x78, 0x28, 0xc1, 0x04, 0x63, 0x89, 0xa9, 0x12, - 0xa2, 0xf1, 0xd2, 0x42, 0x5d, 0x1a, 0xfb, 0x42, 0xb6, 0xb3, 0x9a, 0xde, 0x88, 0x1e, 0x4c, 0xfc, - 0x0b, 0xfc, 0x13, 0x3c, 0x7a, 0x31, 0xf1, 0xe8, 0x71, 0x8f, 0x1c, 0x3d, 0xf1, 0xe6, 0x85, 0x23, - 0x47, 0xe2, 0xc9, 0x67, 0x66, 0xfa, 0x16, 0x40, 0xb3, 0x94, 0xc3, 0x93, 0x79, 0x7b, 0x9e, 0xcf, - 0xf3, 0x9d, 0xa7, 0x33, 0x53, 0xd4, 0xd8, 0x0c, 0x7d, 0x3b, 0x8c, 0x5a, 0x76, 0x48, 0xb6, 0x5b, - 0x9b, 0x56, 0x44, 0x48, 0xbc, 0xe3, 0x34, 0x77, 0x7a, 0x21, 0x09, 0xb1, 0x94, 0x8e, 0x1b, 0x77, - 0xbb, 0x2e, 0xd9, 0xee, 0xdb, 0x4d, 0x70, 0x6e, 0x75, 0xc3, 0x6e, 0xd8, 0x62, 0x0e, 0x76, 0xff, - 0x35, 0x1b, 0xb1, 0x01, 0xeb, 0xf1, 0xc0, 0x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e, 0xbc, 0x92, 0x02, 0xaf, 0xb1, 0x88, 0x50, 0x7e, 0x24, 0xf0, 0x04, 0xaa, 0xbe, - 0x71, 0x62, 0xf6, 0xe8, 0xca, 0x26, 0xed, 0xe2, 0x1b, 0x48, 0x7c, 0x6b, 0x79, 0x7d, 0x87, 0x3d, - 0xb2, 0xa3, 0x26, 0x1f, 0x2c, 0x8d, 0x2c, 0x0a, 0x8d, 0x87, 0x68, 0xe2, 0xfc, 0xa7, 0xbd, 0x52, - 0xbc, 0x89, 0xf0, 0xc5, 0x02, 0x17, 0x09, 0x22, 0x27, 0xdc, 0x2a, 0x12, 0x94, 0xf6, 0x44, 0x5e, - 0xa2, 0x0d, 0xd7, 0x8b, 0xc2, 0xe0, 0x02, 0xf3, 0x7c, 0xb9, 0xae, 0xc7, 0x9c, 0xd6, 0xd0, 0x18, - 0x9f, 0xa4, 0x7b, 0x59, 0x65, 0xaf, 0x3d, 0xfb, 0x29, 0xb1, 0x3f, 0xcc, 0x42, 0x47, 0x7f, 0x32, - 0x38, 0xd2, 0x2a, 0x7b, 0x60, 0x3f, 0xc1, 0x0e, 0x8f, 0x34, 0xe1, 0x04, 0xec, 0x14, 0xec, 0x0c, - 0x6c, 0xf7, 0x58, 0x13, 0xbe, 0x80, 0x7d, 0x05, 0xfb, 0x0e, 0xf6, 0x03, 0x6c, 0x00, 0xb6, 0x07, - 0x76, 0x08, 0x76, 0x72, 0xac, 0x55, 0x4e, 0xa1, 0x3d, 0x83, 0x76, 0xf7, 0x97, 0x56, 0xf9, 0x13, - 0x00, 0x00, 0xff, 0xff, 0x22, 0x3b, 0x52, 0x73, 0x5e, 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 3c67d8b0..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto +++ /dev/null @@ -1,79 +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]; -} - -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 813ff318..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/both/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 a2c39ba2..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go +++ /dev/null @@ -1,1561 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=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,json=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,json=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,json=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,json=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,json=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,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=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,json=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,json=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,json=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,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3789 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, - 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x6c, 0xd9, 0x72, 0x2e, - 0x5e, 0xef, 0xae, 0xe4, 0x3a, 0x8e, 0xed, 0xd0, 0xdb, 0x2c, 0x44, 0x89, 0xd6, 0xd2, 0xd0, 0xad, - 0x23, 0x71, 0x6d, 0xa7, 0x05, 0x06, 0x23, 0x72, 0x44, 0xd1, 0x1e, 0xce, 0xb0, 0x9c, 0xa1, 0x6d, - 0xed, 0x53, 0x5a, 0xb7, 0x5d, 0x6c, 0x8b, 0xde, 0x0b, 0x34, 0x9b, 0xcd, 0x6e, 0x9b, 0x00, 0x6d, - 0xd2, 0xf4, 0x96, 0xb4, 0x4d, 0x51, 0xf4, 0x29, 0x40, 0x91, 0x36, 0x4f, 0x45, 0xda, 0xa7, 0x3e, - 0x14, 0x49, 0x73, 0x01, 0x9a, 0xb6, 0x69, 0x9b, 0x02, 0x06, 0x1a, 0x34, 0x2f, 0x3d, 0xe7, 0xbf, - 0x0c, 0x87, 0x17, 0x69, 0x28, 0x05, 0x69, 0x2a, 0x80, 0x10, 0xe7, 0xfc, 0xe7, 0x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0x80, 0x83, 0x7a, 0x43, 0x2a, - 0x7a, 0xa0, 0x90, 0xba, 0x0e, 0xa3, 0x9e, 0x49, 0x5a, 0x53, 0xb7, 0xaa, 0x32, 0x36, 0x67, 0x83, - 0x2c, 0x99, 0x29, 0x48, 0x9c, 0x4a, 0x30, 0x35, 0x6d, 0x74, 0x5c, 0x2b, 0x0b, 0x00, 0xb6, 0x65, - 0xd8, 0x5b, 0xb8, 0xbc, 0xca, 0x26, 0xc6, 0x49, 0x7f, 0x2f, 0xad, 0x92, 0x4a, 0x8f, 0x97, 0x6c, - 0x2e, 0x2d, 0x9b, 0xca, 0x13, 0xed, 0x50, 0x1b, 0xde, 0x25, 0x52, 0x96, 0xf9, 0x22, 0xeb, 0x89, - 0xb6, 0x12, 0xa4, 0x9b, 0x06, 0xc5, 0x3d, 0xba, 0x98, 0x3f, 0x59, 0x82, 0x19, 0x31, 0x13, 0xf8, - 0x64, 0xaa, 0x80, 0xf1, 0x07, 0x1b, 0x69, 0xfa, 0x2f, 0x95, 0x53, 0xe0, 0x09, 0x34, 0x16, 0x56, - 0xc0, 0xb2, 0x50, 0x4a, 0x0a, 0x57, 0x50, 0x36, 0x79, 0x09, 0xd2, 0x9d, 0xee, 0x51, 0x26, 0x20, - 0xe6, 0xb8, 0x7a, 0xd3, 0x65, 0x51, 0x18, 0x53, 0xf9, 0x85, 0x92, 0x81, 0x08, 0x26, 0x19, 0x96, - 0xe5, 0x62, 0x2a, 0x7d, 0x9d, 0xbc, 0x08, 0x23, 0x1d, 0xb7, 0x1f, 0x14, 0x38, 0xfd, 0xcc, 0x10, - 0x4c, 0xf4, 0x8b, 0xb9, 0xbe, 0xe1, 0x8f, 0xcb, 0x07, 0x23, 0x60, 0xd3, 0x68, 0x62, 0xdc, 0x11, - 0x83, 0xb8, 0xc2, 0x88, 0x8a, 0x99, 0xfa, 0xa6, 0x61, 0x62, 0x34, 0x85, 0x4e, 0xa7, 0xcf, 0x7d, - 0x65, 0xa0, 0xa8, 0x9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, 0x8d, 0x96, 0x49, 0x39, 0x3a, 0x98, 0xe2, 0xb7, 0x24, 0x85, 0xc4, 0x08, - 0x8a, 0x7d, 0xb8, 0xf5, 0xb7, 0x25, 0x85, 0xe3, 0xf3, 0xe7, 0x37, 0xe8, 0xac, 0xd7, 0xdc, 0xb1, - 0xad, 0x41, 0x8c, 0x78, 0x5e, 0x30, 0x80, 0x80, 0x10, 0xc1, 0x65, 0x48, 0x0c, 0x3a, 0x11, 0xbf, - 0x23, 0xe0, 0x71, 0x43, 0xce, 0x00, 0xae, 0x33, 0x99, 0x64, 0xe8, 0xdd, 0x4a, 0x30, 0xc5, 0xef, - 0x0a, 0x8a, 0xb4, 0x0f, 0x26, 0x1e, 0xc3, 0x35, 0x1c, 0x17, 0xb7, 0xea, 0x03, 0x90, 0xbc, 0x28, - 0x1f, 0x43, 0x40, 0x84, 0x2b, 0x37, 0x0d, 0xab, 0xbc, 0x3d, 0x18, 0xc3, 0x4b, 0xd2, 0x95, 0x12, - 0x43, 0x14, 0x98, 0x79, 0xea, 0x7a, 0x13, 0x37, 0xd7, 0xe6, 0x40, 0xd3, 0xf1, 0x7b, 0x82, 0x23, - 0xe5, 0x81, 0x84, 0x47, 0x5a, 0xd6, 0x7e, 0x68, 0x5e, 0x96, 0x1e, 0xf1, 0xc1, 0xc4, 0xd2, 0xc3, - 0x9d, 0x29, 0x75, 0x12, 0xfb, 0x61, 0xfb, 0x7d, 0xb9, 0xf4, 0x38, 0x76, 0xd9, 0xcf, 0x88, 0x33, - 0xed, 0xe0, 0x16, 0x7c, 0x10, 0x9a, 0x3f, 0x90, 0x33, 0xcd, 0x00, 0x04, 0xbe, 0x01, 0x47, 0xfb, - 0xa6, 0xfa, 0x01, 0xc8, 0xfe, 0x50, 0x90, 0x1d, 0xee, 0x93, 0xee, 0x45, 0x4a, 0xd8, 0x2f, 0xe5, - 0x1f, 0xc9, 0x94, 0x60, 0x74, 0x71, 0xad, 0x51, 0x1b, 0xeb, 0xe8, 0x5b,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fb, 0xc7, 0x0f, 0xfd, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0x34, 0x8e, 0xb2, 0xd0, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - 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 -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) 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 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() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - 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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) - } - data[i] = 0x35 - i++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) - if m.MyFloat64Ptr != nil { - data[i] = 0x39 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) - } - data[i] = 0x41 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) - 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.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := int32(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Int32Ptr = &v1 - } - this.Int32 = int32(r.Int63()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - if r.Intn(10) != 0 { - v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - this.MyUint64Ptr = &v2 - } - this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - if r.Intn(10) != 0 { - v3 := 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 !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v14 := int64(r.Int63()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Int64 = &v14 - } - 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 { - v15 := r.Intn(100) - tmps := make([]rune, v15) - for i := 0; i < v15; 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)) - v16 := r.Int63() - if r.Intn(2) == 0 { - v16 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v16)) - 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.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `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 + `,`, - `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{ - // 670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0x73, 0x02, 0xd1, 0x89, 0xc1, 0x8a, 0x44, 0x12, 0xb5, 0x2a, - 0x62, 0x80, 0xa4, 0x4a, 0xa3, 0x10, 0x15, 0xc4, 0xe0, 0xaa, 0x48, 0x45, 0xb8, 0x42, 0x86, 0xaa, - 0x02, 0xb1, 0x38, 0x8d, 0x49, 0x2d, 0xfc, 0x23, 0xb2, 0x1d, 0x90,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, 0x3f, 0x4c, 0xa7, 0xad, - 0x3c, 0x19, 0x1f, 0x56, 0xa7, 0xf6, 0xc0, 0x7e, 0x82, 0xfd, 0x3a, 0xac, 0x72, 0xc7, 0x60, 0x27, - 0x60, 0xa7, 0x60, 0xbb, 0x47, 0x55, 0xee, 0x0b, 0xd8, 0x57, 0xb0, 0xef, 0x60, 0x3f, 0xc0, 0xc6, - 0x60, 0x7b, 0x47, 0xe0, 0x0b, 0xed, 0x31, 0xb4, 0x27, 0xd0, 0x9e, 0x42, 0xbb, 0xfb, 0xbb, 0x3a, - 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xbd, 0x6b, 0x7d, 0x63, 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 e4934ac2..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto +++ /dev/null @@ -1,79 +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]; -} - -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 a7de0549..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 409d2109..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go +++ /dev/null @@ -1,1352 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/neither/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=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,json=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,json=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,json=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,json=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,json=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,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=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,json=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,json=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,json=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,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3789 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, - 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x7c, 0x93, 0x73, 0xf1, - 0x7a, 0x77, 0x25, 0xd7, 0x71, 0x6c, 0x87, 0xde, 0x66, 0x21, 0x4a, 0xb4, 0x96, 0x86, 0x6e, 0x1d, - 0x89, 0x6b, 0x3b, 0x2d, 0x30, 0x18, 0x91, 0x23, 0x8a, 0xf6, 0x70, 0x86, 0xe5, 0x0c, 0x6d, 0x6b, - 0x9f, 0xd2, 0xba, 0xed, 0x22, 0x2d, 0x7a, 0x2f, 0xd0, 0xdc, 0xdb, 0x04, 0x68, 0x93, 0xa6, 0xb7, - 0xa4, 0x6d, 0x8a, 0xa2, 0x4f, 0x01, 0x8a, 0xb4, 0x79, 0x2a, 0xda, 0x3e, 0xf5, 0xa1, 0xc8, 0xad, - 0x01, 0x9a, 0xb6, 0x69, 0x9b, 0x02, 0x06, 0x1a, 0x34, 0x2f, 0x3d, 0xe7, 0xbf, 0x0c, 0x87, 0x17, - 0x69, 0x28, 0x05, 0x69, 0x56, 0x00, 0x21, 0xce, 0xf9, 0xcf, 0xf7, 0xcd, 0x99, 0xf3, 0x9f, 0xff, - 0x9c, 0xf3, 0xff, 0x43, 0xf8, 0xab, 0x1f, 0x81, 0xe3, 0x55, 0xdb, 0xae, 0x9a, 0xc6, 0x4c, 0xa3, - 0x69, 0xbb, 0xf6, 0x46, 0x6b, 0x73, 0xa6, 0x62, 0x38, 0xe5, 0x66, 0xad, 0xe1, 0xda, 0xcd, 0x69, - 0x26, 0x53, 0x46, 0xb9, 0xc6, 0xb4, 0xd4, 0x98, 0x5a, 0x82, 0xb1, 0xcb, 0x35, 0xd3, 0x98, 0xf7, - 0x14, 0xd7, 0x0c, 0x57, 0xb9, 0x08, 0xd1, 0x4d, 0x14, 0x66, 0x43, 0xc7, 0x23, 0xa7, 0x92, 0x67, - 0x1f, 0x98, 0xee, 0x02, 0x4d, 0x77, 0x22, 0x56, 0x49, 0xac, 0x32, 0xc4, 0xd4, 0x47, 0x51, 0x18, - 0xef, 0x33, 0xaa, 0x28,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 0xa4, 0xe9, 0xbf, 0x54, 0x4e, 0x82, 0x27, 0xd0, 0x58, 0x58, 0x01, 0xcb, 0x42, - 0x29, 0x29, 0x5c, 0x46, 0xd9, 0xe4, 0x45, 0x48, 0x77, 0xba, 0x47, 0x99, 0x80, 0x98, 0xe3, 0xea, - 0x4d, 0x97, 0x45, 0x61, 0x4c, 0xe5, 0x17, 0x4a, 0x06, 0x22, 0x98, 0x64, 0x58, 0x96, 0x8b, 0xa9, - 0xf4, 0x75, 0xf2, 0x02, 0x8c, 0x74, 0xdc, 0x7e, 0x50, 0xe0, 0xd4, 0xd3, 0x43, 0x30, 0xd1, 0x2f, - 0xe6, 0xfa, 0x86, 0x3f, 0x2e, 0x1f, 0x8c, 0x80, 0x0d, 0xa3, 0x89, 0x71, 0x47, 0x0c, 0xe2, 0x0a, - 0x23, 0x2a, 0x66, 0xea, 0x1b, 0x86, 0x89, 0xd1, 0x14, 0x3a, 0x95, 0x3e, 0xfb, 0x8d, 0x81, 0xa2, - 0x7a, 0x7a, 0x91, 0x20, 0x2a, 0x47, 0x2a, 0x8f, 0x43, 0x54, 0xa4, 0x38, 0x62, 0x38, 0x3d, 0x18, - 0x03, 0xc5, 0xa2, 0xca, 0x70, 0xca, 0xd7, 0x20, 0x41, 0xff, 0xb9, 0x6f, 0x87, 0x98, 0xcd, 0x71, - 0x12, 0x90, 0x5f, 0x95, 0x49, 0x88, 0xb3, 0x30, 0xab, 0x18, 0xb2, 0x34, 0x78, 0xd7, 0x34, 0x31, - 0x15, 0x63, 0x53, 0x6f, 0x99, 0xae, 0x76, 0x4b, 0x37, 0x5b, 0x06, 0x0b, 0x18, 0x9c, 0x18, 0x21, - 0xfc, 0x1e, 0xc9, 0x94, 0x63, 0x90, 0xe4, 0x51, 0x59, 0x43, 0xcc, 0x1d, 0x96, 0x7d, 0x62, 0x2a, - 0x0f, 0xd4, 0x22, 0x49, 0xe8, 0xf6, 0x37, 0x1c, 0x5c, 0x0b, 0x62, 0x6a, 0xd9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x3f, 0x43, 0xf2, - 0x6c, 0xa6, 0xed, 0xa2, 0xab, 0x35, 0x13, 0x0b, 0x76, 0x0f, 0x67, 0xb7, 0xbb, 0xbe, 0x18, 0xe7, - 0xd4, 0x51, 0x18, 0xe2, 0x42, 0x7a, 0x96, 0x22, 0xcb, 0xf6, 0xac, 0x28, 0xb1, 0x0a, 0x73, 0xfe, - 0x5c, 0x7e, 0xf1, 0x9d, 0x0f, 0x8e, 0x1e, 0xf8, 0x3b, 0xfc, 0xfc, 0x23, 0x7e, 0xde, 0xff, 0xe0, - 0x68, 0xe8, 0x63, 0xfc, 0x7c, 0x8a, 0x9f, 0xcf, 0xf0, 0xf3, 0xe4, 0x87, 0x47, 0x43, 0xaf, 0xe2, - 0xe7, 0x75, 0xfc, 0xfc, 0x05, 0x7e, 0xde, 0xc2, 0xcf, 0x3b, 0x1f, 0xa2, 0x3e, 0x7e, 0xde, 0xc7, - 0xef, 0x1f, 0xe3, 0xff, 0x4f, 0xf1, 0xff, 0x67, 0xf8, 0xff, 0xc9, 0x7f, 0x3e, 0x7a, 0xe0, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x56, 0xee, 0xce, 0xcf, 0xce, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - 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 -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) 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 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() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - 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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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 !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v14 := int64(r.Int63()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Int64 = &v14 - } - 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 { - v15 := r.Intn(100) - tmps := make([]rune, v15) - for i := 0; i < v15; 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)) - v16 := r.Int63() - if r.Intn(2) == 0 { - v16 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v16)) - 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.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `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 + `,`, - `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{ - // 668 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xec, 0x73, 0x02, 0xd1, 0x89, 0xc1, 0x8a, 0xd4, 0x34, 0x6a, 0x55, - 0xc4, 0x00, 0x49, 0x95, 0x46, 0x21, 0x2a, 0x88, 0xc1, 0x55, 0x91, 0x8a, 0x70, 0x85, 0x0c, 0x55, - 0x05, 0x62, 0x71, 0x1a, 0x13, 0x2c, 0xfc, 0x23, 0xb2, 0x1d, 0x90, 0xb7, 0x0a, 0x06, 0x24, 0xfe, - 0x02, 0xfe, 0x04, 0x46, 0x16, 0x24, 0x46, 0xc6, 0x8c, 0x8c, 0x4c, 0xfd, 0xc5, 0xd2, 0xb1, 0x63,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x8f, 0x6a, 0xdc, 0x17, 0xb0, 0xaf, 0x60, 0xdf, 0xc1, 0x7e, 0x80, 0x8d, 0x8f, 0xc0, 0x1f, - 0xec, 0x00, 0xfa, 0xc7, 0xd0, 0x9e, 0x40, 0x7b, 0x0a, 0xed, 0xee, 0xef, 0xda, 0xd4, 0xdf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xc5, 0x8d, 0x07, 0x8c, 0x61, 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 e8cd18d4..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto +++ /dev/null @@ -1,79 +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]; -} - -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 0f1fb926..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/neither/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 7f50bbcb..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go +++ /dev/null @@ -1,2241 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=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,json=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,json=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,json=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,json=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,json=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,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=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,json=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,json=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,json=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,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3786 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02,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xb3, - 0x0f, 0x4c, 0x77, 0x81, 0xa6, 0x3b, 0x11, 0xab, 0x24, 0x56, 0x19, 0x62, 0xea, 0xa3, 0x28, 0x8c, - 0xf7, 0x19, 0x55, 0x14, 0x88, 0x5a, 0x7a, 0x9d, 0x18, 0x43, 0xa7, 0x12, 0x2a, 0xfb, 0xae, 0x64, - 0x61, 0xb8, 0xa1, 0x97, 0x6f, 0xea, 0x55, 0x23, 0x1b, 0x66, 0x62, 0x79, 0xa9, 0x1c, 0x05, 0xa8, - 0x18, 0x0d, 0xc3, 0xaa, 0x18, 0x56, 0x79, 0x3b, 0x1b, 0x41, 0x2b, 0x12, 0xaa, 0x4f, 0xa2, 0x7c, - 0x03, 0xc6, 0x1a, 0xad, 0x0d, 0xb3, 0x56, 0xd6, 0x7c, 0x6a, 0x80, 0x6a, 0x31, 0x35, 0xc3, 0x07, - 0xe6, 0xdb, 0xca, 0x0f, 0xc3, 0xe8, 0x6d, 0x43, 0xbf, 0xe9, 0x57, 0x4d, 0x32, 0xd5, 0x34, 0x89, - 0x7d, 0x8a, 0x73, 0x90, 0xaa, 0x1b, 0x8e, 0x83, 0x06, 0x68, 0xee, 0x76, 0xc3, 0xc8, 0x46, 0xd9, - 0xd3, 0x1f, 0xef, 0x79, 0xfa, 0xee, 0x27, 0x4f, 0x0a, 0xd4, 0x3a, 0x82, 0x94, 0x59, 0x48, 0x18, - 0x56, 0xab, 0xce, 0x19, 0x62, 0x3b, 0xf8, 0xaf, 0x80, 0x1a, 0xdd, 0x2c, 0x71, 0x82, 0x09, 0x8a, - 0x61, 0xc7, 0x68, 0xde, 0xaa, 0x95, 0x8d, 0xec, 0x10, 0x23, 0x78, 0xb8, 0x87, 0x60, 0x8d, 0x8f, - 0x77, 0x73, 0x48, 0x1c, 0x3e, 0x4a, 0xc2, 0xb8, 0xe3, 0x1a, 0x96, 0x53, 0xb3, 0xad, 0xec, 0x30, - 0x23, 0x79, 0xb0, 0xcf, 0x2c, 0x1a, 0x66, 0xa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e, 0x7c, 0x31, 0x34, 0xf9, 0x38, 0x64, 0xba, 0xa7, 0x76, 0x4f, 0x78, - 0x15, 0x94, 0x5e, 0x07, 0xfb, 0x19, 0x62, 0x9c, 0xe1, 0x21, 0x3f, 0x43, 0xf2, 0x6c, 0xa6, 0xed, - 0xa2, 0xab, 0x35, 0x13, 0x8b, 0x76, 0x0f, 0x67, 0xb7, 0xbb, 0xbe, 0x18, 0xe7, 0xd4, 0x51, 0x18, - 0xe2, 0x42, 0x7a, 0x96, 0x22, 0xcb, 0xf6, 0xac, 0x28, 0xb1, 0x0a, 0x73, 0xfe, 0x5c, 0x7e, 0xf1, - 0x9d, 0x0f, 0x8e, 0x1e, 0xf8, 0x1b, 0xfc, 0xfc, 0x3d, 0x7e, 0xde, 0xff, 0xe0, 0x68, 0xe8, 0x63, - 0xfc, 0x7c, 0x8a, 0x9f, 0xcf, 0xf0, 0xf3, 0xe4, 0x87, 0x47, 0x43, 0xaf, 0xe2, 0xe7, 0x75, 0xfc, - 0xfc, 0x19, 0x7e, 0xde, 0xc2, 0xcf, 0x3b, 0x1f, 0xa2, 0x3e, 0xfe, 0x7f, 0x1f, 0x3f, 0x1f, 0xe3, - 0xf7, 0x4f, 0xf1, 0xff, 0x67, 0xf8, 0xff, 0xc9, 0x7f, 0x3c, 0x7a, 0xe0, 0x7f, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x6f, 0xce, 0x5c, 0x69, 0xd2, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - 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 -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) 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 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() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - 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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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 !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v14 := int64(r.Int63()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Int64 = &v14 - } - 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 { - v15 := r.Intn(100) - tmps := make([]rune, v15) - for i := 0; i < v15; 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)) - v16 := r.Int63() - if r.Intn(2) == 0 { - v16 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v16)) - 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.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `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 + `,`, - `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 - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := 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 - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := 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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.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 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyMap[mapkey] = mapvalue - } else { - var mapvalue uint64 - 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttype - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - } else { - var mapvalue github_com_gogo_protobuf_test_casttype.MyUint64Type - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } else { - var mapvalue *Wilson - 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttype - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - } else { - var mapvalue Wilson - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttype(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttype(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttype - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttype - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttype(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unmarshaler/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbb, 0x6f, 0xd3, 0x5e, - 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0xeb, 0xe4, 0xf7, 0xab, 0xae, 0x18, 0xac, 0x48, 0xa4, 0xa1, - 0x55, 0x11, 0x03, 0x24, 0x55, 0x1a, 0x85, 0xa8, 0x20, 0x06, 0x57, 0x45, 0x2a, 0xc2, 0x15, 0x32, - 0x54, 0x15, 0x88, 0xc5, 0x69, 0x4c, 0x6a, 0xe1, 0x47, 0xe4, 0x07, 0xc8, 0x5b, 0x05, 0x03, 0x12, - 0x7f, 0x01, 0x7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xb5, 0x89, 0x1f, 0x60, 0x3f, 0xc1, 0x0e, 0x0e, 0x6b, 0xdc, - 0x31, 0xd8, 0x09, 0xd8, 0x29, 0xd8, 0xee, 0x51, 0x8d, 0xfb, 0x0c, 0xf6, 0x05, 0xec, 0x1b, 0xd8, - 0x77, 0xb0, 0xd1, 0x11, 0xf8, 0x43, 0x7b, 0x00, 0x76, 0x0c, 0xfd, 0x13, 0x68, 0x4f, 0xa1, 0xdd, - 0xfd, 0x55, 0x9b, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x72, 0x82, 0xd6, 0x2b, 0x65, 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 55188b27..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto +++ /dev/null @@ -1,79 +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]; -} - -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 4b331acd..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.pb.go deleted file mode 100644 index 021bb182..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.pb.go +++ /dev/null @@ -1,2449 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=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,json=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,json=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,json=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,json=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,json=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,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=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,json=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,json=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,json=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,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3788 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, - 0x76, 0x0e, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x7c, 0x93, 0x73, 0xf1, - 0x7a, 0x77, 0x25, 0xd7, 0x71, 0x6c, 0x87, 0xde, 0x66, 0x21, 0x4a, 0xb4, 0x96, 0x86, 0x6e, 0x1d, - 0x89, 0x6b, 0x3b, 0x2d, 0x30, 0x18, 0x91, 0x23, 0x8a, 0xf6, 0x70, 0x86, 0xe5, 0x0c, 0x6d, 0x6b, - 0x9f, 0xd2, 0xba, 0xed, 0x22, 0x2d, 0x7a, 0x2f, 0xd0, 0xdc, 0xdb, 0x04, 0x68, 0x93, 0xa6, 0xb7, - 0xa4, 0x6d, 0x8a, 0xa2, 0x4f, 0x01, 0x8a, 0xb4, 0x79, 0x2a, 0xda, 0x3e, 0xf5, 0xa1, 0xc8, 0xad, - 0x06, 0x9a, 0xb6, 0x69, 0x9b, 0x02, 0x06, 0x1a, 0x34, 0x2f, 0x3d, 0xe7, 0xbf, 0x0c, 0x87, 0x17, - 0x69, 0x28, 0x05, 0x69, 0x56, 0x00, 0x21, 0xce, 0xf9, 0xcf, 0xf7, 0xcd, 0x99, 0xf3, 0x9f, 0xff, - 0x9c, 0xf3, 0xff, 0x43, 0xf8, 0xab, 0x1f, 0x81, 0x63, 0x55, 0xdb, 0xae, 0x9a, 0xc6, 0x4c, 0xa3, - 0x69, 0xbb, 0xf6, 0x46, 0x6b, 0x73, 0xa6, 0x62, 0x38, 0xe5, 0x66, 0xad, 0xe1, 0xda, 0xcd, 0x69, - 0x26, 0x53, 0x46, 0xb9, 0xc6, 0xb4, 0xd4, 0x98, 0x5a, 0x82, 0xb1, 0x4b, 0x35, 0xd3, 0x98, 0xf7, - 0x14, 0xd7, 0x0c, 0x57, 0xb9, 0x00, 0xd1, 0x4d, 0x14, 0x66, 0x43, 0xc7, 0x22, 0x27, 0x93, 0x67, - 0x1e, 0x9c, 0xee, 0x02, 0x4d, 0x77, 0x22, 0x56, 0x49, 0xac, 0x32, 0xc4, 0xd4, 0xdd, 0x28, 0x8c, - 0xf7, 0x19, 0x55, 0x14, 0x88, 0x5a, 0x7a, 0x9d, 0x18, 0x43, 0x27, 0x13, 0x2a, 0xfb, 0xae, 0x64, - 0x61, 0xb8, 0xa1, 0x97, 0x6f, 0xe8, 0x55, 0x23, 0x1b, 0x66, 0x62, 0x79, 0xa9, 0x1c, 0x01, 0xa8, - 0x18, 0x0d, 0xc3, 0xaa, 0x18, 0x56, 0x79, 0x3b, 0x1b, 0x41, 0x2b, 0x12, 0xaa, 0x4f, 0xa2, 0x7c, - 0x03, 0xc6, 0x1a, 0xad, 0x0d, 0xb3, 0x56, 0xd6, 0x7c, 0x6a, 0x80, 0x6a, 0x31, 0x35, 0xc3, 0x07, - 0xe6, 0xdb, 0xca, 0x8f, 0xc0, 0xe8, 0x2d, 0x43, 0xbf, 0xe1, 0x57, 0x4d, 0x32, 0xd5, 0x34, 0x89, - 0x7d, 0x8a, 0x73, 0x90, 0xaa, 0x1b, 0x8e, 0x83, 0x06, 0x68, 0xee, 0x76, 0xc3, 0xc8, 0x46, 0xd9, - 0xd3, 0x1f, 0xeb, 0x79, 0xfa, 0xee, 0x27, 0x4f, 0x0a, 0xd4, 0x3a, 0x82, 0x94, 0x59, 0x48, 0x18, - 0x56, 0xab, 0xce, 0x19, 0x62, 0x3b, 0xf8, 0xaf, 0x80, 0x1a, 0xdd, 0x2c, 0x71, 0x82, 0x09, 0x8a, - 0x61, 0xc7, 0x68, 0xde, 0xac, 0x95, 0x8d, 0xec, 0x10, 0x23, 0x78, 0xa4, 0x87, 0x60, 0x8d, 0x8f, - 0x77, 0x73, 0x48, 0x1c,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30, 0x41, 0x12, - 0xb6, 0x06, 0xfd, 0x6c, 0xc1, 0x47, 0x08, 0xd9, 0xbf, 0xbf, 0xc3, 0x63, 0x6f, 0xdc, 0x23, 0xf0, - 0xf1, 0xfa, 0x66, 0xa2, 0x6a, 0xb8, 0x98, 0xdb, 0x70, 0xff, 0x67, 0x9a, 0xca, 0xae, 0xef, 0x18, - 0xb2, 0xcf, 0x7e, 0xd2, 0x39, 0x13, 0x0b, 0x1c, 0x39, 0x6b, 0x9a, 0xb9, 0x12, 0x1c, 0xec, 0x33, - 0xb3, 0x03, 0x70, 0x3e, 0x27, 0x38, 0x27, 0x7a, 0x66, 0x97, 0x68, 0x57, 0x41, 0xca, 0xbd, 0xf9, - 0x18, 0x80, 0xf3, 0x79, 0xc1, 0xa9, 0x08, 0xac, 0x9c, 0x16, 0x62, 0xbc, 0x0c, 0x63, 0xb8, 0x53, - 0xdf, 0xb0, 0x1d, 0xb1, 0xef, 0x1d, 0x80, 0xee, 0x05, 0x41, 0x37, 0x2a, 0x80, 0x6c, 0x17, 0x4c, - 0x5c, 0x8f, 0x43, 0x7c, 0x13, 0x37, 0x40, 0x03, 0x50, 0xbc, 0x28, 0x28, 0x86, 0x49, 0x9f, 0xa0, - 0xb3, 0x90, 0xaa, 0xda, 0x22, 0x0d, 0x07, 0xc3, 0x5f, 0x12, 0xf0, 0xa4, 0xc4, 0x08, 0x8a, 0x86, - 0xdd, 0x68, 0x99, 0x94, 0xa3, 0x83, 0x29, 0x7e, 0x4b, 0x52, 0x48, 0x8c, 0xa0, 0xd8, 0x83, 0x5b, - 0x7f, 0x5b, 0x52, 0x38, 0x3e, 0x7f, 0x7e, 0x87, 0xce, 0x7a, 0xcd, 0x6d, 0xdb, 0x1a, 0xc4, 0x88, - 0x97, 0x05, 0x03, 0x08, 0x08, 0x11, 0x5c, 0x84, 0xc4, 0xa0, 0x13, 0xf1, 0x3b, 0x02, 0x1e, 0x37, - 0xe4, 0x0c, 0xe0, 0x3a, 0x93, 0x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, 0xfc, 0x17, 0x05, 0x94, 0xeb, 0x63, 0x05, 0x49, 0xfa, 0xea, 0x5a, 0x30, - 0xfc, 0x97, 0x04, 0xdc, 0x8f, 0x22, 0xd3, 0x45, 0x5d, 0x0b, 0x26, 0xf8, 0x65, 0x69, 0xba, 0x40, - 0x90, 0xdb, 0x64, 0x49, 0x0b, 0x46, 0xff, 0x8a, 0xf4, 0xba, 0x84, 0xe0, 0x6a, 0x4a, 0x78, 0x69, - 0x2a, 0x18, 0xff, 0xab, 0x02, 0xdf, 0xc6, 0x90, 0x07, 0x7c, 0x69, 0x32, 0x98, 0xe2, 0xd7, 0xa4, - 0x07, 0x7c, 0x28, 0x5a, 0x46, 0xdd, 0xa5, 0x2f, 0x98, 0xe9, 0xd7, 0xe5, 0x32, 0xea, 0xaa, 0x7c, - 0x34, 0x9b, 0x2c, 0x5b, 0x04, 0x53, 0xfc, 0x86, 0x9c, 0x4d, 0xa6, 0x4f, 0x66, 0x74, 0xd7, 0x92, - 0x60, 0x8e, 0xdf, 0x94, 0x66, 0x74, 0x95, 0x12, 0xac, 0x4c, 0x4a, 0x6f, 0x1d, 0x09, 0xe6, 0x7b, - 0x46, 0xf0, 0x8d, 0xf5, 0x94, 0x91, 0xdc, 0x15, 0x38, 0xd0, 0xbf, 0x86, 0x04, 0xb3, 0x3e, 0x7b, - 0xaf, 0xab, 0xeb, 0xf7, 0x97, 0x10, 0x2c, 0x79, 0x13, 0xfd, 0xea, 0x47, 0x30, 0xed, 0x73, 0xf7, - 0x3a, 0x37, 0x76, 0xfe, 0xf2, 0x81, 0x1d, 0x1a, 0xb4, 0x53, 0x77, 0x30, 0xd7, 0x0b, 0x82, 0xcb, - 0x07, 0xa2, 0xa5, 0x21, 0x32, 0x77, 0x30, 0xfe, 0x45, 0xb9, 0x34, 0x04, 0x02, 0xc1, 0x71, 0xab, - 0x65, 0x9a, 0x14, 0x1c, 0xca, 0xee, 0x3f, 0x69, 0xc8, 0xfe, 0xeb, 0xe7, 0x62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, 0xca, - 0xdf, 0xc1, 0xd1, 0x8b, 0x22, 0x7e, 0x91, 0x0b, 0x5f, 0x08, 0x4d, 0x3e, 0x01, 0x99, 0xee, 0xa9, - 0xdd, 0x13, 0x5e, 0x05, 0xa5, 0xd7, 0xc1, 0x7e, 0x86, 0x18, 0x67, 0x78, 0xd8, 0xcf, 0x90, 0x3c, - 0x93, 0x69, 0xbb, 0xe8, 0x4a, 0xcd, 0xc4, 0x9a, 0xdd, 0xc3, 0xd9, 0xed, 0xae, 0x2f, 0xc6, 0x39, - 0x75, 0x04, 0x86, 0xb8, 0x90, 0x9e, 0xa5, 0xc8, 0xb2, 0x3d, 0x2b, 0x4a, 0xac, 0xc2, 0x9c, 0x3b, - 0x9b, 0x5f, 0x7c, 0xf7, 0xc3, 0x23, 0xf7, 0xfd, 0x1d, 0x7e, 0xfe, 0x11, 0x3f, 0x1f, 0x7c, 0x78, - 0x24, 0xf4, 0x31, 0x7e, 0x3e, 0xc5, 0xcf, 0x67, 0xf8, 0x79, 0xea, 0xa3, 0x23, 0xa1, 0xd7, 0xf0, - 0xf3, 0x06, 0x7e, 0xfe, 0x02, 0x3f, 0x6f, 0xe3, 0xe7, 0xdd, 0x8f, 0x50, 0x1f, 0x3f, 0x1f, 0xe0, - 0xf7, 0x8f, 0xf1, 0xff, 0xa7, 0xf8, 0xff, 0x33, 0xfc, 0x3c, 0xf5, 0xcf, 0x47, 0x42, 0xff, 0x17, - 0x00, 0x00, 0xff, 0xff, 0x14, 0x3a, 0xfe, 0x24, 0xd1, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - 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 -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) 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 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() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - 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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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 !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v14 := int64(r.Int63()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Int64 = &v14 - } - 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 { - v15 := r.Intn(100) - tmps := make([]rune, v15) - for i := 0; i < v15; 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)) - v16 := r.Int63() - if r.Intn(2) == 0 { - v16 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v16)) - 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.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `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 + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32Ptr != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) - } - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(m.Int32)) - if m.MyUint64Ptr != nil { - data[i] = 0x18 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) - } - data[i] = 0x20 - i++ - i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) - if m.MyFloat32Ptr != nil { - data[i] = 0x2d - i++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) - } - data[i] = 0x35 - i++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) - if m.MyFloat64Ptr != nil { - data[i] = 0x39 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) - } - data[i] = 0x41 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) - 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.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Ptr = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64Ptr = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) - } - m.MyUint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := 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 - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := 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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MyBytes = append(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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NormalBytes = append(m.NormalBytes[:0], data[iNdEx:postIndex]...) - if m.NormalBytes == nil { - m.NormalBytes = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyMap[mapkey] = mapvalue - } else { - var mapvalue uint64 - 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - } else { - var mapvalue github_com_gogo_protobuf_test_casttype.MyUint64Type - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } else { - var mapvalue *Wilson - 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - } else { - var mapvalue Wilson - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttypeUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttypeUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttypeUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttypeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttypeUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeboth/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x4f, 0xd4, 0x4e, - 0x18, 0xc7, 0x29, 0x4b, 0xa1, 0x9d, 0xee, 0xfe, 0x7e, 0x64, 0xe2, 0xa1, 0x21, 0x71, 0xd9, 0x40, - 0x30, 0x1e, 0x74, 0x97, 0x2c, 0x1b, 0x24, 0x68, 0x3c, 0x94, 0x60, 0x82, 0xb1, 0xc4, 0x54, 0x09, - 0xd1, 0x78, 0x69, 0xa1, 0x2c, 0x8d, 0x7d, 0xd9, 0x6c, 0xa7, 0x9a, 0xde, 0x88, 0x1e, 0x4c, 0xfc, - 0x0b, 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0x19, 0x1c, 0xd5, 0x47, 0x7e, 0x80, 0xfd, 0x04, 0x3b, 0x3c, 0xaa, 0x0b, 0x27, - 0x60, 0xa7, 0x60, 0x67, 0x60, 0x7b, 0xc7, 0x75, 0xe1, 0x33, 0xd8, 0x17, 0xb0, 0x6f, 0x60, 0xdf, - 0xc1, 0x06, 0xc7, 0xe0, 0x0f, 0x76, 0x08, 0xfd, 0x13, 0x68, 0x4f, 0xa1, 0x3d, 0x03, 0xdb, 0xfb, - 0x55, 0x17, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xc4, 0xb4, 0x9d, 0x64, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto deleted file mode 100644 index 757849e6..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto +++ /dev/null @@ -1,79 +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) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -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]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go deleted file mode 100644 index 5709d6ab..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go deleted file mode 100644 index 7e73aa68..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go +++ /dev/null @@ -1,1562 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=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,json=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,json=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,json=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,json=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,json=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,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=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,json=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,json=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,json=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,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3790 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, - 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 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3a, 0x70, 0x66, 0xaa, - 0x80, 0xf1, 0x89, 0x8d, 0x34, 0xfd, 0x97, 0xca, 0x49, 0xf0, 0x04, 0x1a, 0x0b, 0x2b, 0x60, 0x59, - 0x28, 0x25, 0x85, 0xcb, 0x28, 0x9b, 0xbc, 0x04, 0xe9, 0x4e, 0xf7, 0x28, 0x13, 0x10, 0x73, 0x5c, - 0xbd, 0xe9, 0xb2, 0x28, 0x8c, 0xa9, 0xfc, 0x42, 0xc9, 0x40, 0x04, 0x93, 0x0c, 0xcb, 0x72, 0x31, - 0x95, 0xbe, 0x4e, 0x5e, 0x84, 0x91, 0x8e, 0xdb, 0x0f, 0x0a, 0x9c, 0x7a, 0x7a, 0x08, 0x26, 0xfa, - 0xc5, 0x5c, 0xdf, 0xf0, 0xc7, 0xed, 0x83, 0x11, 0xb0, 0x61, 0x34, 0x31, 0xee, 0x88, 0x41, 0x5c, - 0x61, 0x44, 0xc5, 0x4c, 0x7d, 0xc3, 0x30, 0x31, 0x9a, 0x42, 0xa7, 0xd3, 0xe7, 0xbe, 0x36, 0x50, - 0x54, 0x4f, 0x2f, 0x12, 0x44, 0xe5, 0x48, 0xe5, 0x09, 0x88, 0x8a, 0x14, 0x47, 0x0c, 0x67, 0x06, - 0x63, 0xa0, 0x58, 0x54, 0x19, 0x4e, 0xf9, 0x0a, 0x24, 0xe8, 0x3f, 0xf7, 0xed, 0x10, 0xb3, 0x39, - 0x4e, 0x02, 0xf2, 0xab, 0x32, 0x09, 0x71, 0x16, 0x66, 0x15, 0x43, 0x96, 0x06, 0xef, 0x9a, 0x16, - 0xa6, 0x62, 0x6c, 0xea, 0x2d, 0xd3, 0xd5, 0x6e, 0xeb, 0x66, 0xcb, 0x60, 0x01, 0x83, 0x0b, 0x23, - 0x84, 0xdf, 0x21, 0x99, 0x72, 0x0c, 0x92, 0x3c, 0x2a, 0x6b, 0x88, 0xb9, 0xcb, 0xb2, 0x4f, 0x4c, - 0xe5, 0x81, 0x5a, 0x24, 0x09,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c, 0x7b, 0x4a, 0xd6, 0x59, 0xc8, 0x94, 0xcd, 0x9a, 0x61, 0xb9, 0x9a, 0xe3, 0x36, 0x0d, 0xbd, - 0x5e, 0xb3, 0xaa, 0x2c, 0x8f, 0xc6, 0x73, 0xb1, 0x4d, 0xdd, 0x74, 0x0c, 0x75, 0x94, 0x0f, 0xaf, - 0xc9, 0x51, 0x42, 0xb0, 0x62, 0xd1, 0xf4, 0x21, 0x86, 0x3a, 0x10, 0x7c, 0xd8, 0x43, 0x4c, 0xfd, - 0xc3, 0x30, 0x24, 0x7d, 0xdd, 0x99, 0x72, 0x02, 0x52, 0x37, 0xf5, 0xdb, 0xba, 0x26, 0x3b, 0x6e, - 0xee, 0x89, 0x24, 0xc9, 0x56, 0x45, 0xd7, 0x7d, 0x16, 0x26, 0x98, 0x0a, 0xce, 0x11, 0x6f, 0x54, - 0x36, 0x75, 0xc7, 0x61, 0x4e, 0x8b, 0x33, 0x55, 0x85, 0xc6, 0x56, 0x68, 0x68, 0x4e, 0x8e, 0x28, - 0x8f, 0xc1, 0x38, 0x43, 0xd4, 0x31, 0xf1, 0xd6, 0x1a, 0xa6, 0xa1, 0xd1, 0x33, 0x80, 0xc3, 0xf2, - 0xa9, 0x67, 0xd9, 0x18, 0x69, 0x2c, 0x09, 0x05, 0xb2, 0xc8, 0x51, 0x16, 0xe0, 0x08, 0x83, 0x55, - 0x0d, 0xcb, 0x68, 0xea, 0xae, 0xa1, 0x19, 0x3f, 0xd9, 0x42, 0x5d, 0x4d, 0xb7, 0x2a, 0xda, 0x96, - 0xee, 0x6c, 0x65, 0x27, 0xfc, 0x04, 0x87, 0x49, 0x77, 0x41, 0xa8, 0x16, 0x98, 0xe6, 0xac, 0x55, - 0xf9, 0x36, 0xea, 0x29, 0x39, 0x38, 0xc8, 0x88, 0xd0, 0x29, 0x38, 0x67, 0xad, 0xbc, 0x65, 0x94, - 0x6f, 0x69, 0x2d, 0x77, 0xf3, 0x52, 0xf6, 0x2b, 0x7e, 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c8, 0x6d, 0xb2, 0xa4, 0x05, 0xa3, 0x7f, 0x45, 0x7a, 0x5d, 0x42, 0x70, 0x37, - 0x25, 0xbc, 0x34, 0x15, 0x8c, 0xff, 0x55, 0x81, 0x6f, 0x63, 0xc8, 0x03, 0xbe, 0x34, 0x19, 0x4c, - 0xf1, 0x6b, 0xd2, 0x03, 0x3e, 0x14, 0x6d, 0xa3, 0xee, 0xd2, 0x17, 0xcc, 0xf4, 0xeb, 0x72, 0x1b, - 0x75, 0x55, 0x3e, 0x5a, 0x4d, 0x96, 0x2d, 0x82, 0x29, 0x7e, 0x43, 0xae, 0x26, 0xd3, 0x27, 0x33, - 0xba, 0x6b, 0x49, 0x30, 0xc7, 0x6f, 0x4a, 0x33, 0xba, 0x4a, 0x09, 0x56, 0x26, 0xa5, 0xb7, 0x8e, - 0x04, 0xf3, 0x3d, 0x2d, 0xf8, 0xc6, 0x7a, 0xca, 0x48, 0xee, 0x1a, 0x1c, 0xec, 0x5f, 0x43, 0x82, - 0x59, 0x7f, 0x70, 0xbf, 0xab, 0xeb, 0xf7, 0x97, 0x10, 0x2c, 0x79, 0x13, 0xfd, 0xea, 0x47, 0x30, - 0xed, 0x33, 0xf7, 0x3b, 0x1f, 0xec, 0xfc, 0xe5, 0x03, 0x3b, 0x34, 0x68, 0xa7, 0xee, 0x60, 0xae, - 0x67, 0x05, 0x97, 0x0f, 0x44, 0x5b, 0x43, 0x64, 0xee, 0x60, 0xfc, 0x73, 0x72, 0x6b, 0x08, 0x04, - 0x82, 0xe3, 0x56, 0xcb, 0x34, 0x29, 0x38, 0x94, 0xdd, 0x7f, 0xd2, 0x90, 0xfd, 0xe8, 0x33, 0xb1, - 0x31, 0x24, 0x00, 0x73, 0x68, 0xcc, 0xa8, 0x6f, 0xa0, 0x0f, 0x02, 0x90, 0xff, 0xfa, 0x99, 0x4c, - 0x08, 0xa4, 0x8d, 0xfb, 0x09, 0xf8, 0x43, 0x23, 0x3b, 0xc3, 0x0e, 0xc0, 0x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, 0x86, 0x87, 0xfd, 0x0c, - 0xc9, 0x73, 0x99, 0xb6, 0x8b, 0xae, 0xd5, 0x4c, 0x2c, 0xdc, 0x3d, 0x9c, 0xdd, 0xee, 0xfa, 0x7c, - 0x9c, 0x53, 0x47, 0x61, 0x88, 0x0b, 0x69, 0x2e, 0x45, 0x96, 0xed, 0x59, 0x51, 0x62, 0x15, 0xe6, - 0xc2, 0xf9, 0xfc, 0xe2, 0x5b, 0xef, 0x1d, 0x3d, 0xf0, 0x77, 0xf8, 0xf9, 0x47, 0xfc, 0xbc, 0xfb, - 0xde, 0xd1, 0xd0, 0x87, 0xf8, 0xf9, 0x04, 0x3f, 0x9f, 0xe2, 0xe7, 0xa9, 0xf7, 0x8f, 0x86, 0x5e, - 0xc6, 0xcf, 0xab, 0xf8, 0xf9, 0x0b, 0xfc, 0xbc, 0x81, 0x9f, 0xb7, 0xde, 0x47, 0x7d, 0xfc, 0xbc, - 0x8b, 0xdf, 0x3f, 0xc4, 0xff, 0x9f, 0xe0, 0xff, 0x4f, 0xf1, 0xf3, 0xd4, 0x3f, 0x1f, 0x3d, 0xf0, - 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xca, 0x2d, 0xe1, 0xd1, 0xd6, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - 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 -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) 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 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() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - 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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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 !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v14 := int64(r.Int63()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Int64 = &v14 - } - 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 { - v15 := r.Intn(100) - tmps := make([]rune, v15) - for i := 0; i < v15; 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)) - v16 := r.Int63() - if r.Intn(2) == 0 { - v16 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v16)) - 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.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `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 + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32Ptr != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) - } - data[i] = 0x10 - i++ - i = encodeVarintCasttype(data, i, uint64(m.Int32)) - if m.MyUint64Ptr != nil { - data[i] = 0x18 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) - } - data[i] = 0x20 - i++ - i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) - if m.MyFloat32Ptr != nil { - data[i] = 0x2d - i++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) - } - data[i] = 0x35 - i++ - i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) - if m.MyFloat64Ptr != nil { - data[i] = 0x39 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) - } - data[i] = 0x41 - i++ - i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) - 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.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Wilson) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Wilson) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int64 != nil { - data[i] = 0x8 - i++ - i = encodeVarintCasttype(data, i, uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Casttype(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Casttype(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCasttype(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} - -func init() { proto.RegisterFile("combos/unsafemarshaler/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 676 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbb, 0x6f, 0xd3, 0x5e, - 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0xeb, 0xe4, 0xf7, 0xab, 0xae, 0x18, 0xac, 0x4a, 0xa4, 0x51, - 0xab, 0x20, 0x06, 0x48, 0xaa, 0x34, 0x0a, 0x51, 0x41, 0x0c, 0xae, 0x8a, 0x54, 0x84, 0x2b, 0x64, - 0xa8, 0x2a, 0x10, 0x8b, 0xd3, 0xb8, 0xa9, 0x85, 0x1f, 0x91, 0x1f, 0x20, 0x6f, 0x15, 0x0c, 0x48, - 0xfc, 0x05, 0xfc, 0x09, 0x8c, 0x2c, 0x48, 0x8c, 0x8c, 0x19, 0x19, 0x99, 0xfa, 0x62, 0xe9, 0xd8, - 0xb1, 0x62, 0xe2, 0xdc, 0x7b, 0xfd, 0x52, 0x5b, 0x50, 0xea, 0x0e, 0x47, 0xf7, 0x75, 0xce, 0xe7, - 0x7c, 0xef, 0xf1, 0xbd, 0xd7, 0xa8, 0xbe, 0xed, 0xda, 0x3d, 0xd7, 0x6f, 0x86, 0x8e, 0xaf, 0xef, - 0x18, 0xb6, 0xee, 0xf9, 0xbb, 0xba, 0x65, 0x78, 0xcd, 0x6d, 0xdd, 0x0f, 0x82, 0x68, 0x68, 0x34, - 0x86, 0x9e, 0x1b, 0xb8, 0x58, 0x48, 0xc6, 0x73, 0x77, 0x07, 0x66, 0xb0, 0x1b, 0xf6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, 0x7e, 0xdf, 0xe8, 0x13, 0x15, - 0xff, 0xff, 0x43, 0x45, 0xce, 0x8f, 0xa9, 0x58, 0x21, 0xa7, 0xbe, 0xb8, 0x92, 0x1c, 0x6f, 0xae, - 0x8b, 0x50, 0x76, 0x24, 0xf0, 0x2c, 0x2a, 0xbd, 0x36, 0x22, 0xfa, 0xe8, 0x8a, 0x1a, 0xe9, 0xe2, - 0x1b, 0x88, 0x7f, 0xa3, 0x5b, 0xa1, 0x41, 0x1f, 0xd9, 0x29, 0x8d, 0x0d, 0x56, 0x26, 0xbb, 0xdc, - 0xdc, 0x43, 0x34, 0x7b, 0xfe, 0xd3, 0x5e, 0x29, 0x5e, 0x43, 0xf8, 0x62, 0x81, 0xf3, 0x04, 0x9e, - 0x11, 0x6e, 0xe5, 0x09, 0x52, 0x6b, 0x36, 0x2b, 0xd1, 0x96, 0x69, 0xf9, 0xae, 0x73, 0x81, 0x79, - 0xbe, 0x5c, 0xd7, 0x63, 0x2e, 0x54, 0xd1, 0x34, 0x9b, 0x24, 0x7b, 0x59, 0xa7, 0xaf, 0x3d, 0xfd, - 0x29, 0xd1, 0x3f, 0x4c, 0xa7, 0xad, 0x3c, 0x19, 0x1d, 0x55, 0x27, 0x7e, 0x80, 0xfd, 0x04, 0x3b, - 0x3c, 0xaa, 0x72, 0x27, 0x60, 0xa7, 0x60, 0x67, 0x60, 0x7b, 0xc7, 0x55, 0xee, 0x33, 0xd8, 0x17, - 0xb0, 0x6f, 0x60, 0xdf, 0xc1, 0x46, 0xc7, 0xe0, 0x0f, 0x76, 0x08, 0xfd, 0x13, 0x68, 0x4f, 0xa1, - 0x3d, 0x03, 0xdb, 0xfb, 0x55, 0x9d, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xe5, 0x25, 0x59, - 0x69, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto deleted file mode 100644 index d95ff9cd..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto +++ /dev/null @@ -1,79 +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) = true; -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]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go deleted file mode 100644 index 31bb75e7..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go deleted file mode 100644 index 962ae76e..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go +++ /dev/null @@ -1,2241 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/casttype.proto -// DO NOT EDIT! - -/* - Package casttype is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/casttype.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` - MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=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,json=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,json=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,json=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,json=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,json=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,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=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,json=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,json=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,json=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,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -type Wilson struct { - Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CasttypeDescription() -} -func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3788 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, - 0x76, 0x0e, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x7c, 0x93, 0x93, 0xd8, - 0xeb, 0xdd, 0x95, 0x5c, 0xc7, 0xb1, 0x1d, 0x7a, 0x9b, 0x85, 0x28, 0xd1, 0x5a, 0x1a, 0xba, 0x75, - 0x24, 0xae, 0xed, 0xb4, 0xc0, 0x60, 0x44, 0x8e, 0x28, 0xda, 0xc3, 0x19, 0x96, 0x33, 0xb4, 0xad, - 0x7d, 0x4a, 0xeb, 0xb6, 0x8b, 0x6d, 0xd1, 0x7b, 0x81, 0xe6, 0xde, 0x26, 0x40, 0x9b, 0x34, 0xbd, - 0x25, 0x6d, 0x53, 0x14, 0x7d, 0x0a, 0x50, 0xa4, 0xcd, 0x53, 0xd1, 0xf6, 0xa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 0x3f, 0x2e, 0x1f, 0x8c, 0x80, 0x0d, 0xa3, 0x89, 0x71, 0x47, 0x0c, 0xe2, 0x0a, - 0x23, 0x2a, 0x66, 0xea, 0x1b, 0x86, 0x89, 0xd1, 0x14, 0x3a, 0x95, 0x3e, 0xfb, 0x8d, 0x81, 0xa2, - 0x7a, 0x7a, 0x91, 0x20, 0x2a, 0x47, 0x2a, 0x8f, 0x43, 0x54, 0xa4, 0x38, 0x62, 0x38, 0x3d, 0x18, - 0x03, 0xc5, 0xa2, 0xca, 0x70, 0xca, 0xd7, 0x20, 0x41, 0xff, 0xb9, 0x6f, 0x87, 0x98, 0xcd, 0x71, - 0x12, 0x90, 0x5f, 0x95, 0x49, 0x88, 0xb3, 0x30, 0xab, 0x18, 0xb2, 0x34, 0x78, 0xd7, 0x34, 0x31, - 0x15, 0x63, 0x53, 0x6f, 0x99, 0xae, 0x76, 0x4b, 0x37, 0x5b, 0x06, 0x0b, 0x18, 0x9c, 0x18, 0x21, - 0xfc, 0x1e, 0xc9, 0x94, 0xa3, 0x90, 0xe4, 0x51, 0x59, 0x43, 0xcc, 0x1d, 0x96, 0x7d, 0x62, 0x2a, - 0x0f, 0xd4, 0x22, 0x49, 0xe8, 0xf6, 0x37, 0x1c, 0x5c, 0x0b, 0x62, 0x6a, 0xd9, 0x2d, 0x48, 0xc0, - 0x6e, 0x7f, 0xa1, 0x3b, 0xf1, 0x1d, 0xee, 0xff, 0x78, 0xdd, 0xb1, 0x38, 0xf5, 0xe7, 0x61, 0x88, - 0xb2, 0xf5, 0x36, 0x0a, 0xc9, 0xf5, 0xeb, 0xab, 0x05, 0x6d, 0x7e, 0xa5, 0x94, 0x5f, 0x2c, 0x64, - 0x42, 0x4a, 0x1a, 0x80, 0x09, 0x2e, 0x2f, 0xae, 0xcc, 0xae, 0x67, 0xc2, 0xde, 0x75, 0x71, 0x79, - 0xfd, 0xfc, 0xb9, 0x4c, 0xc4, 0x03, 0x94, 0xb8, 0x20, 0xea, 0x57, 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, 0xa1, 0x90, 0x12, 0x45, 0x4f, 0x38, 0xdd, 0x0d, 0x41, 0x76, 0x27, 0xee, 0x80, 0xf5, - 0x1e, 0xee, 0x58, 0xef, 0x97, 0xba, 0x0d, 0x38, 0xbe, 0xf3, 0x33, 0xf4, 0x58, 0xf1, 0x72, 0x08, - 0x0e, 0xf4, 0xef, 0x37, 0xfa, 0xda, 0xf0, 0x38, 0x0c, 0xd5, 0x0d, 0x77, 0xcb, 0x96, 0x35, 0xf7, - 0xe1, 0x3e, 0x99, 0x9c, 0x86, 0xbb, 0x7d, 0x25, 0x50, 0xfe, 0x52, 0x10, 0xd9, 0xa9, 0x69, 0xe0, - 0xd6, 0xf4, 0x58, 0xfa, 0xc3, 0x30, 0xdc, 0xdf, 0x97, 0xbc, 0xaf, 0xa1, 0x87, 0x01, 0x6a, 0x56, - 0xa3, 0xe5, 0xf2, 0xba, 0xca, 0xd3, 0x4c, 0x82, 0x49, 0xd8, 0x12, 0xa6, 0x14, 0xd2, 0x72, 0xbd, - 0xf1, 0x08, 0x1b, 0x07, 0x2e, 0x62, 0x0a, 0x17, 0xdb, 0x86, 0x46, 0x99, 0xa1, 0x47, 0x76, 0x78, - 0xd2, 0x9e, 0x92, 0x75, 0x06, 0x32, 0x65, 0xb3, 0x66, 0x58, 0xae, 0xe6, 0xb8, 0x4d, 0x43, 0xaf, - 0xd7, 0xac, 0x2a, 0xcb, 0xa3, 0xf1, 0x5c, 0x6c, 0x53, 0x37, 0x1d, 0x43, 0x1d, 0xe5, 0xc3, 0x6b, - 0x72, 0x94, 0x10, 0xac, 0x58, 0x34, 0x7d, 0x88, 0xa1, 0x0e, 0x04, 0x1f, 0xf6, 0x10, 0x53, 0xff, - 0x30, 0x0c, 0x49, 0x5f, 0x77, 0xa6, 0x1c, 0x87, 0xd4, 0x0d, 0xfd, 0x96, 0xae, 0xc9, 0x8e, 0x9b, - 0x7b, 0x22, 0x49, 0xb2, 0x55, 0xd1, 0x75, 0x9f, 0x81, 0x09,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 0x71, 0x03, 0x34, 0x00, 0xc5, 0xf3, 0x82, 0x62, 0x98, 0xf4, 0x09, - 0x3a, 0x0b, 0xa9, 0xaa, 0x2d, 0xd2, 0x70, 0x30, 0xfc, 0x05, 0x01, 0x4f, 0x4a, 0x8c, 0xa0, 0x68, - 0xd8, 0x8d, 0x96, 0x49, 0x39, 0x3a, 0x98, 0xe2, 0xb7, 0x24, 0x85, 0xc4, 0x08, 0x8a, 0x3d, 0xb8, - 0xf5, 0xb7, 0x25, 0x85, 0xe3, 0xf3, 0xe7, 0x77, 0xe8, 0xac, 0xd7, 0xdc, 0xb6, 0xad, 0x41, 0x8c, - 0x78, 0x51, 0x30, 0x80, 0x80, 0x10, 0xc1, 0x25, 0x48, 0x0c, 0x3a, 0x11, 0xbf, 0x23, 0xe0, 0x71, - 0x43, 0xce, 0x00, 0xae, 0x33, 0x99, 0x64, 0xe8, 0xdd, 0x4a, 0x30, 0xc5, 0xef, 0x0a, 0x8a, 0xb4, - 0x0f, 0x26, 0x1e, 0xc3, 0x35, 0x1c, 0x17, 0xb7, 0xea, 0x03, 0x90, 0xbc, 0x2c, 0x1f, 0x43, 0x40, - 0x84, 0x2b, 0x37, 0x0c, 0xab, 0xbc, 0x35, 0x18, 0xc3, 0x2b, 0xd2, 0x95, 0x12, 0x43, 0x14, 0x98, - 0x79, 0xea, 0x7a, 0x13, 0x37, 0xd7, 0xe6, 0x40, 0xd3, 0xf1, 0x7b, 0x82, 0x23, 0xe5, 0x81, 0x84, - 0x47, 0x5a, 0xd6, 0x5e, 0x68, 0x5e, 0x95, 0x1e, 0xf1, 0xc1, 0xc4, 0xd2, 0xc3, 0x9d, 0x29, 0x75, - 0x12, 0x7b, 0x61, 0xfb, 0x7d, 0xb9, 0xf4, 0x38, 0x76, 0xc9, 0xcf, 0x88, 0x33, 0xed, 0xe0, 0x16, - 0x7c, 0x10, 0x9a, 0x3f, 0x90, 0x33, 0xcd, 0x00, 0x04, 0xbe, 0x0e, 0x87, 0xfa, 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0x7e, 0x70, 0x24, 0xf4, 0x0a, 0x7e, - 0x5e, 0xc3, 0xcf, 0x5f, 0xe0, 0xe7, 0x4d, 0xfc, 0xbc, 0xfd, 0x01, 0xea, 0xe3, 0xe7, 0x3d, 0xfc, - 0xfe, 0x11, 0xfe, 0xff, 0x14, 0xff, 0x7f, 0x86, 0xff, 0x9f, 0xfc, 0xe7, 0x23, 0xa1, 0xff, 0x0d, - 0x00, 0x00, 0xff, 0xff, 0x79, 0x9a, 0x32, 0xce, 0xd8, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Castaway) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32Ptr != nil && that1.Int32Ptr != nil { - if *this.Int32Ptr != *that1.Int32Ptr { - return false - } - } else if this.Int32Ptr != nil { - return false - } else if that1.Int32Ptr != nil { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { - if *this.MyUint64Ptr != *that1.MyUint64Ptr { - return false - } - } else if this.MyUint64Ptr != nil { - return false - } else if that1.MyUint64Ptr != nil { - return false - } - if this.MyUint64 != that1.MyUint64 { - return false - } - if 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - 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 -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetInt32Ptr() *int32 { - return this.Int32Ptr -} - -func (this *Castaway) GetInt32() int32 { - return this.Int32 -} - -func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64Ptr -} - -func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { - return this.MyUint64 -} - -func (this *Castaway) 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 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() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - 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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - if this.MyMap != nil { - s = append(s, "MyMap: "+mapStringForMyMap+",\n") - } - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - if this.MyCustomMap != nil { - s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") - } - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - if this.MyNullableMap != nil { - s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") - } - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - if this.MyEmbeddedMap != nil { - s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&casttype.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCasttype(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCasttype(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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 !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v14 := int64(r.Int63()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Int64 = &v14 - } - 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 { - v15 := r.Intn(100) - tmps := make([]rune, v15) - for i := 0; i < v15; 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)) - v16 := r.Int63() - if r.Intn(2) == 0 { - v16 *= -1 - } - data = encodeVarintPopulateCasttype(data, uint64(v16)) - 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.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Wilson) Size() (n int) { - var l int - _ = l - if m.Int64 != nil { - n += 1 + sovCasttype(uint64(*m.Int64)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCasttype(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCasttype(x uint64) (n int) { - return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Castaway) String() string { - if this == nil { - return "nil" - } - keysForMyMap := make([]string, 0, len(this.MyMap)) - for k := range this.MyMap { - keysForMyMap = append(keysForMyMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) - mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" - for _, k := range keysForMyMap { - mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) - } - mapStringForMyMap += "}" - keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) - for k := range this.MyCustomMap { - keysForMyCustomMap = append(keysForMyCustomMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) - mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" - for _, k := range keysForMyCustomMap { - mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) - } - mapStringForMyCustomMap += "}" - keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) - for k := range this.MyNullableMap { - keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) - mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" - for _, k := range keysForMyNullableMap { - mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyNullableMap += "}" - keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) - for k := range this.MyEmbeddedMap { - keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) - mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" - for _, k := range keysForMyEmbeddedMap { - mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) - } - mapStringForMyEmbeddedMap += "}" - s := strings.Join([]string{`&Castaway{`, - `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, - `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, - `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 + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCasttype(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCasttype(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Ptr = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64Ptr = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) - } - m.MyUint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := 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 - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := 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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MyBytes = append(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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NormalBytes = append(m.NormalBytes[:0], data[iNdEx:postIndex]...) - if m.NormalBytes == nil { - m.NormalBytes = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyUint64S = append(m.MyUint64S, v) - case 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyMap[mapkey] = mapvalue - } else { - var mapvalue uint64 - 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - } else { - var mapvalue github_com_gogo_protobuf_test_casttype.MyUint64Type - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } else { - var mapvalue *Wilson - 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 ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - } else { - var mapvalue Wilson - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCasttypeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttypeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCasttypeUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCasttypeUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCasttypeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCasttypeUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCasttypeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCasttypeUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeunmarshaler/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 676 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0x3b, 0x6f, 0xd3, 0x50, - 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0xeb, 0x04, 0xaa, 0x2b, 0x06, 0xab, 0x12, 0x69, 0xd4, 0xaa, - 0xc0, 0x00, 0x49, 0x95, 0x46, 0x21, 0x2a, 0x88, 0xc1, 0x55, 0x91, 0x8a, 0x70, 0x85, 0x0c, 0x55, - 0x05, 0x62, 0x71, 0x1a, 0x37, 0xb5, 0xf0, 0x23, 0xf2, 0x03, 0xe4, 0xad, 0x82, 0x01, 0x89, 0x4f, - 0xc0, 0x47, 0x60, 0x64, 0x41, 0x62, 0x64, 0xcc, 0xc8, 0xc8, 0xd4, 0x17, 0x4b, 0xc7, 0x8e, 0x15, - 0x13, 0xe7, 0xde, 0xeb, 0x97, 0xda, 0x82, 0x52, 0x77, 0x38, 0xba, 0xaf, 0x73, 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 0xaf, - 0x60, 0xdf, 0xc1, 0x7e, 0x80, 0x0d, 0x8f, 0xc0, 0x1f, 0xec, 0x00, 0xfa, 0xc7, 0xd0, 0x9e, 0x40, - 0x7b, 0x0a, 0xed, 0xee, 0xef, 0x2a, 0xf7, 0x37, 0x00, 0x00, 0xff, 0xff, 0x32, 0x04, 0x75, 0xf8, - 0x6b, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto deleted file mode 100644 index acc0b0fa..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto +++ /dev/null @@ -1,79 +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) = true; - -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]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go deleted file mode 100644 index 94f85584..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/casttype.proto -// DO NOT EDIT! - -/* -Package casttype is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/casttype.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package casttype - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCasttypeDescription(t *testing.T) { - CasttypeDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go b/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go deleted file mode 100644 index 6961260b..00000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go +++ /dev/null @@ -1,59 +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 casttype - -import ( - "encoding/json" -) - -type MyInt32Type int32 -type MyFloat32Type float32 - -type MyUint64Type uint64 -type MyFloat64Type float64 - -type Bytes []byte - -func (this Bytes) MarshalJSON() ([]byte, error) { - return json.Marshal([]byte(this)) -} - -func (this *Bytes) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - *this = *v - return nil -} - -type MyStringType string - -type MyMapType map[string]uint64 diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/Makefile b/vendor/github.com/gogo/protobuf/test/castvalue/Makefile deleted file mode 100644 index 260ae801..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/Makefile +++ /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. - -regenerate: - rm -rf combos - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. castvalue.proto - protoc-gen-combo --default=false --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. castvalue.proto - cp mytypes.go ./combos/both/ || true - cp mytypes.go ./combos/marshaler/ || true - cp mytypes.go ./combos/unmarshaler/ || true - cp mytypes.go ./combos/unsafeboth/ || true - cp mytypes.go ./combos/unsafemarshaler/ || true - cp mytypes.go ./combos/unsafeunmarshaler/ || true diff --git a/vendor/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 1038bbf7..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go +++ /dev/null @@ -1,862 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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" 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3462 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, - 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x49, 0x77, 0xbd, 0xd9, 0x76, 0x1f, 0xee, - 0x63, 0xb7, 0xdb, 0x36, 0xdb, 0xff, 0xfe, 0xfb, 0xd8, 0xba, 0xff, 0x7f, 0xab, 0x3c, 0xbc, 0xa9, - 0x57, 0x79, 0x31, 0x89, 0xdb, 0xdd, 0xf2, 0x61, 0x34, 0x19, 0xdf, 0x38, 0xde, 0x1d, 0xcf, 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x51, 0xec, 0x45, 0x52, 0xf5, 0x49, 0x94, 0xeb, 0x60, 0xb4, - 0xd1, 0x5a, 0x33, 0x6b, 0x86, 0xe6, 0x53, 0x03, 0x54, 0x8b, 0xab, 0x59, 0xde, 0x30, 0xdb, 0x56, - 0x3e, 0x0c, 0x23, 0x17, 0x88, 0x7e, 0xce, 0xaf, 0x9a, 0x62, 0xaa, 0x19, 0x2a, 0xf6, 0x29, 0xce, - 0x40, 0xba, 0x4e, 0x1c, 0x07, 0x3b, 0xa0, 0xb9, 0x9b, 0x0d, 0x92, 0x8b, 0xb1, 0xd1, 0x1f, 0xec, - 0x1a, 0x7d, 0xe7, 0xc8, 0x53, 0x02, 0xb5, 0x8a, 0x20, 0x65, 0x0a, 0x92, 0xc4, 0x6a, 0xd5, 0x39, - 0x43, 0x7c, 0x0b, 0xfb, 0x15, 0x51, 0xa3, 0x93, 0x25, 0x41, 0x61, 0x82, 0x62, 0xc8, 0x21, 0xcd, - 0xf3, 0x35, 0x83, 0xe4, 0x06, 0x19, 0xc1, 0xe1, 0x2e, 0x82, 0x15, 0xde, 0xde, 0xc9, 0x21, 0x71, - 0x38, 0x94, 0x24, 0xb9, 0xe8, 0x12, 0xcb, 0xa9, 0xd9, 0x56, 0x6e, 0x88, 0x91, 0x5c, 0xdd, 0x63, - 0x16, 0x89, 0x59, 0xe9, 0xa4, 0x68, 0xe3, 0x94, 0x5b, 0x60, 0xc8, 0x6e, 0xb8, 0x78, 0xe7, 0xe4, - 0x12, 0x38, 0x3f, 0xa9, 0xe3, 0x97, 0xf7, 0x74, 0x84, 0x25, 0xae, 0xa3, 0x4a, 0x65, 0xa5, 0x04, - 0x59, 0xc7, 0x6e, 0x35, 0x0d, 0xa2, 0x19, 0x76, 0x85, 0x68, 0x35, 0x6b, 0xdd, 0xce, 0x25, 0x19, - 0xc1, 0x81, 0xee, 0x81, 0x30, 0xc5, 0x19, 0xd4, 0x2b, 0xa1, 0x9a, 0x9a, 0x71, 0x02, 0xcf, 0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58, 0x8f, 0x90, 0xd9, 0x73, 0x15, 0xdd, 0x09, 0x71, 0xee, 0x69, 0x3c, 0x89, 0x5c, - 0xdb, 0x33, 0xf6, 0x32, 0xbf, 0xeb, 0x4a, 0x24, 0x0c, 0xe7, 0x4f, 0xa4, 0xd1, 0x2d, 0x12, 0x29, - 0xa5, 0xe8, 0x72, 0xa7, 0x07, 0x22, 0x90, 0xdb, 0x8a, 0x3b, 0x64, 0xbd, 0x0f, 0x04, 0xd6, 0xfb, - 0xed, 0x9d, 0x1d, 0x38, 0xb4, 0xf5, 0x18, 0xba, 0x7a, 0xf1, 0x4c, 0x04, 0x76, 0xf7, 0xae, 0x37, - 0x7a, 0xf6, 0xe1, 0x0e, 0x18, 0xac, 0x13, 0x77, 0xc3, 0x96, 0x39, 0xf7, 0x9a, 0x1e, 0x91, 0x9c, - 0x36, 0x77, 0xda, 0x4a, 0xa0, 0xfc, 0xa9, 0x20, 0xba, 0x55, 0xd1, 0xc0, 0x7b, 0xd3, 0xd5, 0xd3, - 0x87, 0x06, 0xe0, 0xb2, 0x9e, 0xe4, 0x3d, 0x3b, 0x7a, 0x05, 0x40, 0xcd, 0x6a, 0xb4, 0x5c, 0x9e, - 0x57, 0x79, 0x98, 0x49, 0x32, 0x09, 0x5b, 0xc2, 0x34, 0x84, 0xb4, 0x5c, 0xaf, 0x3d, 0xca, 0xda, - 0x81, 0x8b, 0x98, 0xc2, 0x89, 0x76, 0x47, 0x63, 0xac, 0xa3, 0xfb, 0xb7, 0x18, 0x69, 0x57, 0xca, - 0xba, 0x11, 0xb2, 0x86, 0x59, 0x23, 0x96, 0xab, 0x39, 0x6e, 0x93, 0xe8, 0xf5, 0x9a, 0x55, 0x65, - 0x71, 0x34, 0x51, 0x88, 0xaf, 0xeb, 0xa6, 0x43, 0xd4, 0x11, 0xde, 0xbc, 0x22, 0x5b, 0x29, 0x82, - 0x25, 0x8b, 0xa6, 0x0f, 0x31, 0x18, 0x40, 0xf0, 0x66, 0x0f, 0x91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x56, 0x4e, 0x0b, 0x65, 0x3c, 0x05, 0xa3, 0xb8, 0x53, 0x5f, 0xb3, 0x1d, - 0xb1, 0xef, 0xed, 0x83, 0xee, 0x71, 0x41, 0x37, 0x22, 0x80, 0x6c, 0x17, 0x4c, 0xb9, 0x6e, 0x83, - 0xc4, 0x3a, 0x6e, 0x80, 0xfa, 0xa0, 0x78, 0x42, 0x50, 0x0c, 0x51, 0x7d, 0x0a, 0x9d, 0x82, 0x74, - 0xd5, 0x16, 0x61, 0x38, 0x1c, 0xfe, 0xa4, 0x80, 0xa7, 0x24, 0x46, 0x50, 0x34, 0xec, 0x46, 0xcb, - 0xa4, 0x31, 0x3a, 0x9c, 0xe2, 0x4b, 0x92, 0x42, 0x62, 0x04, 0xc5, 0x0e, 0xcc, 0xfa, 0x65, 0x49, - 0xe1, 0xf8, 0xec, 0x79, 0x27, 0x3d, 0xeb, 0x35, 0x37, 0x6d, 0xab, 0x9f, 0x4e, 0x3c, 0x25, 0x18, - 0x40, 0x40, 0x28, 0xc1, 0xed, 0x90, 0xec, 0x77, 0x22, 0xbe, 0x22, 0xe0, 0x09, 0x22, 0x67, 0x00, - 0xd7, 0x99, 0x0c, 0x32, 0xf4, 0xdb, 0x4a, 0x38, 0xc5, 0x57, 0x05, 0x45, 0xc6, 0x07, 0x13, 0xc3, - 0x70, 0x89, 0xe3, 0xe2, 0x56, 0xbd, 0x0f, 0x92, 0x67, 0xe4, 0x30, 0x04, 0x44, 0x98, 0x72, 0x8d, - 0x58, 0xc6, 0x46, 0x7f, 0x0c, 0xcf, 0x4a, 0x53, 0x4a, 0x0c, 0xa5, 0xc0, 0xc8, 0x53, 0xd7, 0x9b, - 0xb8, 0xb9, 0x36, 0xfb, 0x9a, 0x8e, 0xaf, 0x09, 0x8e, 0xb4, 0x07, 0x12, 0x16, 0x69, 0x59, 0x3b, - 0xa1, 0x79, 0x4e, 0x5a, 0xc4, 0x07, 0x13, 0x4b, 0x0f, 0x77, 0xa6, 0xb4, 0x92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, 0xbd, 0x13, 0x2f, 0xe3, 0xed, 0x85, 0x81, 0x13, 0x91, 0x09, - 0x1d, 0x0e, 0x86, 0xf5, 0xf4, 0xdf, 0x7c, 0x45, 0x7e, 0x3f, 0x0c, 0x72, 0x21, 0xfd, 0x1d, 0x5b, - 0xc9, 0x72, 0x6f, 0xb9, 0x89, 0x51, 0x45, 0xd5, 0x78, 0x8d, 0x3e, 0x4c, 0xcf, 0xbf, 0xfc, 0xea, - 0xfe, 0x5d, 0xbf, 0xc0, 0xeb, 0xd7, 0x78, 0xbd, 0xf2, 0xea, 0xfe, 0xc8, 0x1b, 0x78, 0xbd, 0x85, - 0xd7, 0xdb, 0x78, 0xdd, 0xff, 0xda, 0xfe, 0xc8, 0xb3, 0x78, 0x3d, 0x8f, 0xd7, 0x0f, 0xf1, 0x7a, - 0x11, 0xaf, 0x97, 0x5f, 0x43, 0x7d, 0xbc, 0x5e, 0xc1, 0xfb, 0x37, 0xf0, 0xff, 0x5b, 0xf8, 0xff, - 0x6d, 0xfc, 0x7f, 0xff, 0xef, 0xf7, 0xef, 0xfa, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x6d, - 0x34, 0xdd, 0xea, 0x2c, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x19, 0xa8, 0x39, 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, 0x09, 0x27, 0x63, 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, - 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, - 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, - 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, - 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, - 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, - 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, - 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, - 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, - 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, - 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, 0x02, 0x48, 0x7f, 0x00, 0xd2, 0x3f, 0x80, 0x74, - 0xc3, 0x63, 0x39, 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0x1f, 0x01, 0x78, 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 35e47436..00000000 --- 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 2c97a9d0..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 cb6114e6..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go +++ /dev/null @@ -1,1438 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/both/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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" 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3472 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88,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x9a, - 0x68, 0x03, 0x4d, 0x04, 0x11, 0xcb, 0x54, 0xac, 0x32, 0x44, 0xfe, 0x8d, 0x18, 0x8c, 0x74, 0x69, - 0x55, 0x14, 0x88, 0x59, 0x7a, 0x8d, 0x32, 0x46, 0x8e, 0x26, 0x55, 0x76, 0xaf, 0xe4, 0x60, 0xa0, - 0xae, 0x1b, 0xe7, 0xf4, 0x0a, 0xc9, 0xf5, 0x31, 0xb1, 0x7c, 0x54, 0xc6, 0x01, 0xca, 0xa4, 0x4e, - 0xac, 0x32, 0xb1, 0x8c, 0xad, 0x5c, 0x14, 0x7b, 0x91, 0x54, 0x7d, 0x12, 0xe5, 0x3a, 0x18, 0xae, - 0x37, 0xd7, 0xcd, 0xaa, 0xa1, 0xf9, 0xd4, 0x00, 0xd5, 0xe2, 0x6a, 0x96, 0x37, 0xcc, 0xb6, 0x94, - 0x8f, 0xc0, 0xd0, 0x05, 0xa2, 0x9f, 0xf3, 0xab, 0xa6, 0x98, 0x6a, 0x86, 0x8a, 0x7d, 0x8a, 0x33, - 0x90, 0xae, 0x11, 0xc7, 0xc1, 0x0e, 0x68, 0xee, 0x56, 0x9d, 0xe4, 0x62, 0x6c, 0xf4, 0x87, 0x3a, - 0x46, 0xdf, 0x3e, 0xf2, 0x94, 0x40, 0xad, 0x22, 0x48, 0x99, 0x82, 0x24, 0xb1, 0x9a, 0x35, 0xce, - 0x10, 0xdf, 0xc6, 0x7e, 0x45, 0xd4, 0x68, 0x67, 0x49, 0x50, 0x98, 0xa0, 0x18, 0x70, 0x48, 0xe3, - 0x7c, 0xd5, 0x20, 0xb9, 0x7e, 0x46, 0x70, 0xa4, 0x83, 0x60, 0x85, 0xb7, 0xb7, 0x73, 0x48, 0x1c, - 0x0e, 0x25, 0x49, 0x2e, 0xba, 0xc4, 0x72, 0xaa, 0xb6, 0x95, 0x1b, 0x60, 0x24, 0x57, 0x77, 0x99, - 0x45, 0x62, 0x96, 0xdb, 0x29, 0x5a, 0x38, 0xe5, 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 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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 encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - 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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - } else { - var mapvalue MyWilson - m.CastMapValueMessage[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - } else { - var mapvalue *MyWilson - m.CastMapValueMessageNullable[mapkey] = 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{ - // 333 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xce, 0xcf, 0x4d, - 0xca, 0x2f, 0xd6, 0x4f, 0xca, 0x2f, 0xc9, 0xd0, 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, 0x01, 0x95, 0xeb, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x24, 0x95, - 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, 0x99, 0x8b, 0xc3, 0x19, 0xa8, - 0x39, 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, - 0x09, 0x27, 0x63, 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, 0x86, 0x5f, 0x69, 0x4e, 0x4e, - 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, 0x69, 0x83, 0x38, 0x81, - 0x07, 0xc5, 0x7a, 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, 0x70, 0xf9, 0x44, 0x48, 0x80, - 0x8b, 0x39, 0x3b, 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, - 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, - 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, - 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, - 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, - 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, - 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, 0x40, 0x7c, 0x01, 0x88, 0x1f, - 0x00, 0xf1, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x80, 0xf4, 0x0f, 0x20, 0xdd, 0xf0, 0x58, 0x8e, 0x01, - 0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0x74, 0x6c, 0x99, 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 15663957..00000000 --- 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 2ce3ed65..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/both/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 202656ee..00000000 --- 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 e177c48d..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go +++ /dev/null @@ -1,989 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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" 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3470 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, - 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x49, 0x77, 0xbd, 0xd9, 0x76, 0xb3, 0xeb, - 0x3e, 0x76, 0xbb, 0x6d, 0x93, 0xfe, 0xf7, 0xdf, 0xc7, 0xd6, 0xfd, 0xff, 0x5b, 0xe5, 0xe1, 0x4d, - 0xbd, 0xca, 0x8b, 0x49, 0xd2, 0xee, 0x96, 0x0f, 0xa3, 0xc9, 0xf8, 0xc6, 0xf1, 0xee, 0x78, 0xc6, - 0x78, 0xc6, 0xbb, 0x9b, 0x7e, 0x2a, 0x6a, 0x01, 0x15, 0x44, 0x79, 0x4a, 0xf4, 0x0d, 0xad, 0x04, - 0x2d, 0xe5, 0xd5, 0xf2, 0x12, 0xe2, 0x53, 0x11, 0x2a, 0xf4, 0x13, 0x2a, 0x7c, 0xe2, 0x03, 0x02, - 0x5a, 0x2a, 0x51, 0xa0, 0x40, 0x91, 0x56, 0xa2, 0x52, 0xbf, 0x70, 0xee, 0x6b, 0x3c, 0x63, 0x3b, - 0x19, 0xa7, 0xa8, 0x94, 0x48, 0xa3, 0xcc, 0x9c, 0x7b, 0x7e, 0xbf, 0xb9, 0xf7, 0xdc, 0x73, 0xcf, - 0x39, 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, 0x94, 0x29, 0x48, 0x12, 0xab, 0x59, 0xe3, - 0x0c, 0xf1, 0x6d, 0xec, 0x57, 0x44, 0x8d, 0x76, 0x96, 0x04, 0x85, 0x09, 0x8a, 0x01, 0x87, 0x34, - 0xce, 0x57, 0x0d, 0x92, 0xeb, 0x67, 0x04, 0x47, 0x3a, 0x08, 0x56, 0x78, 0x7b, 0x3b, 0x87, 0xc4, - 0xe1, 0x50, 0x92, 0xe4, 0xa2, 0x4b, 0x2c, 0xa7, 0x6a, 0x5b, 0xb9, 0x01, 0x46, 0x72, 0x75, 0x97, - 0x59, 0x24, 0x66, 0xb9, 0x9d, 0xa2, 0x85, 0x53, 0x6e, 0x81, 0x01, 0xbb, 0xee, 0xe2, 0x9d, 0x93, - 0x4b, 0xe0, 0xfc, 0xa4, 0x8e, 0x5f, 0xde, 0xd5, 0x11, 0x96, 0xb8, 0x8e, 0x2a, 0x95, 0x95, 0x12, - 0x64, 0x1d, 0xbb, 0xd9, 0x30, 0x88, 0x66, 0xd8, 0x65, 0xa2, 0x55, 0xad, 0x0d, 0x3b, 0x97, 0x64, - 0x04, 0xe3, 0x9d, 0x03, 0x61, 0x8a, 0x33, 0xa8, 0x57, 0x42, 0x35, 0x35, 0xe3, 0x04, 0x9e, 0x95, - 0xbd, 0xd0, 0xef, 0x6c, 0x59, 0xae, 0x7e, 0x31, 0x97, 0x66, 0x1e, 0x22, 0x9e, 0xf2, 0xff, 0x8c, - 0xc3, 0x50, 0x2f, 0x2e, 0x76, 0x3b, 0xc4, 0x37, 0xe8, 0x28, 0xd1, 0xc1, 0x76, 0x61, 0x03, 0x8e, - 0x09, 0x1a, 0xb1, 0xff, 0x3d, 0x1a, 0x71, 0x0a, 0x52, 0x16, 0x71, 0x5c, 0x52, 0xe6, 0x1e, 0x11, - 0xed, 0xd1, 0xa7, 0x80, 0x83, 0x3a, 0x5d, 0x2a, 0xf6, 0x9e, 0x5c, 0xea, 0x34, 0x0c, 0x79, 0x5d, - 0xd2, 0x1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 0x3d, 0xce, - 0x39, 0x75, 0x69, 0x6d, 0x39, 0x0b, 0x1e, 0xc3, 0x42, 0x71, 0x65, 0x65, 0x6a, 0xae, 0x98, 0x4d, - 0x79, 0x1a, 0xd3, 0x67, 0x56, 0x8b, 0x2b, 0xd9, 0x74, 0xa0, 0x5b, 0xf8, 0x8a, 0x41, 0xef, 0x15, - 0xc5, 0xc5, 0xb5, 0x85, 0x6c, 0x46, 0x19, 0x86, 0x41, 0xfe, 0x0a, 0xd9, 0x89, 0xa1, 0x36, 0x11, - 0xf6, 0x34, 0xdb, 0xea, 0x08, 0x67, 0x19, 0x0e, 0x08, 0x50, 0x43, 0xc9, 0xcf, 0x40, 0x9c, 0x79, - 0x17, 0x7a, 0x71, 0x66, 0x7e, 0x6a, 0xba, 0x38, 0xaf, 0x2d, 0x2d, 0xaf, 0x96, 0x96, 0x16, 0xa7, - 0xe6, 0xd1, 0x76, 0x9e, 0x4c, 0x2d, 0x7e, 0x68, 0xad, 0xa4, 0x16, 0x67, 0xd1, 0x7e, 0x3e, 0xd9, - 0x72, 0x71, 0x6a, 0x15, 0x65, 0xd1, 0xfc, 0x31, 0x18, 0xed, 0x16, 0x67, 0xba, 0xad, 0x8c, 0xfc, - 0x33, 0x11, 0x18, 0xe9, 0x12, 0x32, 0xbb, 0xae, 0xa2, 0x3b, 0x21, 0xce, 0x3d, 0x8d, 0x27, 0x91, - 0x6b, 0xbb, 0xc6, 0x5e, 0xe6, 0x77, 0x1d, 0x89, 0x84, 0xe1, 0xfc, 0x89, 0x34, 0xba, 0x4d, 0x22, - 0xa5, 0x14, 0x1d, 0xee, 0xf4, 0x40, 0x04, 0x72, 0xdb, 0x71, 0x87, 0xac, 0xf7, 0xbe, 0xc0, 0x7a, - 0xbf, 0xbd, 0xbd, 0x03, 0x87, 0xb7, 0x1f, 0x43, 0x47, 0x2f, 0x9e, 0x8d, 0xc0, 0xde, 0xee, 0xf5, - 0x46, 0xd7, 0x3e, 0xdc, 0x01, 0xfd, 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, 0x98, 0x8d, 0x1e, 0x4b, 0x26, 0xde, 0x1c, - 0xc8, 0xde, 0x8f, 0x7f, 0x7d, 0xf9, 0x97, 0xfb, 0x20, 0x13, 0xac, 0x83, 0x95, 0xff, 0x83, 0x7d, - 0x72, 0xd3, 0xea, 0x10, 0x57, 0xbb, 0x50, 0x6d, 0x30, 0x77, 0xae, 0xe9, 0xbc, 0x92, 0xf4, 0x66, - 0x62, 0x54, 0x68, 0xe1, 0xf6, 0xfe, 0x1e, 0xd4, 0x39, 0xc9, 0x54, 0x94, 0x79, 0x18, 0x47, 0x93, - 0x61, 0xad, 0x69, 0x95, 0xf5, 0x46, 0x59, 0x6b, 0x1d, 0x17, 0x68, 0xba, 0x81, 0x7e, 0xe0, 0xd8, - 0x3c, 0x93, 0x78, 0x2c, 0x97, 0x5b, 0xf6, 0x8a, 0x50, 0x6e, 0x85, 0xd8, 0x29, 0xa1, 0xda, 0xe6, - 0x35, 0xd1, 0xed, 0xbc, 0x06, 0x6b, 0xaf, 0x9a, 0x5e, 0x47, 0xb7, 0x71, 0x1b, 0x5b, 0xac, 0x7a, - 0x4b, 0xa8, 0x09, 0x14, 0x14, 0xe9, 0xf3, 0xfb, 0x37, 0x07, 0x7e, 0x3b, 0xfe, 0x26, 0x0a, 0x69, - 0x7f, 0x05, 0x47, 0x0b, 0x62, 0x83, 0x85, 0xf9, 0x08, 0x8b, 0x02, 0x57, 0xee, 0x58, 0xef, 0x4d, - 0xcc, 0xd0, 0xf8, 0x5f, 0xe8, 0xe7, 0x75, 0x95, 0xca, 0x91, 0x34, 0xf7, 0x52, 0x5f, 0x23, 0xbc, - 0x5a, 0x4f, 0xa8, 0xe2, 0x09, 0x83, 0x5d, 0xff, 0x59, 0x87, 0x71, 0xf7, 0x33, 0xee, 0xab, 0x76, - 0xe6, 0x3e, 0xb5, 0xc2, 0xc8, 0x93, 0xa7, 0x56, 0xb4, 0xc5, 0x25, 0x75, 0x61, 0x6a, 0x5e, 0x15, - 0x70, 0x65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e3, 0xf5, 0x0e, 0x5e, 0xf7, 0xbf, 0x7e, 0x30, - 0xf2, 0x1c, 0x5e, 0x2f, 0xe0, 0xf5, 0x23, 0xbc, 0x5e, 0xc2, 0xeb, 0x15, 0xbc, 0x5e, 0x7d, 0x1d, - 0x75, 0xf1, 0xff, 0x9b, 0xf8, 0xff, 0x6d, 0xfc, 0xff, 0x0e, 0xfe, 0xbf, 0xff, 0x0f, 0x07, 0xf7, - 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xda, 0x83, 0xc0, 0xc0, 0xfb, 0x2c, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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 encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { - this := &Castaway{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.CastMapValueMessage = make(map[int32]MyWilson) - for i := 0; i < v1; i++ { - this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) - } - } - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.CastMapValueMessageNullable = make(map[int32]*MyWilson) - for i := 0; i < v2; i++ { - this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) - } - return this -} - -func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Int64 = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) - } - return this -} - -type randyCastvalue interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCastvalue(r randyCastvalue) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCastvalue(r randyCastvalue) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneCastvalue(r) - } - return string(tmps) -} -func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldCastvalue(data, r, fieldNumber, wire) - } - return data -} -func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateCastvalue(data, uint64(v5)) - case 1: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateCastvalue(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateCastvalue(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateCastvalue(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Castaway) Size() (n int) { - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k, v := range m.CastMapValueMessage { - _ = k - _ = v - l = ((*Wilson)(&v)).Size() - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) - n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) - } - } - if len(m.CastMapValueMessageNullable) > 0 { - for k, v := range m.CastMapValueMessageNullable { - _ = k - _ = v - l = 0 - if v != nil { - l = ((*Wilson)(v)).Size() - 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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("combos/marshaler/castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0xcf, 0x4d, - 0xca, 0x2f, 0xd6, 0xcf, 0x4d, 0x2c, 0x2a, 0xce, 0x48, 0xcc, 0x49, 0x2d, 0xd2, 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, 0x01, 0xf5, 0xe8, 0xa7, 0xe7, 0xa7, 0xe7, - 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, - 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 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, 0x09, 0x27, 0x63, 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, - 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, - 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, - 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, - 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, - 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, - 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, - 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, - 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, - 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, - 0x40, 0x7c, 0xe1, 0x11, 0x50, 0x2d, 0x90, 0x7e, 0x01, 0xa4, 0x3f, 0x00, 0xe9, 0x1f, 0x40, 0xba, - 0xe1, 0xb1, 0x1c, 0x03, 0x20, 0x00, 0x00, 0xff, 0xff, 0x15, 0xb6, 0x94, 0x56, 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 728312b8..00000000 --- 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 302a1f3a..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 202656ee..00000000 --- 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 394e25b4..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go +++ /dev/null @@ -1,1313 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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" 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3471 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, - 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x49, 0x77, 0xbd, 0xd9, 0x76, 0xb3, 0xeb, - 0x3e, 0x76, 0xbb, 0x6d, 0x93, 0xfe, 0xf7, 0xdf, 0xc7, 0xd6, 0xfd, 0xff, 0x5b, 0xe5, 0xe1, 0x4d, - 0xbd, 0xca, 0x8b, 0x49, 0xd2, 0xee, 0x96, 0x0f, 0xa3, 0xc9, 0xf8, 0xc6, 0xf1, 0xee, 0x78, 0xc6, - 0x78, 0xc6, 0xbb, 0x9b, 0x7e, 0x2a, 0x6a, 0x01, 0x15, 0x04, 0x94, 0x87, 0x44, 0xdf, 0xd0, 0x4a, - 0xd0, 0x52, 0x5e, 0x2d, 0x2f, 0x21, 0x3e, 0x15, 0xa1, 0x42, 0x3f, 0x21, 0xe0, 0x13, 0x1f, 0x10, - 0xb4, 0xa5, 0x12, 0x05, 0x0a, 0x14, 0x69, 0x25, 0x2a, 0xf5, 0x0b, 0xe7, 0xbe, 0xc6, 0x33, 0xb6, - 0x93, 0x71, 0x8a, 0x4a, 0x89, 0x34, 0xca, 0xcc, 0xb9, 0xe7, 0xf7, 0x9b, 0x7b, 0xcf, 0x3d, 0xf7, - 0x9c, 0x73, 0xef, 0x18, 0x7e, 0xfa, 0x3f, 0x70, 0xa8, 0x62, 0xdb, 0x15, 0x93, 0x4c, 0xd6, 0x1b, - 0xb6, 0x6b, 0xaf, 0x37, 0x37, 0x26, 0xcb, 0xc4, 0x31, 0x1a, 0xd5, 0xba, 0x6b, 0x37, 0x26, 0x98, - 0x4c, 0x19, 0xe2, 0x1a, 0x13, 0x52, 0x23, 0xbf, 0x00, 0xc3, 0x27, 0xab, 0x26, 0x99, 0xf5, 0x14, - 0x57, 0x88, 0xab, 0x9c, 0x80, 0xd8, 0x06, 0x0a, 0x73, 0x91, 0x43, 0xd1, 0xa3, 0xa9, 0xe3, 0x57, - 0x4d, 0xb4, 0x81, 0x26, 0x82, 0x88, 0x65, 0x2a, 0x56, 0x19, 0x22, 0xff, 0x46, 0x0c, 0x46, 0xba, - 0xb4, 0x2a, 0x0a, 0xc4, 0x2c, 0xbd, 0x46, 0x19, 0x23, 0x47, 0x93, 0x2a, 0xbb, 0x57, 0x72, 0x30, - 0x50, 0xd7, 0x8d, 0x73, 0x7a, 0x85, 0xe4, 0xfa, 0x98, 0x58, 0x3e, 0x2a, 0x07, 0x01, 0xca, 0xa4, - 0x4e, 0xac, 0x32, 0xb1, 0x8c, 0xad, 0x5c, 0x14, 0x7b, 0x91, 0x54, 0x7d, 0x12, 0xe5, 0x3a, 0x18, - 0xae, 0x37, 0xd7, 0xcd, 0xaa, 0xa1, 0xf9, 0xd4, 0x00, 0xd5, 0xe2, 0x6a, 0x96, 0x37, 0xcc, 0xb6, - 0x94, 0x8f, 0xc0, 0xd0, 0x05, 0xa2, 0x9f, 0xf3, 0xab, 0xa6, 0x98, 0x6a, 0x86, 0x8a, 0x7d, 0x8a, - 0x33, 0x90, 0xae, 0x11, 0xc7, 0xc1, 0x0e, 0x68, 0xee, 0x56, 0x9d, 0xe4, 0x62, 0x6c, 0xf4, 0x87, - 0x3a, 0x46, 0xdf, 0x3e, 0xf2, 0x94, 0x40, 0xad, 0x22, 0x48, 0x99, 0x82, 0x24, 0xb1, 0x9a, 0x35, - 0xce, 0x10, 0xdf, 0xc6, 0x7e, 0x45, 0xd4, 0x68, 0x67, 0x49, 0x50, 0x98, 0xa0, 0x18, 0x70, 0x48, - 0xe3, 0x7c, 0xd5, 0x20, 0xb9, 0x7e, 0x46, 0x70, 0xa4, 0x83, 0x60, 0x85, 0xb7, 0xb7, 0x73, 0x48, - 0x1c, 0x0e, 0x25, 0x49, 0x2e, 0xba, 0xc4, 0x72, 0xaa, 0xb6, 0x95, 0x1b, 0x60, 0x24, 0x57, 0x77, - 0x99, 0x45, 0x62, 0x96, 0xdb, 0x29, 0x5a, 0x38, 0xe5, 0x16, 0x18, 0xb0, 0xeb, 0x2e, 0xde, 0x39, - 0xb9, 0x04, 0xce, 0x4f, 0xea, 0xf8, 0xe5, 0x5d, 0x1d, 0x61, 0x89, 0xeb, 0xa8, 0x52, 0x59, 0x29, - 0x41, 0xd6, 0xb1, 0x9b, 0x0d, 0x83, 0x68, 0x86, 0x5d, 0x26, 0x5a, 0xd5, 0xda, 0xb0, 0x73, 0x49, - 0x46, 0x30, 0xde, 0x39, 0x10, 0xa6, 0x38, 0x83, 0x7a, 0x25, 0x54, 0x53, 0x33, 0x4e, 0xe0, 0x59, - 0xd9, 0x0b, 0xfd, 0xce, 0x96, 0xe5, 0xea, 0x17, 0x73, 0x69, 0xe6, 0x21, 0xe2, 0x29, 0xff, 0xcf, - 0x38, 0x0c, 0xf5, 0xe2, 0x62, 0xb7, 0x43, 0x7c, 0x83, 0x8e, 0x12, 0x1d, 0x6c, 0x17, 0x36, 0xe0, - 0x98, 0xa0, 0x11, 0xfb, 0xdf, 0xa3, 0x11, 0xa7, 0x20, 0x65, 0x11, 0xc7, 0x25, 0x65, 0xee, 0x11, - 0xd1, 0x1e, 0x7d, 0x0a, 0x38, 0xa8, 0xd3, 0xa5, 0x62, 0xef, 0xc9, 0xa5, 0x4e, 0xc3, 0x90, 0xd7, - 0x25, 0xad, 0xa1, 0x5b, 0x15, 0xe9, 0x9b, 0x93, 0x61, 0x3d, 0x99, 0x28, 0x4a, 0x9c, 0x4a, 0x61, - 0x6a, 0x86, 0x04, 0x9e, 0x95, 0x59, 0x00, 0xdb, 0x22, 0xf6, 0x06, 0x2e, 0x2f, 0xc3, 0x44, 0x3f, - 0xe9, 0x6e, 0xa5, 0x25, 0xaa, 0xd2, 0x61, 0x25, 0x9b, 0x4b, 0x0d, 0x53, 0xb9, 0xad, 0xe5, 0x6a, - 0x03, 0xdb, 0x78, 0xca, 0x02, 0x5f, 0x64, 0x1d, 0xde, 0xb6, 0x06, 0x99, 0x06, 0xa1, 0x7e, 0x8f, - 0x26, 0xe6, 0x23, 0x4b, 0xb2, 0x4e, 0x4c, 0x84, 0x8e, 0x4c, 0x15, 0x30, 0x3e, 0xb0, 0xc1, 0x86, - 0xff, 0x51, 0xb9, 0x12, 0x3c, 0x81, 0xc6, 0xdc, 0x0a, 0x58, 0x14, 0x4a, 0x4b, 0xe1, 0x22, 0xca, - 0xc6, 0x4e, 0x40, 0x26, 0x68, 0x1e, 0x65, 0x14, 0xe2, 0x8e, 0xab, 0x37, 0x5c, 0xe6, 0x85, 0x71, - 0x95, 0x3f, 0x28, 0x59, 0x88, 0x62, 0x90, 0x61, 0x51, 0x2e, 0xae, 0xd2, 0xdb, 0xb1, 0x5b, 0x61, - 0x30, 0xf0, 0xfa, 0x5e, 0x81, 0xf9, 0x47, 0xfa, 0x61, 0xb4, 0x9b, 0xcf, 0x75, 0x75, 0x7f, 0x5c, - 0x3e, 0xe8, 0x01, 0xeb, 0xa4, 0x81, 0x7e, 0x47, 0x19, 0xc4, 0x13, 0x7a, 0x54, 0xdc, 0xd4, 0xd7, - 0x89, 0x89, 0xde, 0x14, 0x39, 0x9a, 0x39, 0x7e, 0x5d, 0x4f, 0x5e, 0x3d, 0x31, 0x4f, 0x21, 0x2a, - 0x47, 0x2a, 0x77, 0x40, 0x4c, 0x84, 0x38, 0xca, 0x70, 0xac, 0x37, 0x06, 0xea, 0x8b, 0x2a, 0xc3, - 0x29, 0x07, 0x20, 0x49, 0xff, 0x73, 0xdb, 0xf6, 0xb3, 0x3e, 0x27, 0xa8, 0x80, 0xda, 0x55, 0x19, - 0x83, 0x04, 0x73, 0xb3, 0x32, 0x91, 0xa9, 0xc1, 0x7b, 0xa6, 0x13, 0x53, 0x26, 0x1b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 0xf4, 0x0a, 0x80, 0xaa, 0x55, 0x6f, 0xba, - 0x3c, 0xaf, 0xf2, 0x30, 0x93, 0x64, 0x12, 0xb6, 0x84, 0x69, 0x08, 0x69, 0xba, 0x5e, 0x7b, 0x94, - 0xb5, 0x03, 0x17, 0x31, 0x85, 0x13, 0xad, 0x8e, 0xc6, 0x58, 0x47, 0x0f, 0x6e, 0x33, 0xd2, 0x8e, - 0x94, 0x75, 0x23, 0x64, 0x0d, 0xb3, 0x4a, 0x2c, 0x57, 0x73, 0xdc, 0x06, 0xd1, 0x6b, 0x55, 0xab, - 0xc2, 0xe2, 0x68, 0xa2, 0x10, 0xdf, 0xd0, 0x4d, 0x87, 0xa8, 0x43, 0xbc, 0x79, 0x45, 0xb6, 0x52, - 0x04, 0x4b, 0x16, 0x0d, 0x1f, 0xa2, 0x3f, 0x80, 0xe0, 0xcd, 0x1e, 0x22, 0xff, 0xeb, 0x01, 0x48, - 0xf9, 0xaa, 0x33, 0xe5, 0x30, 0xa4, 0xcf, 0xea, 0xe7, 0x75, 0x4d, 0x56, 0xdc, 0xdc, 0x12, 0x29, - 0x2a, 0x5b, 0x16, 0x55, 0xf7, 0x8d, 0x30, 0xca, 0x54, 0x70, 0x8c, 0xf8, 0x22, 0xc3, 0xd4, 0x1d, - 0x87, 0x19, 0x2d, 0xc1, 0x54, 0x15, 0xda, 0xb6, 0x44, 0x9b, 0x66, 0x64, 0x8b, 0x72, 0x33, 0x8c, - 0x30, 0x44, 0x0d, 0x03, 0x6f, 0xb5, 0x6e, 0x12, 0x8d, 0xee, 0x01, 0x1c, 0x16, 0x4f, 0xbd, 0x9e, - 0x0d, 0x53, 0x8d, 0x05, 0xa1, 0x40, 0x7b, 0xe4, 0x28, 0x73, 0x70, 0x05, 0x83, 0x55, 0x88, 0x45, - 0x1a, 0xba, 0x4b, 0x34, 0xf2, 0x91, 0x26, 0xea, 0x6a, 0xba, 0x55, 0xd6, 0x36, 0x75, 0x67, 0x33, - 0x37, 0xea, 0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b, 0x36, 0x0d, 0x43, - 0x51, 0x35, 0x2b, 0x5b, 0x3c, 0x6d, 0x2c, 0x34, 0xcb, 0x76, 0x93, 0x16, 0x04, 0x5c, 0x8f, 0x46, - 0xbd, 0x88, 0x9a, 0xe2, 0x32, 0x4f, 0x45, 0x54, 0x6c, 0xad, 0x1d, 0x7c, 0x5a, 0x4d, 0x71, 0x19, - 0x57, 0x39, 0x02, 0x43, 0x7a, 0xa5, 0xd2, 0xa0, 0xe4, 0x92, 0x88, 0x97, 0xa1, 0x19, 0x4f, 0xcc, - 0x14, 0xc7, 0x4e, 0x41, 0x42, 0xda, 0x81, 0x26, 0x16, 0x6a, 0x09, 0xcc, 0xf9, 0xec, 0x1c, 0xa5, - 0x8f, 0x6e, 0xea, 0x2d, 0xd9, 0x88, 0x2f, 0xad, 0x3a, 0x5a, 0xeb, 0x40, 0xaf, 0x0f, 0xdb, 0x13, - 0x6a, 0xaa, 0xea, 0x78, 0x27, 0x38, 0xf9, 0x67, 0x31, 0xbd, 0x06, 0x0f, 0x24, 0x95, 0x59, 0x48, - 0x98, 0x36, 0xfa, 0x07, 0x45, 0xf0, 0xd3, 0xf0, 0xa3, 0x21, 0x67, 0x98, 0x13, 0xf3, 0x42, 0x5f, - 0xf5, 0x90, 0x63, 0xbf, 0x88, 0x40, 0x42, 0x8a, 0x31, 0x51, 0xc4, 0xea, 0xba, 0xbb, 0xc9, 0xe8, - 0xe2, 0xd3, 0x7d, 0xd9, 0x88, 0xca, 0x9e, 0xa9, 0x1c, 0xab, 0x19, 0x8b, 0xb9, 0x80, 0x90, 0xd3, - 0x67, 0x3a, 0xaf, 0x26, 0xd1, 0xcb, 0xac, 0xc0, 0xb5, 0x6b, 0x35, 0x9c, 0x49, 0x47, 0xce, 0xab, - 0x90, 0xcf, 0x08, 0x31, 0x3d, 0x17, 0x77, 0x1b, 0x7a, 0xd5, 0x0c, 0xe8, 0xc6, 0x98, 0x6e, 0x56, - 0x36, 0x78, 0xca, 0x05, 0xd8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 0x1c, 0xdc, - 0xf3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x4f, 0xfc, 0xaf, 0xfd, 0x2c, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - } else { - var mapvalue MyWilson - m.CastMapValueMessage[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalue - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalue - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - } else { - var mapvalue *MyWilson - m.CastMapValueMessageNullable[mapkey] = 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{ - // 340 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0xcf, 0x4d, - 0xca, 0x2f, 0xd6, 0x2f, 0xcd, 0xcb, 0x4d, 0x2c, 0x2a, 0xce, 0x48, 0xcc, 0x49, 0x2d, 0xd2, 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, 0x01, 0x75, 0xe9, 0xa7, 0xe7, - 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, - 0x74, 0x90, 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 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, 0x09, 0x27, 0x63, 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, - 0xc6, 0x62, 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, - 0x22, 0xad, 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, - 0xb9, 0x24, 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, - 0xac, 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, - 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, - 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, - 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, - 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, - 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, - 0xe2, 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf4, 0x03, 0x20, 0x7e, 0x01, 0x64, 0x7f, 0x00, 0xd2, 0x3f, - 0x80, 0x74, 0xc3, 0x63, 0x39, 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x77, 0x04, 0x2e, - 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 2f046a71..00000000 --- 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 fc745be7..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 202656ee..00000000 --- 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/combos/unsafeboth/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go deleted file mode 100644 index 7405709e..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go +++ /dev/null @@ -1,1439 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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" 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3470 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, - 0x15, 0xae, 0x63, 0x3b, 0xb1, 0x8f, 0x1d, 0xc7, 0x99, 0xa4, 0xbb, 0xde, 0x6c, 0xbb, 0xd9, 0x75, - 0x1f, 0xbb, 0xdd, 0xb6, 0x49, 0x59, 0xfa, 0xd8, 0xba, 0xd0, 0x2a, 0x0f, 0x6f, 0xea, 0x55, 0x5e, - 0x4c, 0x92, 0x76, 0xb7, 0xfc, 0x18, 0x4d, 0xc6, 0x37, 0x8e, 0x77, 0xc7, 0x33, 0xc6, 0x33, 0xde, - 0xdd, 0xf4, 0x57, 0x51, 0x0b, 0xa8, 0x20, 0x28, 0x2f, 0x89, 0xbe, 0xa1, 0x95, 0xa0, 0xa5, 0xbc, - 0x5a, 0x5e, 0x42, 0xfc, 0x2a, 0x42, 0x85, 0xfe, 0x42, 0xc0, 0x2f, 0x7e, 0x20, 0x68, 0x4b, 0x25, - 0x0a, 0x14, 0x28, 0xd2, 0x4a, 0x54, 0xea, 0x1f, 0xce, 0x7d, 0x8d, 0x67, 0x6c, 0x27, 0xe3, 0x14, - 0x95, 0x12, 0x69, 0x94, 0x99, 0x73, 0xcf, 0xf7, 0xcd, 0xbd, 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0x77, - 0x0c, 0x3f, 0xff, 0x00, 0x1c, 0xac, 0xd8, 0x76, 0xc5, 0x24, 0x93, 0xf5, 0x86, 0xed, 0xda, 0xeb, - 0xcd, 0x8d, 0xc9, 0x32, 0x71, 0x8c, 0x46, 0xb5, 0xee,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0x48, 0xae, 0x9f, 0x11, 0x1c, 0xee, 0x20, 0x58, 0xe1, 0xed, 0xed, 0x1c, 0x12, 0x87, 0x43, 0x49, - 0x92, 0x0b, 0x2e, 0xb1, 0x9c, 0xaa, 0x6d, 0xe5, 0x06, 0x18, 0xc9, 0x55, 0x5d, 0x66, 0x91, 0x98, - 0xe5, 0x76, 0x8a, 0x16, 0x4e, 0xb9, 0x19, 0x06, 0xec, 0xba, 0x8b, 0x77, 0x4e, 0x2e, 0x81, 0xf3, - 0x93, 0x3a, 0x76, 0x59, 0x57, 0x47, 0x58, 0xe2, 0x3a, 0xaa, 0x54, 0x56, 0x4a, 0x90, 0x75, 0xec, - 0x66, 0xc3, 0x20, 0x9a, 0x61, 0x97, 0x89, 0x56, 0xb5, 0x36, 0xec, 0x5c, 0x92, 0x11, 0x8c, 0x77, - 0x0e, 0x84, 0x29, 0xce, 0xa0, 0x5e, 0x09, 0xd5, 0xd4, 0x8c, 0x13, 0x78, 0x56, 0xf6, 0x40, 0xbf, - 0xb3, 0x65, 0xb9, 0xfa, 0x85, 0x5c, 0x9a, 0x79, 0x88, 0x78, 0xca, 0xff, 0x3b, 0x0e, 0x43, 0xbd, - 0xb8, 0xd8, 0x6d, 0x10, 0xdf, 0xa0, 0xa3, 0x44, 0x07, 0xdb, 0x85, 0x0d, 0x38, 0x26, 0x68, 0xc4, - 0xfe, 0x77, 0x69, 0xc4, 0x29, 0x48, 0x59, 0xc4, 0x71, 0x49, 0x99, 0x7b, 0x44, 0xb4, 0x47, 0x9f, - 0x02, 0x0e, 0xea, 0x74, 0xa9, 0xd8, 0xbb, 0x72, 0xa9, 0x53, 0x30, 0xe4, 0x75, 0x49, 0x6b, 0xe8, - 0x56, 0x45, 0xfa, 0xe6, 0x64, 0x58, 0x4f, 0x26, 0x8a, 0x12, 0xa7, 0x52, 0x98, 0x9a, 0x21, 0x81, - 0x67, 0x65, 0x16, 0xc0, 0xb6, 0x88, 0xbd, 0x81, 0xcb, 0xcb, 0x30, 0xd1, 0x4f, 0xba, 0x5b, 0x69, - 0x89, 0xaa, 0x74, 0x58, 0xc9, 0xe6, 0x52, 0xc3, 0x54, 0x6e, 0x6d, 0xb9, 0xda, 0xc0, 0x36, 0x9e, - 0xb2, 0xc0, 0x17, 0x59, 0x87, 0xb7, 0xad, 0x41, 0xa6, 0x41, 0xa8, 0xdf, 0xa3, 0x89, 0xf9, 0xc8, - 0x92, 0xac, 0x13, 0x13, 0xa1, 0x23, 0x53, 0x05, 0x8c, 0x0f, 0x6c, 0xb0, 0xe1, 0x7f, 0x54, 0xae, - 0x00, 0x4f, 0xa0, 0x31, 0xb7, 0x02, 0x16, 0x85, 0xd2, 0x52, 0xb8, 0x88, 0xb2, 0xb1, 0xe3, 0x90, - 0x09, 0x9a, 0x47, 0x19, 0x85, 0xb8, 0xe3, 0xea, 0x0d, 0x97, 0x79, 0x61, 0x5c, 0xe5, 0x0f, 0x4a, - 0x16, 0xa2, 0x18, 0x64, 0x58, 0x94, 0x8b, 0xab, 0xf4, 0x76, 0xec, 0x16, 0x18, 0x0c, 0xbc, 0xbe, - 0x57, 0x60, 0xfe, 0xe1, 0x7e, 0x18, 0xed, 0xe6, 0x73, 0x5d, 0xdd, 0x1f, 0x97, 0x0f, 0x7a, 0xc0, - 0x3a, 0x69, 0xa0, 0xdf, 0x51, 0x06, 0xf1, 0x84, 0x1e, 0x15, 0x37, 0xf5, 0x75, 0x62, 0xa2, 0x37, - 0x45, 0x8e, 0x64, 0x8e, 0x5d, 0xdb, 0x93, 0x57, 0x4f, 0xcc, 0x53, 0x88, 0xca, 0x91, 0xca, 0xed, - 0x10, 0x13, 0x21, 0x8e, 0x32, 0x1c, 0xed, 0x8d, 0x81, 0xfa, 0xa2, 0xca, 0x70, 0xca, 0x7e, 0x48, - 0xd2, 0xff, 0xdc, 0xb6, 0xfd, 0xac, 0xcf, 0x09, 0x2a, 0xa0, 0x76, 0x55, 0xc6, 0x20, 0xc1, 0xdc, - 0xac, 0x4c, 0x64,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, 0xd3, 0xea, - 0x10, 0x57, 0x3b, 0x5f, 0x6d, 0x30, 0x77, 0xae, 0xe9, 0xbc, 0x92, 0xf4, 0x66, 0x62, 0x54, 0x68, - 0xe1, 0xf6, 0xfe, 0x6e, 0xd4, 0x39, 0xc1, 0x54, 0x94, 0x79, 0x18, 0x47, 0x93, 0x61, 0xad, 0x69, - 0x95, 0xf5, 0x46, 0x59, 0x6b, 0x1d, 0x17, 0x68, 0xba, 0x81, 0x7e, 0xe0, 0xd8, 0x3c, 0x93, 0x78, - 0x2c, 0x97, 0x59, 0xf6, 0x8a, 0x50, 0x6e, 0x85, 0xd8, 0x29, 0xa1, 0xda, 0xe6, 0x35, 0xd1, 0xed, - 0xbc, 0x06, 0x6b, 0xaf, 0x9a, 0x5e, 0x47, 0xb7, 0x71, 0x1b, 0x5b, 0xac, 0x7a, 0x4b, 0xa8, 0x09, - 0x14, 0x14, 0xe9, 0xf3, 0x7b, 0x37, 0x07, 0x7e, 0x3b, 0xfe, 0x3e, 0x0a, 0x69, 0x7f, 0x05, 0x47, - 0x0b, 0x62, 0x83, 0x85, 0xf9, 0x08, 0x8b, 0x02, 0x57, 0xec, 0x58, 0xef, 0x4d, 0xcc, 0xd0, 0xf8, - 0x5f, 0xe8, 0xe7, 0x75, 0x95, 0xca, 0x91, 0x34, 0xf7, 0x52, 0x5f, 0x23, 0xbc, 0x5a, 0x4f, 0xa8, - 0xe2, 0x09, 0x83, 0x5d, 0xff, 0x19, 0x87, 0x71, 0xf7, 0x33, 0xee, 0x2b, 0x77, 0xe6, 0x3e, 0xb9, - 0xc2, 0xc8, 0x93, 0x27, 0x57, 0xb4, 0xc5, 0x25, 0x75, 0x61, 0x6a, 0x5e, 0x15, 0x70, 0x65, 0x1f, - 0xc4, 0x4c, 0xfd, 0xde, 0xad, 0x60, 0xa6, 0x60, 0xa2, 0x5e, 0x0d, 0x8f, 0x0c, 0xf4, 0xc8, 0x23, - 0x18, 0x9f, 0x99, 0xe8, 0x3d, 0x74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, 0x34, 0xad, 0x62, 0x63, 0x6a, 0x56, - 0xb6, 0x94, 0x2c, 0xd7, 0xd3, 0xb6, 0x48, 0x45, 0x6f, 0xd3, 0xa6, 0x61, 0x28, 0xaa, 0x66, 0x65, - 0x8b, 0xa7, 0x8d, 0x85, 0x66, 0xd9, 0x6e, 0xd2, 0x82, 0x80, 0xeb, 0xd1, 0xa8, 0x17, 0x51, 0x53, - 0x5c, 0xe6, 0xa9, 0x88, 0x8a, 0xad, 0xb5, 0x83, 0x4f, 0xab, 0x29, 0x2e, 0xe3, 0x2a, 0x87, 0x61, - 0x48, 0xaf, 0x54, 0x1a, 0x94, 0x5c, 0x12, 0xf1, 0x32, 0x34, 0xe3, 0x89, 0x99, 0xe2, 0xd8, 0x49, - 0x48, 0x48, 0x3b, 0xd0, 0xc4, 0x42, 0x2d, 0x81, 0x39, 0x9f, 0x9d, 0xa3, 0xf4, 0xd1, 0x4d, 0xbd, - 0x25, 0x1b, 0xf1, 0xa5, 0x55, 0x47, 0x6b, 0x1d, 0xe8, 0xf5, 0x61, 0x7b, 0x42, 0x4d, 0x55, 0x1d, - 0xef, 0x04, 0x27, 0xff, 0x0c, 0xa6, 0xd7, 0xe0, 0x81, 0xa4, 0x32, 0x0b, 0x09, 0xd3, 0x46, 0xff, - 0xa0, 0x08, 0x7e, 0x1a, 0x7e, 0x24, 0xe4, 0x0c, 0x73, 0x62, 0x5e, 0xe8, 0xab, 0x1e, 0x72, 0xec, - 0x57, 0x11, 0x48, 0x48, 0x31, 0x26, 0x8a, 0x58, 0x5d, 0x77, 0x37, 0x19, 0x5d, 0x7c, 0xba, 0x2f, - 0x1b, 0x51, 0xd9, 0x33, 0x95, 0x63, 0x35, 0x63, 0x31, 0x17, 0x10, 0x72, 0xfa, 0x4c, 0xe7, 0xd5, - 0x24, 0x7a, 0x99, 0x15, 0xb8, 0x76, 0xad, 0x86, 0x33, 0xe9, 0xc8, 0x79, 0x15, 0xf2, 0x19, 0x21, - 0xa6, 0xe7, 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0xfc, 0x1a, 0xea, 0xe3, - 0xf5, 0x0a, 0xde, 0xbf, 0x81, 0xff, 0xdf, 0xc2, 0xff, 0x6f, 0xe3, 0x75, 0xdf, 0x9f, 0x0e, 0x44, - 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa1, 0xab, 0x0b, 0xfc, 0x2c, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k := range m.CastMapValueMessage { - data[i] = 0xa - i++ - v := m.CastMapValueMessage[k] - msgSize := 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 encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - } else { - var mapvalue MyWilson - m.CastMapValueMessage[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - } else { - var mapvalue *MyWilson - m.CastMapValueMessageNullable[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCastvalueUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCastvalueUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCastvalueUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCastvalueUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCastvalueUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeboth/castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 338 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0xcf, 0x4d, - 0xca, 0x2f, 0xd6, 0x2f, 0xcd, 0x2b, 0x4e, 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a, 0xac, - 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, - 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, - 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, - 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, - 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, - 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, - 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, 0x02, 0x48, 0x7f, 0x00, 0xd2, 0x3f, 0x80, - 0xb8, 0xe1, 0xb1, 0x1c, 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0x61, 0x07, 0x36, 0x06, 0x8f, 0x02, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.proto deleted file mode 100644 index c7d8c83b..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/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) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go deleted file mode 100644 index 2fc91d01..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/mytypes.go deleted file mode 100644 index 202656ee..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/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/unsafemarshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go deleted file mode 100644 index 3478494a..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go +++ /dev/null @@ -1,989 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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" 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3472 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xd5, - 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x09, 0xbb, 0xde, 0x2c, 0x6c, 0x76, 0xcd, - 0x63, 0x97, 0x05, 0x12, 0xfe, 0xfb, 0xe7, 0xb1, 0x98, 0xff, 0x1f, 0x94, 0x87, 0x37, 0x78, 0x95, - 0x57, 0x27,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0xeb, 0xe8, 0x36, 0x6e, 0x63, 0x8b, 0x55, 0x6f, - 0x09, 0x35, 0x81, 0x82, 0x22, 0x7d, 0x7e, 0xff, 0xe6, 0xc0, 0x6f, 0xc7, 0xdf, 0x46, 0x21, 0xed, - 0xaf, 0xe0, 0x68, 0x41, 0x6c, 0xb0, 0x30, 0x1f, 0x61, 0x51, 0xe0, 0xca, 0x1d, 0xeb, 0xbd, 0x89, - 0x19, 0x1a, 0xff, 0x0b, 0xfd, 0xbc, 0xae, 0x52, 0x39, 0x92, 0xe6, 0x5e, 0xea, 0x6b, 0x84, 0x57, - 0xeb, 0x09, 0x55, 0x3c, 0x61, 0xb0, 0xeb, 0x3f, 0xeb, 0x30, 0xee, 0x7e, 0xc6, 0x7d, 0xd5, 0xce, - 0xdc, 0xa7, 0x56, 0x18, 0x79, 0xf2, 0xd4, 0x8a, 0xb6, 0xb8, 0xa4, 0x2e, 0x4c, 0xcd, 0xab, 0x02, - 0xae, 0xec, 0x87, 0x98, 0xa9, 0xdf, 0xb7, 0x15, 0xcc, 0x14, 0x4c, 0xd4, 0xab, 0xe1, 0x91, 0x81, - 0x1e, 0x79, 0x04, 0xe3, 0x33, 0x13, 0xbd, 0x8f, 0xae, 0x3f, 0x09, 0x71, 0x66, 0x2f, 0x05, 0x40, - 0x58, 0x2c, 0xbb, 0x47, 0x49, 0x40, 0x6c, 0x66, 0x49, 0xa5, 0xee, 0x8f, 0xfe, 0xce, 0xa5, 0xda, - 0x72, 0xa9, 0x38, 0x83, 0x2b, 0x20, 0x7f, 0x33, 0xf4, 0x73, 0x23, 0xd0, 0xa5, 0xe1, 0x99, 0x01, - 0x41, 0xfc, 0x51, 0x70, 0x44, 0x64, 0xeb, 0xda, 0xc2, 0x74, 0x51, 0xcd, 0xf6, 0xf9, 0xa7, 0xf7, - 0xc7, 0x11, 0x48, 0xf9, 0x0a, 0x2a, 0x9a, 0xca, 0x75, 0xd3, 0xb4, 0x2f, 0x68, 0xba, 0x59, 0xc5, -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c6, 0xf6, 0xfa, 0x63, 0x67, 0x20, 0xb7, 0xdd, 0x48, 0xe8, 0x8f, 0xc3, - 0x70, 0xbe, 0xc5, 0x0f, 0xc6, 0xe8, 0xad, 0x72, 0xa4, 0xf5, 0x4b, 0x15, 0xfa, 0x83, 0x84, 0x61, - 0x5f, 0xef, 0xc4, 0xcb, 0x78, 0x7b, 0xa1, 0xef, 0x44, 0x64, 0x4c, 0x87, 0x43, 0x61, 0x3d, 0xfd, - 0x37, 0x5f, 0x91, 0x3f, 0x08, 0xfd, 0x5c, 0x48, 0x7f, 0xde, 0x56, 0xb2, 0xdc, 0x5b, 0x6e, 0x62, - 0x54, 0x51, 0x35, 0x5e, 0xa5, 0x0f, 0xd3, 0xf3, 0xaf, 0xbc, 0x76, 0x70, 0xcf, 0x2f, 0xf1, 0xfa, - 0x0d, 0x5e, 0xaf, 0xbe, 0x76, 0x30, 0xf2, 0x26, 0x5e, 0x6f, 0xe3, 0xf5, 0x0e, 0x5e, 0xf7, 0xbf, - 0x7e, 0x30, 0xf2, 0x1c, 0x5e, 0x2f, 0xe0, 0xf5, 0x23, 0xbc, 0x5e, 0xc2, 0xeb, 0x95, 0xd7, 0x51, - 0x1f, 0xaf, 0x57, 0xf1, 0xfe, 0x4d, 0xfc, 0xff, 0x36, 0xfe, 0x7f, 0x07, 0xaf, 0xfb, 0xff, 0x70, - 0x70, 0xcf, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x76, 0x38, 0x95, 0x63, 0x01, 0x2d, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Castaway) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.CastMapValueMessage) > 0 { - for k := range m.CastMapValueMessage { - data[i] = 0xa - i++ - v := m.CastMapValueMessage[k] - msgSize := 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 encodeFixed64Castvalue(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Castvalue(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintCastvalue(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} - -func init() { proto.RegisterFile("combos/unsafemarshaler/castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 343 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xce, 0xcf, 0x4d, - 0xca, 0x2f, 0xd6, 0x2f, 0xcd, 0x2b, 0x4e, 0x4c, 0x4b, 0xcd, 0x4d, 0x2c, 0x2a, 0xce, 0x48, 0xcc, - 0x49, 0x2d, 0xd2, 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, 0x01, - 0x75, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, - 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 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, 0x09, 0x27, 0x63, 0xaa, 0x15, - 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, - 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, - 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, - 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, - 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, - 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, - 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, - 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, - 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, - 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, 0x02, 0x48, - 0x7f, 0x00, 0xd2, 0x3f, 0x80, 0xb8, 0xe1, 0xb1, 0x1c, 0x03, 0x20, 0x00, 0x00, 0xff, 0xff, 0x29, - 0x83, 0xc1, 0xb7, 0x94, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto deleted file mode 100644 index 4039d3be..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/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) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go deleted file mode 100644 index 368eb54d..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go deleted file mode 100644 index 202656ee..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/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/unsafeunmarshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go deleted file mode 100644 index 7171ff0f..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go +++ /dev/null @@ -1,1313 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/castvalue.proto -// DO NOT EDIT! - -/* - Package castvalue is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/castvalue.proto - - It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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" 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return CastvalueDescription() -} -func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3469 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, - 0x15, 0xae, 0x63, 0x3b, 0xb1, 0x8f, 0x1d, 0xc7, 0x99, 0xa4, 0xbb, 0xde, 0x6c, 0xbb, 0xd9, 0x75, - 0x1f, 0xbb, 0xdd, 0xb6, 0x49, 0x59, 0xfa, 0xd8, 0xba, 0xd0, 0x2a, 0x0f, 0x6f, 0xea, 0x55, 0x5e, - 0x4c, 0x92, 0x76, 0xb7, 0xfc, 0x18, 0x4d, 0xc6, 0x37, 0x8e, 0x77, 0xc7, 0x33, 0xc6, 0x33, 0xde, - 0xdd, 0xf4, 0x57, 0x51, 0x0b, 0xa8, 0x20, 0xde, 0x08, 0xfa, 0x86, 0x56, 0x82, 0x96, 0xf2, 0x6a, - 0x79, 0x09, 0xf1, 0xab, 0x08, 0x15, 0xfa, 0x0b, 0x01, 0xbf, 0xf8, 0x81, 0xa0, 0x2d, 0x95, 0x28, - 0x50, 0xa0, 0x48, 0x2b, 0x51, 0xa9, 0x7f, 0x38, 0xf7, 0x35, 0x9e, 0xb1, 0x9d, 0x8c, 0x53, 0x54, - 0x4a, 0xa4, 0x51, 0x66, 0xce, 0x3d, 0xdf, 0x37, 0xf7, 0x9e, 0x7b, 0xee, 0x39, 0xe7, 0xde, 0x31, - 0xfc, 0xfc, 0x7d, 0x70, 0xb0, 0x62, 0xdb, 0x15, 0x93, 0x4c, 0xd6, 0x1b, 0xb6, 0x6b, 0xaf, 0x37, - 0x37, 0x26, 0xcb, 0xc4, 0x31, 0x1a, 0xd5, 0xba, 0x6b, 0x37, 0x26, 0x98, 0x4c, 0x19, 0xe2, 0x1a, - 0x13, 0x52, 0x23, 0xbf, 0x00, 0xc3, 0x27, 0xaa, 0x26, 0x99, 0xf5, 0x14, 0x57, 0x88, 0xab, 0x1c, - 0x87, 0xd8, 0x06, 0x0a, 0x73, 0x91, 0x83, 0xd1, 0x23, 0xa9, 0x63, 0x57, 0x4e, 0xb4, 0x81, 0x26, - 0x82, 0x88, 0x65, 0x2a, 0x56, 0x19, 0x22, 0xff, 0x5a, 0x0c, 0x46, 0xba, 0xb4, 0x2a, 0x0a, 0xc4, - 0x2c, 0xbd, 0x46, 0x19, 0x23, 0x47, 0x92, 0x2a, 0xbb, 0x57, 0x72, 0x30, 0x50, 0xd7, 0x8d, 0xb3, - 0x7a, 0x85, 0xe4, 0xfa, 0x98, 0x58, 0x3e, 0x2a, 0x07, 0x00, 0xca, 0xa4, 0x4e, 0xac, 0x32, 0xb1, - 0x8c, 0xad, 0x5c, 0x14, 0x7b, 0x91, 0x54, 0x7d, 0x12, 0xe5, 0x5a, 0x18, 0xae, 0x37, 0xd7, 0xcd, - 0xaa, 0xa1, 0xf9, 0xd4, 0x00, 0xd5, 0xe2, 0x6a, 0x96, 0x37, 0xcc, 0xb6, 0x94, 0x0f, 0xc3, 0xd0, - 0x79, 0xa2, 0x9f, 0xf5, 0xab, 0xa6, 0x98, 0x6a, 0x86, 0x8a, 0x7d, 0x8a, 0x33, 0x90, 0xae, 0x11, - 0xc7, 0xc1, 0x0e, 0x68, 0xee, 0x56, 0x9d, 0xe4, 0x62, 0x6c, 0xf4, 0x07, 0x3b, 0x46, 0xdf, 0x3e, - 0xf2, 0x94, 0x40, 0xad, 0x22, 0x48, 0x99, 0x82, 0x24, 0xb1, 0x9a, 0x35, 0xce, 0x10, 0xdf, 0xc6, - 0x7e, 0x45, 0xd4, 0x68, 0x67, 0x49, 0x50, 0x98, 0xa0, 0x18, 0x70, 0x48, 0xe3, 0x5c, 0xd5, 0x20, - 0xb9, 0x7e, 0x46, 0x70, 0xb8, 0x83, 0x60, 0x85, 0xb7, 0xb7, 0x73, 0x48, 0x1c, 0x0e, 0x25, 0x49, - 0x2e, 0xb8, 0xc4, 0x72, 0xaa, 0xb6, 0x95, 0x1b, 0x60, 0x24, 0x57, 0x75, 0x99, 0x45, 0x62, 0x96, - 0xdb, 0x29, 0x5a, 0x38, 0xe5, 0x66, 0x18, 0xb0, 0xeb, 0x2e, 0xde, 0x39, 0xb9, 0x04, 0xce, 0x4f, - 0xea, 0xd8, 0x65, 0x5d, 0x1d, 0x61, 0x89, 0xeb, 0xa8, 0x52, 0x59, 0x29, 0x41, 0xd6, 0xb1, 0x9b, - 0x0d, 0x83, 0x68, 0x86, 0x5d, 0x26, 0x5a, 0xd5, 0xda, 0xb0, 0x73, 0x49, 0x46, 0x30, 0xde, 0x39, - 0x10, 0xa6, 0x38, 0x83, 0x7a, 0x25, 0x54, 0x53, 0x33, 0x4e, 0xe0, 0x59, 0xd9, 0x03, 0xfd, 0xce, - 0x96, 0xe5, 0xea, 0x17, 0x72, 0x69, 0xe6, 0x21, 0xe2, 0x29, 0xff, 0xef, 0x38, 0x0c, 0xf5, 0xe2, - 0x62, 0xb7, 0x41, 0x7c, 0x83, 0x8e, 0x12, 0x1d, 0x6c, 0x17, 0x36, 0xe0, 0x98, 0xa0, 0x11, 0xfb, - 0xdf, 0xa1, 0x11, 0xa7, 0x20, 0x65, 0x11, 0xc7, 0x25, 0x65, 0xee, 0x11, 0xd1, 0x1e, 0x7d, 0x0a, - 0x38, 0xa8, 0xd3, 0xa5, 0x62, 0xef, 0xc8, 0xa5, 0x4e, 0xc1, 0x90, 0xd7, 0x25, 0xad, 0xa1, 0x5b, - 0x15, 0xe9, 0x9b, 0x93, 0x61, 0x3d, 0x99, 0x28, 0x4a, 0x9c, 0x4a, 0x61, 0x6a, 0x86, 0x04, 0x9e, - 0x95, 0x59, 0x00, 0xdb, 0x22, 0xf6, 0x06, 0x2e, 0x2f, 0xc3, 0x44, 0x3f, 0xe9, 0x6e, 0xa5, 0x25, - 0xaa, 0xd2, 0x61, 0x25, 0x9b, 0x4b, 0x0d, 0x53, 0xb9, 0xb5, 0xe5, 0x6a, 0x03, 0xdb, 0x78, 0xca, - 0x02, 0x5f, 0x64, 0x1d, 0xde, 0xb6, 0x06, 0x99, 0x06, 0xa1, 0x7e, 0x8f, 0x26, 0xe6, 0x23, 0x4b, - 0xb2, 0x4e, 0x4c, 0x84, 0x8e, 0x4c, 0x15, 0x30, 0x3e, 0xb0, 0xc1, 0x86, 0xff, 0x51, 0xb9, 0x02, - 0x3c, 0x81, 0xc6, 0xdc, 0x0a, 0x58, 0x14, 0x4a, 0x4b, 0xe1, 0x22, 0xca, 0xc6, 0x8e, 0x43, 0x26, - 0x68, 0x1e, 0x65, 0x14, 0xe2, 0x8e, 0xab, 0x37, 0x5c, 0xe6, 0x85, 0x71, 0x95, 0x3f, 0x28, 0x59, - 0x88, 0x62, 0x90, 0x61, 0x51, 0x2e, 0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 0xad, 0x72, 0xb8, 0xf5, 0x5b, 0x15, 0xfa, 0x93, 0x84, 0x61, 0x5f, 0xef, 0xc4, - 0xcb, 0x78, 0x7b, 0xa1, 0xef, 0x78, 0x64, 0x4c, 0x87, 0x83, 0x61, 0x3d, 0xfd, 0x2f, 0x5f, 0x91, - 0x3f, 0x00, 0xfd, 0x5c, 0x48, 0x7f, 0xe0, 0x56, 0xb2, 0xdc, 0x9b, 0x6f, 0x64, 0x54, 0x51, 0x35, - 0x5e, 0xa5, 0x0f, 0xd3, 0xf3, 0x2f, 0xbd, 0x72, 0xe0, 0x92, 0x5f, 0xe3, 0xf5, 0x3b, 0xbc, 0x5e, - 0x7e, 0xe5, 0x40, 0xe4, 0x75, 0xbc, 0xde, 0xc4, 0xeb, 0x2d, 0xbc, 0xee, 0x7b, 0xf5, 0x40, 0xe4, - 0x19, 0xbc, 0x9e, 0xc3, 0xeb, 0x27, 0x78, 0xbd, 0x80, 0xd7, 0x4b, 0xaf, 0xa2, 0x3e, 0x5e, 0x2f, - 0xe3, 0xfd, 0xeb, 0xf8, 0xff, 0x4d, 0xfc, 0xff, 0x16, 0xfe, 0xbf, 0xef, 0x4f, 0x07, 0x22, 0xff, - 0x09, 0x00, 0x00, 0xff, 0xff, 0x61, 0xee, 0x66, 0x13, 0x03, 0x2d, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { - return false - } - for i := range this.CastMapValueMessage { - a := (Wilson)(this.CastMapValueMessage[i]) - b := (Wilson)(that1.CastMapValueMessage[i]) - if !(&a).Equal(&b) { - return false - } - } - if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { - return false - } - for i := range this.CastMapValueMessageNullable { - a := (*Wilson)(this.CastMapValueMessageNullable[i]) - b := (*Wilson)(that1.CastMapValueMessageNullable[i]) - if !a.Equal(b) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Wilson) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Wilson") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Wilson but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Wilson but is not nil && this == nil") - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) - } - } else if this.Int64 != nil { - return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") - } else if that1.Int64 != nil { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Wilson) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != nil && that1.Int64 != nil { - if *this.Int64 != *that1.Int64 { - return false - } - } else if this.Int64 != nil { - return false - } else if that1.Int64 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CastawayFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCastawayFromFace(this) -} - -func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { - return this.CastMapValueMessage -} - -func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { - return this.CastMapValueMessageNullable -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.CastMapValueMessage = that.GetCastMapValueMessage() - this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() - return this -} - -type WilsonFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { - return NewWilsonFromFace(this) -} - -func (this *Wilson) GetInt64() *int64 { - return this.Int64 -} - -func NewWilsonFromFace(that WilsonFace) *Wilson { - this := &Wilson{} - this.Int64 = that.GetInt64() - return this -} - -func (this *Castaway) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&castvalue.Castaway{") - keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) - for k := range this.CastMapValueMessage { - keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - if this.CastMapValueMessage != nil { - s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") - } - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - if this.CastMapValueMessageNullable != nil { - s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Wilson) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&castvalue.Wilson{") - if this.Int64 != nil { - s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringCastvalue(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringCastvalue(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) - mapStringForCastMapValueMessage := "map[int32]MyWilson{" - for _, k := range keysForCastMapValueMessage { - mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) - } - mapStringForCastMapValueMessage += "}" - keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) - for k := range this.CastMapValueMessageNullable { - keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) - mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" - for _, k := range keysForCastMapValueMessageNullable { - mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) - } - mapStringForCastMapValueMessageNullable += "}" - s := strings.Join([]string{`&Castaway{`, - `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, - `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Wilson) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Wilson{`, - `Int64:` + valueToStringCastvalue(this.Int64) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringCastvalue(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Castaway) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Castaway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) - } else { - var mapvalue MyWilson - m.CastMapValueMessage[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Wilson{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) - } else { - var mapvalue *MyWilson - m.CastMapValueMessageNullable[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Wilson) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Wilson: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - default: - iNdEx = preIndex - skippy, err := skipCastvalueUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalueUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCastvalueUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCastvalueUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCastvalueUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCastvalueUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCastvalueUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCastvalueUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeunmarshaler/castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 346 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x48, 0xce, 0xcf, 0x4d, - 0xca, 0x2f, 0xd6, 0x2f, 0xcd, 0x2b, 0x4e, 0x4c, 0x4b, 0x2d, 0xcd, 0xcb, 0x4d, 0x2c, 0x2a, 0xce, - 0x48, 0xcc, 0x49, 0x2d, 0xd2, 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, 0x01, 0xf5, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, - 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 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, 0x09, 0x27, 0x63, - 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, - 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, - 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, - 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, - 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, - 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, - 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, - 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, - 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, - 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, - 0x02, 0x48, 0x7f, 0x00, 0xd2, 0x3f, 0x80, 0x74, 0xc3, 0x63, 0x39, 0x46, 0x40, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x09, 0x08, 0xa5, 0x19, 0x96, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto deleted file mode 100644 index 22e94ea3..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/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) = true; - -message Castaway { - map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; - map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go deleted file mode 100644 index 21bb4cf4..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/castvalue.proto -// DO NOT EDIT! - -/* -Package castvalue is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/castvalue.proto - -It has these top-level messages: - Castaway - Wilson -*/ -package castvalue - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCastawayProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastawayProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Castaway{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWilsonProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Wilson{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWilsonJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastawayProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastawayProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWilsonProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastvalueDescription(t *testing.T) { - CastvalueDescription() -} -func TestCastawayVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWilsonVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastawayFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestWilsonFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCastawayGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastawaySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Castaway, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastaway(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWilsonSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWilsonSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Wilson, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWilson(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastawayStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWilsonStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go deleted file mode 100644 index 202656ee..00000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/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 202656ee..00000000 --- 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 53f720e9..00000000 --- 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/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go deleted file mode 100644 index 96834097..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go +++ /dev/null @@ -1,40305 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/both/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -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 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import compress_gzip "compress/gzip" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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,json=id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=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" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=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" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=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" 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" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=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" 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,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data,json=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" 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{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=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{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=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" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=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" 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" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=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,json=field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" 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" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=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" 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{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" 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" 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" 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" 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" 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" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children,json=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} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA,json=fieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB,json=fieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC,json=fieldC", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD,json=fieldD", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE,json=fieldE", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterType((*Node)(nil), "test.Node") - 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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6125 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xff, 0x0e, 0x87, 0x94, 0xa8, 0x43, 0x89, 0xa2, 0x66, 0xb5, 0x32, 0x2d, 0xaf, 0xf7, 0x41, - 0xcb, 0x6b, 0x59, 0xb1, 0xf5, 0x5a, 0xed, 0x8b, 0x4e, 0x1c, 0xf0, 0xb5, 0xb2, 0xf6, 0xaf, 0xd7, - 0x7f, 0x24, 0x25, 0x76, 0x5a, 0x80, 0xa0, 0xc8, 0x91, 0x44, 0x9b, 0x1a, 0xb2, 0x1c, 0xd2, 0xf6, - 0xe6, 0x43, 0x91, 0x26, 0x6d, 0x9a, 0xb4, 0xe8, 0x33, 0x2d, 0x9a, 0x77, 0x9c, 0x14, 0x69, 0x9c, - 0xf4, 0x95, 0xb4, 0x69, 0x50, 0x04, 0x45, 0x63, 0xa0, 0x48, 0xbb, 0xfd, 0x52, 0xb8, 0xf9, 0x54, - 0x14, 0x85, 0x91, 0x17, 0xd0, 0xb4, 0x4d, 0xdb, 0x04, 0x30, 0x90, 0x00, 0xc9, 0x87, 0xde, 0xf7, - 0xcc, 0xbd, 0x1c, 0x72, 0x46, 0x5e, 0x3b, 0xc9, 0x02, 0x5c, 0x91, 0xf7, 0x9c, 0xdf, 0x99, 0x33, - 0xe7, 0x75, 0xcf, 0xbd, 0x77, 0x48, 0xf8, 0xbb, 0x25, 0xb8, 0x70, 0xd8, 0x6c, 0x1e, 0x36, 0xac, - 0x85, 0x56, 0xbb, 0xd9, 0x69, 0xee, 0x77, 0x0f, 0x16, 0x6a, 0x96, 0x53, 0x6d, 0xd7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e, 0x95, 0x1c, - 0x93, 0x55, 0x5b, 0x31, 0x94, 0x77, 0x2a, 0xd0, 0xfb, 0x35, 0x0d, 0x54, 0x9b, 0x1e, 0x4d, 0xdf, - 0x1f, 0x81, 0x33, 0xbe, 0xc2, 0x7d, 0x15, 0xbd, 0x1f, 0xa0, 0x6e, 0xb7, 0xba, 0x1d, 0x3a, 0xaf, - 0xd2, 0x32, 0x33, 0x42, 0x46, 0x48, 0x0a, 0xe3, 0x12, 0xd2, 0xed, 0x08, 0xba, 0x4e, 0xe8, 0x40, - 0x87, 0x08, 0xc3, 0x75, 0x57, 0xd1, 0x28, 0x51, 0xf4, 0x5c, 0x9f, 0x3b, 0xed, 0x99, 0xb2, 0x16, - 0x21, 0x55, 0x6d, 0xd4, 0x2d, 0xbb, 0x53, 0x76, 0x3a, 0x6d, 0xab, 0x72, 0x5c, 0xb7, 0x0f, 0x49, - 0x1d, 0x8d, 0x67, 0x63, 0x07, 0x95, 0x86, 0x63, 0x99, 0xe3, 0x94, 0xbc, 0xc3, 0xa9, 0x18, 0x41, - 0x26, 0x8b, 0xb6, 0x07, 0x31, 0x24, 0x21, 0x28, 0x59, 0x20, 0x32, 0x5f, 0x1b, 0x86, 0x84, 0xa7, - 0x3b, 0x33, 0x2e, 0xc2, 0xe8, 0xd3, 0x95, 0x67, 0x2b, 0x65, 0xde, 0x71, 0x53, 0x4b, 0x24, 0xf0, - 0xd8, 0x36, 0xeb, 0xba, 0x17, 0x61, 0x92, 0xb0, 0xa0, 0x7b, 0x44, 0x17, 0xaa, 0x36, 0x2a, 0x8e, - 0x43, 0x8c, 0x16, 0x27, 0xac, 0x06, 0xa6, 0x6d, 0x61, 0x52, 0x81, 0x53, 0x8c, 0x2b, 0x70, 0x9a, - 0x20, 0x8e, 0x51, 0xe1, 0xad, 0xb7, 0x1a, 0x56, 0x19, 0xaf, 0x01, 0x1c, 0x52, 0x4f, 0x85, 0x66, - 0x13, 0x98, 0x63, 0x83, 0x31, 0x60, 0x8d,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 0x96, 0xdc, 0x83, 0x25, 0x7e, - 0x95, 0x49, 0x3c, 0xed, 0x91, 0xb8, 0xc3, 0xa0, 0xd9, 0x02, 0x8c, 0x9d, 0x44, 0xd6, 0xdf, 0x33, - 0x59, 0xa3, 0x96, 0x57, 0xc8, 0x2a, 0x8c, 0x13, 0x21, 0xd5, 0xae, 0xd3, 0x69, 0x1e, 0x93, 0x02, - 0x31, 0x58, 0xcc, 0x3f, 0x7c, 0x9b, 0x06, 0x55, 0x12, 0xc3, 0x0a, 0x02, 0x95, 0x7d, 0x1b, 0x4c, - 0xe2, 0x11, 0x92, 0x83, 0x5e, 0x69, 0xc1, 0x5b, 0x08, 0xe9, 0x7f, 0x7e, 0x0f, 0x8d, 0xbd, 0xd3, - 0x42, 0x80, 0x47, 0xae, 0xc7, 0x13, 0x87, 0x56, 0x07, 0xd5, 0x36, 0xb4, 0xfe, 0x6b, 0x34, 0x8c, - 0x81, 0x67, 0x0c, 0xe9, 0x0f, 0x7d, 0x57, 0xf6, 0xc4, 0x2a, 0x45, 0xe6, 0x1a, 0x8d, 0xec, 0x1e, - 0xdc, 0xe3, 0xe3, 0xd9, 0x10, 0x32, 0x3f, 0xcc, 0x64, 0x4e, 0xf6, 0x78, 0x17, 0x8b, 0xdd, 0x06, - 0x3e, 0x2e, 0xfc, 0x11, 0x42, 0xe6, 0x47, 0x98, 0x4c, 0x83, 0x61, 0xb9, 0x5b, 0xb0, 0xc4, 0x5b, - 0x30, 0x81, 0x56, 0xea, 0xfb, 0x4d, 0x87, 0xad, 0x7b, 0x43, 0x88, 0xfb, 0x28, 0x13, 0x37, 0xce, - 0x80, 0x64, 0x15, 0x8c, 0x65, 0xdd, 0x80, 0xf8, 0x01, 0x5a, 0x00, 0x85, 0x10, 0xf1, 0x31, 0x26, - 0x62, 0x18, 0xf3, 0x63, 0x68, 0x0e, 0x46, 0x0f, 0x9b, 0xac, 0x0c, 0x07, 0xc3, 0x3f, 0xce, 0xe0, - 0x09, 0x8e, 0x61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eb, 0xa6, 0xec, 0xc8, 0xd2, 0xf2, 0xe5, 0x95, 0x79, 0xfc, 0x9f, - 0x08, 0xc9, 0x8b, 0xf2, 0x12, 0xaa, 0x97, 0xa5, 0xe7, 0x31, 0x91, 0x6c, 0xd4, 0x43, 0xed, 0x79, - 0x4c, 0x44, 0xa2, 0xf6, 0x3c, 0x26, 0x22, 0x51, 0x7b, 0x1e, 0x13, 0x91, 0xa8, 0x3d, 0x47, 0x01, - 0x12, 0xb5, 0xe7, 0x31, 0x11, 0x89, 0xda, 0xf3, 0x98, 0x88, 0x44, 0xed, 0x7d, 0x4c, 0x84, 0x91, - 0xfb, 0x3e, 0x26, 0x22, 0xd3, 0x7b, 0x1f, 0x13, 0x91, 0xe9, 0xbd, 0x8f, 0x89, 0x64, 0x51, 0x7f, - 0xd6, 0xb5, 0xfa, 0x1f, 0x3a, 0xc8, 0xf8, 0x41, 0x6b, 0x40, 0xb7, 0x00, 0x6f, 0xc1, 0x38, 0xdd, - 0x8f, 0x28, 0xe0, 0x67, 0xb0, 0xea, 0x36, 0x2a, 0xc5, 0x6f, 0x86, 0x51, 0x3a, 0x44, 0x57, 0x39, - 0x7e, 0xab, 0x40, 0x4a, 0x67, 0xe5, 0x76, 0xb4, 0xea, 0xe1, 0xce, 0xfc, 0x38, 0x0a, 0x53, 0x94, - 0x8c, 0xbf, 0x28, 0x28, 0x3d, 0x64, 0x74, 0x49, 0x39, 0x52, 0x4a, 0x62, 0xf8, 0x37, 0x5f, 0x39, - 0x4f, 0x47, 0x73, 0x22, 0x98, 0x2e, 0x29, 0x87, 0x4b, 0x32, 0x9f, 0x3b, 0xff, 0x5c, 0x52, 0x1e, - 0x3c, 0x92, 0xf9, 0xc4, 0x74, 0x23, 0xf8, 0xf8, 0x23, 0x48, 0x32, 0x5f, 0x51, 0x44, 0xd9, 0x25, - 0xe5, 0x61, 0x24, 0x99, 0xaf, 0x24, 0xe2, 0xed, 0x92, 0x72, 0xf4, 0x24, 0xf3, 0xdd, 0x14, 0x91, - 0x77, 0x49, 0x39, 0x84, 0x92, 0xf9, 0x56, 0x45, 0x0c, 0x5e, 0x52, 0x1e, 0x55, 0x92, 0xf9, 0x9e, - 0x10, 0xd1, 0x78, 0x49, 0x79, 0x68, 0x49, 0xe6, 0x5b, 0x13, 0x71, 0x39, 0xab, 0x3e, 0xbe, 0x24, - 0x33, 0xde, 0x72, 0x23, 0x74, 0x56, 0x7d, 0x90, 0x49, 0xe6, 0xfc, 0x7f, 0x6e, 0xac, 0xce, 0xaa, - 0x8f, 0x34, 0xc9, 0x9c, 0xeb, 0x6e, 0xd4, 0xce, 0xaa, 0x47, 0x65, 0x32, 0xe7, 0x86, 0x1b, 0xbf, - 0xb3, 0xea, 0xa1, 0x99, 0xcc, 0xb9, 0xe9, 0x46, 0xf2, 0xac, 0x7a, 0x7c, 0x26, 0x73, 0x6e, 0xb9, - 0x7b, 0xe8, 0x5f, 0x51, 0xc2, 0xcf, 0xf3, 0x10, 0x54, 0x46, 0x09, 0x3f, 0xf0, 0x09, 0xbd, 0x8c, - 0x12, 0x7a, 0xe0, 0x13, 0x76, 0x19, 0x25, 0xec, 0xc0, 0x27, 0xe4, 0x32, 0x4a, 0xc8, 0x81, 0x4f, - 0xb8, 0x65, 0x94, 0x70, 0x03, 0x9f, 0x50, 0xcb, 0x28, 0xa1, 0x06, 0x3e, 0x61, 0x96, 0x51, 0xc2, - 0x0c, 0x7c, 0x42, 0x2c, 0xa3, 0x84, 0x18, 0xf8, 0x84, 0x57, 0x46, 0x09, 0x2f, 0xf0, 0x09, 0xad, - 0x19, 0x35, 0xb4, 0xc0, 0x2f, 0xac, 0x66, 0xd4, 0xb0, 0x02, 0xbf, 0x90, 0x7a, 0x40, 0x0d, 0xa9, - 0x11, 0xc4, 0x15, 0xc3, 0x43, 0x9e, 0x68, 0x9a, 0x51, 0xa3, 0x09, 0xfc, 0x22, 0x69, 0x46, 0x8d, - 0x24, 0xf0, 0x8b, 0xa2, 0x19, 0x35, 0x8a, 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a, 0x65, 0x17, 0xd8, 0x34, 0x92, 0x5b, 0x32, - 0xce, 0xf0, 0x28, 0x90, 0x72, 0x9c, 0x19, 0x88, 0xce, 0x28, 0xb9, 0x25, 0x74, 0x87, 0x14, 0x90, - 0xef, 0x0b, 0xe8, 0x6f, 0x25, 0x2a, 0x24, 0xbf, 0x94, 0x7d, 0x82, 0x09, 0x29, 0xf4, 0x15, 0x12, - 0x60, 0x2a, 0x2a, 0xa9, 0xb0, 0x94, 0xdf, 0xbd, 0xf3, 0x8d, 0x73, 0xa7, 0x5e, 0x46, 0xaf, 0x7f, - 0x41, 0xaf, 0xaf, 0x7f, 0xe3, 0x9c, 0xf6, 0x1d, 0xf4, 0xfa, 0x1e, 0x7a, 0xfd, 0x10, 0xbd, 0xde, - 0xf5, 0xcd, 0x73, 0xda, 0x8b, 0xe8, 0xf5, 0x79, 0xf4, 0xfa, 0x6b, 0xf4, 0x7a, 0x09, 0xbd, 0xee, - 0xa0, 0xd7, 0xcb, 0xe8, 0xf5, 0x75, 0xf4, 0xfa, 0xce, 0x37, 0xcf, 0x9d, 0xfa, 0x1e, 0xfa, 0xfb, - 0x43, 0xf4, 0xf7, 0x5d, 0xdf, 0x3a, 0x77, 0xea, 0x05, 0xf4, 0x7a, 0xf1, 0x5b, 0xe7, 0xb4, 0xff, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0x85, 0x47, 0xda, 0x26, 0x15, 0x5f, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -type NodeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Node) TestProto() github_com_gogo_protobuf_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 -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+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 *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+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 *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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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 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 github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field9)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field10)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field11)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field12)) - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f1 := math.Float64bits(float64(num)) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f2 := math.Float32bits(float32(num)) - data[i] = uint8(f2) - i++ - data[i] = uint8(f2 >> 8) - i++ - data[i] = uint8(f2 >> 16) - i++ - data[i] = uint8(f2 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f5 := math.Float64bits(float64(num)) - data[i] = uint8(f5) - i++ - data[i] = uint8(f5 >> 8) - i++ - data[i] = uint8(f5 >> 16) - i++ - data[i] = uint8(f5 >> 24) - i++ - data[i] = uint8(f5 >> 32) - i++ - data[i] = uint8(f5 >> 40) - i++ - data[i] = uint8(f5 >> 48) - i++ - data[i] = uint8(f5 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f6 := math.Float32bits(float32(num)) - data[i] = uint8(f6) - i++ - data[i] = uint8(f6 >> 8) - i++ - data[i] = uint8(f6 >> 16) - i++ - data[i] = uint8(f6 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x7 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x7 >= 1<<7 { - data[i] = uint8(uint64(x7)&0x7f | 0x80) - x7 >>= 7 - i++ - } - data[i] = uint8(x7) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x8 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x8 >= 1<<7 { - data[i] = uint8(uint64(x8)&0x7f | 0x80) - x8 >>= 7 - i++ - } - data[i] = uint8(x8) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f9 := math.Float64bits(float64(num)) - data[i] = uint8(f9) - i++ - data[i] = uint8(f9 >> 8) - i++ - data[i] = uint8(f9 >> 16) - i++ - data[i] = uint8(f9 >> 24) - i++ - data[i] = uint8(f9 >> 32) - i++ - data[i] = uint8(f9 >> 40) - i++ - data[i] = uint8(f9 >> 48) - i++ - data[i] = uint8(f9 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f10 := math.Float32bits(float32(num)) - data[i] = uint8(f10) - i++ - data[i] = uint8(f10 >> 8) - i++ - data[i] = uint8(f10 >> 16) - i++ - data[i] = uint8(f10 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data12 := make([]byte, len(m.Field3)*10) - var j11 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field4) > 0 { - data14 := make([]byte, len(m.Field4)*10) - var j13 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data14[j13] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j13++ - } - data14[j13] = uint8(num) - j13++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j13)) - i += copy(data[i:], data14[:j13]) - } - if len(m.Field5) > 0 { - data16 := make([]byte, len(m.Field5)*10) - var j15 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data16[j15] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j15++ - } - data16[j15] = uint8(num) - j15++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j15)) - i += copy(data[i:], data16[:j15]) - } - if len(m.Field6) > 0 { - data18 := make([]byte, len(m.Field6)*10) - var j17 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data18[j17] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j17++ - } - data18[j17] = uint8(num) - j17++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j17)) - i += copy(data[i:], data18[:j17]) - } - if len(m.Field7) > 0 { - data19 := make([]byte, len(m.Field7)*5) - var j20 int - for _, num := range m.Field7 { - x21 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x21 >= 1<<7 { - data19[j20] = uint8(uint64(x21)&0x7f | 0x80) - j20++ - x21 >>= 7 - } - data19[j20] = uint8(x21) - j20++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j20)) - i += copy(data[i:], data19[:j20]) - } - if len(m.Field8) > 0 { - var j22 int - data24 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x23 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x23 >= 1<<7 { - data24[j22] = uint8(uint64(x23)&0x7f | 0x80) - j22++ - x23 >>= 7 - } - data24[j22] = uint8(x23) - j22++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j22)) - i += copy(data[i:], data24[:j22]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f25 := math.Float64bits(float64(num)) - data[i] = uint8(f25) - i++ - data[i] = uint8(f25 >> 8) - i++ - data[i] = uint8(f25 >> 16) - i++ - data[i] = uint8(f25 >> 24) - i++ - data[i] = uint8(f25 >> 32) - i++ - data[i] = uint8(f25 >> 40) - i++ - data[i] = uint8(f25 >> 48) - i++ - data[i] = uint8(f25 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f26 := math.Float32bits(float32(num)) - data[i] = uint8(f26) - i++ - data[i] = uint8(f26 >> 8) - i++ - data[i] = uint8(f26 >> 16) - i++ - data[i] = uint8(f26 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data28 := make([]byte, len(m.Field3)*10) - var j27 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data28[j27] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j27++ - } - data28[j27] = uint8(num) - j27++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j27)) - i += copy(data[i:], data28[:j27]) - } - if len(m.Field4) > 0 { - data30 := make([]byte, len(m.Field4)*10) - var j29 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data30[j29] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j29++ - } - data30[j29] = uint8(num) - j29++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j29)) - i += copy(data[i:], data30[:j29]) - } - if len(m.Field5) > 0 { - data32 := make([]byte, len(m.Field5)*10) - var j31 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data32[j31] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j31++ - } - data32[j31] = uint8(num) - j31++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j31)) - i += copy(data[i:], data32[:j31]) - } - if len(m.Field6) > 0 { - data34 := make([]byte, len(m.Field6)*10) - var j33 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data34[j33] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j33++ - } - data34[j33] = uint8(num) - j33++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j33)) - i += copy(data[i:], data34[:j33]) - } - if len(m.Field7) > 0 { - data35 := make([]byte, len(m.Field7)*5) - var j36 int - for _, num := range m.Field7 { - x37 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x37 >= 1<<7 { - data35[j36] = uint8(uint64(x37)&0x7f | 0x80) - j36++ - x37 >>= 7 - } - data35[j36] = uint8(x37) - j36++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j36)) - i += copy(data[i:], data35[:j36]) - } - if len(m.Field8) > 0 { - var j38 int - data40 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x39 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x39 >= 1<<7 { - data40[j38] = uint8(uint64(x39)&0x7f | 0x80) - j38++ - x39 >>= 7 - } - data40[j38] = uint8(x39) - j38++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j38)) - i += copy(data[i:], data40[:j38]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n41, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n42, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n43, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n44, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n45, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n46, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f47 := math.Float64bits(float64(num)) - data[i] = uint8(f47) - i++ - data[i] = uint8(f47 >> 8) - i++ - data[i] = uint8(f47 >> 16) - i++ - data[i] = uint8(f47 >> 24) - i++ - data[i] = uint8(f47 >> 32) - i++ - data[i] = uint8(f47 >> 40) - i++ - data[i] = uint8(f47 >> 48) - i++ - data[i] = uint8(f47 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f48 := math.Float32bits(float32(num)) - data[i] = uint8(f48) - i++ - data[i] = uint8(f48 >> 8) - i++ - data[i] = uint8(f48 >> 16) - i++ - data[i] = uint8(f48 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x49 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x49 >= 1<<7 { - data[i] = uint8(uint64(x49)&0x7f | 0x80) - x49 >>= 7 - i++ - } - data[i] = uint8(x49) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f50 := math.Float64bits(float64(num)) - data[i] = uint8(f50) - i++ - data[i] = uint8(f50 >> 8) - i++ - data[i] = uint8(f50 >> 16) - i++ - data[i] = uint8(f50 >> 24) - i++ - data[i] = uint8(f50 >> 32) - i++ - data[i] = uint8(f50 >> 40) - i++ - data[i] = uint8(f50 >> 48) - i++ - data[i] = uint8(f50 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f51 := math.Float32bits(float32(num)) - data[i] = uint8(f51) - i++ - data[i] = uint8(f51 >> 8) - i++ - data[i] = uint8(f51 >> 16) - i++ - data[i] = uint8(f51 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x52 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x52 >= 1<<7 { - data[i] = uint8(uint64(x52)&0x7f | 0x80) - x52 >>= 7 - i++ - } - data[i] = uint8(x52) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n53, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n54, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n55, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n56, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n57, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n58, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n59, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n60, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n61, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n62, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n63, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n64, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n65, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n66, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n67, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n68, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n69, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n70, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n71, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n72, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n73, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n74, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n75, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n76, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n77, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n78, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n79, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n80, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n80 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n81, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n81 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n82, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n83, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n84, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.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++ - i = encodeFixed64Thetest(data, i, uint64(m.Time1)) - data[i] = 0x11 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Time2)) - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - n, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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++ - i = encodeFixed64Thetest(data, i, uint64(*m.NestedField1)) - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n88, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n89, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n89 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n90, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n90 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n91, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n91 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.FieldA)))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.FieldB)))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldI)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldJ)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldK)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldL)) - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldI)) - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldJ)) - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FieldK)) - } - if m.FielL != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FielL)) - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - f92 := math.Float64bits(float64(num)) - data[i] = uint8(f92) - i++ - data[i] = uint8(f92 >> 8) - i++ - data[i] = uint8(f92 >> 16) - i++ - data[i] = uint8(f92 >> 24) - i++ - data[i] = uint8(f92 >> 32) - i++ - data[i] = uint8(f92 >> 40) - i++ - data[i] = uint8(f92 >> 48) - i++ - data[i] = uint8(f92 >> 56) - i++ - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - f93 := math.Float32bits(float32(num)) - data[i] = uint8(f93) - i++ - data[i] = uint8(f93 >> 8) - i++ - data[i] = uint8(f93 >> 16) - i++ - data[i] = uint8(f93 >> 24) - i++ - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x94 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x94 >= 1<<7 { - data[i] = uint8(uint64(x94)&0x7f | 0x80) - x94 >>= 7 - i++ - } - data[i] = uint8(x94) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x95 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x95 >= 1<<7 { - data[i] = uint8(uint64(x95)&0x7f | 0x80) - x95 >>= 7 - i++ - } - data[i] = uint8(x95) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n96, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n96 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n97, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n97 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n98, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n98 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n99, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n99 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n100, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n100 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n101, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n101 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n102 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (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 encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(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] = 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] = 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 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(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] = 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] = 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 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if r.Intn(10) != 0 { - 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - 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 := 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 := 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 = 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 := 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] = 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 := 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v243 := 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 := 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 := 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 := 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 -} - -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 { - v252 := r.Intn(100) - tmps := make([]rune, v252) - for i := 0; i < v252; 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)) - v253 := r.Int63() - if r.Intn(2) == 0 { - v253 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v253)) - 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 += github_com_gogo_protobuf_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 += github_com_gogo_protobuf_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 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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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 valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - m.Field9 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field9 = uint32(data[iNdEx-4]) - m.Field9 |= uint32(data[iNdEx-3]) << 8 - m.Field9 |= uint32(data[iNdEx-2]) << 16 - m.Field9 |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - m.Field10 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field10 = int32(data[iNdEx-4]) - m.Field10 |= int32(data[iNdEx-3]) << 8 - m.Field10 |= int32(data[iNdEx-2]) << 16 - m.Field10 |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - m.Field11 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field11 = uint64(data[iNdEx-8]) - m.Field11 |= uint64(data[iNdEx-7]) << 8 - m.Field11 |= uint64(data[iNdEx-6]) << 16 - m.Field11 |= uint64(data[iNdEx-5]) << 24 - m.Field11 |= uint64(data[iNdEx-4]) << 32 - m.Field11 |= uint64(data[iNdEx-3]) << 40 - m.Field11 |= uint64(data[iNdEx-2]) << 48 - m.Field11 |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - m.Field12 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field12 = int64(data[iNdEx-8]) - m.Field12 |= int64(data[iNdEx-7]) << 8 - m.Field12 |= int64(data[iNdEx-6]) << 16 - m.Field12 |= int64(data[iNdEx-5]) << 24 - m.Field12 |= int64(data[iNdEx-4]) << 32 - m.Field12 |= int64(data[iNdEx-3]) << 40 - m.Field12 |= int64(data[iNdEx-2]) << 48 - m.Field12 |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 = append(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 = append(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 *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 = append(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 = append(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 *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 - } - iNdEx += 8 - m.Time1 = int64(data[iNdEx-8]) - m.Time1 |= int64(data[iNdEx-7]) << 8 - m.Time1 |= int64(data[iNdEx-6]) << 16 - m.Time1 |= int64(data[iNdEx-5]) << 24 - m.Time1 |= int64(data[iNdEx-4]) << 32 - m.Time1 |= int64(data[iNdEx-3]) << 40 - m.Time1 |= int64(data[iNdEx-2]) << 48 - m.Time1 |= int64(data[iNdEx-1]) << 56 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - m.Time2 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Time2 = int64(data[iNdEx-8]) - m.Time2 |= int64(data[iNdEx-7]) << 8 - m.Time2 |= int64(data[iNdEx-6]) << 16 - m.Time2 |= int64(data[iNdEx-5]) << 24 - m.Time2 |= int64(data[iNdEx-4]) << 32 - m.Time2 |= int64(data[iNdEx-3]) << 40 - m.Time2 |= int64(data[iNdEx-2]) << 48 - m.Time2 |= int64(data[iNdEx-1]) << 56 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(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 - } - github_com_gogo_protobuf_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 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.M == nil { - m.M = &MyExtendable{} - } - if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = &v - default: - if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldA = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldB = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - m.FieldI = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldI = uint32(data[iNdEx-4]) - m.FieldI |= uint32(data[iNdEx-3]) << 8 - m.FieldI |= uint32(data[iNdEx-2]) << 16 - m.FieldI |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - m.FieldJ = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldJ = int32(data[iNdEx-4]) - m.FieldJ |= int32(data[iNdEx-3]) << 8 - m.FieldJ |= int32(data[iNdEx-2]) << 16 - m.FieldJ |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - m.FieldK = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldK = uint64(data[iNdEx-8]) - m.FieldK |= uint64(data[iNdEx-7]) << 8 - m.FieldK |= uint64(data[iNdEx-6]) << 16 - m.FieldK |= uint64(data[iNdEx-5]) << 24 - m.FieldK |= uint64(data[iNdEx-4]) << 32 - m.FieldK |= uint64(data[iNdEx-3]) << 40 - m.FieldK |= uint64(data[iNdEx-2]) << 48 - m.FieldK |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - m.FieldL = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldL = int64(data[iNdEx-8]) - m.FieldL |= int64(data[iNdEx-7]) << 8 - m.FieldL |= int64(data[iNdEx-6]) << 16 - m.FieldL |= int64(data[iNdEx-5]) << 24 - m.FieldL |= int64(data[iNdEx-4]) << 32 - m.FieldL |= int64(data[iNdEx-3]) << 40 - m.FieldL |= int64(data[iNdEx-2]) << 48 - m.FieldL |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = append(m.FieldA, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = append(m.FieldB, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_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 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/both/thetest.proto", fileDescriptorThetest) } - -var fileDescriptorThetest = []byte{ - // 3006 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, - 0x15, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x5b, 0x46, 0x95, 0xe4, 0x2d, - 0xa3, 0x2a, 0x44, 0x2c, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x71, 0x6d, 0xd7, 0xa2, - 0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, 0x40, 0xe4, 0x82, - 0xa3, 0x0a, 0xe0, 0xb8, 0xb0, 0xa8, 0x02, 0x2c, 0x2e, 0x20, 0xaa, 0x00, 0x88, 0x0b, 0x85, 0x2a, - 0x40, 0xe1, 0x82, 0x80, 0x73, 0xac, 0xa9, 0x1f, 0xf9, 0xe4, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, - 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, 0x81, - 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x9c, 0x63, 0x20, 0x24, 0xc7, 0x40, 0x48, 0x8e, 0x81, 0x90, - 0x1c, 0x03, 0x21, 0x39, 0x06, 0x42, 0x72, 0x0c, 0x04, 0xe6, 0x98, 0x0b, 0x6f, 0x9a, 0x87, 0xd7, - 0x37, 0xc7, 0x40, 0x40, 0x8e, 0x81, 0x80, 0x1c, 0x03, 0x01, 0x39, 0x06, 0x02, 0x72, 0x0c, 0x04, - 0xe4, 0x18, 0x08, 0xc8, 0x31, 0x10, 0x90, 0x63, 0x20, 0x28, 0xc7, 0x40, 0x60, 0x8e, 0x81, 0xc0, - 0x1c, 0x03, 0x81, 0x39, 0x06, 0x02, 0x73, 0x0c, 0x04, 0xe6, 0x18, 0x60, 0x73, 0xec, 0xcf, 0x00, - 0x2a, 0x4e, 0x8e, 0xdd, 0x6a, 0xed, 0xfc, 0x50, 0x6f, 0x63, 0x28, 0x66, 0x84, 0x4c, 0x1b, 0xb5, - 0xa0, 0x4b, 0xb9, 0x90, 0xcc, 0x08, 0xb9, 0xc6, 0xcb, 0x8b, 0x54, 0x4e, 0xb2, 0x8d, 0x97, 0x2f, - 0x53, 0x39, 0xc9, 0x37, 0x5e, 0x5e, 0xa2, 0x72, 0x92, 0x71, 0xbc, 0x7c, 0x85, 0xca, 0x49, 0xce, - 0xf1, 0xf2, 0x55, 0x2a, 0x27, 0x59, 0xc7, 0xcb, 0x2f, 0x53, 0x39, 0xc9, 0x3b, 0x5e, 0xbe, 0x46, - 0xe5, 0x24, 0xf3, 0x78, 0xf9, 0x15, 0x65, 0x4e, 0xcc, 0x3d, 0xa2, 0x40, 0xa1, 0x9d, 0x13, 0xb3, - 0x4f, 0xd0, 0x28, 0xb8, 0x1a, 0x24, 0xff, 0x04, 0x8d, 0xa2, 0xab, 0x41, 0x32, 0x50, 0xd0, 0x58, - 0xd6, 0x1e, 0xd8, 0xf0, 0x19, 0x22, 0x7c, 0x19, 0x01, 0x3e, 0x99, 0x81, 0x2e, 0x23, 0x40, 0x27, - 0x33, 0xb0, 0x65, 0x04, 0xd8, 0x64, 0x06, 0xb2, 0x8c, 0x00, 0x99, 0xcc, 0xc0, 0x95, 0x11, 0xe0, - 0x92, 0x19, 0xa8, 0x32, 0x02, 0x54, 0x32, 0x03, 0x53, 0x46, 0x80, 0x49, 0x66, 0x20, 0xca, 0x08, - 0x10, 0xc9, 0x0c, 0x3c, 0x19, 0x01, 0x1e, 0x99, 0x81, 0x66, 0x5a, 0x84, 0x46, 0x66, 0x61, 0x99, - 0x16, 0x61, 0x91, 0x59, 0x48, 0xa6, 0x45, 0x48, 0x64, 0x16, 0x8e, 0x69, 0x11, 0x0e, 0x99, 0x85, - 0xe2, 0x0b, 0x99, 0x54, 0x84, 0xef, 0x98, 0xbd, 0xe3, 0x1d, 0xf3, 0x54, 0x15, 0x61, 0x9e, 0x2b, - 0x1f, 0xc6, 0x8b, 0xca, 0xa2, 0x5d, 0xb0, 0xb2, 0x15, 0xa7, 0xb0, 0x82, 0xe5, 0xb9, 0xc2, 0x82, - 0xb1, 0x30, 0xfc, 0x2d, 0x4a, 0xa7, 0xaa, 0x0d, 0xf3, 0x5c, 0x99, 0x11, 0xee, 0xdf, 0xda, 0x0b, - 0xaf, 0xd8, 0x1e, 0xcb, 0xa4, 0x62, 0xc3, 0xe1, 0x1f, 0xb6, 0x62, 0xcb, 0x85, 0x87, 0x9c, 0x06, - 0x3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 0x77, 0x66, 0xa7, 0x03, 0xe6, 0x82, 0x06, 0x74, 0x73, 0x88, - 0x0e, 0x75, 0x8f, 0x2c, 0xce, 0xd5, 0xe3, 0xbe, 0xd9, 0x3d, 0x44, 0x93, 0x83, 0x7c, 0xbd, 0x6d, - 0x8f, 0x91, 0xac, 0x24, 0x2d, 0xa7, 0xfe, 0xf9, 0x74, 0x36, 0x76, 0xfb, 0x18, 0xf9, 0x2a, 0x77, - 0xda, 0xca, 0x0d, 0x18, 0xff, 0x4e, 0xeb, 0xe0, 0x58, 0xb7, 0x97, 0x88, 0x64, 0xa5, 0x84, 0x15, - 0xde, 0x08, 0x7c, 0x47, 0x64, 0x0d, 0xbc, 0xb4, 0x63, 0x77, 0xbd, 0x78, 0xbb, 0x63, 0x98, 0x85, - 0xe2, 0x5a, 0x33, 0x7e, 0xd7, 0xea, 0x42, 0xfb, 0x3e, 0x84, 0xce, 0x98, 0xb5, 0x56, 0x7f, 0x5f, - 0x69, 0x90, 0x9e, 0x9d, 0xa1, 0xd7, 0x50, 0xaf, 0xa5, 0x28, 0xbd, 0x5e, 0x6a, 0x23, 0xeb, 0x4b, - 0xe6, 0xfd, 0x23, 0x7d, 0xb1, 0x72, 0x1f, 0xb5, 0x93, 0xde, 0x8f, 0xc8, 0xaa, 0x87, 0xef, 0x4b, - 0x65, 0xee, 0x2b, 0xc1, 0xdd, 0xd3, 0x55, 0xfe, 0x9e, 0xf2, 0xcf, 0x7b, 0x3f, 0xf7, 0xc8, 0x22, - 0x21, 0x44, 0x12, 0x84, 0x45, 0x12, 0x9c, 0x36, 0x92, 0x47, 0x64, 0x7e, 0x14, 0xee, 0x15, 0x0c, - 0xba, 0x57, 0x70, 0x9a, 0x7b, 0xfd, 0x8f, 0x93, 0xad, 0x34, 0x9f, 0x6e, 0x1b, 0x9d, 0xae, 0xf1, - 0xa5, 0x7b, 0x17, 0x74, 0xa6, 0x55, 0x40, 0x39, 0x76, 0xf2, 0x70, 0x56, 0xd2, 0xde, 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, 0xa0, 0x0f, 0xdd, 0x34, 0x81, 0x6e, 0xd0, 0x87, 0x6a, 0x9a, 0x40, 0x35, - 0xe8, 0x43, 0x33, 0x4d, 0xa0, 0x19, 0xf4, 0xa1, 0x98, 0x26, 0x50, 0x0c, 0xfa, 0xd0, 0x4b, 0x13, - 0xe8, 0x05, 0x7d, 0xa8, 0x95, 0x15, 0xa9, 0x05, 0xfd, 0x68, 0x95, 0x15, 0x69, 0x05, 0xfd, 0x28, - 0xf5, 0x35, 0x91, 0x52, 0x63, 0x48, 0x2b, 0x6e, 0x35, 0x31, 0x6c, 0xca, 0x8a, 0x6c, 0x82, 0x7e, - 0x4c, 0xca, 0x8a, 0x4c, 0x82, 0x7e, 0x2c, 0xca, 0x8a, 0x2c, 0x82, 0x7e, 0x0c, 0x7a, 0x2c, 0x32, - 0xc8, 0x3d, 0xe2, 0xa3, 0x09, 0x3b, 0x8a, 0x61, 0x0c, 0x02, 0x11, 0x18, 0x04, 0x22, 0x30, 0x08, - 0x44, 0x60, 0x10, 0x88, 0xc0, 0x20, 0x10, 0x81, 0x41, 0x20, 0x02, 0x83, 0x40, 0x04, 0x06, 0x81, - 0x28, 0x0c, 0x02, 0x91, 0x18, 0x04, 0x82, 0x18, 0x94, 0x15, 0x0f, 0x3c, 0x40, 0xbf, 0x09, 0x29, - 0x2b, 0xee, 0x7c, 0x86, 0x53, 0x08, 0x44, 0xa2, 0x10, 0x08, 0xa2, 0xd0, 0x87, 0xa8, 0x90, 0xe2, - 0x28, 0x84, 0xb7, 0x87, 0xce, 0x6a, 0x06, 0x5a, 0x8d, 0x70, 0xbe, 0xc2, 0x8f, 0x53, 0xab, 0x11, - 0xf6, 0xa8, 0x07, 0xf1, 0xcc, 0x3b, 0x0b, 0xd5, 0x23, 0xcc, 0x42, 0x57, 0x29, 0x87, 0x56, 0x23, - 0x9c, 0xbb, 0xf0, 0x72, 0x6f, 0x6d, 0xd0, 0x24, 0x70, 0x2d, 0xd2, 0x24, 0x70, 0x3d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 0x67, 0x33, 0x23, 0x9f, - 0xa1, 0xef, 0xcf, 0xd1, 0xf7, 0xbb, 0x9f, 0xcc, 0x8c, 0x3c, 0x44, 0xd7, 0xa3, 0x4f, 0x66, 0xa4, - 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x09, 0xbb, 0xed, 0xa8, 0x34, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto deleted file mode 100644 index 7d23743d..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto +++ /dev/null @@ -1,626 +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) = 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; -} - 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 c94b76cb..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go +++ /dev/null @@ -1,16373 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/both/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNodeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNodeFace(t *testing.T) { - popr := math_rand.New(math_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 TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNodeStringer(t *testing.T) { - popr := math_rand.New(math_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 TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go deleted file mode 100644 index ae349da4..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/both/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/marshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go deleted file mode 100644 index 53f720e9..00000000 --- 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/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go deleted file mode 100644 index aaad2338..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go +++ /dev/null @@ -1,28773 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/marshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -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 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import compress_gzip "compress/gzip" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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,json=id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=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" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=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" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=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" 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" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=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" 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,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data,json=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" 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{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=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{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=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" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=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" 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" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=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,json=field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" 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" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=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" 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{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" 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" 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" 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" 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" 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" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children,json=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} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA,json=fieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB,json=fieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC,json=fieldC", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD,json=fieldD", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE,json=fieldE", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterType((*Node)(nil), "test.Node") - 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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6123 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xff, 0x0e, 0x87, 0x94, 0xa8, 0x43, 0x89, 0xa2, 0x66, 0xb5, 0x32, 0x2d, 0xaf, 0xf7, 0x41, - 0xcb, 0xb2, 0xac, 0xd8, 0x7a, 0xad, 0xf6, 0x45, 0x27, 0x0e, 0xf8, 0x5a, 0x59, 0xfb, 0xd7, 0xeb, - 0x3f, 0x92, 0x12, 0x3b, 0x2d, 0x40, 0x70, 0xc9, 0x91, 0x44, 0x9b, 0x1a, 0xb2, 0x1c, 0xd2, 0xf6, - 0xe6, 0x43, 0x91, 0x26, 0x6d, 0x9a, 0xb4, 0xe8, 0x33, 0x2d, 0x9a, 0x77, 0x9c, 0x14, 0x69, 0x9c, - 0xb4, 0x69, 0x93, 0x36, 0x0d, 0x8a, 0xa0, 0x68, 0x0c, 0x14, 0x69, 0xb7, 0x5f, 0x0a, 0x37, 0x9f, - 0x8a, 0xa2, 0x30, 0x9a, 0x07, 0xd0, 0xb4, 0x4d, 0xdb, 0x04, 0x30, 0x90, 0x00, 0xc9, 0x87, 0xde, - 0xf7, 0xcc, 0xb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0x43, 0xaf, 0xd1, 0x88, 0x39, 0x48, 0xd8, 0x96, 0xd3, 0xb1, 0x6a, 0x34, 0x22, 0xf4, 0x90, 0x31, - 0x05, 0x14, 0xd4, 0x1b, 0x52, 0xd1, 0xd7, 0x14, 0x52, 0x4f, 0xc2, 0xb8, 0x50, 0xa9, 0xdc, 0xae, - 0xd8, 0x87, 0x3c, 0x36, 0x17, 0x83, 0x34, 0x59, 0x28, 0x71, 0x9c, 0x89, 0x61, 0x66, 0xd2, 0x92, - 0x3e, 0x1b, 0x45, 0x80, 0xa6, 0x6d, 0x35, 0x0f, 0x50, 0x7a, 0x55, 0x1b, 0x28, 0x4e, 0xfc, 0xad, - 0xb4, 0x8d, 0x59, 0x7a, 0xac, 0xd4, 0xa4, 0xa3, 0xd5, 0x86, 0x71, 0xdd, 0x0d, 0xb5, 0xe1, 0x3e, - 0x91, 0xb2, 0x49, 0x93, 0xac, 0x27, 0xda, 0xf6, 0x21, 0xd9, 0xb6, 0x70, 0xdc, 0x23, 0x13, 0xd3, - 0x3b, 0x1b, 0x21, 0x4a, 0x2c, 0x04, 0xde, 0x99, 0xc9, 0x60, 0xf4, 0xc6, 0xc6, 0xda, 0xde, 0x8f, - 0xc6, 0x03, 0x20, 0x06, 0xca, 0x24, 0xac, 0x80, 0x54, 0xa1, 0x51, 0x3e, 0xb8, 0x85, 0xc6, 0xa6, - 0xaf, 0x41, 0x52, 0x36, 0x8f, 0x31, 0x09, 0x31, 0xa7, 0x53, 0x69, 0x77, 0x48, 0x14, 0xc6, 0x4c, - 0xfa, 0xc1, 0x48, 0x81, 0x8e, 0x8a, 0x0c, 0xa9, 0x72, 0x31, 0x13, 0xbf, 0x9d, 0xbe, 0x0a, 0x63, - 0xd2, 0xe5, 0xc3, 0x02, 0x33, 0x1f, 0x1c, 0x82, 0x49, 0xbf, 0x98, 0xf3, 0x0d, 0x7f, 0x94, 0x3e, - 0x28, 0x02, 0x6e, 0x59, 0x6d, 0x14, 0x77, 0x58, 0x02,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- 0x54, 0xc0, 0xfa, 0x93, 0xa5, 0x22, 0xe2, 0x18, 0x92, 0x47, 0x10, 0xcf, 0xb0, 0x31, 0x06, 0x23, - 0x64, 0x24, 0xbf, 0xbd, 0xbd, 0x91, 0x8a, 0x0b, 0x99, 0xbb, 0x7b, 0xe6, 0xfa, 0xd6, 0x5a, 0x6a, - 0x44, 0xc8, 0x5c, 0x33, 0xb7, 0xf7, 0x77, 0x52, 0x20, 0x24, 0x6c, 0x96, 0x76, 0x77, 0x73, 0x6b, - 0xa5, 0x54, 0x42, 0x70, 0xe4, 0x9f, 0xda, 0x2b, 0xed, 0xa6, 0x46, 0x25, 0xb5, 0xd0, 0x25, 0xc6, - 0xc4, 0x25, 0x4a, 0x5b, 0xfb, 0x9b, 0xa9, 0xa4, 0x31, 0x01, 0x63, 0xf4, 0x12, 0x5c, 0x89, 0x71, - 0x65, 0x08, 0x69, 0x9a, 0x72, 0x15, 0xa1, 0x52, 0x26, 0xa4, 0x01, 0xc4, 0x61, 0x64, 0x0a, 0x10, - 0x23, 0xd1, 0x85, 0xa2, 0x38, 0xb9, 0x91, 0xcb, 0x97, 0x36, 0xca, 0xdb, 0x3b, 0x7b, 0xeb, 0xdb, - 0x5b, 0xb9, 0x0d, 0x64, 0x3b, 0x31, 0x66, 0x96, 0xfe, 0xff, 0xfe, 0xba, 0x59, 0x2a, 0x22, 0xfb, - 0x79, 0xc6, 0x76, 0x4a, 0xb9, 0x3d, 0x34, 0xa6, 0x67, 0xe6, 0x61, 0xd2, 0xaf, 0xce, 0xf8, 0x65, - 0x46, 0xe6, 0x53, 0x1a, 0x9c, 0xf6, 0x29, 0x99, 0xbe, 0x59, 0xf4, 0x56, 0x88, 0xd1, 0x48, 0xa3, - 0x93, 0xc8, 0xc3, 0xbe, 0xb5, 0x97, 0xc4, 0x5d, 0xcf, 0x44, 0x42, 0x70, 0xde, 0x89, 0x54, 0xef, - 0x33, 0x91, 0x62, 0x11, 0x3d, 0xe1, 0xf4, 0x1e, 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xde, 0x10, 0xe2, 0x3e, - 0xca, 0xc4, 0x8d, 0x33, 0x20, 0x79, 0x0a, 0xc6, 0xb2, 0xae, 0x43, 0xfc, 0x00, 0x3d, 0x00, 0x85, - 0x10, 0xf1, 0x31, 0x26, 0x62, 0x18, 0xf3, 0x63, 0x68, 0x0e, 0x46, 0x0f, 0x9b, 0xac, 0x0c, 0x07, - 0xc3, 0x3f, 0xce, 0xe0, 0x09, 0x8e, 0x61, 0x22, 0x5a, 0xcd, 0x56, 0xb7, 0x81, 0x6b, 0x74, 0xb0, - 0x88, 0x4f, 0x70, 0x11, 0x1c, 0xc3, 0x44, 0x9c, 0xc0, 0xac, 0x2f, 0x70, 0x11, 0x8e, 0xc7, 0x9e, - 0x6f, 0xc5, 0x6b, 0xbd, 0x8d, 0xdb, 0x4d, 0x3b, 0x8c, 0x12, 0x9f, 0x64, 0x12, 0x80, 0x41, 0xb0, - 0x80, 0xc7, 0x60, 0x24, 0xac, 0x23, 0x3e, 0xcd, 0xe0, 0x71, 0x8b, 0x7b, 0x00, 0xe5, 0x19, 0x2f, - 0x32, 0x78, 0x6f, 0x25, 0x58, 0xc4, 0x1f, 0x31, 0x11, 0x49, 0x0f, 0x8c, 0xdd, 0x46, 0xc7, 0x72, - 0x3a, 0xe8, 0x51, 0x3d, 0x84, 0x90, 0xcf, 0xf0, 0xdb, 0x60, 0x10, 0x66, 0xca, 0x5b, 0x96, 0x5d, - 0x3d, 0x0a, 0x27, 0xe1, 0x45, 0x6e, 0x4a, 0x8e, 0xc1, 0x22, 0x50, 0xe5, 0x39, 0xae, 0xb4, 0xd1, - 0xc3, 0x75, 0x23, 0x94, 0x3b, 0x3e, 0xcb, 0x64, 0x8c, 0x0a, 0x10, 0xb3, 0x48, 0xd7, 0x3e, 0x89, - 0x98, 0xcf, 0x71, 0x8b, 0x78, 0x60, 0x2c, 0xf5, 0xd0, 0x93, 0x29, 0xee, 0x24, 0x4e, 0x22, 0xed, - 0x8f, 0x79, 0xea, 0x51, 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 0x2d, 0x62, - 0xf0, 0x07, 0x21, 0x5a, 0x6c, 0x3e, 0x67, 0x33, 0x05, 0x27, 0x98, 0x45, 0x31, 0x99, 0xd9, 0x34, - 0x5a, 0x43, 0x64, 0xc4, 0xe6, 0xb1, 0xfb, 0x69, 0x61, 0x77, 0x0f, 0x1f, 0xb1, 0x7d, 0x46, 0xb2, - 0x3d, 0x73, 0x20, 0x66, 0xea, 0xb1, 0xff, 0x55, 0x48, 0x78, 0xae, 0x62, 0xcc, 0x31, 0x35, 0x22, - 0x2a, 0xd0, 0x6b, 0x2b, 0xac, 0x49, 0xc6, 0x82, 0x31, 0xe9, 0xc2, 0x18, 0xea, 0x31, 0x71, 0x1f, - 0x28, 0x31, 0xf3, 0xbc, 0x6c, 0x66, 0x7f, 0x56, 0x66, 0xea, 0x25, 0x6a, 0x23, 0x62, 0xee, 0x19, - 0x1a, 0x9c, 0xfd, 0x9d, 0xd8, 0x41, 0xef, 0x33, 0x31, 0xd0, 0xb7, 0xea, 0x8d, 0xcc, 0x5b, 0x00, - 0x68, 0xca, 0xe3, 0x33, 0x54, 0x4a, 0xd6, 0x25, 0xb9, 0x81, 0xf7, 0x8e, 0xac, 0x3d, 0xf4, 0x17, - 0xb3, 0xc8, 0xfd, 0x14, 0x2e, 0x30, 0x40, 0x53, 0x8c, 0xe0, 0x1f, 0x0e, 0xc4, 0xfb, 0x76, 0x62, - 0x98, 0x35, 0x4d, 0x59, 0x9f, 0xb2, 0x3a, 0x39, 0xbb, 0xd9, 0x39, 0xb2, 0xda, 0x0a, 0x62, 0xc5, - 0xb8, 0x24, 0x25, 0x6c, 0x72, 0xe5, 0x3e, 0x81, 0xe8, 0x0b, 0xba, 0x94, 0xf9, 0x02, 0x51, 0x10, - 0xb7, 0x02, 0x3d, 0x37, 0xa8, 0x87, 0xb8, 0x41, 0xe3, 0x8a, 0xd4, 0xbf, 0x0d, 0x50, 0x53, 0x79, - 0xb4, 0xbc, 0x2e, 0x3d, 0xe7, 0x0c, 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 0x16, 0xf8, 0x85, 0xd5, 0x8c, 0x1a, 0x56, 0xe0, 0x17, 0x52, 0x0f, 0xa8, 0x21, 0x35, - 0x82, 0xb8, 0x62, 0x78, 0xc8, 0x13, 0x4d, 0x33, 0x6a, 0x34, 0x81, 0x5f, 0x24, 0xcd, 0xa8, 0x91, - 0x04, 0x7e, 0x51, 0x34, 0xa3, 0x46, 0x11, 0xf8, 0x45, 0xd0, 0x4b, 0x6a, 0x04, 0xb9, 0x47, 0x7c, - 0x32, 0xca, 0x8e, 0x62, 0x50, 0x04, 0xe9, 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x88, 0x08, - 0xd2, 0x43, 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x4c, - 0x04, 0xe9, 0xa1, 0x22, 0x48, 0xef, 0x17, 0x41, 0x33, 0xea, 0x81, 0x07, 0xf0, 0x2b, 0x48, 0x33, - 0xea, 0xce, 0x67, 0x70, 0x08, 0xe9, 0xa1, 0x42, 0x48, 0xef, 0x17, 0x42, 0x5f, 0x45, 0x8d, 0x94, - 0x14, 0x42, 0x6c, 0x7b, 0xe8, 0xf5, 0xaa, 0x40, 0x57, 0x42, 0x9c, 0xaf, 0xf0, 0x8b, 0xa9, 0x2b, - 0x21, 0xf6, 0xa8, 0x07, 0xc5, 0x59, 0x6f, 0x15, 0x2a, 0x85, 0xa8, 0x42, 0x37, 0x44, 0x0c, 0x5d, - 0x09, 0x71, 0xee, 0xa2, 0x37, 0xf6, 0xae, 0x0d, 0x2a, 0x02, 0x4f, 0x84, 0x2a, 0x02, 0xeb, 0xa1, - 0x8a, 0xc0, 0x4d, 0xd7, 0x83, 0xef, 0x8d, 0xc0, 0xa4, 0xeb, 0x41, 0xfa, 0x8e, 0xfc, 0x52, 0x4a, - 0xc6, 0xb3, 0x43, 0x65, 0xf0, 0x5d, 0x1b, 0x8f, 0x1b, 0xf1, 0xfe,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, 0x30, 0x7c, 0xc1, 0x17, 0x7f, 0xa0, 0xec, 0xdb, - 0xc9, 0x35, 0x88, 0x09, 0x29, 0x08, 0x85, 0x8b, 0xbe, 0x42, 0x8e, 0x3c, 0xa7, 0xa9, 0x8b, 0x42, - 0xe1, 0x92, 0x2f, 0x6f, 0x3d, 0xe0, 0x54, 0x51, 0x29, 0xbb, 0xc8, 0xa6, 0x91, 0xdc, 0xb2, 0x71, - 0x86, 0x47, 0x81, 0x94, 0xe3, 0xcc, 0x40, 0x74, 0x46, 0xc9, 0x2d, 0xa3, 0x3b, 0xa4, 0x80, 0x7c, - 0x5f, 0x40, 0x7f, 0x2b, 0x51, 0x21, 0xf9, 0xe5, 0xec, 0x13, 0x4c, 0x48, 0xa1, 0xaf, 0x90, 0x00, - 0x53, 0x51, 0x49, 0x85, 0xe5, 0xfc, 0xde, 0x9d, 0x6f, 0x9c, 0x3b, 0xf5, 0x32, 0x7a, 0xfd, 0x33, - 0x7a, 0xfd, 0xdb, 0x37, 0xce, 0x69, 0xdf, 0x41, 0xaf, 0xef, 0xa1, 0xd7, 0x0f, 0xd1, 0xeb, 0x5d, - 0xdf, 0x3c, 0xa7, 0xbd, 0x88, 0x5e, 0x5f, 0x40, 0xaf, 0xbf, 0x42, 0xaf, 0x97, 0xd0, 0xeb, 0x0e, - 0x7a, 0xbd, 0xfc, 0x4d, 0xc4, 0x8b, 0xfe, 0x7e, 0x07, 0xfd, 0xfd, 0x1e, 0xfa, 0xfb, 0x43, 0xf4, - 0xf7, 0x5d, 0xdf, 0x3a, 0x77, 0xea, 0x05, 0xf4, 0x7a, 0xf1, 0x5b, 0xe7, 0xb4, 0xff, 0x0b, 0x00, - 0x00, 0xff, 0xff, 0x20, 0x2c, 0x09, 0x2b, 0x1a, 0x5f, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -type NodeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Node) TestProto() github_com_gogo_protobuf_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 -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+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 *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+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 *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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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 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 github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field9)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.Field10)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field11)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Field12)) - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f1 := math.Float64bits(float64(num)) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f2 := math.Float32bits(float32(num)) - data[i] = uint8(f2) - i++ - data[i] = uint8(f2 >> 8) - i++ - data[i] = uint8(f2 >> 16) - i++ - data[i] = uint8(f2 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f5 := math.Float64bits(float64(num)) - data[i] = uint8(f5) - i++ - data[i] = uint8(f5 >> 8) - i++ - data[i] = uint8(f5 >> 16) - i++ - data[i] = uint8(f5 >> 24) - i++ - data[i] = uint8(f5 >> 32) - i++ - data[i] = uint8(f5 >> 40) - i++ - data[i] = uint8(f5 >> 48) - i++ - data[i] = uint8(f5 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f6 := math.Float32bits(float32(num)) - data[i] = uint8(f6) - i++ - data[i] = uint8(f6 >> 8) - i++ - data[i] = uint8(f6 >> 16) - i++ - data[i] = uint8(f6 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x7 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x7 >= 1<<7 { - data[i] = uint8(uint64(x7)&0x7f | 0x80) - x7 >>= 7 - i++ - } - data[i] = uint8(x7) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x8 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x8 >= 1<<7 { - data[i] = uint8(uint64(x8)&0x7f | 0x80) - x8 >>= 7 - i++ - } - data[i] = uint8(x8) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f9 := math.Float64bits(float64(num)) - data[i] = uint8(f9) - i++ - data[i] = uint8(f9 >> 8) - i++ - data[i] = uint8(f9 >> 16) - i++ - data[i] = uint8(f9 >> 24) - i++ - data[i] = uint8(f9 >> 32) - i++ - data[i] = uint8(f9 >> 40) - i++ - data[i] = uint8(f9 >> 48) - i++ - data[i] = uint8(f9 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f10 := math.Float32bits(float32(num)) - data[i] = uint8(f10) - i++ - data[i] = uint8(f10 >> 8) - i++ - data[i] = uint8(f10 >> 16) - i++ - data[i] = uint8(f10 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data12 := make([]byte, len(m.Field3)*10) - var j11 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field4) > 0 { - data14 := make([]byte, len(m.Field4)*10) - var j13 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data14[j13] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j13++ - } - data14[j13] = uint8(num) - j13++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j13)) - i += copy(data[i:], data14[:j13]) - } - if len(m.Field5) > 0 { - data16 := make([]byte, len(m.Field5)*10) - var j15 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data16[j15] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j15++ - } - data16[j15] = uint8(num) - j15++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j15)) - i += copy(data[i:], data16[:j15]) - } - if len(m.Field6) > 0 { - data18 := make([]byte, len(m.Field6)*10) - var j17 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data18[j17] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j17++ - } - data18[j17] = uint8(num) - j17++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j17)) - i += copy(data[i:], data18[:j17]) - } - if len(m.Field7) > 0 { - data19 := make([]byte, len(m.Field7)*5) - var j20 int - for _, num := range m.Field7 { - x21 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x21 >= 1<<7 { - data19[j20] = uint8(uint64(x21)&0x7f | 0x80) - j20++ - x21 >>= 7 - } - data19[j20] = uint8(x21) - j20++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j20)) - i += copy(data[i:], data19[:j20]) - } - if len(m.Field8) > 0 { - var j22 int - data24 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x23 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x23 >= 1<<7 { - data24[j22] = uint8(uint64(x23)&0x7f | 0x80) - j22++ - x23 >>= 7 - } - data24[j22] = uint8(x23) - j22++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j22)) - i += copy(data[i:], data24[:j22]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - f25 := math.Float64bits(float64(num)) - data[i] = uint8(f25) - i++ - data[i] = uint8(f25 >> 8) - i++ - data[i] = uint8(f25 >> 16) - i++ - data[i] = uint8(f25 >> 24) - i++ - data[i] = uint8(f25 >> 32) - i++ - data[i] = uint8(f25 >> 40) - i++ - data[i] = uint8(f25 >> 48) - i++ - data[i] = uint8(f25 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f26 := math.Float32bits(float32(num)) - data[i] = uint8(f26) - i++ - data[i] = uint8(f26 >> 8) - i++ - data[i] = uint8(f26 >> 16) - i++ - data[i] = uint8(f26 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data28 := make([]byte, len(m.Field3)*10) - var j27 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data28[j27] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j27++ - } - data28[j27] = uint8(num) - j27++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j27)) - i += copy(data[i:], data28[:j27]) - } - if len(m.Field4) > 0 { - data30 := make([]byte, len(m.Field4)*10) - var j29 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data30[j29] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j29++ - } - data30[j29] = uint8(num) - j29++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j29)) - i += copy(data[i:], data30[:j29]) - } - if len(m.Field5) > 0 { - data32 := make([]byte, len(m.Field5)*10) - var j31 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data32[j31] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j31++ - } - data32[j31] = uint8(num) - j31++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j31)) - i += copy(data[i:], data32[:j31]) - } - if len(m.Field6) > 0 { - data34 := make([]byte, len(m.Field6)*10) - var j33 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data34[j33] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j33++ - } - data34[j33] = uint8(num) - j33++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j33)) - i += copy(data[i:], data34[:j33]) - } - if len(m.Field7) > 0 { - data35 := make([]byte, len(m.Field7)*5) - var j36 int - for _, num := range m.Field7 { - x37 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x37 >= 1<<7 { - data35[j36] = uint8(uint64(x37)&0x7f | 0x80) - j36++ - x37 >>= 7 - } - data35[j36] = uint8(x37) - j36++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j36)) - i += copy(data[i:], data35[:j36]) - } - if len(m.Field8) > 0 { - var j38 int - data40 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x39 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x39 >= 1<<7 { - data40[j38] = uint8(uint64(x39)&0x7f | 0x80) - j38++ - x39 >>= 7 - } - data40[j38] = uint8(x39) - j38++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j38)) - i += copy(data[i:], data40[:j38]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n41, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n42, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n43, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n44, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n45, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n46, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f47 := math.Float64bits(float64(num)) - data[i] = uint8(f47) - i++ - data[i] = uint8(f47 >> 8) - i++ - data[i] = uint8(f47 >> 16) - i++ - data[i] = uint8(f47 >> 24) - i++ - data[i] = uint8(f47 >> 32) - i++ - data[i] = uint8(f47 >> 40) - i++ - data[i] = uint8(f47 >> 48) - i++ - data[i] = uint8(f47 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f48 := math.Float32bits(float32(num)) - data[i] = uint8(f48) - i++ - data[i] = uint8(f48 >> 8) - i++ - data[i] = uint8(f48 >> 16) - i++ - data[i] = uint8(f48 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x49 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x49 >= 1<<7 { - data[i] = uint8(uint64(x49)&0x7f | 0x80) - x49 >>= 7 - i++ - } - data[i] = uint8(x49) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - f50 := math.Float64bits(float64(num)) - data[i] = uint8(f50) - i++ - data[i] = uint8(f50 >> 8) - i++ - data[i] = uint8(f50 >> 16) - i++ - data[i] = uint8(f50 >> 24) - i++ - data[i] = uint8(f50 >> 32) - i++ - data[i] = uint8(f50 >> 40) - i++ - data[i] = uint8(f50 >> 48) - i++ - data[i] = uint8(f50 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - f51 := math.Float32bits(float32(num)) - data[i] = uint8(f51) - i++ - data[i] = uint8(f51 >> 8) - i++ - data[i] = uint8(f51 >> 16) - i++ - data[i] = uint8(f51 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x52 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x52 >= 1<<7 { - data[i] = uint8(uint64(x52)&0x7f | 0x80) - x52 >>= 7 - i++ - } - data[i] = uint8(x52) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n53, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n54, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n55, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n56, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n57, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n58, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n59, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n60, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n61, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n62, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n63, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n64, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n65, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n66, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n67, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n68, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n69, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n70, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n71, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n72, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n73, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n74, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n75, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n76, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n77, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n78, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n79, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n80, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n80 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n81, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n81 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n82, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n83, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n84, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.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++ - i = encodeFixed64Thetest(data, i, uint64(m.Time1)) - data[i] = 0x11 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.Time2)) - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - n, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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++ - i = encodeFixed64Thetest(data, i, uint64(*m.NestedField1)) - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n88, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n89, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n89 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n90, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n90 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n91, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n91 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.FieldA)))) - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.FieldB)))) - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldI)) - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(m.FieldJ)) - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldK)) - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(m.FieldL)) - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldI)) - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Thetest(data, i, uint32(*m.FieldJ)) - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FieldK)) - } - if m.FielL != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Thetest(data, i, uint64(*m.FielL)) - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - f92 := math.Float64bits(float64(num)) - data[i] = uint8(f92) - i++ - data[i] = uint8(f92 >> 8) - i++ - data[i] = uint8(f92 >> 16) - i++ - data[i] = uint8(f92 >> 24) - i++ - data[i] = uint8(f92 >> 32) - i++ - data[i] = uint8(f92 >> 40) - i++ - data[i] = uint8(f92 >> 48) - i++ - data[i] = uint8(f92 >> 56) - i++ - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - f93 := math.Float32bits(float32(num)) - data[i] = uint8(f93) - i++ - data[i] = uint8(f93 >> 8) - i++ - data[i] = uint8(f93 >> 16) - i++ - data[i] = uint8(f93 >> 24) - i++ - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x94 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x94 >= 1<<7 { - data[i] = uint8(uint64(x94)&0x7f | 0x80) - x94 >>= 7 - i++ - } - data[i] = uint8(x94) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x95 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x95 >= 1<<7 { - data[i] = uint8(uint64(x95)&0x7f | 0x80) - x95 >>= 7 - i++ - } - data[i] = uint8(x95) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n96, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n96 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n97, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n97 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n98, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n98 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n99, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n99 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n100, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n100 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n101, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n101 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n102 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (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 encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(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] = 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] = 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 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(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] = 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] = 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 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - this.M = NewPopulatedMyExtendable(r, easy) - } - if r.Intn(10) != 0 { - 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - 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 := 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 := 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 = 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 := 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] = 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 := 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v243 := 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 := 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 := 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 := 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 -} - -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 { - v252 := r.Intn(100) - tmps := make([]rune, v252) - for i := 0; i < v252; 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)) - v253 := r.Int63() - if r.Intn(2) == 0 { - v253 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v253)) - 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 += github_com_gogo_protobuf_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 += github_com_gogo_protobuf_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 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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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 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{ - // 3009 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, - 0x15, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x95, 0xe4, 0x2d, - 0xa3, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x71, 0x6d, 0xd7, 0xa2, - 0x0c, 0x46, 0x6e, 0x6b, 0xa0, 0x40, 0x41, 0x89, 0x2b, 0x89, 0xa8, 0xb4, 0x14, 0xc8, 0x95, 0x6b, - 0xf7, 0x50, 0x04, 0x39, 0x14, 0x46, 0xaf, 0x45, 0x8f, 0x6d, 0x5c, 0x14, 0x05, 0xdc, 0x5b, 0x0e, - 0x45, 0x51, 0x14, 0x45, 0xe3, 0x4b, 0x01, 0xf5, 0x66, 0xf4, 0x54, 0x14, 0x85, 0xd1, 0x38, 0x97, - 0x1c, 0xd3, 0x53, 0x73, 0xc8, 0xa1, 0xb3, 0xbb, 0x33, 0xb3, 0x33, 0xb3, 0xbb, 0xdc, 0xa5, 0x25, - 0xb7, 0x39, 0xac, 0x96, 0x9a, 0xf7, 0xde, 0xcc, 0xdb, 0xf7, 0x7d, 0x6f, 0xe6, 0xed, 0xce, 0xc0, - 0x99, 0x9d, 0xee, 0xe1, 0x76, 0xb7, 0xbf, 0x74, 0xd8, 0xea, 0xf5, 0xf7, 0x5b, 0x07, 0x7a, 0x6f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c, 0x79, 0x51, 0x4d, 0x22, 0x79, 0x8a, 0x97, 0x17, 0x5d, 0xf9, - 0xb2, 0x3a, 0x81, 0xe4, 0x09, 0x5e, 0xbe, 0xec, 0xca, 0x4b, 0xea, 0x24, 0x92, 0x8f, 0xf1, 0xf2, - 0x92, 0x2b, 0x5f, 0x51, 0xa7, 0x90, 0x3c, 0xc9, 0xcb, 0x57, 0xb4, 0xf7, 0x6d, 0x78, 0x0d, 0x17, - 0xde, 0x34, 0x0f, 0x2f, 0x05, 0x36, 0xcd, 0x03, 0x4b, 0x21, 0x4d, 0xf3, 0x90, 0x52, 0x30, 0xd3, - 0x3c, 0x98, 0x14, 0xc6, 0x34, 0x0f, 0x23, 0x05, 0x30, 0xcd, 0x03, 0x48, 0xa1, 0x4b, 0xf3, 0xd0, - 0x51, 0xd0, 0xd2, 0x3c, 0x68, 0x14, 0xae, 0x34, 0x0f, 0x17, 0x05, 0x4a, 0x15, 0x80, 0x72, 0x21, - 0x52, 0x05, 0x88, 0x5c, 0x70, 0x54, 0x01, 0x1c, 0x17, 0x16, 0x55, 0x80, 0xc5, 0x05, 0x44, 0x15, - 0x00, 0x71, 0xa1, 0x50, 0x05, 0x28, 0x5c, 0x10, 0x70, 0x8e, 0x35, 0xf5, 0x23, 0x9f, 0x1c, 0x03, - 0x03, 0x73, 0x0c, 0x0c, 0xcc, 0x31, 0x30, 0x30, 0xc7, 0xc0, 0xc0, 0x1c, 0x03, 0x03, 0x73, 0x0c, - 0x0c, 0xcc, 0x31, 0x30, 0x30, 0xc7, 0xc0, 0xc0, 0x1c, 0x03, 0x83, 0x73, 0x0c, 0x84, 0xe4, 0x18, - 0x08, 0xc9, 0x31, 0x10, 0x92, 0x63, 0x20, 0x24, 0xc7, 0x40, 0x48, 0x8e, 0x81, 0xc0, 0x1c, 0x73, - 0xe1, 0x4d, 0xf3, 0xf0, 0xfa, 0xe6, 0x18, 0x08, 0xc8, 0x31, 0x10, 0x90, 0x63, 0x20, 0x20, 0xc7, - 0x40, 0x40, 0x8e, 0x81, 0x80, 0x1c, 0x03, 0x01, 0x39, 0x06, 0x02, 0x72, 0x0c, 0x04, 0xe5, 0x18, - 0x08, 0xcc, 0x31, 0x10, 0x98, 0x63, 0x20, 0x30, 0xc7, 0x40, 0x60, 0x8e, 0x81, 0xc0, 0x1c, 0x03, - 0x6c, 0x8e, 0xfd, 0x09, 0x40, 0xc5, 0xc9, 0xb1, 0xdb, 0xad, 0x9d, 0x1f, 0xe8, 0x6d, 0x0c, 0xc5, - 0x8c, 0x90, 0x69, 0xa3, 0x16, 0x74, 0x29, 0x17, 0x92, 0x19, 0x21, 0xd7, 0x78, 0x79, 0x91, 0xca, - 0x49, 0xb6, 0xf1, 0xf2, 0x65, 0x2a, 0x27, 0xf9, 0xc6, 0xcb, 0x4b, 0x54, 0x4e, 0x32, 0x8e, 0x97, - 0xaf, 0x50, 0x39, 0xc9, 0x39, 0x5e, 0xbe, 0x4a, 0xe5, 0x24, 0xeb, 0x78, 0xf9, 0x15, 0x2a, 0x27, - 0x79, 0xc7, 0xcb, 0xd7, 0xa8, 0x9c, 0x64, 0x1e, 0x2f, 0xbf, 0xaa, 0xcc, 0x89, 0xb9, 0x47, 0x14, - 0x28, 0xb4, 0x73, 0x62, 0xf6, 0x09, 0x1a, 0x05, 0x57, 0x83, 0xe4, 0x9f, 0xa0, 0x51, 0x74, 0x35, - 0x48, 0x06, 0x0a, 0x1a, 0xcb, 0xda, 0x43, 0x1b, 0x3e, 0x43, 0x84, 0x2f, 0x23, 0xc0, 0x27, 0x33, - 0xd0, 0x65, 0x04, 0xe8, 0x64, 0x06, 0xb6, 0x8c, 0x00, 0x9b, 0xcc, 0x40, 0x96, 0x11, 0x20, 0x93, - 0x19, 0xb8, 0x32, 0x02, 0x5c, 0x32, 0x03, 0x55, 0x46, 0x80, 0x4a, 0x66, 0x60, 0xca, 0x08, 0x30, - 0xc9, 0x0c, 0x44, 0x19, 0x01, 0x22, 0x99, 0x81, 0x27, 0x23, 0x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, - 0x3b, 0x21, 0xa7, 0x8a, 0xea, 0xe5, 0x25, 0xbc, 0x8c, 0xac, 0x17, 0x94, 0x0b, 0x84, 0x05, 0x5c, - 0x8e, 0xe3, 0x00, 0x39, 0x2b, 0xca, 0x7a, 0x01, 0x3d, 0xa1, 0x63, 0x50, 0x09, 0x34, 0x08, 0x8e, - 0x92, 0xd3, 0x49, 0xa5, 0x50, 0xbe, 0x8e, 0x3b, 0xa9, 0x06, 0x76, 0x12, 0x12, 0x2a, 0xa7, 0xa7, - 0x6a, 0xa1, 0xb2, 0x75, 0xf2, 0xf1, 0xcc, 0xc8, 0x53, 0x74, 0xfd, 0x1d, 0x5d, 0xff, 0xfa, 0x78, - 0x46, 0xfa, 0x14, 0x5d, 0x9f, 0xa1, 0xeb, 0x73, 0x74, 0xbd, 0xf7, 0x7c, 0x46, 0x7a, 0x8c, 0xae, - 0x0f, 0xd1, 0xf5, 0x07, 0x74, 0x3d, 0x41, 0xd7, 0x09, 0xba, 0x9e, 0x3e, 0x47, 0xba, 0xe8, 0xfe, - 0x29, 0xba, 0x7f, 0x86, 0xee, 0x9f, 0xa3, 0xfb, 0x7b, 0x9f, 0xcc, 0x8c, 0x3c, 0x42, 0xd7, 0xe3, - 0x4f, 0x66, 0xa4, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xa8, 0x87, 0x58, 0xad, 0x34, 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 72509912..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto +++ /dev/null @@ -1,626 +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; -} - 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 47fdcf12..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go +++ /dev/null @@ -1,16373 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNodeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNodeFace(t *testing.T) { - popr := math_rand.New(math_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 TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNodeStringer(t *testing.T) { - popr := math_rand.New(math_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 TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 ae349da4..00000000 --- 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 53f720e9..00000000 --- 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/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go deleted file mode 100644 index d47145ab..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go +++ /dev/null @@ -1,36190 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -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 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import compress_gzip "compress/gzip" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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,json=id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=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" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=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" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=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" 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" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=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" 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,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data,json=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" 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{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=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{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=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" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=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" 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" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=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,json=field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" 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" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=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" 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{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" 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" 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" 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" 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" 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" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children,json=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} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA,json=fieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB,json=fieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC,json=fieldC", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD,json=fieldD", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE,json=fieldE", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterType((*Node)(nil), "test.Node") - 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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6121 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5c, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xde, 0xe1, 0x90, 0x12, 0x75, 0x28, 0x51, 0xd4, 0xac, 0x56, 0xa6, 0xe5, 0xf5, 0x3e, 0x68, - 0x59, 0x96, 0x15, 0x5b, 0xaf, 0xd5, 0xbe, 0xe8, 0xc4, 0x01, 0x5f, 0x2b, 0x6b, 0xab, 0x57, 0x47, - 0x52, 0x62, 0xa7, 0x05, 0x08, 0x2e, 0x39, 0x92, 0x68, 0x53, 0x43, 0x96, 0x43, 0xda, 0xde, 0xfc, - 0x28, 0xd2, 0xa4, 0x4d, 0x93, 0x16, 0x7d, 0xa6, 0x45, 0xf3, 0x8e, 0x93, 0x22, 0x8d, 0x93, 0x3e, - 0x92, 0xb4, 0x69, 0x50, 0x04, 0x45, 0x63, 0xa0, 0x48, 0xbb, 0xfd, 0x53, 0xa4, 0xf9, 0x55, 0x14, - 0x85, 0x91, 0x17, 0xd0, 0xb4, 0x4d, 0xdb, 0x04, 0x30, 0x90, 0x00, 0xc9, 0x8f, 0xde, 0xf7, 0xcc, - 0xbd, 0x1c, 0x72, 0x46, 0x5e, 0x3b, 0xc9, 0x02, 0x5c, 0x91, 0xf7, 0x9c, 0xef, 0xcc, 0x99, 0xf3, - 0xba, 0x67, 0xee, 0xbd, 0x24, 0xfc, 0xfd, 0x32, 0x5c, 0x38, 0x6c, 0x36, 0x0f, 0x1b, 0xd6, 0x62, - 0xab, 0xdd, 0xec, 0x34, 0x6f, 0x75, 0x0f, 0x16, 0x6b, 0x96, 0x53, 0x6d, 0xd7, 0x5b, 0x9d, 0x66, - 0x7b, 0x81, 0x8c, 0x19, 0xe3, 0x94, 0x63, 0x81, 0x73, 0x64, 0x36, 0x61, 0xe2, 0x46, 0xbd, 0x61, - 0x15, 0x05, 0xe3, 0xae, 0xd5, 0x31, 0xae, 0x41, 0xf4, 0x00, 0x0d, 0xa6, 0xb5, 0x0b, 0xfa, 0x5c, - 0x62, 0x65, 0x66, 0x41, 0x01, 0x2d, 0xc8, 0x88, 0x1d, 0x3c, 0x6c, 0x12, 0x44, 0xe6, 0xdb, 0x51, - 0x38, 0xed, 0x43, 0x35, 0x0c, 0x88, 0xda, 0x95, 0x63, 0x2c, 0x51, 0x9b, 0x1b, 0x31, 0xc9, 0x7b, - 0x23, 0x0d, 0xc3, 0xad, 0x4a, 0xf5, 0x99, 0xca, 0xa1, 0x95, 0x8e, 0x90, 0x61, 0xfe, 0xd1, 0x38, - 0x07, 0x50, 0xb3, 0x5a, 0x96, 0x5d, 0xb3, 0xec, 0xea, 0xed, 0xb4, 0x8e, 0xb4, 0x18, 0x31, 0x3d, - 0x23, 0xc6, 0x1b, 0x60, 0xa2, 0xd5, 0xbd, 0xd5, 0xa8, 0x57, 0xcb, 0x1e, 0x36, 0x40, 0x6c, 0x31, - 0x33, 0x45, 0x09, 0x45, 0x97, 0xf9, 0x21, 0x18, 0x7f, 0xce, 0xaa, 0x3c, 0xe3, 0x65, 0x4d, 0x10, - 0xd6, 0x24, 0x1e, 0xf6, 0x30, 0x16, 0x60, 0xf4, 0xd8, 0x72, 0x1c, 0xa4, 0x40, 0xb9, 0x73, 0xbb, - 0x65, 0xa5, 0xa3, 0xe4, 0xee, 0x2f, 0xf4, 0xdc, 0xbd, 0x7a, 0xe7, 0x09, 0x86, 0xda, 0x43, 0x20, - 0x23, 0x07, 0x23, 0x96, 0xdd, 0x3d, 0xa6, 0x12, 0x62, 0x7d, 0xec, 0x57, 0x42, 0x1c, 0xaa, 0x94, - 0x38, 0x86, 0x31, 0x11, 0xc3, 0x8e, 0xd5, 0x7e, 0xb6, 0x5e, 0xb5, 0xd2, 0x43, 0x44, 0xc0, 0x43, - 0x3d, 0x02, 0x76, 0x29, 0x5d, 0x95, 0xc1, 0x71, 0xe8, 0x56, 0x46, 0xac, 0xe7, 0x3b, 0x96, 0xed, - 0xd4, 0x9b, 0x76, 0x7a, 0x98, 0x08, 0x79, 0xd0, 0xc7, 0x8b, 0x56, 0xa3, 0xa6, 0x8a, 0x70, 0x71, - 0xc6, 0x15, 0x18, 0x6e, 0xb6, 0x3a, 0xe8, 0x9d, 0x93, 0x8e, 0x23, 0xff, 0x24, 0x56, 0xce, 0xfa, - 0x06, 0xc2, 0x36, 0xe5, 0x31, 0x39, 0xb3, 0xb1, 0x0e, 0x29, 0xa7, 0xd9, 0x6d, 0x57, 0xad, 0x72, - 0xb5, 0x59, 0xb3, 0xca, 0x75, 0xfb, 0xa0, 0x99, 0x1e, 0x21, 0x02, 0xce, 0xf7, 0xde, 0x08, 0x61, - 0x2c, 0x20, 0xbe, 0x75, 0xc4, 0x66, 0x26, 0x1d, 0xe9, 0xb3, 0x31, 0x05, 0x43, 0xce, 0x6d, 0xbb, - 0x53, 0x79, 0x3e, 0x3d, 0x4a, 0x22, 0x84, 0x7d, 0xca, 0xfc, 0x20, 0x06, 0xe3, 0x61, 0x42, 0xec, - 0x31, 0x88, 0x1d, 0xe0, 0xbb, 0x44, 0x01, 0x76, 0x02, 0x1b, 0x50, 0x8c, 0x6c, 0xc4, 0xa1, 0x57, - 0x69, 0xc4, 0x1c, 0x24, 0x6c, 0xcb, 0xe9, 0x58, 0x35, 0x1a, 0x11, 0x7a, 0xc8, 0x98, 0x02, 0x0a, - 0xea, 0x0d, 0xa9, 0xe8, 0xab, 0x0a, 0xa9, 0x27, 0x61, 0x5c, 0xa8, 0x54, 0x6e, 0x57, 0xec, 0x43, - 0x1e, 0x9b, 0x8b, 0x41, 0x9a, 0x2c, 0x94, 0x38, 0xce, 0xc4, 0x30, 0x33, 0x69, 0x49, 0x9f, 0x8d, - 0x22, 0x40, 0xd3, 0xb6, 0x9a, 0x07, 0x28, 0xbd, 0xaa, 0x0d, 0x14, 0x27, 0xfe, 0x56, 0xda, 0xc6, - 0x2c, 0x3d, 0x56, 0x6a, 0xd2, 0xd1, 0x6a, 0xc3, 0xb8, 0xee, 0x86, 0xda, 0x70, 0x9f, 0x48, 0xd9, - 0xa4, 0x49, 0xd6, 0x13, 0x6d, 0xfb, 0x90, 0x6c, 0x5b, 0x38, 0xee, 0x91, 0x89, 0xe9, 0x9d, 0x8d, - 0x10, 0x25, 0x16, 0x02, 0xef, 0xcc, 0x64, 0x30, 0x7a, 0x63, 0x63, 0x6d, 0xef, 0x47, 0xe3, 0x01, - 0x10, 0x03, 0x65, 0x12, 0x56, 0x40, 0xaa, 0xd0, 0x28, 0x1f, 0xdc, 0x42, 0x63, 0xd3, 0xd7, 0x20, - 0x29, 0x9b, 0xc7, 0x98, 0x84, 0x98, 0xd3, 0xa9, 0xb4, 0x3b, 0x24, 0x0a, 0x63, 0x26, 0xfd, 0x60, - 0xa4, 0x40, 0x47, 0x45, 0x86, 0x54, 0xb9, 0x98, 0x89, 0xdf, 0x4e, 0x5f, 0x85, 0x31, 0xe9, 0xf2, - 0x61, 0x81, 0x99, 0xf7, 0x0f, 0xc1, 0xa4, 0x5f, 0xcc, 0xf9, 0x86, 0x3f, 0x4a, 0x1f, 0x14, 0x01, - 0xb7, 0xac, 0x36, 0x8a, 0x3b, 0x2c, 0x81, 0x7d, 0x42, 0x11, 0x15, 0x6b, 0x54, 0x6e, 0x59, 0x0d, - 0x14, 0x4d, 0xda, 0x5c, 0x72, 0xe5, 0x0d, 0xa1, 0xa2, 0x7a, 0x61, 0x03, 0x43, 0x4c, 0x8a, 0x34, - 0x1e, 0x87, 0x28, 0x2b, 0x71, 0x58, 0xc2, 0x7c, 0x38, 0x09, 0x38, 0x16, 0x4d, 0x82, 0x33, 0xee, - 0x83, 0x11, 0xfc, 0x97, 0xda, 0x76, 0x88, 0xe8, 0x1c, 0xc7, 0x03, 0xd8, 0xae, 0xc6, 0x34, 0xc4, - 0x49, 0x98, 0xd5, 0x2c, 0x3e, 0x35, 0x88, 0xcf, 0xd8, 0x31, 0x35, 0xeb, 0xa0, 0xd2, 0x6d, 0x74, - 0xca, 0xcf, 0x56, 0x1a, 0x5d, 0x8b, 0x04, 0x0c, 0x72, 0x0c, 0x1b, 0x7c, 0x0b,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, 0xe6, 0xfc, 0x39, 0x37, 0x56, 0xe7, 0xd4, 0x23, 0x4d, - 0x32, 0xe7, 0x86, 0x1b, 0xb5, 0x73, 0xea, 0x56, 0x99, 0xcc, 0xb9, 0xe9, 0xc6, 0xef, 0x9c, 0xba, - 0x69, 0x26, 0x73, 0x6e, 0xb9, 0x91, 0x3c, 0xa7, 0x6e, 0x9f, 0xc9, 0x9c, 0xdb, 0xee, 0x1a, 0xfa, - 0x97, 0x95, 0xf0, 0xf3, 0x1c, 0x82, 0xca, 0x28, 0xe1, 0x07, 0x3e, 0xa1, 0x97, 0x51, 0x42, 0x0f, - 0x7c, 0xc2, 0x2e, 0xa3, 0x84, 0x1d, 0xf8, 0x84, 0x5c, 0x46, 0x09, 0x39, 0xf0, 0x09, 0xb7, 0x8c, - 0x12, 0x6e, 0xe0, 0x13, 0x6a, 0x19, 0x25, 0xd4, 0xc0, 0x27, 0xcc, 0x32, 0x4a, 0x98, 0x81, 0x4f, - 0x88, 0x65, 0x94, 0x10, 0x03, 0x9f, 0xf0, 0xca, 0x28, 0xe1, 0x05, 0x3e, 0xa1, 0x35, 0xa3, 0x86, - 0x16, 0xf8, 0x85, 0xd5, 0x8c, 0x1a, 0x56, 0xe0, 0x17, 0x52, 0x0f, 0xa8, 0x21, 0x35, 0x82, 0xb8, - 0x62, 0x78, 0xc8, 0x13, 0x4d, 0x33, 0x6a, 0x34, 0x81, 0x5f, 0x24, 0xcd, 0xa8, 0x91, 0x04, 0x7e, - 0x51, 0x34, 0xa3, 0x46, 0x11, 0xf8, 0x45, 0xd0, 0x4b, 0x6a, 0x04, 0xb9, 0x47, 0x7c, 0x32, 0xca, - 0x8e, 0x62, 0x50, 0x04, 0xe9, 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x88, 0x08, 0xd2, 0x43, - 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x4c, 0x04, 0xe9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, 0xcb, 0xf9, 0xbd, 0x3b, 0xdf, 0x38, 0x77, 0xea, 0xab, 0xe8, 0xf5, 0xaf, 0xe8, 0xf5, - 0xf5, 0x6f, 0x9c, 0xd3, 0xbe, 0x83, 0x5e, 0xdf, 0x43, 0xaf, 0x1f, 0xa2, 0xd7, 0x3b, 0xbe, 0x79, - 0x4e, 0x7b, 0x11, 0xbd, 0x3e, 0x87, 0x5e, 0x7f, 0x83, 0x5e, 0x2f, 0xa1, 0xd7, 0x9d, 0x6f, 0x22, - 0x7e, 0xf4, 0xf7, 0xeb, 0xe8, 0xf5, 0x1d, 0xf4, 0xfe, 0x7b, 0xe8, 0xef, 0x0f, 0xd1, 0xdf, 0x77, - 0x7c, 0xeb, 0xdc, 0xa9, 0x17, 0xd0, 0xeb, 0xc5, 0x6f, 0x9d, 0xd3, 0xfe, 0x3f, 0x00, 0x00, 0xff, - 0xff, 0x1e, 0xd1, 0x9e, 0xe4, 0x1c, 0x5f, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -type NodeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Node) TestProto() github_com_gogo_protobuf_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 -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+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 *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+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 *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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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 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 github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(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] = 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] = 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 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(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] = 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] = 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 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - 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 := 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 := 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 = 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 := 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] = 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 := 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v243 := 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 := 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 := 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 := 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 -} - -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 { - v252 := r.Intn(100) - tmps := make([]rune, v252) - for i := 0; i < v252; 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)) - v253 := r.Int63() - if r.Intn(2) == 0 { - v253 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v253)) - 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 += github_com_gogo_protobuf_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 += github_com_gogo_protobuf_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 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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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 valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - m.Field9 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field9 = uint32(data[iNdEx-4]) - m.Field9 |= uint32(data[iNdEx-3]) << 8 - m.Field9 |= uint32(data[iNdEx-2]) << 16 - m.Field9 |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - m.Field10 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field10 = int32(data[iNdEx-4]) - m.Field10 |= int32(data[iNdEx-3]) << 8 - m.Field10 |= int32(data[iNdEx-2]) << 16 - m.Field10 |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - m.Field11 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field11 = uint64(data[iNdEx-8]) - m.Field11 |= uint64(data[iNdEx-7]) << 8 - m.Field11 |= uint64(data[iNdEx-6]) << 16 - m.Field11 |= uint64(data[iNdEx-5]) << 24 - m.Field11 |= uint64(data[iNdEx-4]) << 32 - m.Field11 |= uint64(data[iNdEx-3]) << 40 - m.Field11 |= uint64(data[iNdEx-2]) << 48 - m.Field11 |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - m.Field12 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field12 = int64(data[iNdEx-8]) - m.Field12 |= int64(data[iNdEx-7]) << 8 - m.Field12 |= int64(data[iNdEx-6]) << 16 - m.Field12 |= int64(data[iNdEx-5]) << 24 - m.Field12 |= int64(data[iNdEx-4]) << 32 - m.Field12 |= int64(data[iNdEx-3]) << 40 - m.Field12 |= int64(data[iNdEx-2]) << 48 - m.Field12 |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 = append(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 = append(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 *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 = append(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 = append(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 *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 - } - iNdEx += 8 - m.Time1 = int64(data[iNdEx-8]) - m.Time1 |= int64(data[iNdEx-7]) << 8 - m.Time1 |= int64(data[iNdEx-6]) << 16 - m.Time1 |= int64(data[iNdEx-5]) << 24 - m.Time1 |= int64(data[iNdEx-4]) << 32 - m.Time1 |= int64(data[iNdEx-3]) << 40 - m.Time1 |= int64(data[iNdEx-2]) << 48 - m.Time1 |= int64(data[iNdEx-1]) << 56 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - m.Time2 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Time2 = int64(data[iNdEx-8]) - m.Time2 |= int64(data[iNdEx-7]) << 8 - m.Time2 |= int64(data[iNdEx-6]) << 16 - m.Time2 |= int64(data[iNdEx-5]) << 24 - m.Time2 |= int64(data[iNdEx-4]) << 32 - m.Time2 |= int64(data[iNdEx-3]) << 40 - m.Time2 |= int64(data[iNdEx-2]) << 48 - m.Time2 |= int64(data[iNdEx-1]) << 56 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(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 - } - github_com_gogo_protobuf_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 - } - github_com_gogo_protobuf_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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldA = float64(math.Float64frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldB = float32(math.Float32frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - m.FieldI = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldI = uint32(data[iNdEx-4]) - m.FieldI |= uint32(data[iNdEx-3]) << 8 - m.FieldI |= uint32(data[iNdEx-2]) << 16 - m.FieldI |= uint32(data[iNdEx-1]) << 24 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - m.FieldJ = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.FieldJ = int32(data[iNdEx-4]) - m.FieldJ |= int32(data[iNdEx-3]) << 8 - m.FieldJ |= int32(data[iNdEx-2]) << 16 - m.FieldJ |= int32(data[iNdEx-1]) << 24 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - m.FieldK = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldK = uint64(data[iNdEx-8]) - m.FieldK |= uint64(data[iNdEx-7]) << 8 - m.FieldK |= uint64(data[iNdEx-6]) << 16 - m.FieldK |= uint64(data[iNdEx-5]) << 24 - m.FieldK |= uint64(data[iNdEx-4]) << 32 - m.FieldK |= uint64(data[iNdEx-3]) << 40 - m.FieldK |= uint64(data[iNdEx-2]) << 48 - m.FieldK |= uint64(data[iNdEx-1]) << 56 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - m.FieldL = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.FieldL = int64(data[iNdEx-8]) - m.FieldL |= int64(data[iNdEx-7]) << 8 - m.FieldL |= int64(data[iNdEx-6]) << 16 - m.FieldL |= int64(data[iNdEx-5]) << 24 - m.FieldL |= int64(data[iNdEx-4]) << 32 - m.FieldL |= int64(data[iNdEx-3]) << 40 - m.FieldL |= int64(data[iNdEx-2]) << 48 - m.FieldL |= int64(data[iNdEx-1]) << 56 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = append(m.FieldA, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = append(m.FieldB, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.FieldA = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.FieldB = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetest - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append(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 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetest(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_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 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{ - // 3012 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, - 0xf5, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x3f, 0x49, 0xde, - 0x9f, 0xa2, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0xda, 0xae, - 0x45, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x12, 0x57, 0x12, 0x51, 0x69, 0x29, 0x90, 0x4b, - 0xd7, 0xee, 0xa1, 0x08, 0x72, 0x28, 0x8c, 0x5e, 0x8b, 0x1e, 0xdb, 0xb8, 0x28, 0x0a, 0xb8, 0xb7, - 0x1c, 0x8a, 0xa2, 0x28, 0x8a, 0xc6, 0x97, 0x02, 0xea, 0xcd, 0xe8,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0x1f, 0x69, 0xcd, 0x8b, 0xd2, 0x82, 0x7e, 0xb2, 0x9a, 0x17, 0x65, - 0x05, 0xfd, 0x24, 0xf5, 0xff, 0xa2, 0xa4, 0xc6, 0x90, 0x55, 0xdc, 0x3a, 0xc4, 0xa8, 0x69, 0x5e, - 0x54, 0x13, 0xf4, 0x53, 0xd2, 0xbc, 0xa8, 0x24, 0xe8, 0xa7, 0xa2, 0x79, 0x51, 0x45, 0xd0, 0x4f, - 0x41, 0x4f, 0x44, 0x05, 0xb9, 0x5b, 0x7c, 0x34, 0x61, 0x45, 0x31, 0x4c, 0x41, 0x20, 0x82, 0x82, - 0x40, 0x04, 0x05, 0x81, 0x08, 0x0a, 0x02, 0x11, 0x14, 0x04, 0x22, 0x28, 0x08, 0x44, 0x50, 0x10, - 0x88, 0xa0, 0x20, 0x10, 0x45, 0x41, 0x20, 0x92, 0x82, 0x40, 0x90, 0x82, 0xe6, 0xc5, 0x0d, 0x0f, - 0xd0, 0x6f, 0x42, 0x9a, 0x17, 0x57, 0x3e, 0xc3, 0x25, 0x04, 0x22, 0x49, 0x08, 0x04, 0x49, 0xe8, - 0x23, 0xd4, 0x48, 0x71, 0x12, 0xc2, 0xcb, 0x43, 0x67, 0x35, 0x03, 0xad, 0x45, 0xd8, 0x5f, 0xe1, - 0xa7, 0xa9, 0xb5, 0x08, 0x6b, 0xd4, 0x83, 0x74, 0xe6, 0x9d, 0x85, 0x6a, 0x11, 0x66, 0xa1, 0x6b, - 0x54, 0x43, 0x6b, 0x11, 0xf6, 0x5d, 0x78, 0xb5, 0xb7, 0x3e, 0x68, 0x12, 0xb8, 0x1e, 0x69, 0x12, - 0xb8, 0x11, 0x69, 0x12, 0xb8, 0xe9, 0x32, 0xf8, 0x13, 0x19, 0xbe, 0xea, 0x32, 0xe8, 0xfc, 0xda, - 0x7e, 0x70, 0x6c, 0x4d, 0x01, 0xee, 0x0a, 0x95, 0x42, 0x56, 0x6d, 0x18, 0x1a, 0xad, 0xf5, 0x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, 0x6c, 0xcd, 0x1a, - 0xaf, 0x34, 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 ff80f481..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto +++ /dev/null @@ -1,626 +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; -} - 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 5de863bf..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go +++ /dev/null @@ -1,14637 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNodeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNodeFace(t *testing.T) { - popr := math_rand.New(math_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 TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNodeStringer(t *testing.T) { - popr := math_rand.New(math_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 TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 ae349da4..00000000 --- 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/combos/unsafeboth/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/bug_test.go deleted file mode 100644 index 53f720e9..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/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/unsafeboth/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.pb.go deleted file mode 100644 index 2ea3fe43..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.pb.go +++ /dev/null @@ -1,39492 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -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 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import compress_gzip "compress/gzip" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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,json=id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=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" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=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" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=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" 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" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=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" 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,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data,json=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" 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{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=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{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=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" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=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" 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" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=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,json=field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" 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" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=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" 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{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" 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" 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" 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" 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" 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" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children,json=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} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA,json=fieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB,json=fieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC,json=fieldC", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD,json=fieldD", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE,json=fieldE", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterType((*Node)(nil), "test.Node") - 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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6125 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5c, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xde, 0xe1, 0x90, 0x12, 0x75, 0x28, 0x51, 0xd4, 0xac, 0x56, 0xa6, 0xe5, 0xf5, 0x3e, 0x68, - 0x79, 0x2d, 0x2b, 0xb6, 0x5e, 0xab, 0x7d, 0xd1, 0x89, 0x03, 0xbe, 0x56, 0xd6, 0x56, 0xaf, 0x8e, - 0xa4, 0xc4, 0x4e, 0x0b, 0x10, 0x14, 0x39, 0x92, 0x68, 0x53, 0x43, 0x96, 0x43, 0xda, 0xde, 0xfc, - 0x28, 0xd2, 0xa4, 0x4d, 0x93, 0x16, 0x7d, 0xa6, 0x45, 0xf3, 0x8e, 0x93, 0x22, 0x8d, 0x93, 0xb6, - 0x69, 0xd2, 0xa6, 0x41, 0x11,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 0x1e, 0x36, 0x40, 0x6c, 0x31, - 0x33, 0x45, 0x09, 0x45, 0x97, 0xf9, 0x21, 0x18, 0x7f, 0xce, 0xaa, 0x3c, 0xe3, 0x65, 0x4d, 0x10, - 0xd6, 0x24, 0x1e, 0xf6, 0x30, 0x16, 0x60, 0xf4, 0xd8, 0x72, 0x1c, 0xa4, 0x40, 0xb9, 0x73, 0xbb, - 0x65, 0xa5, 0xa3, 0xe4, 0xee, 0x2f, 0xf4, 0xdc, 0xbd, 0x7a, 0xe7, 0x09, 0x86, 0xda, 0x45, 0x20, - 0x23, 0x07, 0x23, 0x96, 0xdd, 0x3d, 0xa6, 0x12, 0x62, 0x7d, 0xec, 0x57, 0x42, 0x1c, 0xaa, 0x94, - 0x38, 0x86, 0x31, 0x11, 0xc3, 0x8e, 0xd5, 0x7e, 0xb6, 0x5e, 0xb5, 0xd2, 0x43, 0x44, 0xc0, 0x43, - 0x3d, 0x02, 0x76, 0x28, 0x5d, 0x95, 0xc1, 0x71, 0xe8, 0x56, 0x46, 0xac, 0xe7, 0x3b, 0x96, 0xed, - 0xd4, 0x9b, 0x76, 0x7a, 0x98, 0x08, 0x79, 0xd0, 0xc7, 0x8b, 0x56, 0xa3, 0xa6, 0x8a, 0x70, 0x71, - 0xc6, 0x55, 0x18, 0x6e, 0xb6, 0x3a, 0xe8, 0x9d, 0x93, 0x8e, 0x23, 0xff, 0x24, 0x96, 0xcf, 0xfa, - 0x06, 0xc2, 0x16, 0xe5, 0x31, 0x39, 0xb3, 0xb1, 0x06, 0x29, 0xa7, 0xd9, 0x6d, 0x57, 0xad, 0x72, - 0xb5, 0x59, 0xb3, 0xca, 0x75, 0xfb, 0xa0, 0x99, 0x1e, 0x21, 0x02, 0xce, 0xf7, 0xde, 0x08, 0x61, - 0x2c, 0x20, 0xbe, 0x35, 0xc4, 0x66, 0x26, 0x1d, 0xe9, 0xb3, 0x31, 0x05, 0x43, 0xce, 0x6d, 0xbb, - 0x53, 0x79, 0x3e, 0x3d, 0x4a, 0x22, 0x84, 0x7d, 0xca, 0xfc, 0x20, 0x06, 0xe3, 0x61, 0x42, 0xec, - 0x31, 0x88, 0x1d, 0xe0, 0xbb, 0x44, 0x01, 0x76, 0x02, 0x1b, 0x50, 0x8c, 0x6c, 0xc4, 0xa1, 0x57, - 0x69, 0xc4, 0x1c, 0x24, 0x6c, 0xcb, 0xe9, 0x58, 0x35, 0x1a, 0x11, 0x7a, 0xc8, 0x98, 0x02, 0x0a, - 0xea, 0x0d, 0xa9, 0xe8, 0xab, 0x0a, 0xa9, 0x27, 0x61, 0x5c, 0xa8, 0x54, 0x6e, 0x57, 0xec, 0x43, - 0x1e, 0x9b, 0x0b, 0x41, 0x9a, 0xcc, 0x97, 0x38, 0xce, 0xc4, 0x30, 0x33, 0x69, 0x49, 0x9f, 0x8d, - 0x22, 0x40, 0xd3, 0xb6, 0x9a, 0x07, 0x28, 0xbd, 0xaa, 0x0d, 0x14, 0x27, 0xfe, 0x56, 0xda, 0xc2, - 0x2c, 0x3d, 0x56, 0x6a, 0xd2, 0xd1, 0x6a, 0xc3, 0xb8, 0xe1, 0x86, 0xda, 0x70, 0x9f, 0x48, 0xd9, - 0xa0, 0x49, 0xd6, 0x13, 0x6d, 0x7b, 0x90, 0x6c, 0x5b, 0x38, 0xee, 0x91, 0x89, 0xe9, 0x9d, 0x8d, - 0x10, 0x25, 0xe6, 0x03, 0xef, 0xcc, 0x64, 0x30, 0x7a, 0x63, 0x63, 0x6d, 0xef, 0x47, 0xe3, 0x01, - 0x10, 0x03, 0x65, 0x12, 0x56, 0x40, 0xaa, 0xd0, 0x28, 0x1f, 0xdc, 0x44, 0x63, 0xd3, 0xd7, 0x21, - 0x29, 0x9b, 0xc7, 0x98, 0x84, 0x98, 0xd3, 0xa9, 0xb4, 0x3b, 0x24, 0x0a, 0x63, 0x26, 0xfd, 0x60, - 0xa4, 0x40, 0x47, 0x45, 0x86, 0x54, 0xb9, 0x98, 0x89, 0xdf, 0x4e, 0x5f, 0x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7d, 0x2b, 0xb7, 0x9b, 0x8a, 0x88, 0xcf, 0x6b, 0x9b, 0xbb, 0x57, 0x57, 0x52, 0xba, - 0x00, 0xec, 0xd1, 0x81, 0xa8, 0x97, 0xe1, 0xf2, 0x72, 0x2a, 0x86, 0x22, 0x61, 0x94, 0x0a, 0x58, - 0x7b, 0xb2, 0x54, 0x44, 0x1c, 0x43, 0xf2, 0x08, 0xe2, 0x19, 0x36, 0xc6, 0x60, 0x84, 0x8c, 0xe4, - 0xb7, 0xb6, 0xd6, 0x53, 0x71, 0x21, 0x73, 0x67, 0xd7, 0x5c, 0xdb, 0x5c, 0x4d, 0x8d, 0x08, 0x99, - 0xab, 0xe6, 0xd6, 0xde, 0x76, 0x0a, 0x84, 0x84, 0x8d, 0xd2, 0xce, 0x4e, 0x6e, 0xb5, 0x94, 0x4a, - 0x08, 0x8e, 0xfc, 0x53, 0xbb, 0xa5, 0x9d, 0xd4, 0xa8, 0xa4, 0x16, 0xba, 0xc4, 0x98, 0xb8, 0x44, - 0x69, 0x73, 0x6f, 0x23, 0x95, 0x34, 0x26, 0x60, 0x8c, 0x5e, 0x82, 0x2b, 0x31, 0xae, 0x0c, 0x21, - 0x4d, 0x53, 0xae, 0x22, 0x54, 0xca, 0x84, 0x34, 0x80, 0x38, 0x8c, 0x4c, 0x01, 0x62, 0x24, 0xba, - 0x50, 0x14, 0x27, 0xd7, 0x73, 0xf9, 0xd2, 0x7a, 0x79, 0x6b, 0x7b, 0x77, 0x6d, 0x6b, 0x33, 0xb7, - 0x8e, 0x6c, 0x27, 0xc6, 0xcc, 0xd2, 0xcf, 0xef, 0xad, 0x99, 0xa5, 0x22, 0xb2, 0x9f, 0x67, 0x6c, - 0xbb, 0x94, 0xdb, 0x45, 0x63, 0x7a, 0x66, 0x0e, 0x26, 0xfd, 0xea, 0x8c, 0x5f, 0x66, 0x64, 0x3e, - 0xa1, 0xc1, 0x69, 0x9f, 0x92, 0xe9, 0x9b, 0x45, 0x6f, 0x86, 0x18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x93, 0x3d, 0xde, 0xc5, 0x62, 0xb7, - 0x81, 0x8f, 0x0b, 0x7f, 0x84, 0x90, 0xf9, 0x21, 0x26, 0xd3, 0x60, 0x58, 0xee, 0x16, 0x2c, 0xf1, - 0x16, 0x4c, 0xa0, 0x27, 0xf5, 0xfd, 0xa6, 0xc3, 0x9e, 0x7b, 0x43, 0x88, 0xfb, 0x30, 0x13, 0x37, - 0xce, 0x80, 0xe4, 0x29, 0x18, 0xcb, 0xba, 0x01, 0xf1, 0x03, 0xf4, 0x00, 0x14, 0x42, 0xc4, 0x47, - 0x98, 0x88, 0x61, 0xcc, 0x8f, 0xa1, 0x39, 0x18, 0x3d, 0x6c, 0xb2, 0x32, 0x1c, 0x0c, 0xff, 0x28, - 0x83, 0x27, 0x38, 0x86, 0x89, 0x68, 0x35, 0x5b, 0xdd, 0x06, 0xae, 0xd1, 0xc1, 0x22, 0x3e, 0xc6, - 0x45, 0x70, 0x0c, 0x13, 0x71, 0x02, 0xb3, 0xbe, 0xc0, 0x45, 0x38, 0x1e, 0x7b, 0xbe, 0x19, 0xaf, - 0xf5, 0x36, 0x6e, 0x37, 0xed, 0x30, 0x4a, 0x7c, 0x9c, 0x49, 0x00, 0x06, 0xc1, 0x02, 0x1e, 0x83, - 0x91, 0xb0, 0x8e, 0xf8, 0x24, 0x83, 0xc7, 0x2d, 0xee, 0x01, 0x94, 0x67, 0xbc, 0xc8, 0xe0, 0xbd, - 0x95, 0x60, 0x11, 0x7f, 0xc2, 0x44, 0x24, 0x3d, 0x30, 0x76, 0x1b, 0x1d, 0xcb, 0xe9, 0xa0, 0x47, - 0xf5, 0x10, 0x42, 0x3e, 0xc5, 0x6f, 0x83, 0x41, 0x98, 0x29, 0xf7, 0x2d, 0xbb, 0x7a, 0x14, 0x4e, - 0xc2, 0x8b, 0xdc, 0x94, 0x1c, 0x83, 0x45, 0xa0, 0xca, 0x73, 0x5c, 0x69, 0xa3, 0x87, 0xeb, 0x46, - 0x28, 0x77, 0x7c, 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35, - 0xf4, 0x24, 0xec, 0x99, 0x4f, 0xf8, 0xba, 0x25, 0xfb, 0x32, 0xe7, 0x05, 0x88, 0x23, 0x33, 0xbb, - 0x45, 0x9f, 0x77, 0xa4, 0x78, 0xe7, 0x9d, 0x8c, 0x66, 0xde, 0xa9, 0x41, 0xbc, 0x68, 0x59, 0x2d, - 0x62, 0xf0, 0x07, 0x21, 0x5a, 0x6c, 0x3e, 0x67, 0x33, 0x05, 0x27, 0x98, 0x45, 0x31, 0x99, 0xd9, - 0x34, 0x5a, 0x43, 0x64, 0xc4, 0xe6, 0xb1, 0xfb, 0x69, 0x61, 0x77, 0x0f, 0x1f, 0xb1, 0x7d, 0x46, - 0xb2, 0x3d, 0x73, 0x20, 0x66, 0xea, 0xb1, 0xff, 0x35, 0x48, 0x78, 0xae, 0x62, 0xcc, 0x32, 0x35, - 0x22, 0x2a, 0xd0, 0x6b, 0x2b, 0xac, 0x49, 0xc6, 0x82, 0x31, 0xe9, 0xc2, 0x18, 0xea, 0x31, 0x71, - 0x1f, 0x28, 0x31, 0xf3, 0x9c, 0x6c, 0x66, 0x7f, 0x56, 0x66, 0xea, 0x45, 0x6a, 0x23, 0x62, 0xee, - 0x19, 0x1a, 0x9c, 0xfd, 0x9d, 0xd8, 0x41, 0xef, 0x33, 0x31, 0xd0, 0x37, 0xeb, 0x8d, 0xcc, 0x9b, - 0x00, 0x68, 0xca, 0xe3, 0x43, 0x54, 0x4a, 0xd6, 0x25, 0xb9, 0x81, 0x77, 0x8f, 0xac, 0x5d, 0xf4, - 0x17, 0xb3, 0xc8, 0xfd, 0x14, 0x2e, 0x30, 0x40, 0x53, 0x8c, 0xe0, 0x1f, 0x0e, 0xc4, 0xfb, 0x76, - 0x62, 0x98, 0x35, 0x4d, 0x59, 0x9f, 0xb2, 0x3a, 0x39, 0xbb, 0xd9, 0x39, 0xb2, 0xda, 0x0a, 0x62, - 0xd9, 0xb8, 0x2c, 0x25, 0x6c, 0x72, 0xf9, 0x3e, 0x81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e, - 0x62, 0xc8, 0xdd, 0x1f, 0xef, 0x57, 0x97, 0xe6, 0x62, 0xf1, 0x5a, 0xea, 0x8e, 0x96, 0x8d, 0x12, - 0x7d, 0x9e, 0x85, 0xe4, 0x16, 0x56, 0x9b, 0xe0, 0x24, 0x18, 0xbd, 0xba, 0x2e, 0x6e, 0x5e, 0x69, - 0xca, 0x74, 0xb7, 0x29, 0xbb, 0x00, 0xda, 0x86, 0xdc, 0x3a, 0x79, 0xf5, 0x30, 0xb5, 0xe3, 0xb9, - 0x68, 0x3c, 0x99, 0x9a, 0x40, 0xff, 0x43, 0x6a, 0x8c, 0x5d, 0xf7, 0x9f, 0x74, 0x48, 0xd1, 0x56, - 0x07, 0x39, 0xb1, 0x6e, 0xd7, 0x3b, 0xbd, 0xfd, 0xaa, 0xd0, 0xd8, 0x78, 0x33, 0x8c, 0x60, 0x93, - 0xde, 0x64, 0x3f, 0xb8, 0x83, 0x4d, 0x7f, 0x91, 0xb5, 0x28, 0x8a, 0x08, 0x36, 0x40, 0x42, 0x87, - 0xfc, 0xb6, 0x0d, 0xc1, 0xa0, 0x07, 0x0c, 0x7d, 0x73, 0x73, 0x83, 0x4d, 0x6e, 0x2b, 0x03, 0xa1, - 0xec, 0xa8, 0x0b, 0xfb, 0xc4, 0xc6, 0x9c, 0x43, 0x53, 0xb7, 0x37, 0x37, 0x50, 0xd8, 0x44, 0x90, - 0x18, 0xda, 0xf0, 0xce, 0x84, 0x11, 0x63, 0x46, 0xec, 0x8d, 0xe9, 0xbf, 0xd3, 0x60, 0x4c, 0x1a, - 0x45, 0xb3, 0xed, 0x28, 0x1d, 0xf0, 0xdc, 0xee, 0x90, 0x39, 0x6a, 0x7b, 0xc6, 0xb8, 0xce, 0x91, - 0xbb, 0xd4, 0x79, 0x3a, 0x87, 0x9e, 0xda, 0xe5, 0x71, 0x63, 0x1e, 0x0c, 0xef, 0x10, 0x53, 0x82, - 0xfe, 0x58, 0x89, 0x61, 0xf7, 0x50, 0x32, 0x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0x3f, 0x8e, - 0xc2, 0x14, 0x25, 0xe3, 0xaf, 0x0b, 0x4a, 0x87, 0x8c, 0x2e, 0x29, 0x5b, 0x4a, 0x49, 0x0c, 0xff, - 0xe6, 0xcb, 0xe7, 0xe9, 0x68, 0x4e, 0x04, 0xd3, 0x25, 0x65, 0x73, 0x49, 0xe6, 0x73, 0xe7, 0x9f, - 0x4b, 0xca, 0xc1, 0x23, 0x99, 0x4f, 0x4c, 0x37, 0x82, 0x8f, 0x1f, 0x41, 0x92, 0xf9, 0x8a, 0x22, - 0xca, 0x2e, 0x29, 0x87, 0x91, 0x64, 0xbe, 0x92, 0x88, 0xb7, 0x4b, 0xca, 0xd6, 0x93, 0xcc, 0x77, - 0x53, 0x44, 0xde, 0x25, 0x65, 0x13, 0x4a, 0xe6, 0x5b, 0x15, 0x31, 0x78, 0x49, 0x39, 0xaa, 0x24, - 0xf3, 0x3d, 0x21, 0xa2, 0xf1, 0x92, 0x72, 0x68, 0x49, 0xe6, 0x5b, 0x13, 0x71, 0x39, 0xab, 0x1e, - 0x5f, 0x92, 0x19, 0x6f, 0xb9, 0x11, 0x3a, 0xab, 0x1e, 0x64, 0x92, 0x39, 0x7f, 0xce, 0x8d, 0xd5, - 0x59, 0xf5, 0x48, 0x93, 0xcc, 0xb9, 0xee, 0x46, 0xed, 0xac, 0xba, 0x55, 0x26, 0x73, 0x6e, 0xb8, - 0xf1, 0x3b, 0xab, 0x6e, 0x9a, 0xc9, 0x9c, 0x9b, 0x6e, 0x24, 0xcf, 0xaa, 0xdb, 0x67, 0x32, 0xe7, - 0x96, 0xbb, 0x86, 0xfe, 0x65, 0x25, 0xfc, 0x3c, 0x87, 0xa0, 0x32, 0x4a, 0xf8, 0x81, 0x4f, 0xe8, - 0x65, 0x94, 0xd0, 0x03, 0x9f, 0xb0, 0xcb, 0x28, 0x61, 0x07, 0x3e, 0x21, 0x97, 0x51, 0x42, 0x0e, - 0x7c, 0xc2, 0x2d, 0xa3, 0x84, 0x1b, 0xf8, 0x84, 0x5a, 0x46, 0x09, 0x35, 0xf0, 0x09, 0xb3, 0x8c, - 0x12, 0x66, 0xe0, 0x13, 0x62, 0x19, 0x25, 0xc4, 0xc0, 0x27, 0xbc, 0x32, 0x4a, 0x78, 0x81, 0x4f, - 0x68, 0xcd, 0xa8, 0xa1, 0x05, 0x7e, 0x61, 0x35, 0xa3, 0x86, 0x15, 0xf8, 0x85, 0xd4, 0x03, 0x6a, - 0x48, 0x8d, 0x20, 0xae, 0x18, 0x1e, 0xf2, 0x44, 0xd3, 0x8c, 0x1a, 0x4d, 0xe0, 0x17, 0x49, 0x33, - 0x6a, 0x24, 0x81, 0x5f, 0x14, 0xcd, 0xa8, 0x51, 0x04, 0x7e, 0x11, 0xf4, 0x92, 0x1a, 0x41, 0xee, - 0x11, 0x9f, 0x8c, 0xb2, 0xa3, 0x18, 0x14, 0x41, 0x7a, 0x88, 0x08, 0xd2, 0x43, 0x44, 0x90, 0x1e, - 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x44, 0x04, 0xe9, 0x21, 0x22, 0x48, - 0x0f, 0x13, 0x41, 0x7a, 0xa8, 0x08, 0xd2, 0xfb, 0x45, 0xd0, 0x8c, 0x7a, 0xe0, 0x01, 0xfc, 0x0a, - 0xd2, 0x8c, 0xba, 0xf3, 0x19, 0x1c, 0x42, 0x7a, 0xa8, 0x10, 0xd2, 0xfb, 0x85, 0xd0, 0x97, 0x51, - 0x23, 0x25, 0x85, 0x10, 0xdb, 0x1e, 0x7a, 0xad, 0x2a, 0xd0, 0xd5, 0x10, 0xe7, 0x2b, 0xfc, 0x62, - 0xea, 0x6a, 0x88, 0x3d, 0xea, 0x41, 0x71, 0xd6, 0x5b, 0x85, 0x4a, 0x21, 0xaa, 0xd0, 0x4d, 0x11, - 0x43, 0x57, 0x43, 0x9c, 0xbb, 0xe8, 0x8d, 0xbd, 0xeb, 0x83, 0x8a, 0xc0, 0x13, 0xa1, 0x8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f, 0x00, 0x00, 0xff, 0xff, 0x19, 0x57, 0xf3, 0x99, 0x1b, 0x5f, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -type NodeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Node) TestProto() github_com_gogo_protobuf_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 -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+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 *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+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 *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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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 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 github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(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] = 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] = 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 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(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] = 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] = 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 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - 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 := 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 := 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 = 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 := 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] = 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 := 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v243 := 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 := 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 := 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 := 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 -} - -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 { - v252 := r.Intn(100) - tmps := make([]rune, v252) - for i := 0; i < v252; 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)) - v253 := r.Int63() - if r.Intn(2) == 0 { - v253 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v253)) - 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 += github_com_gogo_protobuf_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 += github_com_gogo_protobuf_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 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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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 valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x1 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x1 >= 1<<7 { - data[i] = uint8(uint64(x1)&0x7f | 0x80) - x1 >>= 7 - i++ - } - data[i] = uint8(x1) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x2 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x2 >= 1<<7 { - data[i] = uint8(uint64(x2)&0x7f | 0x80) - x2 >>= 7 - i++ - } - data[i] = uint8(x2) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data6 := make([]byte, len(m.Field3)*10) - var j5 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - data6[j5] = uint8(num) - j5++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j5)) - i += copy(data[i:], data6[:j5]) - } - if len(m.Field4) > 0 { - data8 := make([]byte, len(m.Field4)*10) - var j7 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - data8[j7] = uint8(num) - j7++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j7)) - i += copy(data[i:], data8[:j7]) - } - if len(m.Field5) > 0 { - data10 := make([]byte, len(m.Field5)*10) - var j9 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - data10[j9] = uint8(num) - j9++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j9)) - i += copy(data[i:], data10[:j9]) - } - if len(m.Field6) > 0 { - data12 := make([]byte, len(m.Field6)*10) - var j11 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field7) > 0 { - data13 := make([]byte, len(m.Field7)*5) - var j14 int - for _, num := range m.Field7 { - x15 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x15 >= 1<<7 { - data13[j14] = uint8(uint64(x15)&0x7f | 0x80) - j14++ - x15 >>= 7 - } - data13[j14] = uint8(x15) - j14++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j14)) - i += copy(data[i:], data13[:j14]) - } - if len(m.Field8) > 0 { - var j16 int - data18 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x17 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x17 >= 1<<7 { - data18[j16] = uint8(uint64(x17)&0x7f | 0x80) - j16++ - x17 >>= 7 - } - data18[j16] = uint8(x17) - j16++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j16)) - i += copy(data[i:], data18[:j16]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data20 := make([]byte, len(m.Field3)*10) - var j19 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data20[j19] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j19++ - } - data20[j19] = uint8(num) - j19++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j19)) - i += copy(data[i:], data20[:j19]) - } - if len(m.Field4) > 0 { - data22 := make([]byte, len(m.Field4)*10) - var j21 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data22[j21] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j21++ - } - data22[j21] = uint8(num) - j21++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j21)) - i += copy(data[i:], data22[:j21]) - } - if len(m.Field5) > 0 { - data24 := make([]byte, len(m.Field5)*10) - var j23 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data24[j23] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j23++ - } - data24[j23] = uint8(num) - j23++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j23)) - i += copy(data[i:], data24[:j23]) - } - if len(m.Field6) > 0 { - data26 := make([]byte, len(m.Field6)*10) - var j25 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data26[j25] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j25++ - } - data26[j25] = uint8(num) - j25++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j25)) - i += copy(data[i:], data26[:j25]) - } - if len(m.Field7) > 0 { - data27 := make([]byte, len(m.Field7)*5) - var j28 int - for _, num := range m.Field7 { - x29 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x29 >= 1<<7 { - data27[j28] = uint8(uint64(x29)&0x7f | 0x80) - j28++ - x29 >>= 7 - } - data27[j28] = uint8(x29) - j28++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j28)) - i += copy(data[i:], data27[:j28]) - } - if len(m.Field8) > 0 { - var j30 int - data32 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x31 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x31 >= 1<<7 { - data32[j30] = uint8(uint64(x31)&0x7f | 0x80) - j30++ - x31 >>= 7 - } - data32[j30] = uint8(x31) - j30++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j30)) - i += copy(data[i:], data32[:j30]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n33, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n33 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n34, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n34 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n35, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n35 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n36, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n36 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n37, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n37 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n38, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n38 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x39 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x39 >= 1<<7 { - data[i] = uint8(uint64(x39)&0x7f | 0x80) - x39 >>= 7 - i++ - } - data[i] = uint8(x39) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x40 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x40 >= 1<<7 { - data[i] = uint8(uint64(x40)&0x7f | 0x80) - x40 >>= 7 - i++ - } - data[i] = uint8(x40) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n41, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n42, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n43, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n44, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n45, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n46, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n47, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n47 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n48, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n48 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n49, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n49 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n50, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n50 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n51, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n51 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n52, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n52 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n53, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n54, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n55, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n56, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n57, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n58, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n59, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n60, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n61, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n62, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n63, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n64, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n65, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n66, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n67, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n68, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n69, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n70, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n71, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n72, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.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++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time1 - i += 8 - data[i] = 0x11 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time2 - i += 8 - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - n, err := github_com_gogo_protobuf_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())) - n73, err := m.M.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.Field2 != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field2)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field13)) - } - n, err := github_com_gogo_protobuf_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())) - n74, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - } - if m.NM != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.NM.Size())) - n75, err := m.NM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedField1 != nil { - data[i] = 0x9 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.NestedField1 - i += 8 - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n76, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n77, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n78, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n79, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.FieldA - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.FieldB - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.FieldI - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.FieldJ - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.FieldK - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.FieldL - i += 8 - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.FieldI - i += 4 - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.FieldJ - i += 4 - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.FieldK - i += 8 - } - if m.FielL != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.FielL - i += 8 - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x80 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x80 >= 1<<7 { - data[i] = uint8(uint64(x80)&0x7f | 0x80) - x80 >>= 7 - i++ - } - data[i] = uint8(x80) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x81 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x81 >= 1<<7 { - data[i] = uint8(uint64(x81)&0x7f | 0x80) - x81 >>= 7 - i++ - } - data[i] = uint8(x81) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n82, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n83, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n84, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n85, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n85 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n86, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n86 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n87, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n87 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n88, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (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 encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field9 = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field10 = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field11 = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field12 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NinOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptNativeUnion{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field2 == nil { - m.Field2 = &NinOptStructUnion{} - } - if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinEmbeddedStructUnion{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Or == nil { - m.Or = &OrBranch{} - } - if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &Leaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Leaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrValue = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepTree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepTree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Down == nil { - m.Down = &ADeepBranch{} - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndDeepBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &DeepLeaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ADeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ADeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndDeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndDeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepLeaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepLeaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - m.Field1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field1 |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 ErrIntOverflowThetestUnsafe - } - 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) - 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 ErrIntOverflowThetestUnsafe - } - 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) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 ErrIntOverflowThetestUnsafe - } - 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) - 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 ErrIntOverflowThetestUnsafe - } - 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) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Timer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time1 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time2 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], data[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyExtendable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyExtendable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OtherExtenable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OtherExtenable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.M == nil { - m.M = &MyExtendable{} - } - if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = &v - default: - if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.EnumField = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NM == nil { - m.NM = &NestedDefinition_NestedMessage{} - } - if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomContainer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldA = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldB = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldI = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldK = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldL = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) - if m.FieldO == nil { - m.FieldO = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) - if m.FieldO == nil { - m.FieldO = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = append(m.FieldA, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = append(m.FieldB, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append(m.FieldJ[:0], data[iNdEx:postIndex]...) - if m.FieldJ == nil { - m.FieldJ = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameCustomType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldA = &v - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldB = &v - if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldC = append(m.FieldC, v) - if err := m.FieldC[len(m.FieldC)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldD = append(m.FieldD, v) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldA == nil { - m.FieldA = &NinOptNative{} - } - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldB = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldA = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Unrecognized) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Unrecognized: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) - if err := m.Embedded[len(m.Embedded)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner_Inner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Embedded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.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 ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipThetestUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthThetestUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipThetestUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthThetestUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowThetestUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeboth/thetest.proto", fileDescriptorThetest) } - -var fileDescriptorThetest = []byte{ - // 3011 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, - 0xf5, 0xd7, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x7f, 0x49, 0xde, - 0xbf, 0xa2, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x70, 0x6d, 0xd7, - 0xa2, 0x0c, 0x46, 0x6e, 0x6b, 0xa0, 0x40, 0x41, 0x89, 0x2b, 0x89, 0xa8, 0xb4, 0x14, 0xc8, 0xa5, - 0x6b, 0xf7, 0x50, 0x04, 0x39, 0x14, 0x46, 0xaf, 0x45, 0x8f, 0x6d, 0x5c, 0x14, 0x05, 0xdc, 0x5b, - 0x0e, 0x45, 0x51, 0x14, 0x45, 0xe3, 0x4b, 0x01, 0xf5, 0x66, 0xf4, 0x54, 0x14, 0x85, 0x91, 0x38, - 0x97, 0x1c, 0xd3, 0x53, 0x73, 0xc8, 0xa1, 0xb3, 0xbb, 0x33, 0xb3, 0x33, 0xb3, 0xbb, 0xdc, 0xa5, - 0x25, 0xb7, 0x39, 0x2c, 0x3f, 0xe6, 0xbd, 0x37, 0xf3, 0xf6, 0xfd, 0x7e, 0x6f, 0xe6, 0xed, 0xce, - 0xc0, 0xd9, 0xdd, 0xce, 0xd1, 0x4e, 0xa7, 0xb7, 0xdc, 0x37, 0x7a, 0xcd, 0x3d, 0x7d, 0xa7, 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 0xbb, 0xf2, 0x82, 0x9a, 0x44, 0xf2, 0x14, 0x2f, 0x2f, 0xb8, - 0xf2, 0x15, 0x75, 0x02, 0xc9, 0x13, 0xbc, 0x7c, 0xc5, 0x95, 0x17, 0xd5, 0x49, 0x24, 0x1f, 0xe3, - 0xe5, 0x45, 0x57, 0xbe, 0xaa, 0x4e, 0x21, 0x79, 0x92, 0x97, 0xaf, 0x6a, 0xef, 0xdb, 0xf0, 0x1a, - 0x2e, 0xbc, 0x69, 0x1e, 0x5e, 0x0a, 0x6c, 0x9a, 0x07, 0x96, 0x42, 0x9a, 0xe6, 0x21, 0xa5, 0x60, - 0xa6, 0x79, 0x30, 0x29, 0x8c, 0x69, 0x1e, 0x46, 0x0a, 0x60, 0x9a, 0x07, 0x90, 0x42, 0x97, 0xe6, - 0xa1, 0xa3, 0xa0, 0xa5, 0x79, 0xd0, 0x28, 0x5c, 0x69, 0x1e, 0x2e, 0x0a, 0x94, 0x2a, 0x00, 0xe5, - 0x42, 0xa4, 0x0a, 0x10, 0xb9, 0xe0, 0xa8, 0x02, 0x38, 0x2e, 0x2c, 0xaa, 0x00, 0x8b, 0x0b, 0x88, - 0x2a, 0x00, 0xe2, 0x42, 0xa1, 0x0a, 0x50, 0xb8, 0x20, 0xe0, 0x1c, 0x6b, 0xe8, 0xc7, 0x3e, 0x39, - 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, - 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe7, 0x18, 0x08, 0xc9, - 0x31, 0x10, 0x92, 0x63, 0x20, 0x24, 0xc7, 0x40, 0x48, 0x8e, 0x81, 0x90, 0x1c, 0x03, 0x81, 0x39, - 0xe6, 0xc2, 0x9b, 0xe6, 0xe1, 0xf5, 0xcd, 0x31, 0x10, 0x90, 0x63, 0x20, 0x20, 0xc7, 0x40, 0x40, - 0x8e, 0x81, 0x80, 0x1c, 0x03, 0x01, 0x39, 0x06, 0x02, 0x72, 0x0c, 0x04, 0xe4, 0x18, 0x08, 0xca, - 0x31, 0x10, 0x98, 0x63, 0x20, 0x30, 0xc7, 0x40, 0x60, 0x8e, 0x81, 0xc0, 0x1c, 0x03, 0x81, 0x39, - 0x06, 0xd8, 0x1c, 0xfb, 0x13, 0x80, 0x8a, 0x93, 0x63, 0xb7, 0x9b, 0xbb, 0x3f, 0xd0, 0x5b, 0x18, - 0x8a, 0x19, 0x21, 0xd3, 0x46, 0x2d, 0xe8, 0x52, 0x2e, 0x24, 0x33, 0x42, 0xae, 0xf1, 0xf2, 0x02, - 0x95, 0x93, 0x6c, 0xe3, 0xe5, 0x2b, 0x54, 0x4e, 0xf2, 0x8d, 0x97, 0x17, 0xa9, 0x9c, 0x64, 0x1c, - 0x2f, 0x5f, 0xa5, 0x72, 0x92, 0x73, 0xbc, 0x7c, 0x8d, 0xca, 0x49, 0xd6, 0xf1, 0xf2, 0x2b, 0x54, - 0x4e, 0xf2, 0x8e, 0x97, 0xaf, 0x53, 0x39, 0xc9, 0x3c, 0x5e, 0x7e, 0x55, 0x99, 0x13, 0x73, 0x8f, - 0x28, 0x50, 0x68, 0xe7, 0xc4, 0xec, 0x13, 0x34, 0xf2, 0xae, 0x06, 0xc9, 0x3f, 0x41, 0xa3, 0xe0, - 0x6a, 0x90, 0x0c, 0x14, 0x34, 0x56, 0xb4, 0x87, 0x36, 0x7c, 0x86, 0x08, 0x5f, 0x46, 0x80, 0x4f, - 0x66, 0xa0, 0xcb, 0x08, 0xd0, 0xc9, 0x0c, 0x6c, 0x19, 0x01, 0x36, 0x99, 0x81, 0x2c, 0x23, 0x40, - 0x26, 0x33, 0x70, 0x65, 0x04, 0xb8, 0x64, 0x06, 0xaa, 0x8c, 0x00, 0x95, 0xcc, 0xc0, 0x94, 0x11, - 0x60, 0x92, 0x19, 0x88, 0x32, 0x02, 0x44, 0x32, 0x03, 0x4f, 0x46, 0x80, 0x47, 0x66, 0xa0, 0x99, - 0x16, 0xa1, 0x91, 0x59, 0x58, 0xa6, 0x45, 0x58, 0x64, 0x16, 0x92, 0x69, 0x11, 0x12, 0x99, 0x85, - 0x63, 0x5a, 0x84, 0x43, 0x66, 0xa1, 0xf8, 0x52, 0x26, 0x15, 0xe1, 0xbb, 0x66, 0xb7, 0xbf, 0x6b, - 0x9e, 0xaa, 0x22, 0xcc, 0x71, 0xe5, 0xc3, 0x78, 0x41, 0x59, 0xb2, 0x0b, 0x56, 0xb6, 0xe2, 0x14, - 0x56, 0xb0, 0x1c, 0x57, 0x58, 0x30, 0x16, 0x86, 0xbf, 0x45, 0xf1, 0x54, 0xb5, 0x61, 0x8e, 0x2b, - 0x33, 0xc2, 0xfd, 0x5b, 0x7f, 0xe9, 0x15, 0xdb, 0x13, 0x99, 0x54, 0x6c, 0x38, 0xfc, 0xc3, 0x56, - 0x6c, 0xd9, 0xf0, 0x90, 0xd3, 0x60, 0x67, 0xc3, 0x83, 0xed, 0x59, 0x75, 0xa2, 0x56, 0x70, 0xd9, - 0xf0, 0xd0, 0xd2, 0xa0, 0x9e, 0x6d, 0xbd, 0x85, 0x19, 0x8c, 0x26, 0x13, 0x1f, 0x06, 0x0f, 0x5b, - 0x6f, 0xe5, 0xb8, 0xa9, 0x64, 0x58, 0x06, 0x83, 0xa1, 0x19, 0x3c, 0x6c, 0xe5, 0x95, 0xe3, 0xa6, - 0x97, 0xa1, 0x19, 0xfc, 0x12, 0xea, 0x21, 0xcc, 0x60, 0x37, 0xfc, 0xc3, 0xd6, 0x43, 0xd9, 0xf0, - 0x90, 0xfb, 0x32, 0x18, 0x0c, 0xc1, 0xe0, 0x28, 0xf5, 0x51, 0x36, 0x3c, 0xb4, 0xfe, 0x0c, 0x3e, - 0x75, 0x35, 0xf3, 0x81, 0x04, 0xcf, 0xa3, 0x61, 0x6a, 0x47, 0x3b, 0x7a, 0xab, 0xa5, 0xb7, 0x70, - 0x1c, 0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, 0xee, 0x41, - 0x43, 0xee, 0x74, 0xd1, 0x62, 0x0b, 0x36, 0x8c, 0x16, 0xf6, 0x68, 0xca, 0x51, 0x40, 0x0d, 0x58, - 0x03, 0x34, 0x8d, 0x16, 0xea, 0x22, 0x76, 0x4b, 0x6f, 0xee, 0x61, 0x27, 0xa0, 0xa3, 0x63, 0xb5, - 0x34, 0x62, 0x87, 0xe8, 0x13, 0x0f, 0xf8, 0x5d, 0x98, 0x20, 0x1d, 0x2b, 0xf3, 0x96, 0xc5, 0x9e, - 0x89, 0x87, 0xc5, 0x16, 0x96, 0x3b, 0x78, 0xe5, 0x42, 0x76, 0x7b, 0xa6, 0xb2, 0x00, 0xe3, 0x8d, - 0xf6, 0xfe, 0x81, 0x89, 0x07, 0xf7, 0xaa, 0xc5, 0xbb, 0x96, 0x58, 0xbb, 0x0b, 0xc7, 0xa8, 0x47, - 0x67, 0xdc, 0x75, 0xd5, 0xb9, 0x35, 0xf4, 0x24, 0xcc, 0xac, 0x27, 0xe4, 0xbd, 0xa5, 0x33, 0x7b, - 0x29, 0x73, 0x30, 0x81, 0xc2, 0xec, 0x4e, 0xfa, 0xa4, 0x22, 0x4d, 0xf4, 0x70, 0xab, 0xf6, 0xbe, - 0x04, 0x13, 0x55, 0x5d, 0x3f, 0xb6, 0x03, 0xfe, 0x06, 0x8c, 0x55, 0x3b, 0x3f, 0x34, 0xb0, 0x83, - 0xe7, 0x71, 0x44, 0x2d, 0x31, 0x8e, 0x69, 0xac, 0x85, 0xc4, 0x48, 0x8d, 0x89, 0xfb, 0x2b, 0x34, - 0xee, 0x8c, 0x9e, 0x1d, 0x7b, 0x8d, 0x8b, 0x3d, 0x06, 0xd0, 0x52, 0xf2, 0xc4, 0xff, 0x0a, 0x1c, - 0x67, 0x46, 0x51, 0x16, 0xb1, 0x1b, 0xb2, 0x68, 0xc8, 0xc6, 0xca, 0xf2, 0x44, 0xd3, 0xe1, 0x04, - 0x37, 0xb0, 0x65, 0xca, 0x84, 0x38,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 0xaa, 0xa8, 0x56, 0x5a, 0xc6, 0xcb, 0xc8, 0x46, 0x5e, 0xb9, 0x40, 0x58, - 0xc0, 0xe5, 0x38, 0x0e, 0x90, 0xb3, 0xa2, 0x6c, 0xe4, 0xd1, 0x1d, 0x3a, 0x06, 0xe5, 0x40, 0x83, - 0xe0, 0x28, 0x39, 0x9d, 0x94, 0xf3, 0xa5, 0xeb, 0xb8, 0x93, 0x4a, 0x60, 0x27, 0x21, 0xa1, 0x72, - 0x7a, 0xaa, 0xe4, 0xcb, 0xdb, 0x27, 0x9f, 0xcc, 0x8c, 0x3c, 0x45, 0xd7, 0xdf, 0xd1, 0xf5, 0xf1, - 0x27, 0x33, 0xd2, 0x67, 0xe8, 0xfa, 0x1c, 0x5d, 0x5f, 0xa0, 0xeb, 0xbd, 0xe7, 0x33, 0xd2, 0x63, - 0x74, 0x7d, 0x88, 0xae, 0x3f, 0xa0, 0xeb, 0x09, 0xba, 0x4e, 0x9e, 0x23, 0x7d, 0x74, 0x7d, 0x8c, - 0x7e, 0x7f, 0x86, 0xbe, 0x3f, 0x47, 0xdf, 0x5f, 0xa0, 0xeb, 0xbd, 0x4f, 0x67, 0xa4, 0x47, 0x9f, - 0xce, 0x8c, 0x3c, 0x46, 0xdf, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x5f, 0xbd, 0x69, 0xae, - 0x34, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto deleted file mode 100644 index 0160ae2f..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto +++ /dev/null @@ -1,626 +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) = 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) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -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; -} - diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go deleted file mode 100644 index 531ef799..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go +++ /dev/null @@ -1,16373 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNodeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNodeFace(t *testing.T) { - popr := math_rand.New(math_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 TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNodeStringer(t *testing.T) { - popr := math_rand.New(math_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 TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/uuid.go deleted file mode 100644 index ae349da4..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/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/unsafemarshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/bug_test.go deleted file mode 100644 index 53f720e9..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/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/unsafemarshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.pb.go deleted file mode 100644 index dcac7d28..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.pb.go +++ /dev/null @@ -1,28464 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unsafemarshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -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 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import compress_gzip "compress/gzip" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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,json=id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=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" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=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" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=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" 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" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=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" 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,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data,json=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" 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{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=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{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=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" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=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" 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" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=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,json=field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" 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" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=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" 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{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" 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" 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" 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" 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" 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" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children,json=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} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA,json=fieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB,json=fieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC,json=fieldC", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD,json=fieldD", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE,json=fieldE", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterType((*Node)(nil), "test.Node") - 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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6123 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b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a4, 0xda, 0x75, 0x3a, 0xcd, 0x63, 0x52, - 0x20, 0x06, 0x8b, 0xf9, 0xc7, 0x6f, 0xd3, 0xa0, 0x4a, 0x62, 0x58, 0x41, 0xa0, 0xb2, 0x6f, 0x81, - 0x49, 0x3c, 0x42, 0x72, 0xd0, 0x2b, 0x2d, 0x78, 0x09, 0x21, 0xfd, 0x2f, 0xef, 0xa2, 0xb1, 0x77, - 0x5a, 0x08, 0xf0, 0xc8, 0xf5, 0x78, 0xe2, 0xd0, 0xea, 0xa0, 0xda, 0x86, 0x9e, 0xff, 0x1a, 0x0d, - 0x63, 0xe0, 0x1e, 0x43, 0xfa, 0x03, 0xdf, 0x95, 0x3d, 0xb1, 0x46, 0x91, 0xb9, 0x46, 0x23, 0xbb, - 0x0f, 0xf7, 0xf8, 0x78, 0x36, 0x84, 0xcc, 0x0f, 0x32, 0x99, 0x93, 0x3d, 0xde, 0xc5, 0x62, 0x77, - 0x80, 0x8f, 0x0b, 0x7f, 0x84, 0x90, 0xf9, 0x21, 0x26, 0xd3, 0x60, 0x58, 0xee, 0x16, 0x2c, 0xf1, - 0x26, 0x4c, 0xa0, 0x27, 0xf5, 0x5b, 0x4d, 0x87, 0x3d, 0xf7, 0x86, 0x10, 0xf7, 0x61, 0x26, 0x6e, - 0x9c, 0x01, 0xc9, 0x53, 0x30, 0x96, 0x75, 0x1d, 0xe2, 0x07, 0xe8, 0x01, 0x28, 0x84, 0x88, 0x8f, - 0x30, 0x11, 0xc3, 0x98, 0x1f, 0x43, 0x73, 0x30, 0x7a, 0xd8, 0x64, 0x65, 0x38, 0x18, 0xfe, 0x51, - 0x06, 0x4f, 0x70, 0x0c, 0x13, 0xd1, 0x6a, 0xb6, 0xba, 0x0d, 0x5c, 0xa3, 0x83, 0x45, 0x7c, 0x8c, - 0x8b, 0xe0, 0x18, 0x26, 0xe2, 0x04, 0x66, 0x7d, 0x81, 0x8b, 0x70, 0x3c, 0xf6, 0x7c, 0x33, 0x5e, - 0xeb, 0x6d, 0xdc, 0x6e, 0xda, 0x61, 0x94, 0xf8, 0x38, 0x93, 0x00, 0x0c, 0x82, 0x05, 0x3c, 0x06, - 0x23, 0x61, 0x1d, 0xf1, 0x49, 0x06, 0x8f, 0x5b, 0xdc, 0x03, 0x28, 0xcf, 0x78, 0x91, 0xc1, 0x7b, - 0x2b, 0xc1, 0x22, 0xfe, 0x84, 0x89, 0x48, 0x7a, 0x60, 0xec, 0x36, 0x3a, 0x96, 0xd3, 0x41, 0x8f, - 0xea, 0x21, 0x84, 0x7c, 0x8a, 0xdf, 0x06, 0x83, 0x30, 0x53, 0xde, 0xb2, 0xec, 0xea, 0x51, 0x38, - 0x09, 0x2f, 0x72, 0x53, 0x72, 0x0c, 0x16, 0x81, 0x2a, 0xcf, 0x71, 0xa5, 0x8d, 0x1e, 0xae, 0x1b, - 0xa1, 0xdc, 0xf1, 0x69, 0x26, 0x63, 0x54, 0x80, 0x98, 0x45, 0xba, 0xf6, 0x49, 0xc4, 0x7c, 0x86, - 0x5b, 0xc4, 0x03, 0x63, 0xa9, 0x87, 0x9e, 0x4c, 0x71, 0x27, 0x71, 0x12, 0x69, 0x7f, 0xca, 0x53, - 0x8f, 0x62, 0x37, 0xbd, 0x12, 0x91, 0xa7, 0x1d, 0xf4, 0x08, 0x1e, 0x46, 0xcc, 0x9f, 0x71, 0x4f, - 0x13, 0x00, 0x06, 0x3f, 0x05, 0xf7, 0xfa, 0x96, 0xfa, 0x10, 0xc2, 0xfe, 0x9c, 0x09, 0x9b, 0xf2, - 0x29, 0xf7, 0xac, 0x24, 0x9c, 0x54, 0xe4, 0x5f, 0xf0, 0x92, 0x60, 0x29, 0xb2, 0x76, 0x70, 0x1b, - 0xeb, 0x54, 0x0e, 0x4e, 0x66, 0xb5, 0xbf, 0xe4, 0x56, 0xa3, 0x58, 0xc9, 0x6a, 0x7b, 0x30, 0xc5, - 0x24, 0x9e, 0xcc, 0xaf, 0x9f, 0xe5, 0x85, 0x95, 0xa2, 0xf7, 0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c0, 0x2d, 0xdd, 0xc1, 0xb2, 0x3e, 0xcc, 0x64, 0x79, - 0x40, 0x38, 0x35, 0x58, 0xe5, 0x0e, 0xc6, 0x7f, 0x84, 0xa7, 0x06, 0x43, 0x20, 0x70, 0xdc, 0xee, - 0x36, 0x1a, 0x38, 0x38, 0x8c, 0xc1, 0x47, 0x1a, 0xd2, 0xff, 0xf9, 0x23, 0x96, 0x18, 0x1c, 0x80, - 0x6a, 0x68, 0xcc, 0x3a, 0xbe, 0x85, 0x6c, 0x10, 0x80, 0xfc, 0xaf, 0x1f, 0xf1, 0x82, 0x80, 0xb9, - 0x51, 0x3e, 0x01, 0x7d, 0x68, 0x24, 0x6b, 0xd8, 0x01, 0xd8, 0xff, 0xfe, 0x11, 0xdb, 0x66, 0x75, - 0x21, 0xae, 0x00, 0xba, 0x69, 0x3b, 0x58, 0xc0, 0x77, 0x65, 0x01, 0xe4, 0x41, 0xf3, 0x3a, 0x0c, - 0xe3, 0x93, 0x1d, 0x9d, 0xca, 0x61, 0x10, 0xfa, 0x7f, 0x18, 0x9a, 0xf3, 0x63, 0x83, 0x1d, 0x37, - 0xdb, 0x16, 0x7a, 0xeb, 0x04, 0x61, 0xff, 0x97, 0x61, 0x05, 0x00, 0x83, 0xab, 0x15, 0xa7, 0x13, - 0xe6, 0xbe, 0xff, 0x8f, 0x83, 0x39, 0x00, 0x2b, 0x8d, 0xdf, 0x3f, 0x63, 0xdd, 0x0e, 0xc2, 0x7e, - 0x8f, 0x2b, 0xcd, 0xf8, 0x51, 0x01, 0x1c, 0xc1, 0x6f, 0xe9, 0xd1, 0x83, 0x00, 0xf0, 0xf7, 0x19, - 0xd8, 0x45, 0xe4, 0x2f, 0xfa, 0x2f, 0xed, 0xc0, 0x5a, 0x73, 0xad, 0x49, 0x17, 0x75, 0xe0, 0xf3, - 0x75, 0x98, 0x41, 0x3c, 0x68, 0x7e, 0x5d, 0xa4, 0x39, 0x29, 0x32, 0x72, 0xb1, 0x73, 0x64, 0xe1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, 0x32, - 0xe3, 0x4d, 0x37, 0x42, 0xe7, 0xd4, 0x83, 0x4c, 0x32, 0xe7, 0xcf, 0xb9, 0xb1, 0x3a, 0xa7, 0x1e, - 0x69, 0x92, 0x39, 0x37, 0xdc, 0xa8, 0x9d, 0x53, 0xb7, 0xca, 0x64, 0xce, 0x4d, 0x37, 0x7e, 0xe7, - 0xd4, 0x4d, 0x33, 0x99, 0x73, 0xcb, 0x8d, 0xe4, 0x39, 0x75, 0xfb, 0x4c, 0xe6, 0xdc, 0x76, 0xd7, - 0xd0, 0xbf, 0xac, 0x84, 0x9f, 0xe7, 0x10, 0x54, 0x46, 0x09, 0x3f, 0xf0, 0x09, 0xbd, 0x8c, 0x12, - 0x7a, 0xe0, 0x13, 0x76, 0x19, 0x25, 0xec, 0xc0, 0x27, 0xe4, 0x32, 0x4a, 0xc8, 0x81, 0x4f, 0xb8, - 0x65, 0x94, 0x70, 0x03, 0x9f, 0x50, 0xcb, 0x28, 0xa1, 0x06, 0x3e, 0x61, 0x96, 0x51, 0xc2, 0x0c, - 0x7c, 0x42, 0x2c, 0xa3, 0x84, 0x18, 0xf8, 0x84, 0x57, 0x46, 0x09, 0x2f, 0xf0, 0x09, 0xad, 0x19, - 0x35, 0xb4, 0xc0, 0x2f, 0xac, 0x66, 0xd4, 0xb0, 0x02, 0xbf, 0x90, 0x7a, 0x40, 0x0d, 0xa9, 0x11, - 0xc4, 0x15, 0xc3, 0x43, 0x9e, 0x68, 0x9a, 0x51, 0xa3, 0x09, 0xfc, 0x22, 0x69, 0x46, 0x8d, 0x24, - 0xf0, 0x8b, 0xa2, 0x19, 0x35, 0x8a, 0xc0, 0x2f, 0x82, 0x5e, 0x52, 0x23, 0xc8, 0x3d, 0xe2, 0x93, - 0x51, 0x76, 0x14, 0x83, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x88, 0x08, 0xd2, 0x43, 0x44, 0x90, - 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0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, 0x3e, 0xc1, 0x84, 0x14, 0xfa, 0x0a, 0x09, 0x30, - 0x15, 0x95, 0x54, 0x58, 0xce, 0xef, 0xdd, 0xf9, 0xc6, 0xb9, 0x53, 0x5f, 0x45, 0xaf, 0x7f, 0x45, - 0xaf, 0xaf, 0x7f, 0xe3, 0x9c, 0xf6, 0x1d, 0xf4, 0xfa, 0x1e, 0x7a, 0xfd, 0x10, 0xbd, 0xde, 0xf1, - 0xcd, 0x73, 0xda, 0x8b, 0xe8, 0xf5, 0x59, 0xf4, 0xfa, 0x1b, 0xf4, 0x7a, 0x09, 0xbd, 0xee, 0x7c, - 0x13, 0xf1, 0xa3, 0xd7, 0xd7, 0xd1, 0xfb, 0xef, 0xa0, 0xbf, 0xdf, 0x43, 0x7f, 0x7f, 0x88, 0x5e, - 0xef, 0xf8, 0xd6, 0xb9, 0x53, 0x2f, 0xa0, 0xd7, 0x8b, 0xdf, 0x3a, 0xa7, 0xfd, 0x7f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xde, 0xd7, 0x3e, 0x4d, 0x20, 0x5f, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -type NodeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Node) TestProto() github_com_gogo_protobuf_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 -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+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 *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+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 *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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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 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 github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(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] = 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] = 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 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(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] = 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] = 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 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - 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 := 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 := 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 = 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 := 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] = 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 := 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v243 := 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 := 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 := 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 := 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 -} - -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 { - v252 := r.Intn(100) - tmps := make([]rune, v252) - for i := 0; i < v252; 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)) - v253 := r.Int63() - if r.Intn(2) == 0 { - v253 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v253)) - 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 += github_com_gogo_protobuf_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 += github_com_gogo_protobuf_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 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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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 valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x1 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x1 >= 1<<7 { - data[i] = uint8(uint64(x1)&0x7f | 0x80) - x1 >>= 7 - i++ - } - data[i] = uint8(x1) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x2 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x2 >= 1<<7 { - data[i] = uint8(uint64(x2)&0x7f | 0x80) - x2 >>= 7 - i++ - } - data[i] = uint8(x2) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field4) > 0 { - for _, num := range m.Field4 { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field5) > 0 { - for _, num := range m.Field5 { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x3 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x3 >= 1<<7 { - data[i] = uint8(uint64(x3)&0x7f | 0x80) - x3 >>= 7 - i++ - } - data[i] = uint8(x3) - i++ - } - } - if len(m.Field8) > 0 { - for _, num := range m.Field8 { - data[i] = 0x40 - i++ - x4 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x4 >= 1<<7 { - data[i] = uint8(uint64(x4)&0x7f | 0x80) - x4 >>= 7 - i++ - } - data[i] = uint8(x4) - i++ - } - } - if len(m.Field9) > 0 { - for _, num := range m.Field9 { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data6 := make([]byte, len(m.Field3)*10) - var j5 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - data6[j5] = uint8(num) - j5++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j5)) - i += copy(data[i:], data6[:j5]) - } - if len(m.Field4) > 0 { - data8 := make([]byte, len(m.Field4)*10) - var j7 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - data8[j7] = uint8(num) - j7++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j7)) - i += copy(data[i:], data8[:j7]) - } - if len(m.Field5) > 0 { - data10 := make([]byte, len(m.Field5)*10) - var j9 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - data10[j9] = uint8(num) - j9++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j9)) - i += copy(data[i:], data10[:j9]) - } - if len(m.Field6) > 0 { - data12 := make([]byte, len(m.Field6)*10) - var j11 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - data12[j11] = uint8(num) - j11++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j11)) - i += copy(data[i:], data12[:j11]) - } - if len(m.Field7) > 0 { - data13 := make([]byte, len(m.Field7)*5) - var j14 int - for _, num := range m.Field7 { - x15 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x15 >= 1<<7 { - data13[j14] = uint8(uint64(x15)&0x7f | 0x80) - j14++ - x15 >>= 7 - } - data13[j14] = uint8(x15) - j14++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j14)) - i += copy(data[i:], data13[:j14]) - } - if len(m.Field8) > 0 { - var j16 int - data18 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x17 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x17 >= 1<<7 { - data18[j16] = uint8(uint64(x17)&0x7f | 0x80) - j16++ - x17 >>= 7 - } - data18[j16] = uint8(x17) - j16++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j16)) - i += copy(data[i:], data18[:j16]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepPackedNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) - for _, num := range m.Field1 { - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - data20 := make([]byte, len(m.Field3)*10) - var j19 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data20[j19] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j19++ - } - data20[j19] = uint8(num) - j19++ - } - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(j19)) - i += copy(data[i:], data20[:j19]) - } - if len(m.Field4) > 0 { - data22 := make([]byte, len(m.Field4)*10) - var j21 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data22[j21] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j21++ - } - data22[j21] = uint8(num) - j21++ - } - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(j21)) - i += copy(data[i:], data22[:j21]) - } - if len(m.Field5) > 0 { - data24 := make([]byte, len(m.Field5)*10) - var j23 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data24[j23] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j23++ - } - data24[j23] = uint8(num) - j23++ - } - data[i] = 0x2a - i++ - i = encodeVarintThetest(data, i, uint64(j23)) - i += copy(data[i:], data24[:j23]) - } - if len(m.Field6) > 0 { - data26 := make([]byte, len(m.Field6)*10) - var j25 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data26[j25] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j25++ - } - data26[j25] = uint8(num) - j25++ - } - data[i] = 0x32 - i++ - i = encodeVarintThetest(data, i, uint64(j25)) - i += copy(data[i:], data26[:j25]) - } - if len(m.Field7) > 0 { - data27 := make([]byte, len(m.Field7)*5) - var j28 int - for _, num := range m.Field7 { - x29 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x29 >= 1<<7 { - data27[j28] = uint8(uint64(x29)&0x7f | 0x80) - j28++ - x29 >>= 7 - } - data27[j28] = uint8(x29) - j28++ - } - data[i] = 0x3a - i++ - i = encodeVarintThetest(data, i, uint64(j28)) - i += copy(data[i:], data27[:j28]) - } - if len(m.Field8) > 0 { - var j30 int - data32 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x31 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x31 >= 1<<7 { - data32[j30] = uint8(uint64(x31)&0x7f | 0x80) - j30++ - x31 >>= 7 - } - data32[j30] = uint8(x31) - j30++ - } - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(j30)) - i += copy(data[i:], data32[:j30]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n33, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n33 - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n34, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n34 - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n35, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n35 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n36, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n36 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n37, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n37 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) - n38, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n38 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x39 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x39 >= 1<<7 { - data[i] = uint8(uint64(x39)&0x7f | 0x80) - x39 >>= 7 - i++ - } - data[i] = uint8(x39) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, num := range m.Field1 { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.Field3) > 0 { - for _, msg := range m.Field3 { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field4) > 0 { - for _, msg := range m.Field4 { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field6) > 0 { - for _, num := range m.Field6 { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x38 - i++ - x40 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x40 >= 1<<7 { - data[i] = uint8(uint64(x40)&0x7f | 0x80) - x40 >>= 7 - i++ - } - data[i] = uint8(x40) - i++ - } - } - if len(m.Field8) > 0 { - for _, msg := range m.Field8 { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Field13) > 0 { - for _, b := range m.Field13 { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.Field14) > 0 { - for _, s := range m.Field14 { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.Field15) > 0 { - for _, b := range m.Field15 { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n41, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - } - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n42, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n43, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n44, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n45, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n46, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 - } - if len(m.Field2) > 0 { - for _, msg := range m.Field2 { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n47, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n47 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n48, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n48 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomDash) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomDash) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n49, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n49 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Id.Size())) - n50, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n50 - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value.Size())) - n51, err := m.Value.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n51 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepCustom) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for _, msg := range m.Id { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Value) > 0 { - for _, msg := range m.Value { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n52, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n52 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) - n53, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n53 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n54, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n54 - } - if m.Field200 != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) - n55, err := m.Field200.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.Field210 != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.Field210 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) - n56, err := m.Field1.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n56 - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) - n57, err := m.Field2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n57 - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) - n58, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n58 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Tree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Tree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Or != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Or.Size())) - n59, err := m.Or.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n59 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n60, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n60 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n61, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n62, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n62 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n63, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n63 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n64, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n64 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n65, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Leaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Leaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Value)) - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) - i += copy(data[i:], m.StrValue) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepTree) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepTree) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Down != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n66, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n66 - } - if m.And != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.And.Size())) - n67, err := m.And.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n67 - } - if m.Leaf != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) - n68, err := m.Leaf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ADeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Down.Size())) - n69, err := m.Down.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndDeepBranch) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Left.Size())) - n70, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n70 - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.Right.Size())) - n71, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n71 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeepLeaf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) - n72, err := m.Tree.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n72 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Nil) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nil) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(m.Field1)) - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.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++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time1 - i += 8 - data[i] = 0x11 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Time2 - i += 8 - if m.Data != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MyExtendable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MyExtendable) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - n, err := github_com_gogo_protobuf_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())) - n73, err := m.M.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n73 - } - if m.Field2 != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field2)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field13)) - } - n, err := github_com_gogo_protobuf_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())) - n74, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n74 - } - if m.NM != nil { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(m.NM.Size())) - n75, err := m.NM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n75 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedField1 != nil { - data[i] = 0x9 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.NestedField1 - i += 8 - } - if m.NNM != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) - n76, err := m.NNM.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NestedNestedField1 != nil { - data[i] = 0x52 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) - i += copy(data[i:], *m.NestedNestedField1) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedScope) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedScope) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.A.Size())) - n77, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n77 - } - if m.B != nil { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(*m.B)) - } - if m.C != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.C.Size())) - n78, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n78 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 - i += 8 - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 - i += 4 - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 - i += 4 - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 - i += 4 - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 - i += 8 - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 - i += 8 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomContainer) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomContainer) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) - n79, err := m.CustomStruct.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n79 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.FieldA - i += 8 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.FieldB - i += 4 - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC)) - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldD)) - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldE)) - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldF)) - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.FieldI - i += 4 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.FieldJ - i += 4 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.FieldK - i += 8 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.FieldL - i += 8 - data[i] = 0x68 - i++ - if m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) - i += copy(data[i:], m.FieldN) - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldC)) - } - if m.FieldD != nil { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldD)) - } - if m.FieldE != nil { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldF)) - } - if m.FieldG != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) - } - if m.FieldH != nil { - data[i] = 0x40 - i++ - i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) - } - if m.FieldI != nil { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = *m.FieldI - i += 4 - } - if m.FieldJ != nil { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = *m.FieldJ - i += 4 - } - if m.FieldK != nil { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = *m.FieldK - i += 8 - } - if m.FielL != nil { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = *m.FielL - i += 8 - } - if m.FieldM != nil { - data[i] = 0x68 - i++ - if *m.FieldM { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldN != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) - i += copy(data[i:], *m.FieldN) - } - if m.FieldO != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) - i += copy(data[i:], m.FieldO) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldA) > 0 { - for _, num := range m.FieldA { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldC) > 0 { - for _, num := range m.FieldC { - data[i] = 0x18 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldD) > 0 { - for _, num := range m.FieldD { - data[i] = 0x20 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldE) > 0 { - for _, num := range m.FieldE { - data[i] = 0x28 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldF) > 0 { - for _, num := range m.FieldF { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if len(m.FieldG) > 0 { - for _, num := range m.FieldG { - data[i] = 0x38 - i++ - x80 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x80 >= 1<<7 { - data[i] = uint8(uint64(x80)&0x7f | 0x80) - x80 >>= 7 - i++ - } - data[i] = uint8(x80) - i++ - } - } - if len(m.FieldH) > 0 { - for _, num := range m.FieldH { - data[i] = 0x40 - i++ - x81 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x81 >= 1<<7 { - data[i] = uint8(uint64(x81)&0x7f | 0x80) - x81 >>= 7 - i++ - } - data[i] = uint8(x81) - i++ - } - } - if len(m.FieldI) > 0 { - for _, num := range m.FieldI { - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = num - i += 4 - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = num - i += 8 - } - } - if len(m.FieldM) > 0 { - for _, b := range m.FieldM { - data[i] = 0x68 - i++ - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.FieldN) > 0 { - for _, s := range m.FieldN { - data[i] = 0x72 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.FieldO) > 0 { - for _, b := range m.FieldO { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA - i += 8 - } - if m.FieldB != nil { - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB - i += 4 - } - if m.FieldC != nil { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) - n82, err := m.FieldC.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n82 - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FieldE != nil { - data[i] = 0x30 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldE)) - } - if m.FieldF != nil { - data[i] = 0x38 - i++ - i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) - } - if m.FieldG != nil { - data[i] = 0x42 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) - n83, err := m.FieldG.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - } - if m.FieldH != nil { - data[i] = 0x68 - i++ - if *m.FieldH { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.FieldI != nil { - data[i] = 0x72 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) - i += copy(data[i:], *m.FieldI) - } - if m.FieldJ != nil { - data[i] = 0x7a - i++ - i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) - i += copy(data[i:], m.FieldJ) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameCustomType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n84, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n84 - } - if m.FieldB != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) - n85, err := m.FieldB.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n85 - } - if len(m.FieldC) > 0 { - for _, msg := range m.FieldC { - data[i] = 0x1a - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.FieldD) > 0 { - for _, msg := range m.FieldD { - data[i] = 0x22 - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NidOptNative != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) - n86, err := m.NidOptNative.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n86 - } - if m.FieldA != nil { - data[i] = 0xc2 - i++ - data[i] = 0xc - i++ - i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) - n87, err := m.FieldA.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n87 - } - if m.FieldB != nil { - data[i] = 0x90 - i++ - data[i] = 0xd - i++ - if *m.FieldB { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomNameEnum) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FieldA != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.FieldA)) - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - data[i] = 0x10 - i++ - i = encodeVarintThetest(data, i, uint64(num)) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NoExtensionsMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Unrecognized) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unrecognized) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - return i, nil -} - -func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Embedded) > 0 { - for _, msg := range m.Embedded { - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) - n88, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n88 - if m.Field2 != nil { - data[i] = 0x12 - i++ - i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) - i += copy(data[i:], *m.Field2) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintThetest(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (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 encodeFixed64Thetest(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Thetest(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintThetest(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} - -func init() { proto.RegisterFile("combos/unsafemarshaler/thetest.proto", fileDescriptorThetest) } - -var fileDescriptorThetest = []byte{ - // 3015 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, - 0xf5, 0xd7, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x7f, 0x49, 0xde, - 0x3f, 0xa3, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x70, 0x6d, 0xd7, - 0xa2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e8, 0xae, 0xdd, 0x46, 0xa5, 0x45, 0x55, 0x46, 0x52, 0x99, 0x93, - 0x16, 0xa9, 0x74, 0x59, 0x05, 0x48, 0x1a, 0xe7, 0xa4, 0xcb, 0x54, 0x5a, 0x52, 0x63, 0x48, 0x0a, - 0x38, 0x69, 0x89, 0x4a, 0x57, 0xd4, 0x38, 0x92, 0x4e, 0x70, 0xd2, 0x15, 0x2a, 0x5d, 0x55, 0x47, - 0x91, 0x34, 0xc6, 0x49, 0x57, 0xa9, 0xf4, 0x8a, 0x7a, 0x0e, 0x49, 0xcf, 0x73, 0xd2, 0x2b, 0x54, - 0xba, 0xa6, 0x26, 0x90, 0x54, 0xe1, 0xa4, 0x6b, 0x54, 0x7a, 0x55, 0x1d, 0x43, 0xd2, 0x73, 0x9c, - 0xf4, 0xaa, 0x32, 0x03, 0xcf, 0x39, 0xd1, 0xc8, 0xab, 0x10, 0x89, 0xa7, 0xb0, 0xf8, 0x9c, 0x13, - 0x8e, 0xbc, 0x2b, 0x2f, 0xa8, 0xe3, 0x48, 0x3e, 0xca, 0xcb, 0x0b, 0xae, 0xbc, 0xa8, 0x26, 0x91, - 0x3c, 0xc5, 0xcb, 0x8b, 0xae, 0x7c, 0x59, 0x9d, 0x40, 0xf2, 0x04, 0x2f, 0x5f, 0x76, 0xe5, 0x25, - 0x75, 0x12, 0xc9, 0xc7, 0x78, 0x79, 0xc9, 0x95, 0xaf, 0xa8, 0x53, 0x48, 0x9e, 0xe4, 0xe5, 0x2b, - 0xda, 0xfb, 0x36, 0xbc, 0x86, 0x0b, 0x6f, 0x9a, 0x87, 0x97, 0x02, 0x9b, 0xe6, 0x81, 0xa5, 0x90, - 0xa6, 0x79, 0x48, 0x29, 0x98, 0x69, 0x1e, 0x4c, 0x0a, 0x63, 0x9a, 0x87, 0x91, 0x02, 0x98, 0xe6, - 0x01, 0xa4, 0xd0, 0xa5, 0x79, 0xe8, 0x28, 0x68, 0x69, 0x1e, 0x34, 0x0a, 0x57, 0x9a, 0x87, 0x8b, - 0x02, 0xa5, 0x0a, 0x40, 0xb9, 0x10, 0xa9, 0x02, 0x44, 0x2e, 0x38, 0xaa, 0x00, 0x8e, 0x0b, 0x8b, - 0x2a, 0xc0, 0xe2, 0x02, 0xa2, 0x0a, 0x80, 0xb8, 0x50, 0xa8, 0x02, 0x14, 0x2e, 0x08, 0x38, 0xc7, - 0x9a, 0xfa, 0x91, 0x4f, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, - 0x60, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, - 0xc1, 0x39, 0x06, 0x42, 0x72, 0x0c, 0x84, 0xe4, 0x18, 0x08, 0xc9, 0x31, 0x10, 0x92, 0x63, 0x20, - 0x24, 0xc7, 0x40, 0x60, 0x8e, 0xb9, 0xf0, 0xa6, 0x79, 0x78, 0x7d, 0x73, 0x0c, 0x04, 0xe4, 0x18, - 0x08, 0xc8, 0x31, 0x10, 0x90, 0x63, 0x20, 0x20, 0xc7, 0x40, 0x40, 0x8e, 0x81, 0x80, 0x1c, 0x03, - 0x01, 0x39, 0x06, 0x82, 0x72, 0x0c, 0x04, 0xe6, 0x18, 0x08, 0xcc, 0x31, 0x10, 0x98, 0x63, 0x20, - 0x30, 0xc7, 0x40, 0x60, 0x8e, 0x01, 0x36, 0xc7, 0xfe, 0x04, 0xa0, 0xe2, 0xe4, 0xd8, 0xed, 0xd6, - 0xce, 0x0f, 0xf4, 0x36, 0x86, 0x62, 0x46, 0xc8, 0xb4, 0x51, 0x0b, 0xba, 0x94, 0x0b, 0xc9, 0x8c, - 0x90, 0x6b, 0xbc, 0xbc, 0x48, 0xe5, 0x24, 0xdb, 0x78, 0xf9, 0x32, 0x95, 0x93, 0x7c, 0xe3, 0xe5, - 0x25, 0x2a, 0x27, 0x19, 0xc7, 0xcb, 0x57, 0xa8, 0x9c, 0xe4, 0x1c, 0x2f, 0x5f, 0xa5, 0x72, 0x92, - 0x75, 0xbc, 0xfc, 0x0a, 0x95, 0x93, 0xbc, 0xe3, 0xe5, 0x6b, 0x54, 0x4e, 0x32, 0x8f, 0x97, 0x5f, - 0x55, 0xe6, 0xc4, 0xdc, 0x23, 0x0a, 0x14, 0xda, 0x39, 0x31, 0xfb, 0x04, 0x8d, 0x82, 0xab, 0x41, - 0xf2, 0x4f, 0xd0, 0x28, 0xba, 0x1a, 0x24, 0x03, 0x05, 0x8d, 0x65, 0xed, 0xa1, 0x0d, 0x9f, 0x21, - 0xc2, 0x97, 0x11, 0xe0, 0x93, 0x19, 0xe8, 0x32, 0x02, 0x74, 0x32, 0x03, 0x5b, 0x46, 0x80, 0x4d, - 0x66, 0x20, 0xcb, 0x08, 0x90, 0xc9, 0x0c, 0x5c, 0x19, 0x01, 0x2e, 0x99, 0x81, 0x2a, 0x23, 0x40, - 0x25, 0x33, 0x30, 0x65, 0x04, 0x98, 0x64, 0x06, 0xa2, 0x8c, 0x00, 0x91, 0xcc, 0xc0, 0x93, 0x11, - 0xe0, 0x91, 0x19, 0x68, 0xa6, 0x45, 0x68, 0x64, 0x16, 0x96, 0x69, 0x11, 0x16, 0x99, 0x85, 0x64, - 0x5a, 0x84, 0x44, 0x66, 0xe1, 0x98, 0x16, 0xe1, 0x90, 0x59, 0x28, 0xbe, 0x94, 0x49, 0x45, 0xf8, - 0xae, 0xd9, 0x3b, 0xde, 0x31, 0x4f, 0x55, 0x11, 0xe6, 0xb9, 0xf2, 0x61, 0xbc, 0xa8, 0x2c, 0xda, - 0x05, 0x2b, 0x5b, 0x71, 0x0a, 0x2b, 0x58, 0x9e, 0x2b, 0x2c, 0x18, 0x0b, 0xc3, 0xdf, 0xa2, 0x74, - 0xaa, 0xda, 0x30, 0xcf, 0x95, 0x19, 0xe1, 0xfe, 0xad, 0xbd, 0xf4, 0x8a, 0xed, 0x89, 0x4c, 0x2a, - 0x36, 0x1c, 0xf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d, 0xbd, 0x27, 0x58, 0x14, 0x95, 0x65, 0x2e, - 0x61, 0x27, 0x8b, 0xaf, 0x53, 0x8b, 0x40, 0xa3, 0x65, 0xed, 0x43, 0xdb, 0x41, 0xab, 0x14, 0xf0, - 0xdc, 0x20, 0x88, 0x70, 0x83, 0xca, 0x2a, 0x57, 0xbf, 0x0d, 0x70, 0x53, 0x78, 0xb4, 0xbc, 0xca, - 0x3d, 0xe7, 0x0c, 0x76, 0x96, 0x7f, 0xc6, 0x24, 0x31, 0x25, 0x2e, 0xbf, 0x19, 0xea, 0x72, 0x40, - 0x75, 0x3b, 0x6c, 0x4c, 0x41, 0xd4, 0x98, 0xfe, 0x91, 0x56, 0x1c, 0x56, 0x73, 0x4d, 0xdf, 0x6d, - 0x1d, 0x1f, 0x98, 0xca, 0xa5, 0x50, 0xec, 0xcb, 0x52, 0x95, 0xba, 0x5a, 0x8a, 0x0a, 0x7f, 0x59, - 0xae, 0x54, 0xa8, 0xbb, 0x57, 0x86, 0xa0, 0x40, 0x59, 0xae, 0x56, 0xe9, 0xb4, 0x9d, 0x78, 0x88, - 0xb2, 0xf8, 0xf1, 0xa3, 0xd9, 0x11, 0xed, 0xb7, 0xc8, 0x79, 0xac, 0xc9, 0x10, 0xf7, 0xb2, 0xe0, - 0xfc, 0x05, 0x32, 0x67, 0xf8, 0x45, 0xe0, 0xbf, 0x46, 0xde, 0xbf, 0x48, 0x50, 0xf5, 0xf8, 0x4a, - 0xe2, 0x9d, 0x8f, 0xe4, 0x72, 0x59, 0xaa, 0xff, 0xef, 0x63, 0x7e, 0x17, 0xc6, 0xb7, 0x3a, 0x87, - 0x7a, 0xcf, 0x5a, 0x09, 0xac, 0x1f, 0x8e, 0xcb, 0x64, 0x33, 0x27, 0x6e, 0x5a, 0x4d, 0x44, 0xe6, - 0x38, 0xc7, 0xc9, 0xac, 0xfd, 0x84, 0x58, 0xad, 0x65, 0xb6, 0x6c, 0x0f, 0x92, 0x74, 0x7e, 0x45, - 0x2d,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x1e, 0xf4, 0xa1, 0x9d, 0x26, 0xd0, 0x0e, 0xfa, 0x50, 0x4e, 0x13, 0x28, 0x07, 0x7d, - 0xe8, 0xa6, 0x09, 0x74, 0x83, 0x3e, 0x54, 0xd3, 0x04, 0xaa, 0x41, 0x1f, 0x9a, 0x69, 0x02, 0xcd, - 0xa0, 0x0f, 0xc5, 0x34, 0x81, 0x62, 0xd0, 0x87, 0x5e, 0x9a, 0x40, 0x2f, 0xe8, 0x43, 0xad, 0xac, - 0x48, 0x2d, 0xe8, 0x47, 0xab, 0xac, 0x48, 0x2b, 0xe8, 0x47, 0xa9, 0xff, 0x17, 0x29, 0x35, 0x86, - 0xb4, 0xe2, 0x56, 0x13, 0xc3, 0xa6, 0xac, 0xc8, 0x26, 0xe8, 0xc7, 0xa4, 0xac, 0xc8, 0x24, 0xe8, - 0xc7, 0xa2, 0xac, 0xc8, 0x22, 0xe8, 0xc7, 0xa0, 0x27, 0x22, 0x83, 0xdc, 0x23, 0x3e, 0x9a, 0xb0, - 0xa3, 0x18, 0xc6, 0x20, 0x10, 0x81, 0x41, 0x20, 0x02, 0x83, 0x40, 0x04, 0x06, 0x81, 0x08, 0x0c, - 0x02, 0x11, 0x18, 0x04, 0x22, 0x30, 0x08, 0x44, 0x60, 0x10, 0x88, 0xc2, 0x20, 0x10, 0x89, 0x41, - 0x20, 0x88, 0x41, 0x59, 0xf1, 0xc0, 0x03, 0xf4, 0x9b, 0x90, 0xb2, 0xe2, 0xce, 0x67, 0x38, 0x85, - 0x40, 0x24, 0x0a, 0x81, 0x20, 0x0a, 0x7d, 0x84, 0x0a, 0x29, 0x8e, 0x42, 0x78, 0x7b, 0xe8, 0xac, - 0x66, 0xa0, 0xd5, 0x08, 0xe7, 0x2b, 0xfc, 0x38, 0xb5, 0x1a, 0x61, 0x8f, 0x7a, 0x10, 0xcf, 0xbc, - 0xb3, 0x50, 0x3d, 0xc2, 0x2c, 0x74, 0x8d, 0x72, 0x68, 0x35, 0xc2, 0xb9,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 0xd0, 0x75, 0xf2, 0x1c, - 0xe9, 0xa3, 0xeb, 0x63, 0xf4, 0xfb, 0x33, 0xf4, 0xfd, 0x39, 0xfa, 0xfe, 0x02, 0x5d, 0xef, 0x7d, - 0x3a, 0x33, 0xf2, 0x08, 0x5d, 0x8f, 0x3f, 0x9d, 0x91, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0xe3, - 0x57, 0x38, 0x0d, 0xb3, 0x34, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto deleted file mode 100644 index d17170bf..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto +++ /dev/null @@ -1,626 +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) = 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) = true; -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; -} - diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go deleted file mode 100644 index 44c7b7bf..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go +++ /dev/null @@ -1,16373 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNodeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNodeFace(t *testing.T) { - popr := math_rand.New(math_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 TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNodeStringer(t *testing.T) { - popr := math_rand.New(math_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 TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/uuid.go deleted file mode 100644 index ae349da4..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/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/unsafeunmarshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/bug_test.go deleted file mode 100644 index 53f720e9..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/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/unsafeunmarshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.pb.go deleted file mode 100644 index 9491551a..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.pb.go +++ /dev/null @@ -1,35686 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -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 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import compress_gzip "compress/gzip" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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,json=id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=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" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=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" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=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" 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" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=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" 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,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data,json=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" 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{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=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{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=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" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=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" 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" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=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,json=field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" 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" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=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" 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{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" 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" 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" 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" 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" 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" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children,json=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} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA,json=fieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB,json=fieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC,json=fieldC", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD,json=fieldD", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE,json=fieldE", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterType((*Node)(nil), "test.Node") - 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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6123 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5c, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xde, 0xe1, 0x90, 0x12, 0x75, 0x28, 0x51, 0xd4, 0xac, 0x56, 0xa6, 0xe5, 0xf5, 0x3e, 0x68, - 0x59, 0x96, 0x15, 0x5b, 0xaf, 0xd5, 0xbe, 0xe8, 0xc4, 0x01, 0x5f, 0x2b, 0x6b, 0xab, 0x57, 0x47, - 0x52, 0x62, 0xa7, 0x05, 0x08, 0x2e, 0x39, 0x92, 0x68, 0x53, 0x43, 0x96, 0x43, 0xda, 0xde, 0xfc, - 0x28, 0xd2, 0xa4, 0x4d, 0x93, 0x16, 0x7d, 0xa6, 0x45, 0xf3, 0x8e, 0x93, 0x22, 0x8d, 0x93, 0xbe, - 0x92, 0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 0xa3, 0x81, - 0x12, 0xfe, 0xfc, 0xfa, 0xf9, 0xc0, 0x6b, 0xc7, 0x7f, 0xd7, 0x61, 0xd4, 0xdb, 0xc1, 0xe1, 0x86, - 0xb8, 0x4a, 0xca, 0xbc, 0x46, 0xaa, 0xc0, 0x03, 0x03, 0xfb, 0xbd, 0x85, 0x02, 0xae, 0xff, 0xd9, - 0x21, 0xda, 0x57, 0x99, 0x14, 0x89, 0xe7, 0x5e, 0x1c, 0x6b, 0x16, 0xed, 0xd6, 0xe3, 0x26, 0xfb, - 0x84, 0x8a, 0xdd, 0xd0, 0xd3, 0x0e, 0x91, 0x3d, 0x44, 0x64, 0xcf, 0x0c, 0x96, 0x7d, 0x73, 0x97, - 0x08, 0x1f, 0xb9, 0xb9, 0x5b, 0xde, 0xda, 0x36, 0x37, 0x73, 0x1b, 0x26, 0x83, 0x1b, 0xf7, 0x42, - 0xb4, 0x51, 0x79, 0xfb, 0x6d, 0x79, 0xa6, 0x20, 0x43, 0x61, 0x0d, 0x8f, 0x24, 0xe0, 0x25, 0x0f, - 0xb9, 0x3e, 0x93, 0xa1, 0xd7, 0x31, 0xf4, 0x17, 0x21, 0x46, 0xec, 0x65, 0x00, 0x30, 0x8b, 0xa5, - 0x4e, 0x19, 0x71, 0x88, 0x16, 0xb6, 0x4d, 0x1c, 0xfe, 0x28, 0xde, 0xe9, 0x68, 0x79, 0x67, 0xbd, - 0x54, 0x40, 0x19, 0x90, 0xb9, 0x0c, 0x43, 0xd4, 0x08, 0x38, 0x35, 0x84, 0x19, 0x10, 0x88, 0x7e, - 0x64, 0x32, 0x34, 0x4e, 0xdd, 0xdf, 0xcc, 0x97, 0xcc, 0x54, 0xc4, 0xeb, 0xde, 0x2f, 0x69, 0x90, - 0xf0, 0x34, 0x54, 0x78, 0x2a, 0xaf, 0x34, 0x1a, 0xcd, 0xe7, 0xca, 0x95, 0x46, 0x1d, 0x55, 0x28, - 0xea, 0x1f, 0x20, 0x43, 0x39, 0x3c, 0x12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x0f, 0x32, 0x99, 0x93, 0x3d, 0xde, 0xc5, 0x62, 0x77, - 0x80, 0x8f, 0x0b, 0x7f, 0x84, 0x90, 0xf9, 0x21, 0x26, 0xd3, 0x60, 0x58, 0xee, 0x16, 0x2c, 0xf1, - 0x26, 0x4c, 0xa0, 0x27, 0xf5, 0x5b, 0x4d, 0x87, 0x3d, 0xf7, 0x86, 0x10, 0xf7, 0x61, 0x26, 0x6e, - 0x9c, 0x01, 0xc9, 0x53, 0x30, 0x96, 0x75, 0x1d, 0xe2, 0x07, 0xe8, 0x01, 0x28, 0x84, 0x88, 0x8f, - 0x30, 0x11, 0xc3, 0x98, 0x1f, 0x43, 0x73, 0x30, 0x7a, 0xd8, 0x64, 0x65, 0x38, 0x18, 0xfe, 0x51, - 0x06, 0x4f, 0x70, 0x0c, 0x13, 0xd1, 0x6a, 0xb6, 0xba, 0x0d, 0x5c, 0xa3, 0x83, 0x45, 0x7c, 0x8c, - 0x8b, 0xe0, 0x18, 0x26, 0xe2, 0x04, 0x66, 0x7d, 0x81, 0x8b, 0x70, 0x3c, 0xf6, 0x7c, 0x33, 0x5e, - 0xeb, 0x6d, 0xdc, 0x6e, 0xda, 0x61, 0x94, 0xf8, 0x38, 0x93, 0x00, 0x0c, 0x82, 0x05, 0x3c, 0x06, - 0x23, 0x61, 0x1d, 0xf1, 0x49, 0x06, 0x8f, 0x5b, 0xdc, 0x03, 0x28, 0xcf, 0x78, 0x91, 0xc1, 0x7b, - 0x2b, 0xc1, 0x22, 0xfe, 0x84, 0x89, 0x48, 0x7a, 0x60, 0xec, 0x36, 0x3a, 0x96, 0xd3, 0x41, 0x8f, - 0xea, 0x21, 0x84, 0x7c, 0x8a, 0xdf, 0x06, 0x83, 0x30, 0x53, 0xde, 0xb2, 0xec, 0xea, 0x51, 0x38, - 0x09, 0x2f, 0x72, 0x53, 0x72, 0x0c, 0x16, 0x81, 0x2a, 0xcf, 0x71, 0xa5, 0x8d, 0x1e, 0xae, 0x1b, - 0xa1,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0xe3, - 0x7f, 0x8f, 0xe1, 0x5d, 0x0c, 0xb6, 0x80, 0xa7, 0x4c, 0x06, 0x8b, 0xf8, 0x7d, 0x6e, 0x01, 0x0f, - 0x0a, 0xa7, 0x91, 0x3a, 0xf5, 0x05, 0x4b, 0x7a, 0x1f, 0x4f, 0x23, 0x65, 0xe6, 0xc3, 0xde, 0x24, - 0xd5, 0x22, 0x58, 0xc4, 0x1f, 0x70, 0x6f, 0x12, 0x7e, 0xac, 0x86, 0x3a, 0x97, 0x04, 0xcb, 0xf8, - 0x23, 0xae, 0x86, 0x32, 0x95, 0xa0, 0x99, 0xc9, 0xe8, 0x9d, 0x47, 0x82, 0xe5, 0xbd, 0x9f, 0xc9, - 0x9b, 0xe8, 0x99, 0x46, 0xb2, 0x6f, 0x85, 0x29, 0xff, 0x39, 0x24, 0x58, 0xea, 0x07, 0x5e, 0x51, - 0xba, 0x7e, 0xef, 0x14, 0x82, 0xa6, 0xbc, 0x49, 0xbf, 0xf9, 0x23, 0x58, 0xec, 0x07, 0x5f, 0x91, - 0x1f, 0xec, 0xbc, 0xd3, 0x07, 0xea, 0xd0, 0xc0, 0x2d, 0xdd, 0xc1, 0xb2, 0x3e, 0xcc, 0x64, 0x79, - 0x40, 0x38, 0x35, 0x58, 0xe5, 0x0e, 0xc6, 0x7f, 0x84, 0xa7, 0x06, 0x43, 0x20, 0x70, 0xdc, 0xee, - 0x36, 0x1a, 0x38, 0x38, 0x8c, 0xc1, 0x47, 0x1a, 0xd2, 0xff, 0xf9, 0x23, 0x96, 0x18, 0x1c, 0x80, - 0x6a, 0x68, 0xcc, 0x3a, 0xbe, 0x85, 0x6c, 0x10, 0x80, 0xfc, 0xaf, 0x1f, 0xf1, 0x82, 0x80, 0xb9, - 0x51, 0x3e, 0x01, 0x7d, 0x68, 0x24, 0x6b, 0xd8, 0x01, 0xd8, 0xff, 0xfe, 0x11, 0xdb, 0x66, 0x75, - 0x21, 0xae, 0x00, 0xba, 0x69, 0x3b, 0x58, 0xc0, 0x77, 0x65, 0x01, 0xe4, 0x41, 0xf3, 0x3a, 0x0c, - 0xe3, 0x93, 0x1d, 0x9d, 0xca, 0x61, 0x10, 0xfa, 0x7f, 0x18, 0x9a, 0xf3, 0x63, 0x83, 0x1d, 0x37, - 0xdb, 0x16, 0x7a, 0xeb, 0x04, 0x61, 0xff, 0x97, 0x61, 0x05, 0x00, 0x83, 0xab, 0x15, 0xa7, 0x13, - 0xe6, 0xbe, 0xff, 0x8f, 0x83, 0x39, 0x00, 0x2b, 0x8d, 0xdf, 0x3f, 0x63, 0xdd, 0x0e, 0xc2, 0x7e, - 0x8f, 0x2b, 0xcd, 0xf8, 0x51, 0x01, 0x1c, 0xc1, 0x6f, 0xe9, 0xd1, 0x83, 0x00, 0xf0, 0xf7, 0x19, - 0xd8, 0x45, 0xe4, 0x2f, 0xfa, 0x2f, 0xed, 0xc0, 0x5a, 0x73, 0xad, 0x49, 0x17, 0x75, 0xe0, 0x0b, - 0x75, 0x98, 0x45, 0x3c, 0x68, 0x7e, 0x5d, 0xa4, 0x39, 0xe9, 0xc9, 0xe7, 0xc5, 0xce, 0x91, 0x85, - 0x4b, 0x31, 0x5b, 0x9c, 0x89, 0xe2, 0xf7, 0xd3, 0x27, 0x5b, 0xd1, 0x21, 0xdb, 0x33, 0x5b, 0x75, - 0xac, 0xe4, 0x16, 0x59, 0x5b, 0x34, 0xce, 0xc2, 0x10, 0x51, 0x7b, 0x99, 0x2c, 0x7d, 0x6b, 0xf9, - 0xe8, 0x9d, 0x97, 0xcf, 0x9f, 0x32, 0x87, 0xc8, 0x31, 0xbd, 0x65, 0x41, 0x5d, 0x21, 0x2b, 0xfb, - 0x11, 0x89, 0xba, 0x22, 0xa8, 0x97, 0xe8, 0x19, 0x28, 0x89, 0x7a, 0x49, 0x50, 0x57, 0xc9, 0x32, - 0x99, 0x2e, 0x51, 0x57, 0x05, 0xf5, 0x32, 0x59, 0xed, 0x1c, 0x93, 0xa8, 0x97, 0x05, 0xf5, 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0x07, 0x3e, 0xe1, - 0x96, 0x51, 0xc2, 0x0d, 0x7c, 0x42, 0x2d, 0xa3, 0x84, 0x1a, 0xf8, 0x84, 0x59, 0x46, 0x09, 0x33, - 0xf0, 0x09, 0xb1, 0x8c, 0x12, 0x62, 0xe0, 0x13, 0x5e, 0x19, 0x25, 0xbc, 0xc0, 0x27, 0xb4, 0x66, - 0xd4, 0xd0, 0x02, 0xbf, 0xb0, 0x9a, 0x51, 0xc3, 0x0a, 0xfc, 0x42, 0xea, 0x01, 0x35, 0xa4, 0x46, - 0x10, 0x57, 0x0c, 0x0f, 0x79, 0xa2, 0x69, 0x46, 0x8d, 0x26, 0xf0, 0x8b, 0xa4, 0x19, 0x35, 0x92, - 0xc0, 0x2f, 0x8a, 0x66, 0xd4, 0x28, 0x02, 0xbf, 0x08, 0x7a, 0x49, 0x8d, 0x20, 0xf7, 0x88, 0x4f, - 0x46, 0xd9, 0x51, 0x0c, 0x8a, 0x20, 0x3d, 0x44, 0x04, 0xe9, 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, - 0x7a, 0x88, 0x08, 0xd2, 0x43, 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x89, - 0x20, 0x3d, 0x54, 0x04, 0xe9, 0xfd, 0x22, 0x68, 0x46, 0x3d, 0xf0, 0x00, 0x7e, 0x05, 0x69, 0x46, - 0xdd, 0xf9, 0x0c, 0x0e, 0x21, 0x3d, 0x54, 0x08, 0xe9, 0xfd, 0x42, 0xe8, 0xcb, 0xa8, 0x91, 0x92, - 0x42, 0x88, 0x6d, 0x0f, 0xbd, 0x56, 0x15, 0xe8, 0x4a, 0x88, 0xf3, 0x15, 0x7e, 0x31, 0x75, 0x25, - 0xc4, 0x1e, 0xf5, 0xa0, 0x38, 0xeb, 0xad, 0x42, 0xa5, 0x10, 0x55, 0xe8, 0x86, 0x88, 0xa1, 0x2b, - 0x21, 0xce, 0x5d, 0xf4, 0xc6, 0xde,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d6, 0xb9, 0x53, 0x2f, 0xa2, 0xbf, 0xff, 0x1f, 0x00, - 0x00, 0xff, 0xff, 0x5d, 0x08, 0x16, 0x1e, 0x22, 0x5f, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -type NodeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Node) TestProto() github_com_gogo_protobuf_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 -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+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 *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+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 *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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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 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 github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(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] = 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] = 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 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(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] = 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] = 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 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - 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 := 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 := 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 = 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 := 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] = 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 := 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v243 := 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 := 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 := 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 := 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 -} - -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 { - v252 := r.Intn(100) - tmps := make([]rune, v252) - for i := 0; i < v252; 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)) - v253 := r.Int63() - if r.Intn(2) == 0 { - v253 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v253)) - 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 += github_com_gogo_protobuf_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 += github_com_gogo_protobuf_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 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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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 valueToStringThetest(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *NinOptNativeUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field5 != nil { - return this.Field5 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptNativeUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *int32: - this.Field3 = vt - case *int64: - this.Field4 = vt - case *uint32: - this.Field5 = vt - case *uint64: - this.Field6 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinOptStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - if this.Field4 != nil { - return this.Field4 - } - if this.Field6 != nil { - return this.Field6 - } - if this.Field7 != nil { - return this.Field7 - } - if this.Field13 != nil { - return this.Field13 - } - if this.Field14 != nil { - return this.Field14 - } - if this.Field15 != nil { - return this.Field15 - } - return nil -} - -func (this *NinOptStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *float64: - this.Field1 = vt - case *float32: - this.Field2 = vt - case *NidOptNative: - this.Field3 = vt - case *NinOptNative: - this.Field4 = vt - case *uint64: - this.Field6 = vt - case *int32: - this.Field7 = vt - case *bool: - this.Field13 = vt - case *string: - this.Field14 = vt - case []byte: - this.Field15 = vt - default: - return false - } - return true -} -func (this *NinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.Field200 != nil { - return this.Field200 - } - if this.Field210 != nil { - return this.Field210 - } - return nil -} - -func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.Field200 = vt - case *bool: - this.Field210 = vt - default: - return false - } - return true -} -func (this *NinNestedStructUnion) GetValue() interface{} { - if this.Field1 != nil { - return this.Field1 - } - if this.Field2 != nil { - return this.Field2 - } - if this.Field3 != nil { - return this.Field3 - } - return nil -} - -func (this *NinNestedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NinOptNativeUnion: - this.Field1 = vt - case *NinOptStructUnion: - this.Field2 = vt - case *NinEmbeddedStructUnion: - this.Field3 = vt - default: - this.Field1 = new(NinOptNativeUnion) - if set := this.Field1.SetValue(value); set { - return true - } - this.Field1 = nil - this.Field2 = new(NinOptStructUnion) - if set := this.Field2.SetValue(value); set { - return true - } - this.Field2 = nil - this.Field3 = new(NinEmbeddedStructUnion) - if set := this.Field3.SetValue(value); set { - return true - } - this.Field3 = nil - return false - } - return true -} -func (this *Tree) GetValue() interface{} { - if this.Or != nil { - return this.Or - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *Tree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *OrBranch: - this.Or = vt - case *AndBranch: - this.And = vt - case *Leaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *DeepTree) GetValue() interface{} { - if this.Down != nil { - return this.Down - } - if this.And != nil { - return this.And - } - if this.Leaf != nil { - return this.Leaf - } - return nil -} - -func (this *DeepTree) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *ADeepBranch: - this.Down = vt - case *AndDeepBranch: - this.And = vt - case *DeepLeaf: - this.Leaf = vt - default: - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { - if this.NidOptNative != nil { - return this.NidOptNative - } - if this.FieldA != nil { - return this.FieldA - } - if this.FieldB != nil { - return this.FieldB - } - return nil -} - -func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *NidOptNative: - this.NidOptNative = vt - case *NinOptNative: - this.FieldA = vt - case *bool: - this.FieldB = vt - default: - return false - } - return true -} -func (m *NidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field9 = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field10 = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field11 = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field12 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NidOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field3 = append(m.Field3, &NidOptNative{}) - if err := m.Field3[len(m.Field3)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field4 = append(m.Field4, &NinOptNative{}) - if err := m.Field4[len(m.Field4)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field8 = append(m.Field8, &NidOptNative{}) - if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) - copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field210 = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NidOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, NidRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptStruct{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field2 = append(m.Field2, &NinRepStruct{}) - if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDash) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom_dash_type.Bytes - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = &v - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = &v - if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepCustom) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepCustom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.Id = append(m.Id, v) - if err := m.Id[len(m.Id)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Value = append(m.Value, v) - if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NidOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field200 == nil { - m.Field200 = &NinOptNative{} - } - if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field210 = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinNestedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinNestedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field1 == nil { - m.Field1 = &NinOptNativeUnion{} - } - if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field2 == nil { - m.Field2 = &NinOptStructUnion{} - } - if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinEmbeddedStructUnion{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Or == nil { - m.Or = &OrBranch{} - } - if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &Leaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Leaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrValue = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepTree) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepTree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Down == nil { - m.Down = &ADeepBranch{} - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.And == nil { - m.And = &AndDeepBranch{} - } - if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Leaf == nil { - m.Leaf = &DeepLeaf{} - } - if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ADeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ADeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AndDeepBranch) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndDeepBranch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeepLeaf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeepLeaf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - m.Field1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field1 |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 ErrIntOverflowThetestUnsafe - } - 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) - 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 ErrIntOverflowThetestUnsafe - } - 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) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = append(m.Field1, v) - 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 ErrIntOverflowThetestUnsafe - } - 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) - 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 ErrIntOverflowThetestUnsafe - } - 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) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnotherNinOptEnumDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v AnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (AnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - 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 ErrIntOverflowThetestUnsafe - } - 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 ErrIntOverflowThetestUnsafe - } - 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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Timer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time1 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.Time2 = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], data[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MyExtendable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyExtendable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OtherExtenable) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OtherExtenable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = &v - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.M == nil { - m.M = &MyExtendable{} - } - if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.EnumField = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NM == nil { - m.NM = &NestedDefinition_NestedMessage{} - } - if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.NestedField1 = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NNM == nil { - m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNestedMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.NestedNestedField1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedScope) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v NestedDefinition_NestedEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.B = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &NestedDefinition_NestedMessage{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNativeDefault) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNativeDefault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomContainer) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNidOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldA = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldB = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - m.FieldC = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldC |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - m.FieldD = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldD |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - m.FieldE = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldE |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - m.FieldF = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.FieldF |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = int64(v) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldI = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldK = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.FieldL = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) - if m.FieldO == nil { - m.FieldO = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.FieldH = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FielL = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldM = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldN = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) - if m.FieldO == nil { - m.FieldO = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinRepNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinRepNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = append(m.FieldA, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = append(m.FieldB, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldC = append(m.FieldC, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldD = append(m.FieldD, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = append(m.FieldE, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldF = append(m.FieldF, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldG = append(m.FieldG, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.FieldH = append(m.FieldH, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldI = append(m.FieldI, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldJ = append(m.FieldJ, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldK = append(m.FieldK, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldL = append(m.FieldL, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldM = append(m.FieldM, bool(v != 0)) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) - copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinStruct) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinStruct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.FieldA = &v - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.FieldB = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldC == nil { - m.FieldC = &NidOptNative{} - } - if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldD = append(m.FieldD, &NinOptNative{}) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldE = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.FieldF = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldG == nil { - m.FieldG = &NidOptNative{} - } - if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldH = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.FieldI = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldJ = append(m.FieldJ[:0], data[iNdEx:postIndex]...) - if m.FieldJ == nil { - m.FieldJ = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameCustomType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldA = &v - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldB = &v - if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v Uuid - m.FieldC = append(m.FieldC, v) - if err := m.FieldC[len(m.FieldC)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.FieldD = append(m.FieldD, v) - if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NidOptNative == nil { - m.NidOptNative = &NidOptNative{} - } - if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldA == nil { - m.FieldA = &NinOptNative{} - } - if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 210: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.FieldB = &b - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomNameEnum) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomNameEnum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldA = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - var v TheTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (TheTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FieldB = append(m.FieldB, v) - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoExtensionsMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoExtensionsMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - if (fieldNum >= 100) && (fieldNum < 200) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Unrecognized) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Unrecognized: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) - if err := m.Embedded[len(m.Embedded)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithInner_Inner) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field2 = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Embedded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.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 ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThetestUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.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 := skipThetestUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthThetestUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipThetestUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthThetestUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThetestUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipThetestUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthThetestUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowThetestUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeunmarshaler/thetest.proto", fileDescriptorThetest) } - -var fileDescriptorThetest = []byte{ - // 3017 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, - 0xf5, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x3f, 0x49, 0xde, - 0x9f, 0xa2, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xc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, 0x96, 0xe6, 0x49, 0xa3, 0x74, 0xa5, 0x79, 0xba, 0x28, 0x51, 0xaa, 0x40, - 0x94, 0x4b, 0x91, 0x2a, 0x50, 0xe4, 0x92, 0xa3, 0x0a, 0xe4, 0xb8, 0xb4, 0xa8, 0x02, 0x2d, 0x2e, - 0x21, 0xaa, 0x40, 0x88, 0x4b, 0x85, 0x2a, 0x50, 0xe1, 0x92, 0x80, 0x6b, 0xac, 0xa1, 0x1f, 0xfb, - 0xd4, 0x18, 0x18, 0x58, 0x63, 0x60, 0x60, 0x8d, 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, - 0x58, 0x63, 0x60, 0x60, 0x8d, 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, 0x5c, 0x63, 0x20, - 0xa4, 0xc6, 0x40, 0x48, 0x8d, 0x81, 0x90, 0x1a, 0x03, 0x21, 0x35, 0x06, 0x42, 0x6a, 0x0c, 0x04, - 0xd6, 0x98, 0x4b, 0x6f, 0x9a, 0xa7, 0xd7, 0xb7, 0xc6, 0x40, 0x40, 0x8d, 0x81, 0x80, 0x1a, 0x03, - 0x01, 0x35, 0x06, 0x02, 0x6a, 0x0c, 0x04, 0xd4, 0x18, 0x08, 0xa8, 0x31, 0x10, 0x50, 0x63, 0x20, - 0xa8, 0xc6, 0x40, 0x60, 0x8d, 0x81, 0xc0, 0x1a, 0x03, 0x81, 0x35, 0x06, 0x02, 0x6b, 0x0c, 0x04, - 0xd6, 0x18, 0x60, 0x6b, 0xec, 0x4f, 0x00, 0x2a, 0x4e, 0x8d, 0xdd, 0x6e, 0xee, 0xfe, 0x40, 0x6f, - 0x61, 0x2a, 0x66, 0x84, 0x4a, 0x1b, 0xb5, 0xa8, 0x4b, 0xb9, 0x94, 0xcc, 0x08, 0xb5, 0xc6, 0xe3, - 0x05, 0x8a, 0x93, 0x6a, 0xe3, 0xf1, 0x15, 0x8a, 0x93, 0x7a, 0xe3, 0xf1, 0x22, 0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f, 0x24, 0xc8, 0x8f, 0xd9, 0x04, 0xa5, 0x09, 0xf2, 0x83, 0x3e, 0xd2, 0xd3, 0x04, 0xe9, - 0x41, 0x1f, 0xd9, 0x69, 0x82, 0xec, 0xa0, 0x8f, 0xe4, 0x34, 0x41, 0x72, 0xd0, 0x47, 0x6e, 0x9a, - 0x20, 0x37, 0xe8, 0x23, 0x35, 0x4d, 0x90, 0x1a, 0xf4, 0x91, 0x99, 0x26, 0xc8, 0x0c, 0xfa, 0x48, - 0x4c, 0x13, 0x24, 0x06, 0x7d, 0xe4, 0xa5, 0x09, 0xf2, 0x82, 0x3e, 0xd2, 0x9a, 0x17, 0xa5, 0x05, - 0xfd, 0x64, 0x35, 0x2f, 0xca, 0x0a, 0xfa, 0x49, 0xea, 0xff, 0x45, 0x49, 0x8d, 0x21, 0xab, 0xb8, - 0x75, 0x88, 0x51, 0xd3, 0xbc, 0xa8, 0x26, 0xe8, 0xa7, 0xa4, 0x79, 0x51, 0x49, 0xd0, 0x4f, 0x45, - 0xf3, 0xa2, 0x8a, 0xa0, 0x9f, 0x82, 0x9e, 0x88, 0x0a, 0x72, 0xb7, 0xf8, 0x68, 0xc2, 0x8a, 0x62, - 0x98, 0x82, 0x40, 0x04, 0x05, 0x81, 0x08, 0x0a, 0x02, 0x11, 0x14, 0x04, 0x22, 0x28, 0x08, 0x44, - 0x50, 0x10, 0x88, 0xa0, 0x20, 0x10, 0x41, 0x41, 0x20, 0x8a, 0x82, 0x40, 0x24, 0x05, 0x81, 0x20, - 0x05, 0xcd, 0x8b, 0x1b, 0x1e, 0xa0, 0xdf, 0x84, 0x34, 0x2f, 0xae, 0x7c, 0x86, 0x4b, 0x08, 0x44, - 0x92, 0x10, 0x08, 0x92, 0xd0, 0x47, 0xa8, 0x91, 0xe2, 0x24, 0x84, 0x97, 0x87, 0xce, 0x6a, 0x06, - 0x5a, 0x8b, 0xb0, 0xbf, 0xc2, 0x4f, 0x53, 0x6b, 0x11, 0xd6, 0xa8, 0x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 0x8e, 0x3e, 0x5f, 0xa0, 0xcf, - 0x7b, 0xcf, 0x67, 0xa4, 0xc7, 0xe8, 0xf3, 0x21, 0xfa, 0xfc, 0x01, 0x7d, 0x9e, 0xa0, 0xcf, 0xc9, - 0x73, 0x64, 0x8f, 0x3e, 0x1f, 0xa3, 0xdf, 0x9f, 0xa1, 0xef, 0xcf, 0xd1, 0xf7, 0x17, 0xe8, 0xfb, - 0xbd, 0x4f, 0x67, 0xa4, 0x47, 0x9f, 0xce, 0x8c, 0x3c, 0x46, 0xdf, 0xff, 0x09, 0x00, 0x00, 0xff, - 0xff, 0x44, 0x24, 0xbf, 0xc5, 0xb5, 0x34, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto deleted file mode 100644 index 658be4ed..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto +++ /dev/null @@ -1,626 +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) = 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) = true; - -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; -} - diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go deleted file mode 100644 index fe1f5240..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go +++ /dev/null @@ -1,14637 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNodeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNodeFace(t *testing.T) { - popr := math_rand.New(math_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 TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNodeStringer(t *testing.T) { - popr := math_rand.New(math_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 TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/uuid.go deleted file mode 100644 index ae349da4..00000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/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-dash-type/customdash.go b/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go deleted file mode 100644 index a6af4dc5..00000000 --- a/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go +++ /dev/null @@ -1,104 +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 contains custom types for test and example purposes. - These types are used by the test structures generated by gogoprotobuf. -*/ -package custom - -import ( - "bytes" - "encoding/json" -) - -type Bytes []byte - -func (b Bytes) Marshal() ([]byte, error) { - buffer := make([]byte, len(b)) - _, err := b.MarshalTo(buffer) - return buffer, err -} - -func (b Bytes) MarshalTo(data []byte) (n int, err error) { - copy(data, b) - return len(b), nil -} - -func (b *Bytes) Unmarshal(data []byte) error { - if data == nil { - b = nil - return nil - } - pb := make([]byte, len(data)) - copy(pb, data) - *b = pb - return nil -} - -func (b Bytes) MarshalJSON() ([]byte, error) { - data, err := b.Marshal() - if err != nil { - return nil, err - } - return json.Marshal(data) -} - -func (b *Bytes) Size() int { - return len(*b) -} - -func (b *Bytes) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return b.Unmarshal(*v) -} - -func (this Bytes) Equal(that Bytes) bool { - return bytes.Equal(this, that) -} - -func (this Bytes) Compare(that Bytes) int { - return bytes.Compare(this, that) -} - -type randy interface { - Intn(n int) int -} - -func NewPopulatedBytes(r randy) *Bytes { - l := r.Intn(100) - data := Bytes(make([]byte, l)) - for i := 0; i < l; i++ { - data[i] = byte(r.Intn(255)) - } - return &data -} diff --git a/vendor/github.com/gogo/protobuf/test/custom/custom.go b/vendor/github.com/gogo/protobuf/test/custom/custom.go deleted file mode 100644 index 2aa927de..00000000 --- a/vendor/github.com/gogo/protobuf/test/custom/custom.go +++ /dev/null @@ -1,147 +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 contains custom types for test and example purposes. - These types are used by the test structures generated by gogoprotobuf. -*/ -package custom - -import ( - "bytes" - "encoding/json" - "errors" - "unsafe" -) - -type Uint128 [2]uint64 - -func (u Uint128) Marshal() ([]byte, error) { - buffer := make([]byte, 16) - _, err := u.MarshalTo(buffer) - return buffer, err -} - -func (u Uint128) MarshalTo(data []byte) (n int, err error) { - PutLittleEndianUint128(data, 0, u) - return 16, nil -} - -func GetLittleEndianUint64(b []byte, offset int) uint64 { - return *(*uint64)(unsafe.Pointer(&b[offset])) -} - -func PutLittleEndianUint64(b []byte, offset int, v uint64) { - b[offset] = byte(v) - b[offset+1] = byte(v >> 8) - b[offset+2] = byte(v >> 16) - b[offset+3] = byte(v >> 24) - b[offset+4] = byte(v >> 32) - b[offset+5] = byte(v >> 40) - b[offset+6] = byte(v >> 48) - b[offset+7] = byte(v >> 56) -} - -func PutLittleEndianUint128(buffer []byte, offset int, v [2]uint64) { - PutLittleEndianUint64(buffer, offset, v[0]) - PutLittleEndianUint64(buffer, offset+8, v[1]) -} - -func GetLittleEndianUint128(buffer []byte, offset int) (value [2]uint64) { - value[0] = GetLittleEndianUint64(buffer, offset) - value[1] = GetLittleEndianUint64(buffer, offset+8) - return -} - -func (u *Uint128) Unmarshal(data []byte) error { - if data == nil { - u = nil - return nil - } - if len(data) == 0 { - pu := Uint128{} - *u = pu - return nil - } - if len(data) != 16 { - return errors.New("Uint128: invalid length") - } - pu := Uint128(GetLittleEndianUint128(data, 0)) - *u = pu - return nil -} - -func (u Uint128) MarshalJSON() ([]byte, error) { - data, err := u.Marshal() - if err != nil { - return nil, err - } - return json.Marshal(data) -} - -func (u Uint128) Size() int { - return 16 -} - -func (u *Uint128) UnmarshalJSON(data []byte) error { - v := new([]byte) - err := json.Unmarshal(data, v) - if err != nil { - return err - } - return u.Unmarshal(*v) -} - -func (this Uint128) Equal(that Uint128) bool { - return this == that -} - -func (this Uint128) Compare(that Uint128) int { - thisdata, err := this.Marshal() - if err != nil { - panic(err) - } - thatdata, err := that.Marshal() - if err != nil { - panic(err) - } - return bytes.Compare(thisdata, thatdata) -} - -type randy interface { - Intn(n int) int -} - -func NewPopulatedUint128(r randy) *Uint128 { - data := make([]byte, 16) - for i := 0; i < 16; i++ { - data[i] = byte(r.Intn(255)) - } - u := Uint128(GetLittleEndianUint128(data, 0)) - return &u -} diff --git a/vendor/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 d4fe7bd4..00000000 --- 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 ecb3e74e..00000000 --- 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 2e29d2a0..00000000 --- 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 02d0905b..00000000 --- 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 2d74d831..00000000 --- a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* - Package custombytesnonstruct is a generated protocol buffer package. - - It is generated from these files: - proto.proto - - It has these top-level messages: - Object -*/ -package custombytesnonstruct - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=customField1,customtype=CustomType" json:"CustomField1,omitempty"` - CustomField2 []CustomType `protobuf:"bytes,2,rep,name=CustomField2,json=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{ - // 149 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x88, 0x27, 0x19, 0x49, 0x0d, 0x9a, 0x1e, 0x23, 0x09, 0x26, 0x05, 0x66, 0x02, 0x7a, - 0x8c, 0x9c, 0x58, 0x2e, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x42, 0x52, 0xad, - 0x49, 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 343b457a..00000000 --- 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 90efda36..00000000 --- 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 6266b21b..00000000 --- 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 b288f33e..00000000 --- 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/defaultconflict/df.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto deleted file mode 100644 index 9ec763d3..00000000 --- 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 2d251e27..00000000 --- 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 9762d203..00000000 --- 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 6bddd079..00000000 --- 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 522ce9c1..00000000 --- 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 c5664d7a..00000000 --- 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 1f074e33..00000000 --- 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 c61a5e8b..00000000 --- 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 484e9483..00000000 --- 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 80bedac6..00000000 --- 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 cbf0cd4c..00000000 --- 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 94e0e257..00000000 --- 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 9f5bc38c..00000000 --- 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 f03c1dcd..00000000 --- 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 c11bfd62..00000000 --- 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 da89a622..00000000 --- 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 770f107c..00000000 --- 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 a10e1307..00000000 --- a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: empty.proto -// DO NOT EDIT! - -/* -Package empty is a generated protocol buffer package. - -It is generated from these files: - empty.proto - -It has these top-level messages: - TestRequest -*/ -package empty - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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{ - // 91 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x02, 0x29, 0x27, 0x96, 0x0b, 0x8f, 0xe4, 0x18, 0x01, 0x01, 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 eacfded1..00000000 --- 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 19e12c21..00000000 --- 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 b5da3077..00000000 --- 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 b4d20dc0..00000000 --- a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: enumcustomname.proto -// DO NOT EDIT! - -/* - 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{ - // 546 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x94, 0x4d, 0x8f, 0xd2, 0x40, - 0x18, 0xc7, 0x29, 0xba, 0x2c, 0x3b, 0x22, 0xe9, 0x4e, 0x14, 0x47, 0x30, 0x0d, 0xd9, 0x18, 0x63, - 0x30, 0x0b, 0x89, 0x47, 0x3c, 0x4d, 0x29, 0x9a, 0x8d, 0x01, 0x4d, 0x77, 0xf1, 0xed, 0xd2, 0xf4, - 0x65, 0x60, 0x49, 0x68, 0xbb, 0x29, 0xd3, 0x68, 0xbf, 0x81, 0xf1, 0x3b, 0x78, 0x92, 0x83, 0x47, - 0xcf, 0x9e, 0xfd, 0x60, 0xce, 0x4c, 0x17, 0x16, 0xda, 0x52, 0xc8, 0x9e, 0x86, 0x99, 0xfc, 0x9f, - 0xdf, 0x6f, 0xe6, 0xc9, 0x53, 0xc0, 0x03, 0xe2, 0x85, 0xae, 0x1d, 0xce, 0xa9, 0xef, 0x7a, 0xa6, - 0x4b, 0xda, 0x57, 0x81, 0x4f, 0x7d, 0x58, 0xdd, 0x3c, 0xad, 0x9f, 0x4e, 0xa6, 0xf4, 0x32, 0xb4, - 0xda, 0xb6, 0xef, 0x76, 0x26, 0xfe, 0xc4, 0xef, 0x88, 0x98, 0x15, 0x8e, 0xc5, 0x4e, 0x6c, 0xc4, - 0xaf, 0xb8, 0xbc, 0xfe, 0x62, 0x6b, 0x9c, 0x92, 0x39, 0xed, 0xd0, 0x4b, 0xc2, 0xd7, 0x38, 0x7c, - 0xf2, 0xaf, 0x0c, 0x8e, 0xde, 0x79, 0xb3, 0xa8, 0xcf, 0x94, 0x73, 0xd8, 0x01, 0x87, 0x6e, 0x64, - 0x70, 0x3d, 0x92, 0x9a, 0xd2, 0xf3, 0xea, 0xcb, 0x5a, 0x3b, 0x71, 0xc3, 0x81, 0x48, 0xea, 0x25, - 0x57, 0xac, 0x50, 0x03, 0xc7, 0xd7, 0x05, 0x86, 0x43, 0xc6, 0x66, 0x38, 0xa3, 0x86, 0x89, 0x8a, - 0x79, 0xa5, 0x5d, 0x09, 0xeb, 0xd5, 0xb8, 0x5a, 0x8b, 0x2b, 0x70, 0x16, 0xc5, 0x42, 0x77, 0xf2, - 0x29, 0x6a, 0x82, 0xa2, 0xc2, 0x21, 0x80, 0x8c, 0x12, 0x7a, 0x57, 0x01, 0x19, 0x4f, 0xbf, 0x11, - 0x27, 0x7e, 0xc7, 0x5d, 0x81, 0x69, 0xa6, 0x31, 0xa3, 0x55, 0x50, 0xbc, 0x48, 0x76, 0x13, 0x27, - 0xd0, 0x03, 0x4f, 0xd2, 0xbc, 0xb5, 0x67, 0x1e, 0xec, 0x47, 0xee, 0x56, 0x46, 0xc3, 0xf7, 0x7a, - 0xff, 0xf5, 0xd9, 0xa7, 0xbe, 0x66, 0x60, 0x1d, 0x25, 0x3d, 0xab, 0x2e, 0xe4, 0xfb, 0x2c, 0x54, - 0xba, 0x85, 0x4f, 0xdd, 0xea, 0x53, 0xe1, 0x5b, 0xf0, 0x30, 0x22, 0xec, 0x21, 0x9e, 0xcf, 0x46, - 0x22, 0x30, 0xf8, 0x50, 0xc4, 0x2d, 0x3b, 0x14, 0x22, 0xd4, 0x16, 0x63, 0xf2, 0x99, 0x50, 0x1c, - 0x27, 0x2e, 0xd8, 0x56, 0xb4, 0x0a, 0x46, 0xa9, 0x33, 0x68, 0x83, 0x66, 0x26, 0xec, 0xa6, 0x5f, - 0x26, 0x2a, 0xe7, 0x73, 0xbb, 0x45, 0x8c, 0xf5, 0x46, 0x9a, 0xbd, 0x6c, 0x90, 0xb9, 0x5b, 0x62, - 0x59, 0xe8, 0x68, 0x97, 0x44, 0x55, 0x73, 0x24, 0xaa, 0x05, 0x47, 0xe0, 0x31, 0x97, 0x64, 0xb7, - 0x06, 0x08, 0x7a, 0x63, 0x45, 0xcf, 0xe8, 0x0e, 0x6f, 0x6a, 0xfa, 0x18, 0x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ff --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 0230ddba..00000000 --- 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/enumprefix/Makefile b/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile deleted file mode 100644 index fbb7b030..00000000 --- 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 23afafab..00000000 --- a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: enumprefix.proto -// DO NOT EDIT! - -/* - Package enumprefix is a generated protocol buffer package. - - It is generated from these files: - enumprefix.proto - - It has these top-level messages: - MyMessage -*/ -package enumprefix - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import test "github.com/gogo/protobuf/test" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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{ - // 148 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x0d, 0x14, 0x0d, 0x01, 0xd2, 0xae, 0x40, 0x37, 0x39, 0xb1, 0x9c, 0xb8, 0x27, - 0xcf, 0x10, 0xc4, 0x51, 0x02, 0x55, 0x08, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8c, 0xb3, 0x4a, 0xfa, - 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 67f779f9..00000000 --- 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 67b56985..00000000 --- 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 9f52a631..00000000 --- a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go +++ /dev/null @@ -1,586 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: enumstringer.proto -// DO NOT EDIT! - -/* -Package enumstringer is a generated protocol buffer package. - -It is generated from these files: - enumstringer.proto - -It has these top-level messages: - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum -*/ -package enumstringer - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=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,json=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,json=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,json=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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func NewPopulatedNidOptEnum(r randyEnumstringer, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyEnumstringer, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v1 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -func NewPopulatedNidRepEnum(r randyEnumstringer, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v2) - for i := 0; i < v2; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -func NewPopulatedNinRepEnum(r randyEnumstringer, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v3) - for i := 0; i < v3; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) - } - return this -} - -type randyEnumstringer interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEnumstringer(r randyEnumstringer) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringEnumstringer(r randyEnumstringer) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneEnumstringer(r) - } - return string(tmps) -} -func randUnrecognizedEnumstringer(r randyEnumstringer, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldEnumstringer(data, r, fieldNumber, wire) - } - return data -} -func randFieldEnumstringer(data []byte, r randyEnumstringer, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateEnumstringer(data, uint64(v5)) - case 1: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateEnumstringer(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateEnumstringer(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateEnumstringer(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} - -func init() { proto.RegisterFile("enumstringer.proto", fileDescriptorEnumstringer) } - -var fileDescriptorEnumstringer = []byte{ - // 206 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x15, 0x68, 0x88, 0x90, 0x39, - 0x17, 0x9b, 0x5b, 0x66, 0x6a, 0x4e, 0x8a, 0xa1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0xa4, - 0x1e, 0x8a, 0x7d, 0x21, 0x19, 0xa9, 0x21, 0xa9, 0xc5, 0x60, 0xa5, 0x4e, 0x2c, 0x27, 0xee, 0xc9, - 0x33, 0x04, 0xb1, 0xa5, 0x81, 0x95, 0x2b, 0xd9, 0x83, 0x8c, 0xc9, 0x83, 0x19, 0x63, 0x48, 0xb4, - 0x31, 0x70, 0x03, 0x20, 0xee, 0x08, 0x4a, 0x2d, 0xc0, 0x70, 0x07, 0x33, 0xe9, 0xee, 0x80, 0x19, - 0x63, 0x48, 0xb4, 0x31, 0x30, 0x03, 0xb4, 0x94, 0xb8, 0xb8, 0x91, 0x84, 0x85, 0x58, 0xb9, 0x18, - 0x1d, 0x05, 0x18, 0x40, 0x94, 0x93, 0x00, 0x23, 0x88, 0x72, 0x16, 0x60, 0x72, 0x12, 0x79, 0xf0, - 0x50, 0x8e, 0xf1, 0x07, 0x10, 0xaf, 0x78, 0x24, 0xc7, 0xb8, 0x03, 0x88, 0x5f, 0x3c, 0x92, 0x63, - 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xb1, 0xac, 0x38, 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 7147ccfb..00000000 --- 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 aea552af..00000000 --- a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go +++ /dev/null @@ -1,451 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: enumstringer.proto -// DO NOT EDIT! - -/* -Package enumstringer is a generated protocol buffer package. - -It is generated from these files: - enumstringer.proto - -It has these top-level messages: - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum -*/ -package enumstringer - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/string.go b/vendor/github.com/gogo/protobuf/test/enumstringer/string.go deleted file mode 100644 index 3d9ef700..00000000 --- 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/Makefile b/vendor/github.com/gogo/protobuf/test/example/Makefile deleted file mode 100644 index e45d8feb..00000000 --- a/vendor/github.com/gogo/protobuf/test/example/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=. example.proto) diff --git a/vendor/github.com/gogo/protobuf/test/example/example.pb.go b/vendor/github.com/gogo/protobuf/test/example/example.pb.go deleted file mode 100644 index 1bb3cbf8..00000000 --- a/vendor/github.com/gogo/protobuf/test/example/example.pb.go +++ /dev/null @@ -1,2531 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: example.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - example.proto - - It has these top-level messages: - A - B - C - U - E - R - CastType -*/ -package test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 { - Description string `protobuf:"bytes,1,opt,name=Description,json=description" json:"Description"` - Number int64 `protobuf:"varint,2,opt,name=Number,json=number" json:"Number"` - Id github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,opt,name=Id,json=id,customtype=github.com/gogo/protobuf/test.Uuid" json:"Id"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *A) Reset() { *m = A{} } -func (*A) ProtoMessage() {} -func (*A) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{0} } - -type B struct { - A `protobuf:"bytes,1,opt,name=A,json=a,embedded=A" json:"A"` - G []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=G,json=g,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"G"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *B) Reset() { *m = B{} } -func (*B) ProtoMessage() {} -func (*B) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{1} } - -type C struct { - MySize *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *C) Reset() { *m = C{} } -func (*C) ProtoMessage() {} -func (*C) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{2} } - -func (m *C) GetMySize() int64 { - if m != nil && m.MySize != nil { - return *m.MySize - } - return 0 -} - -type U struct { - A *A `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` - B *B `protobuf:"bytes,2,opt,name=B,json=b" json:"B,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *U) Reset() { *m = U{} } -func (*U) ProtoMessage() {} -func (*U) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{3} } - -func (m *U) GetA() *A { - if m != nil { - return m.A - } - return nil -} - -func (m *U) GetB() *B { - if m != nil { - return m.B - } - return nil -} - -type E struct { - XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *E) Reset() { *m = E{} } -func (*E) ProtoMessage() {} -func (*E) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{4} } - -var extRange_E = []proto.ExtensionRange{ - {1, 536870911}, -} - -func (*E) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_E -} -func (m *E) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type R struct { - Recognized *uint32 `protobuf:"varint,1,opt,name=recognized" json:"recognized,omitempty"` -} - -func (m *R) Reset() { *m = R{} } -func (*R) ProtoMessage() {} -func (*R) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{5} } - -func (m *R) GetRecognized() uint32 { - if m != nil && m.Recognized != nil { - return *m.Recognized - } - return 0 -} - -type CastType struct { - Int32 *int32 `protobuf:"varint,1,opt,name=Int32,json=int32,casttype=int32" json:"Int32,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CastType) Reset() { *m = CastType{} } -func (*CastType) ProtoMessage() {} -func (*CastType) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{6} } - -func (m *CastType) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "test.A") - proto.RegisterType((*B)(nil), "test.B") - proto.RegisterType((*C)(nil), "test.C") - proto.RegisterType((*U)(nil), "test.U") - proto.RegisterType((*E)(nil), "test.E") - proto.RegisterType((*R)(nil), "test.R") - proto.RegisterType((*CastType)(nil), "test.CastType") -} -func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ExampleDescription() -} -func ExampleDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3537 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x69, 0x6c, 0x1b, 0xd7, - 0xb5, 0xf6, 0x88, 0xa4, 0x44, 0x1e, 0x52, 0x14, 0x35, 0x92, 0x6d, 0x5a, 0x71, 0xac, 0x98, 0xce, - 0xe2, 0x38, 0x89, 0x9c, 0x38, 0x8b, 0x1d, 0xe6, 0xbd, 0x04, 0xa4, 0x44, 0x2b, 0x34, 0xb4, 0xbd, - 0x91, 0x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 0x41, 0x3a, 0xe8, 0x1e, 0x79, 0x12, 0x62, 0x8e, 0xab, 0xb5, 0x5c, - 0x1a, 0x85, 0x31, 0x85, 0x3d, 0xc8, 0x19, 0x88, 0x60, 0x92, 0xa1, 0x59, 0x2e, 0xa6, 0x90, 0xaf, - 0x53, 0x27, 0x61, 0x34, 0xf0, 0xfa, 0x41, 0x81, 0xb9, 0x27, 0x86, 0x61, 0xb2, 0x5f, 0xcc, 0xf5, - 0x0d, 0x7f, 0xdc, 0x3e, 0x18, 0x01, 0xeb, 0x7a, 0x0b, 0xe3, 0x8e, 0x30, 0xf0, 0x27, 0x8c, 0xa8, - 0x98, 0xa9, 0xad, 0xeb, 0x26, 0x46, 0x93, 0x74, 0x34, 0x7d, 0xe2, 0x86, 0x81, 0xa2, 0x7a, 0x66, - 0x81, 0x40, 0x14, 0x86, 0x94, 0xef, 0x86, 0x28, 0x4f, 0x71, 0x84, 0xe1, 0xd8, 0x60, 0x0c, 0x24, - 0x16, 0x15, 0x8a, 0x93, 0xaf, 0x80, 0x04, 0xf9, 0x9f, 0xf9, 0x76, 0x98, 0xda, 0x1c, 0x27, 0x02, - 0xe2, 0x57, 0x79, 0x0a, 0xe2, 0x34, 0xcc, 0x6a, 0xba, 0x28, 0x0d, 0xde, 0x33, 0x59, 0x98, 0x9a, - 0xbe, 0xa1, 0xb5, 0x4d, 0x57, 0xbd, 0xa0, 0x99, 0x6d, 0x9d, 0x06, 0x0c, 0x2e, 0x0c, 0x17, 0xde, - 0x47, 0x64, 0xf2, 0x34, 0x24, 0x59, 0x54, 0x1a, 0x88, 0xb9, 0x48, 0xb3, 0x4f, 0x4c, 0x61, 0x81, - 0x5a, 0x26, 0x12, 0xf2, 0xfa, 0x73, 0x0e, 0xee, 0x05, 0xbe, 0xb4, 0xf4, 0x15, 0x44, 0x40, 0x5f, - 0x7f, 0xb2, 0x3b, 0xf1, 0x5d, 0xd9, 0x7f, 0x7a, 0xdd, 0xb1, 0x98, 0xfb, 0xde, 0x10, 0x44, 0xe9, - 0x7e, 0x1b, 0x83, 0xe4, 0xda, 0x03, 0x2b, 0x25, 0x75, 0x6e, 0xb9, 0x52, 0x5c, 0x28, 0x65, 0x24, - 0x39, 0x0d, 0x40, 0x05, 0xa7, 0x17, 0x96, 0x0b, 0x6b, 0x99, 0x21, 0xef, 0xb9, 0xbc, 0xb4, 0x76, - 0xc7, 0x6d, 0x99, 0x88, 0x07, 0xa8, 0x30, 0x41, 0xd4, 0xaf, 0x70, 0xeb, 0x89, 0x4c, 0x0c, 0x23, - 0x21, 0xc5, 0x08, 0xca, 0x67, 0x4b, 0x73, 0xa8, 0x31, 0x1c, 0x94, 0xa0, 0xce, 0x88, 0x3c, 0x0a, - 0x09, 0x2a, 0x29, 0x2e, 0x2f, 0x2f, 0x64, 0xe2, 0x1e, 0xe7, 0xea, 0x9a, 0x52, 0x5e, 0x9a, 0xcf, - 0x24, 0x3c, 0xce, 0x79, 0x65, 0xb9, 0xb2, 0x92, 0x01, 0x8f, 0x61, 0xb1, 0xb4, 0xba, 0x5a, 0x98, - 0x2f, 0x65, 0x92, 0x9e, 0x46, 0xf1, 0x81, 0xb5, 0xd2, 0x6a, 0x26, 0x15, 0x30, 0x0b, 0x5f, 0x31, - 0xea, 0xbd, 0xa2, 0xb4, 0x54, 0x59, 0xcc, 0xa4, 0xe5, 0x71, 0x18, 0x65, 0xaf, 0x10, 0x46, 0x8c, - 0x75, 0x89, 0xd0, 0xd2, 0x4c, 0xc7, 0x10, 0xc6, 0x32, 0x1e, 0x10, 0xa0, 0x86, 0x9c, 0x9b, 0x85, - 0x18, 0x8d, 0x2e, 0x8c, 0xe2, 0xf4, 0x42, 0xa1, 0x58, 0x5a, 0x50, 0x97, 0x57, 0xd6, 0xca, 0xcb, - 0x4b, 0x85, 0x05, 0xf4, 0x9d, 0x27, 0x53, 0x4a, 0xff, 0x56, 0x29, 0x2b, 0xa5, 0x39, 0xf4, 0x9f, - 0x4f, 0xb6, 0x52, 0x2a, 0xac, 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x0d, 0x3f, 0x6f, 0xe0, 0xe7, 0x4d, 0xfc, - 0xbc, 0x85, 0x9f, 0xbf, 0x07, 0x00, 0x00, 0xff, 0xff, 0x03, 0xe3, 0x26, 0x61, 0xac, 0x2c, 0x00, - 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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.Description != that1.Description { - return fmt.Errorf("Description this(%v) Not Equal that(%v)", this.Description, that1.Description) - } - if this.Number != that1.Number { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Description != that1.Description { - return false - } - if this.Number != that1.Number { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *B) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *B") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *B but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *B but is not nil && this == nil") - } - if !this.A.Equal(&that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if len(this.G) != len(that1.G) { - return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(&that1.A) { - return false - } - if len(this.G) != len(that1.G) { - return false - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *C) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *C") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *C but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *C but is not nil && this == nil") - } - if this.MySize != nil && that1.MySize != nil { - if *this.MySize != *that1.MySize { - return fmt.Errorf("MySize this(%v) Not Equal that(%v)", *this.MySize, *that1.MySize) - } - } else if this.MySize != nil { - return fmt.Errorf("this.MySize == nil && that.MySize != nil") - } else if that1.MySize != nil { - return fmt.Errorf("MySize this(%v) Not Equal that(%v)", this.MySize, that1.MySize) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *C) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MySize != nil && that1.MySize != nil { - if *this.MySize != *that1.MySize { - return false - } - } else if this.MySize != nil { - return false - } else if that1.MySize != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *U) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *U") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *U but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *U but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if !this.B.Equal(that1.B) { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *U) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if !this.B.Equal(that1.B) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *E) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*E) - if !ok { - that2, ok := that.(E) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *E") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *E but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *E but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *E) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*E) - if !ok { - that2, ok := that.(E) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *R) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*R) - if !ok { - that2, ok := that.(R) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *R") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *R but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *R but is not nil && this == nil") - } - if this.Recognized != nil && that1.Recognized != nil { - if *this.Recognized != *that1.Recognized { - return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", *this.Recognized, *that1.Recognized) - } - } else if this.Recognized != nil { - return fmt.Errorf("this.Recognized == nil && that.Recognized != nil") - } else if that1.Recognized != nil { - return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", this.Recognized, that1.Recognized) - } - return nil -} -func (this *R) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*R) - if !ok { - that2, ok := that.(R) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Recognized != nil && that1.Recognized != nil { - if *this.Recognized != *that1.Recognized { - return false - } - } else if this.Recognized != nil { - return false - } else if that1.Recognized != nil { - return false - } - return true -} -func (this *CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CastType) - if !ok { - that2, ok := that.(CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CastType but is not nil && this == nil") - } - if this.Int32 != nil && that1.Int32 != nil { - if *this.Int32 != *that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", *this.Int32, *that1.Int32) - } - } else if this.Int32 != nil { - return fmt.Errorf("this.Int32 == nil && that.Int32 != nil") - } else if that1.Int32 != nil { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CastType) - if !ok { - that2, ok := that.(CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int32 != nil && that1.Int32 != nil { - if *this.Int32 != *that1.Int32 { - return false - } - } else if this.Int32 != nil { - return false - } else if that1.Int32 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type AFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDescription() string - GetNumber() int64 - GetId() github_com_gogo_protobuf_test.Uuid -} - -func (this *A) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAFromFace(this) -} - -func (this *A) GetDescription() string { - return this.Description -} - -func (this *A) GetNumber() int64 { - return this.Number -} - -func (this *A) GetId() github_com_gogo_protobuf_test.Uuid { - return this.Id -} - -func NewAFromFace(that AFace) *A { - this := &A{} - this.Description = that.GetDescription() - this.Number = that.GetNumber() - this.Id = that.GetId() - return this -} - -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.A{") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *B) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.B{") - s = append(s, "A: "+strings.Replace(this.A.GoString(), `&`, ``, 1)+",\n") - if this.G != nil { - s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *C) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.C{") - if this.MySize != nil { - s = append(s, "MySize: "+valueToGoStringExample(this.MySize, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *U) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.U{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *E) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&test.E{") - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *R) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.R{") - if this.Recognized != nil { - s = append(s, "Recognized: "+valueToGoStringExample(this.Recognized, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CastType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CastType{") - if this.Int32 != nil { - s = append(s, "Int32: "+valueToGoStringExample(this.Int32, "int32")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringExample(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringExample(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(len(m.Description))) - i += copy(data[i:], m.Description) - data[i] = 0x10 - i++ - i = encodeVarintExample(data, i, uint64(m.Number)) - data[i] = 0x1a - i++ - i = encodeVarintExample(data, i, uint64(m.Id.Size())) - n1, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(m.A.Size())) - n2, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.G) > 0 { - for _, msg := range m.G { - data[i] = 0x12 - i++ - i = encodeVarintExample(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *C) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *C) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MySize != nil { - data[i] = 0x8 - i++ - i = encodeVarintExample(data, i, uint64(*m.MySize)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *U) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *U) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.A != nil { - data[i] = 0xa - i++ - i = encodeVarintExample(data, i, uint64(m.A.Size())) - n3, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.B != nil { - data[i] = 0x12 - i++ - i = encodeVarintExample(data, i, uint64(m.B.Size())) - n4, err := m.B.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *E) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *E) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_extensions != nil { - i += copy(data[i:], m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *R) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *R) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Recognized != nil { - data[i] = 0x8 - i++ - i = encodeVarintExample(data, i, uint64(*m.Recognized)) - } - return i, nil -} - -func (m *CastType) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CastType) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Int32 != nil { - data[i] = 0x8 - i++ - i = encodeVarintExample(data, i, uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Example(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Example(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintExample(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedA(r randyExample, easy bool) *A { - this := &A{} - this.Description = randStringExample(r) - this.Number = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Number *= -1 - } - v1 := github_com_gogo_protobuf_test.NewPopulatedUuid(r) - this.Id = *v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 4) - } - return this -} - -func NewPopulatedB(r randyExample, easy bool) *B { - this := &B{} - v2 := NewPopulatedA(r, easy) - this.A = *v2 - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) - for i := 0; i < v3; i++ { - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.G[i] = *v4 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 3) - } - return this -} - -func NewPopulatedC(r randyExample, easy bool) *C { - this := &C{} - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.MySize = &v5 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 2) - } - return this -} - -func NewPopulatedU(r randyExample, easy bool) *U { - this := &U{} - fieldNum := r.Intn(2) - switch fieldNum { - case 0: - this.A = NewPopulatedA(r, easy) - case 1: - this.B = NewPopulatedB(r, easy) - } - return this -} - -func NewPopulatedE(r randyExample, easy bool) *E { - this := &E{} - if !easy && r.Intn(10) != 0 { - l := r.Intn(5) - for i := 0; i < l; i++ { - fieldNumber := r.Intn(536870911) + 1 - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - data := randFieldExample(nil, r, fieldNumber, wire) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - return this -} - -func NewPopulatedR(r randyExample, easy bool) *R { - this := &R{} - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Recognized = &v6 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedCastType(r randyExample, easy bool) *CastType { - this := &CastType{} - if r.Intn(10) != 0 { - v7 := int32(r.Int63()) - if r.Intn(2) == 0 { - v7 *= -1 - } - this.Int32 = &v7 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 2) - } - return this -} - -type randyExample interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneExample(r randyExample) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringExample(r randyExample) string { - v8 := r.Intn(100) - tmps := make([]rune, v8) - for i := 0; i < v8; i++ { - tmps[i] = randUTF8RuneExample(r) - } - return string(tmps) -} -func randUnrecognizedExample(r randyExample, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldExample(data, r, fieldNumber, wire) - } - return data -} -func randFieldExample(data []byte, r randyExample, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateExample(data, uint64(key)) - v9 := r.Int63() - if r.Intn(2) == 0 { - v9 *= -1 - } - data = encodeVarintPopulateExample(data, uint64(v9)) - case 1: - data = encodeVarintPopulateExample(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateExample(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateExample(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateExample(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateExample(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *A) Size() (n int) { - var l int - _ = l - l = len(m.Description) - n += 1 + l + sovExample(uint64(l)) - n += 1 + sovExample(uint64(m.Number)) - l = m.Id.Size() - n += 1 + l + sovExample(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *B) Size() (n int) { - var l int - _ = l - l = m.A.Size() - n += 1 + l + sovExample(uint64(l)) - if len(m.G) > 0 { - for _, e := range m.G { - l = e.Size() - n += 1 + l + sovExample(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *C) Size() (n int) { - var l int - _ = l - if m.MySize != nil { - n += 1 + sovExample(uint64(*m.MySize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *U) Size() (n int) { - var l int - _ = l - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovExample(uint64(l)) - } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovExample(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *E) Size() (n int) { - var l int - _ = l - if m.XXX_extensions != nil { - n += len(m.XXX_extensions) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *R) Size() (n int) { - var l int - _ = l - if m.Recognized != nil { - n += 1 + sovExample(uint64(*m.Recognized)) - } - return n -} - -func (m *CastType) Size() (n int) { - var l int - _ = l - if m.Int32 != nil { - n += 1 + sovExample(uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovExample(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozExample(x uint64) (n int) { - return sovExample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Number:` + fmt.Sprintf("%v", this.Number) + `,`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *B) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&B{`, - `A:` + strings.Replace(strings.Replace(this.A.String(), "A", "A", 1), `&`, ``, 1) + `,`, - `G:` + fmt.Sprintf("%v", this.G) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *C) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&C{`, - `MySize:` + valueToStringExample(this.MySize) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *U) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&U{`, - `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, - `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *E) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&E{`, - `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *R) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&R{`, - `Recognized:` + valueToStringExample(this.Recognized) + `,`, - `}`, - }, "") - return s -} -func (this *CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CastType{`, - `Int32:` + valueToStringExample(this.Int32) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringExample(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (this *U) GetValue() interface{} { - if this.A != nil { - return this.A - } - if this.B != nil { - return this.B - } - return nil -} - -func (this *U) SetValue(value interface{}) bool { - switch vt := value.(type) { - case *A: - this.A = vt - case *B: - this.B = vt - default: - return false - } - return true -} -func (m *A) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Number |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field G", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.G = append(m.G, v) - if err := m.G[len(m.G)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *C) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: C: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MySize", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MySize = &v - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *U) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: U: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &A{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.B == nil { - m.B = &B{} - } - if err := m.B.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *E) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: E: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: E: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - if (fieldNum >= 1) && (fieldNum < 536870912) { - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - iNdEx -= sizeOfWire - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) - iNdEx += skippy - } else { - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *R) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: R: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: R: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Recognized", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Recognized = &v - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CastType) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CastType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CastType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipExample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipExample(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthExample - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipExample(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthExample = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowExample = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("example.proto", fileDescriptorExample) } - -var fileDescriptorExample = []byte{ - // 415 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x6b, 0xd4, 0x40, - 0x18, 0x86, 0xf7, 0xdb, 0x4d, 0xd7, 0x74, 0xd6, 0x82, 0x8c, 0x08, 0x8b, 0x48, 0x46, 0x22, 0x88, - 0xd6, 0x9a, 0xc5, 0x55, 0x50, 0x72, 0xeb, 0x54, 0x91, 0x1e, 0xf4, 0x30, 0xba, 0x3f, 0x60, 0x93, - 0x8c, 0x71, 0xc0, 0x64, 0x42, 0x32, 0x01, 0xeb, 0xa9, 0x47, 0x6f, 0xfe, 0x85, 0x7a, 0xeb, 0x4f, - 0xf0, 0xe8, 0x71, 0x8f, 0x7b, 0x14, 0x0f, 0xa1, 0xed, 0x2f, 0xe8, 0x51, 0x3c, 0xf9, 0xcd, 0xec, - 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0x08, 0xc8, 0x63, 0xef, 0xdc, 0xf6, 0xdd, 0x22, 0xb0, 0x47, 0x03, 0xe2, - 0x35, 0xea, 0x83, 0x74, 0x95, 0x03, 0x4e, 0xce, 0x3a, 0x36, 0x7c, 0x71, 0xf0, 0x0a, 0x1d, 0xe1, - 0xfc, 0xf0, 0x31, 0x81, 0x19, 0xbd, 0xf6, 0x2f, 0x94, 0x45, 0x41, 0x9b, 0xbb, 0xfb, 0xf8, 0x6d, - 0x73, 0x01, 0x49, 0xec, 0x2d, 0x6c, 0xfa, 0x55, 0x02, 0xcf, 0xb6, 0x7d, 0x1f, 0xae, 0x1c, 0xe2, - 0xd3, 0x47, 0xf3, 0x33, 0xeb, 0x85, 0x77, 0x09, 0x08, 0xac, 0x24, 0xb5, 0x4c, 0x75, 0x5e, 0x62, - 0x7e, 0xe6, 0x62, 0xb7, 0xc4, 0x5f, 0x4e, 0xec, 0x2d, 0xed, 0xea, 0x3d, 0xe2, 0xef, 0xcd, 0x1b, - 0xf3, 0xfa, 0xa0, 0x92, 0x78, 0x29, 0x1b, 0xfb, 0xa5, 0x79, 0x38, 0x5d, 0x53, 0x6e, 0xfe, 0xec, - 0xd8, 0x86, 0xb2, 0x86, 0x58, 0xbd, 0xf8, 0xce, 0xb7, 0xd3, 0xa0, 0x77, 0x72, 0x1a, 0xc0, 0x39, - 0xea, 0x07, 0xea, 0xf0, 0x2c, 0x80, 0x63, 0xd4, 0x17, 0xd4, 0x57, 0xd4, 0x02, 0xb5, 0x44, 0x9d, - 0xa0, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x54, 0x6c, 0x61, 0x3f, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/example/example.proto b/vendor/github.com/gogo/protobuf/test/example/example.proto deleted file mode 100644 index e90aa48d..00000000 --- a/vendor/github.com/gogo/protobuf/test/example/example.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 test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.gostring_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; - -message A { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable) = false]; -} - -message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} - -message C { - optional int64 size = 1 [(gogoproto.customname) = "MySize"]; -} - -message U { - option (gogoproto.onlyone) = true; - optional A A = 1; - optional B B = 2; -} - -message E { - option (gogoproto.goproto_extensions_map) = false; - extensions 1 to max; -} - -message R { - option (gogoproto.goproto_unrecognized) = false; - optional uint32 recognized = 1; -} - -message CastType { - optional int64 Int32 = 1 [(gogoproto.casttype)="int32"]; -} diff --git a/vendor/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 34f4c436..00000000 --- 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 32d07332..00000000 --- a/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go +++ /dev/null @@ -1,1672 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: example.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - example.proto - -It has these top-level messages: - A - B - C - U - E - R - CastType -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*A, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedA(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &A{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkBProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*B, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedB(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkBProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedB(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &B{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*C, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedC(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedC(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &C{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*U, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedU(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedU(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &U{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestEProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkEProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*E, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedE(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkEProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedE(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &E{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkRProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*R, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedR(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedR(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &R{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCastTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CastType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCastType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCastTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CastType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCastTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &E{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &E{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &R{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &R{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCastTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestExampleDescription(t *testing.T) { - ExampleDescription() -} -func TestAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestEVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedE(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &E{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedR(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &R{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCastTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CastType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestEGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedE(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestRGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedR(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCastTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkASize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*A, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedA(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestBSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkBSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*B, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedB(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*C, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedC(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*U, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedU(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestESize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkESize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*E, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedE(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*R, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedR(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCastTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCastTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CastType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCastType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestEStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedE(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestRStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedR(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCastTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, true) - v := p.GetValue() - msg := &U{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/extension_test.go b/vendor/github.com/gogo/protobuf/test/extension_test.go deleted file mode 100644 index 54046d4d..00000000 --- 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 2833183c..00000000 --- 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 aeb699e2..00000000 --- a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go +++ /dev/null @@ -1,573 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: file.dot.proto -// DO NOT EDIT! - -/* -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return FileDotDescription() -} -func FileDotDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3329 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5d, 0x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, 0x94, 0xa9, 0x58, 0x65, 0x88, 0xd9, 0x37, 0x63, 0x30, 0x35, 0xa0, 0x57, 0x51, - 0x20, 0x66, 0xe9, 0x4d, 0xca, 0x18, 0x39, 0x92, 0x54, 0xd9, 0x6f, 0x25, 0x07, 0x63, 0x2d, 0xdd, - 0x38, 0xab, 0xd7, 0x49, 0x6e, 0x84, 0x89, 0x65, 0x53, 0x39, 0x08, 0x50, 0x23, 0x2d, 0x62, 0xd5, - 0x88, 0x65, 0x6c, 0xe7, 0xa2, 0x38, 0x8a, 0xa4, 0xea, 0x93, 0x28, 0x37, 0xc0, 0x64, 0xab, 0xb3, - 0x61, 0x36, 0x0c, 0xcd, 0xa7, 0x06, 0xa8, 0x16, 0x57, 0xb3, 0xbc, 0x63, 0xa9, 0xab, 0x7c, 0x1d, - 0x4c, 0xdc, 0x4f, 0xf4, 0xb3, 0x7e, 0xd5, 0x14, 0x53, 0xcd, 0x50, 0xb1, 0x4f, 0x71, 0x11, 0xd2, - 0x4d, 0xe2, 0x38, 0x38, 0x00, 0xcd, 0xdd, 0x6e, 0x91, 0x5c, 0x8c, 0xcd, 0xfe, 0xca, 0xbe, 0xd9, - 0xf7, 0xce, 0x3c, 0x25, 0x50, 0xeb, 0x08, 0x52, 0xe6, 0x21, 0x49, 0xac, 0x4e, 0x93, 0x33, 0xc4, - 0x77, 0xb0, 0x5f, 0x01, 0x35, 0x7a, 0x59, 0x12, 0x14, 0x26, 0x28, 0xc6, 0x1c, 0xd2, 0x3e, 0xd7, - 0x30, 0x48, 0x6e, 0x94, 0x11, 0x5c, 0xd7, 0x47, 0x50, 0xe1, 0xfd, 0xbd, 0x1c, 0x12, 0x87, 0x53, - 0x49, 0x92, 0xf3, 0x2e, 0xb1, 0x9c, 0x86, 0x6d, 0xe5, 0xc6, 0x18, 0xc9, 0x35, 0x03, 0x56, 0x91, - 0x98, 0xb5, 0x5e, 0x8a, 0x2e, 0x4e, 0xb9, 0x05, 0xc6, 0xec, 0x96, 0x8b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xe8, 0xc1, 0x1d, 0x66, 0xda, 0x97, 0xb2, 0x6e, 0x82, 0xac, - 0x61, 0x36, 0x88, 0xe5, 0x6a, 0x8e, 0xdb, 0x26, 0x7a, 0xb3, 0x61, 0xd5, 0x59, 0x1c, 0x4d, 0xe4, - 0xe3, 0x9b, 0xba, 0xe9, 0x10, 0x75, 0x82, 0x77, 0x57, 0x64, 0x2f, 0x45, 0xb0, 0x64, 0xd1, 0xf6, - 0x21, 0x46, 0x03, 0x08, 0xde, 0xed, 0x21, 0x66, 0xff, 0x30, 0x06, 0x29, 0x5f, 0x75, 0xa6, 0x1c, - 0x86, 0xf4, 0x19, 0xfd, 0x9c, 0xae, 0xc9, 0x8a, 0x9b, 0x5b, 0x22, 0x45, 0x65, 0x65, 0x51, 0x75, - 0xdf, 0x04, 0xd3, 0x4c, 0x05, 0xe7, 0x88, 0x2f, 0x32, 0x4c, 0xdd, 0x71, 0x98, 0xd1, 0x12, 0x4c, - 0x55, 0xa1, 0x7d, 0x25, 0xda, 0xb5, 0x28, 0x7b, 0x94, 0x9b, 0x61, 0x8a, 0x21, 0x9a, 0x18, 0x78, - 0x1b, 0x2d, 0x93, 0x68, 0xf4, 0x0c, 0xe0, 0xb0, 0x78, 0xea, 0x8d, 0x6c, 0x92, 0x6a, 0xac, 0x0a, - 0x05, 0x3a, 0x22, 0x47, 0x59, 0x86, 0x2b, 0x18, 0xac, 0x4e, 0x2c, 0xd2, 0xd6, 0x5d, 0xa2, 0x91, - 0x4f, 0x75, 0x50, 0x57, 0xd3, 0xad, 0x9a, 0xb6, 0xa5, 0x3b, 0x5b, 0xb9, 0x69, 0x3f, 0xc1, 0x01, - 0xaa, 0xbb, 0x2c, 0x54, 0x0b, 0x4c, 0x73, 0xde, 0xaa, 0xdd, 0x85, 0x7a, 0x4a, 0x1e, 0xf6, 0x31, - 0x22, 0x34, 0x0a, 0xce, 0x59, 0x33, 0xb6, 0x88, 0x71, 0x56, 0xeb, 0xb8, 0x9b, 0x27, 0x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, 0x41, 0x2c, 0x63, 0x6b, 0x38, 0x86, - 0xe7, 0xa4, 0x29, 0x25, 0x86, 0x52, 0x60, 0xe4, 0x69, 0xea, 0x6d, 0x3c, 0x5c, 0x9b, 0x43, 0x2d, - 0xc7, 0xf7, 0x04, 0x47, 0xda, 0x03, 0x09, 0x8b, 0x74, 0xac, 0xbd, 0xd0, 0x3c, 0x2f, 0x2d, 0xe2, - 0x83, 0x89, 0xad, 0x87, 0x27, 0x53, 0x5a, 0x49, 0xec, 0x85, 0xed, 0xfb, 0x72, 0xeb, 0x71, 0xec, - 0xaa, 0x9f, 0x11, 0x57, 0xda, 0xc1, 0x23, 0xf8, 0x30, 0x34, 0x3f, 0x90, 0x2b, 0xcd, 0x00, 0x14, - 0x7c, 0x2f, 0x1c, 0x18, 0x18, 0xea, 0x87, 0x20, 0x7b, 0x41, 0x90, 0xed, 0x1b, 0x10, 0xee, 0x45, - 0x48, 0xd8, 0x2b, 0xe5, 0x0f, 0x65, 0x48, 0x20, 0x3d, 0x5c, 0x65, 0x5a, 0xc6, 0x3a, 0xfa, 0xe6, - 0xde, 0xac, 0xf6, 0x23, 0x69, 0x35, 0x8e, 0x0d, 0x58, 0x6d, 0x1d, 0xf6, 0x09, 0xc6, 0xbd, 0xad, - 0xeb, 0x8b, 0x32, 0xb0, 0x72, 0x74, 0x35, 0xb8, 0xba, 0x9f, 0x84, 0x19, 0xcf, 0x9c, 0xb2, 0x02, - 0x73, 0x34, 0x7a, 0x31, 0x10, 0xce, 0xfc, 0x92, 0x60, 0x96, 0x11, 0xdf, 0x2b, 0xe1, 0x9c, 0x55, - 0xbd, 0x45, 0xc9, 0x4f, 0x43, 0x4e, 0x92, 0x77, 0x2c, 0x2c, 0xf0, 0xed, 0xba, 0x85, 0xcb, 0x58, - 0x1b, 0x82, 0xfa, 0xc7, 0x3d, 0x4b, 0x55, 0xf5, 0xc1, 0x29, 0x73, 0x11, 0xb2, 0x5e, 0xbd, 0xa1, - 0x35, 0x9a, 0x2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0x7f, 0xbf, 0x85, 0x7f, 0xdf, 0xc1, 0xbf, 0xef, 0xe2, 0xdf, 0x07, 0xff, - 0x7c, 0xf0, 0x92, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x43, 0x74, 0x16, 0x1a, 0x2b, 0x00, - 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*M) - if !ok { - that2, ok := that.(M) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if 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() github_com_gogo_protobuf_proto.Message - GetA() *string -} - -func (this *M) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *M) TestProto() github_com_gogo_protobuf_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 extensionToGoStringFileDot(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedM(r randyFileDot, easy bool) *M { - this := &M{} - if r.Intn(10) != 0 { - v1 := 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{ - // 158 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcb, 0xcc, 0x49, - 0xd5, 0x4b, 0xc9, 0x2f, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x06, 0xf1, 0x81, 0xdc, - 0xbc, 0xc4, 0xdc, 0x54, 0x29, 0xdd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, - 0xfd, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0x9a, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, - 0x20, 0x7a, 0x95, 0x04, 0xb9, 0x18, 0x7d, 0x85, 0x78, 0xb8, 0x18, 0x13, 0x25, 0x18, 0x15, 0x18, - 0x35, 0x38, 0x83, 0x18, 0x13, 0x9d, 0x7c, 0x4e, 0x3c, 0x94, 0x63, 0xb8, 0x00, 0xc4, 0x37, 0x80, - 0xf8, 0xc1, 0x43, 0x39, 0xc6, 0x17, 0x40, 0xfc, 0x01, 0x88, 0x7f, 0x00, 0x71, 0xc3, 0x23, 0x39, - 0xc6, 0x15, 0x40, 0xbc, 0x01, 0x88, 0x77, 0x00, 0xf1, 0x01, 0x20, 0x3e, 0xf1, 0x08, 0xa8, 0x1e, - 0x88, 0x1f, 0x00, 0xd9, 0x2f, 0x80, 0xf4, 0x07, 0x20, 0xfd, 0x03, 0x48, 0x37, 0x3c, 0x96, 0x63, - 0x00, 0x04, 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 e1a047c4..00000000 --- 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 5668122f..00000000 --- a/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: file.dot.proto -// DO NOT EDIT! - -/* -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 math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &M{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &M{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFileDotDescription(t *testing.T) { - FileDotDescription() -} -func TestMVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &M{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMSize(b *testing.B) { - popr := math_rand.New(math_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 := math_rand.New(math_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 aa82b00f..00000000 --- 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 66c7e024..00000000 --- a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go +++ /dev/null @@ -1,2937 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: fuzz.proto -// DO NOT EDIT! - -/* - Package fuzztests is a generated protocol buffer package. - - It is generated from these files: - fuzz.proto - - It has these top-level messages: - Nil - NinRepPackedNative - NinOptNative - NinOptStruct -*/ -package fuzztests - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NinOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 extensionToGoStringFuzz(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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)) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if len(m.Field2) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field2)*4)) - for _, num := range m.Field2 { - f2 := math.Float32bits(float32(num)) - data[i] = uint8(f2) - i++ - data[i] = uint8(f2 >> 8) - i++ - data[i] = uint8(f2 >> 16) - i++ - data[i] = uint8(f2 >> 24) - i++ - } - } - if len(m.Field3) > 0 { - data4 := make([]byte, len(m.Field3)*10) - var j3 int - for _, num1 := range m.Field3 { - num := uint64(num1) - for num >= 1<<7 { - data4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - data4[j3] = uint8(num) - j3++ - } - data[i] = 0x1a - i++ - i = encodeVarintFuzz(data, i, uint64(j3)) - i += copy(data[i:], data4[:j3]) - } - if len(m.Field4) > 0 { - data6 := make([]byte, len(m.Field4)*10) - var j5 int - for _, num1 := range m.Field4 { - num := uint64(num1) - for num >= 1<<7 { - data6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - data6[j5] = uint8(num) - j5++ - } - data[i] = 0x22 - i++ - i = encodeVarintFuzz(data, i, uint64(j5)) - i += copy(data[i:], data6[:j5]) - } - if len(m.Field5) > 0 { - data8 := make([]byte, len(m.Field5)*10) - var j7 int - for _, num := range m.Field5 { - for num >= 1<<7 { - data8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - data8[j7] = uint8(num) - j7++ - } - data[i] = 0x2a - i++ - i = encodeVarintFuzz(data, i, uint64(j7)) - i += copy(data[i:], data8[:j7]) - } - if len(m.Field6) > 0 { - data10 := make([]byte, len(m.Field6)*10) - var j9 int - for _, num := range m.Field6 { - for num >= 1<<7 { - data10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - data10[j9] = uint8(num) - j9++ - } - data[i] = 0x32 - i++ - i = encodeVarintFuzz(data, i, uint64(j9)) - i += copy(data[i:], data10[:j9]) - } - if len(m.Field7) > 0 { - data11 := make([]byte, len(m.Field7)*5) - var j12 int - for _, num := range m.Field7 { - x13 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x13 >= 1<<7 { - data11[j12] = uint8(uint64(x13)&0x7f | 0x80) - j12++ - x13 >>= 7 - } - data11[j12] = uint8(x13) - j12++ - } - data[i] = 0x3a - i++ - i = encodeVarintFuzz(data, i, uint64(j12)) - i += copy(data[i:], data11[:j12]) - } - if len(m.Field8) > 0 { - var j14 int - data16 := make([]byte, len(m.Field8)*10) - for _, num := range m.Field8 { - x15 := (uint64(num) << 1) ^ uint64((num >> 63)) - for x15 >= 1<<7 { - data16[j14] = uint8(uint64(x15)&0x7f | 0x80) - j14++ - x15 >>= 7 - } - data16[j14] = uint8(x15) - j14++ - } - data[i] = 0x42 - i++ - i = encodeVarintFuzz(data, i, uint64(j14)) - i += copy(data[i:], data16[:j14]) - } - if len(m.Field9) > 0 { - data[i] = 0x4a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field9)*4)) - for _, num := range m.Field9 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field10) > 0 { - data[i] = 0x52 - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - } - } - if len(m.Field11) > 0 { - data[i] = 0x5a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field12) > 0 { - data[i] = 0x62 - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - data[i] = uint8(num) - i++ - data[i] = uint8(num >> 8) - i++ - data[i] = uint8(num >> 16) - i++ - data[i] = uint8(num >> 24) - i++ - data[i] = uint8(num >> 32) - i++ - data[i] = uint8(num >> 40) - i++ - data[i] = uint8(num >> 48) - i++ - data[i] = uint8(num >> 56) - i++ - } - } - if len(m.Field13) > 0 { - data[i] = 0x6a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field13))) - for _, b := range m.Field13 { - if b { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Fuzz(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Fuzz(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field3)) - } - if m.Field4 != nil { - data[i] = 0x20 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field4)) - } - if m.Field5 != nil { - data[i] = 0x28 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field5)) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintFuzz(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x40 - i++ - i = encodeVarintFuzz(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 != nil { - data[i] = 0x4d - i++ - i = encodeFixed32Fuzz(data, i, uint32(*m.Field9)) - } - if m.Field10 != nil { - data[i] = 0x55 - i++ - i = encodeFixed32Fuzz(data, i, uint32(*m.Field10)) - } - if m.Field11 != nil { - data[i] = 0x59 - i++ - i = encodeFixed64Fuzz(data, i, uint64(*m.Field11)) - } - if m.Field12 != nil { - data[i] = 0x61 - i++ - i = encodeFixed64Fuzz(data, i, uint64(*m.Field12)) - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintFuzz(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptStruct) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Fuzz(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 != nil { - data[i] = 0x15 - i++ - i = encodeFixed32Fuzz(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintFuzz(data, i, uint64(m.Field3.Size())) - n17, err := m.Field3.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if m.Field4 != nil { - data[i] = 0x22 - i++ - i = encodeVarintFuzz(data, i, uint64(m.Field4.Size())) - n18, err := m.Field4.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintFuzz(data, i, uint64(*m.Field6)) - } - if m.Field7 != nil { - data[i] = 0x38 - i++ - i = encodeVarintFuzz(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 != nil { - data[i] = 0x42 - i++ - i = encodeVarintFuzz(data, i, uint64(m.Field8.Size())) - n19, err := m.Field8.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.Field13 != nil { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 != nil { - data[i] = 0x72 - i++ - i = encodeVarintFuzz(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintFuzz(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Fuzz(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Fuzz(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintFuzz(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Nil) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepPackedNative) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field1)*8)) + len(m.Field1)*8 - } - if len(m.Field2) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field2)*4)) + len(m.Field2)*4 - } - if len(m.Field3) > 0 { - l = 0 - for _, e := range m.Field3 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field4) > 0 { - l = 0 - for _, e := range m.Field4 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field5) > 0 { - l = 0 - for _, e := range m.Field5 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field6) > 0 { - l = 0 - for _, e := range m.Field6 { - l += sovFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field7) > 0 { - l = 0 - for _, e := range m.Field7 { - l += sozFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field8) > 0 { - l = 0 - for _, e := range m.Field8 { - l += sozFuzz(uint64(e)) - } - n += 1 + sovFuzz(uint64(l)) + l - } - if len(m.Field9) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field9)*4)) + len(m.Field9)*4 - } - if len(m.Field10) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field10)*4)) + len(m.Field10)*4 - } - if len(m.Field11) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field11)*8)) + len(m.Field11)*8 - } - if len(m.Field12) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field12)*8)) + len(m.Field12)*8 - } - if len(m.Field13) > 0 { - n += 1 + sovFuzz(uint64(len(m.Field13))) + len(m.Field13)*1 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNative) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - n += 1 + sovFuzz(uint64(*m.Field3)) - } - if m.Field4 != nil { - n += 1 + sovFuzz(uint64(*m.Field4)) - } - if m.Field5 != nil { - n += 1 + sovFuzz(uint64(*m.Field5)) - } - if m.Field6 != nil { - n += 1 + sovFuzz(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozFuzz(uint64(*m.Field7)) - } - if m.Field8 != nil { - n += 1 + sozFuzz(uint64(*m.Field8)) - } - if m.Field9 != nil { - n += 5 - } - if m.Field10 != nil { - n += 5 - } - if m.Field11 != nil { - n += 9 - } - if m.Field12 != nil { - n += 9 - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptStruct) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - n += 9 - } - if m.Field2 != nil { - n += 5 - } - if m.Field3 != nil { - l = m.Field3.Size() - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field4 != nil { - l = m.Field4.Size() - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field6 != nil { - n += 1 + sovFuzz(uint64(*m.Field6)) - } - if m.Field7 != nil { - n += 1 + sozFuzz(uint64(*m.Field7)) - } - if m.Field8 != nil { - l = m.Field8.Size() - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field13 != nil { - n += 2 - } - if m.Field14 != nil { - l = len(*m.Field14) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovFuzz(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovFuzz(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozFuzz(x uint64) (n int) { - return sovFuzz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Nil) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nil: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFuzz(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipFuzz(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field3 == nil { - m.Field3 = &NinOptNative{} - } - if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field4 == nil { - m.Field4 = &NinOptNative{} - } - if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Field8 == nil { - m.Field8 = &NinOptNative{} - } - if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFuzz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFuzz - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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{ - // 439 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x6e, 0xd3, 0x50, - 0x14, 0xc7, 0x71, 0x1d, 0x3b, 0xb1, 0x93, 0xdb, 0x84, 0xa4, 0x1e, 0x2e, 0x47, 0x15, 0xaa, 0x50, - 0xa6, 0xbb, 0x60, 0x37, 0xfe, 0xd3, 0xa6, 0x6b, 0x07, 0xc6, 0x80, 0xca, 0x13, 0xb4, 0xa9, 0x13, - 0x2c, 0x0a, 0x8e, 0xda, 0x6b, 0x86, 0x8e, 0x4c, 0x3c, 0x1a, 0x1b, 0x3c, 0x02, 0xf0, 0x04, 0x3c, - 0x02, 0x07, 0x87, 0x9c, 0x7b, 0x32, 0x55, 0x91, 0x3a, 0x58, 0xb2, 0xf3, 0x89, 0x15, 0xdd, 0xef, - 0x4f, 0x51, 0x6a, 0xd9, 0x3c, 0x3c, 0xc4, 0xeb, 0xbb, 0xda, 0xd6, 0x51, 0xff, 0xdf, 0xbd, 0x2d, - 0xef, 0xed, 0xfd, 0xd1, 0xab, 0x55, 0x65, 0xdf, 0x37, 0xd7, 0xf1, 0xa2, 0xfe, 0x98, 0xac, 0xea, - 0x55, 0x9d, 0xb4, 0xdf, 0xb8, 0x6e, 0x96, 0xed, 0x53, 0xfb, 0xd0, 0xde, 0x6d, 0xde, 0x9c, 0x74, - 0x95, 0x3f, 0xaf, 0x6e, 0x27, 0x5f, 0x7d, 0x15, 0xcd, 0xab, 0x4f, 0x97, 0xe5, 0xfa, 0xed, 0xd5, - 0xe2, 0x43, 0x79, 0x33, 0xbf, 0xb2, 0xd5, 0xe7, 0x32, 0x3a, 0x52, 0xc1, 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, 0xb0, 0x28, 0xc3, 0x82, 0x19, 0xbb, 0xa8, 0x28, 0xa3, 0x82, 0xe9, 0x71, - 0x50, 0x27, 0x39, 0x3e, 0x23, 0xe9, 0x6f, 0x25, 0x77, 0x52, 0xe0, 0x88, 0x64, 0xb0, 0x95, 0x62, - 0xf2, 0xdd, 0xdb, 0x8e, 0xf0, 0xce, 0xde, 0x35, 0x0b, 0xbb, 0xf7, 0x08, 0xc9, 0xce, 0x08, 0x07, - 0xe9, 0xf3, 0x98, 0xff, 0xa2, 0xb1, 0x5c, 0x97, 0xd7, 0x49, 0x76, 0xd6, 0x79, 0xf4, 0x85, 0x7c, - 0xef, 0x79, 0x92, 0x9d, 0x79, 0x1e, 0xfd, 0x81, 0xd9, 0xd3, 0x16, 0xbd, 0x18, 0xff, 0xf9, 0x75, - 0x0c, 0xdf, 0x7e, 0x1f, 0xc3, 0x0f, 0xba, 0x7e, 0xd2, 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0xce, - 0xa6, 0x95, 0x94, 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 eb01e63c..00000000 --- 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 81c8793e..00000000 --- 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 ebbbbd2c..00000000 --- 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 99bfce6c..00000000 --- a/vendor/github.com/gogo/protobuf/test/group/group.pb.go +++ /dev/null @@ -1,971 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: group.proto -// DO NOT EDIT! - -/* -Package group is a generated protocol buffer package. - -It is generated from these files: - group.proto - -It has these top-level messages: - Groups1 - Groups2 -*/ -package group - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1,omitempty"` - Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return GroupDescription() -} -func (this *Groups1_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return GroupDescription() -} -func (this *Groups2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return GroupDescription() -} -func (this *Groups2_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return GroupDescription() -} -func GroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3364 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x69, 0x8c, 0x23, 0xd5, - 0xb5, 0xc6, 0x6d, 0xbb, 0xdb, 0x3e, 0xee, 0x76, 0x57, 0x57, 0x37, 0x33, 0x9e, 0x06, 0x66, 0x98, - 0x66, 0x1b, 0x86, 0x47, 0x0f, 0xd3, 0x6c, 0x83, 0x79, 0x0f, 0xd4, 0x8b, 0xc7, 0xf4, 0xa8, 0x17, - 0xb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x31, 0xb1, 0x7c, 0x54, 0x0f, 0x03, 0x54, 0x49, 0x93, - 0xd8, 0x55, 0x62, 0x9b, 0x3b, 0xb9, 0x38, 0x5a, 0x91, 0xd6, 0x02, 0x12, 0xf5, 0x26, 0x98, 0x68, - 0xb6, 0x37, 0xad, 0xba, 0xa9, 0x07, 0xd4, 0x00, 0xd5, 0x92, 0x9a, 0xc2, 0x07, 0x96, 0x3a, 0xca, - 0x37, 0xc0, 0xf8, 0xc3, 0xc4, 0x38, 0x1f, 0x54, 0xcd, 0x30, 0xd5, 0x2c, 0x15, 0x07, 0x14, 0x17, - 0x61, 0xb4, 0x41, 0x5c, 0x17, 0x0d, 0xd0, 0xbd, 0x9d, 0x26, 0xc9, 0x25, 0xd8, 0xec, 0xaf, 0xee, - 0x99, 0x7d, 0xf7, 0xcc, 0x33, 0x02, 0xb5, 0x81, 0x20, 0x75, 0x1e, 0xd2, 0xc4, 0x6e, 0x37, 0x38, - 0x43, 0x72, 0x17, 0xff, 0x15, 0x50, 0xa3, 0x9b, 0x25, 0x45, 0x61, 0x82, 0x62, 0xc4, 0x25, 0xad, - 0x0b, 0x75, 0x93, 0xe4, 0x86, 0x19, 0xc1, 0x0d, 0x3d, 0x04, 0x65, 0x3e, 0xde, 0xcd, 0x21, 0x71, - 0x38, 0x95, 0x34, 0xb9, 0xe8, 0x11, 0xdb, 0xad, 0x3b, 0x76, 0x6e, 0x84, 0x91, 0x5c, 0xd7, 0x67, - 0x15, 0x89, 0x55, 0xed, 0xa6, 0xe8, 0xe0, 0xd4, 0x3b, 0x60, 0xc4, 0x69, 0x7a, 0xf8, 0xcd, 0xcd, - 0xa5, 0x70, 0x7d, 0x32, 0x73, 0x57, 0xf6, 0x0d, 0x84, 0x75, 0xae, 0xa3, 0x49, 0x65, 0x75, 0x19, - 0x14, 0xd7, 0x69, 0xb7, 0x4c, 0xa2, 0x9b, 0x4e, 0x95, 0xe8, 0x75, 0x7b, 0xcb, 0xc9, 0xa5, 0x19, - 0xc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xe3, 0x90, - 0xd9, 0x78, 0xb0, 0x54, 0xd0, 0x97, 0xd6, 0x2b, 0x0b, 0x2b, 0x05, 0x25, 0xa6, 0x66, 0x01, 0x98, - 0xe0, 0xf4, 0xca, 0xfa, 0xfc, 0x86, 0x32, 0xe4, 0x3f, 0x2f, 0xaf, 0x6d, 0xdc, 0x71, 0x9b, 0x12, - 0xf7, 0x01, 0x15, 0x2e, 0x48, 0x04, 0x15, 0x6e, 0x9d, 0x53, 0x92, 0x18, 0x09, 0xa3, 0x9c, 0x60, - 0xf9, 0x6c, 0x61, 0x09, 0x35, 0x86, 0xc3, 0x12, 0xd4, 0x19, 0x51, 0xc7, 0x20, 0xcd, 0x24, 0x0b, - 0xeb, 0xeb, 0x2b, 0x4a, 0xca, 0xe7, 0x2c, 0x6f, 0x68, 0xcb, 0x6b, 0x45, 0x25, 0xed, 0x73, 0x16, - 0xb5, 0xf5, 0x4a, 0x49, 0x01, 0x9f, 0x61, 0xb5, 0x50, 0x2e, 0xcf, 0x17, 0x0b, 0x4a, 0xc6, 0xd7, - 0x58, 0x78, 0x70, 0xa3, 0x50, 0x56, 0x46, 0x43, 0x66, 0xe1, 0x2b, 0xc6, 0xfc, 0x57, 0x14, 0xd6, - 0x2a, 0xab, 0x4a, 0x56, 0x9d, 0x80, 0x31, 0xfe, 0x0a, 0x69, 0xc4, 0x78, 0x97, 0x08, 0x2d, 0x55, - 0x3a, 0x86, 0x70, 0x96, 0x89, 0x90, 0x00, 0x35, 0xd4, 0x99, 0x45, 0x48, 0xb2, 0xe8, 0xc2, 0x28, - 0xce, 0xae, 0xcc, 0x2f, 0x14, 0x56, 0xf4, 0xf5, 0xd2, 0xc6, 0xf2, 0xfa, 0xda, 0xfc, 0x0a, 0xfa, - 0xce, 0x97, 0x69, 0x85, 0xff, 0xae, 0x2c, 0x6b, 0x85, 0x25, 0xf4, 0x5f, 0x40, 0x56, 0x2a, 0xcc, - 0x6f, 0xa0, 0x2c, 0x3e, 0x73, 0x1c, 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, 0xed, 0xfd, 0xd0, 0xbc, 0x2c, 0x3d, - 0x12, 0x80, 0x89, 0xad, 0x87, 0x27, 0x53, 0xda, 0x49, 0xec, 0x87, 0xed, 0xeb, 0x72, 0xeb, 0x71, - 0xec, 0x6a, 0x90, 0x11, 0x57, 0xda, 0xc5, 0x23, 0xf8, 0x20, 0x34, 0xdf, 0x90, 0x2b, 0xcd, 0x00, - 0x14, 0xfc, 0x20, 0x1c, 0xea, 0x9b, 0xea, 0x07, 0x20, 0xfb, 0xa6, 0x20, 0x3b, 0xd0, 0x27, 0xdd, - 0x8b, 0x94, 0xb0, 0x5f, 0xca, 0x6f, 0xc9, 0x94, 0x40, 0xba, 0xb8, 0x4a, 0xb4, 0x8d, 0x75, 0x8d, - 0xad, 0xfd, 0x79, 0xed, 0xdb, 0xd2, 0x6b, 0x1c, 0x1b, 0xf2, 0xda, 0x06, 0x1c, 0x10, 0x8c, 0xfb, - 0x5b, 0xd7, 0x57, 0x64, 0x62, 0xe5, 0xe8, 0x4a, 0x78, 0x75, 0xff, 0x07, 0xa6, 0x7d, 0x77, 0xca, - 0x0e, 0xcc, 0xd5, 0xe9, 0xc5, 0x40, 0x34, 0xf3, 0xab, 0x82, 0x59, 0x66, 0x7c, 0xbf, 0x85, 0x73, - 0x57, 0x8d, 0x26, 0x25, 0x3f, 0x0b, 0x39, 0x49, 0xde, 0xb6, 0xb1, 0xc1, 0x77, 0x6a, 0x36, 0x2e, - 0x63, 0x75, 0x00, 0xea, 0xef, 0x74, 0x2d, 0x55, 0x25, 0x00, 0xa7, 0xcc, 0xcb, 0xa0, 0xf8, 0xfd, - 0x86, 0x5e, 0x6f, 0x34, 0x1d, 0x6c, 0x2d, 0xf7, 0x66, 0xfc, 0xae, 0x5c, 0x29, 0x1f, 0xb7, 0xcc, - 0x60, 0xf9, 0x02, 0x64, 0xd9, 0xe3, 0xa0, 0x21, 0xf9, 0x3d, 0x41, 0x34, 0xd6, 0x41, 0x89, 0xc4, - 0x81, 0x9d,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 0x3a, 0x1c, 0x7b, 0x09, 0x3f, 0xaf, 0xe0, 0xe7, 0x87, 0xf8, 0x79, 0xfd, 0x2d, - 0xd4, 0xc3, 0xcf, 0x1b, 0xf8, 0xf9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xe7, 0x78, 0x9f, - 0xa6, 0x2b, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups1) - if !ok { - that2, ok := that.(Groups1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.G) != len(that1.G) { - return false - } - for i := range this.G { - if !this.G[i].Equal(that1.G[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups1_G) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Groups1_G) - if !ok { - that2, ok := that.(Groups1_G) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Groups1_G") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Groups1_G but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Groups1_G but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Groups1_G) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups1_G) - if !ok { - that2, ok := that.(Groups1_G) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Groups2) - if !ok { - that2, ok := that.(Groups2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Groups2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Groups2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Groups2 but is not nil && this == nil") - } - if !this.G.Equal(that1.G) { - return fmt.Errorf("G this(%v) Not Equal that(%v)", this.G, that1.G) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Groups2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups2) - if !ok { - that2, ok := that.(Groups2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.G.Equal(that1.G) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups2_G) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Groups2_G) - if !ok { - that2, ok := that.(Groups2_G) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Groups2_G") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Groups2_G but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Groups2_G but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Groups2_G) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Groups2_G) - if !ok { - that2, ok := that.(Groups2_G) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Groups1) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&group.Groups1{") - if this.G != nil { - s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Groups1_G) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&group.Groups1_G{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringGroup(this.Field2, "float64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Groups2) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&group.Groups2{") - if this.G != nil { - s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Groups2_G) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&group.Groups2_G{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringGroup(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringGroup(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 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{ - // 195 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x02, 0x55, 0x32, 0x6a, 0x30, 0x07, 0xb1, 0xa5, - 0x81, 0x79, 0x70, 0x71, 0x23, 0x09, 0x26, 0xa0, 0x38, 0x23, 0x54, 0xdc, 0x08, 0x61, 0xbe, 0x11, - 0xcc, 0x7c, 0x46, 0x0c, 0xf3, 0x8d, 0x48, 0x34, 0x9f, 0x19, 0x61, 0xbe, 0x93, 0xc9, 0x89, 0x87, - 0x72, 0x0c, 0x17, 0x80, 0xf8, 0x06, 0x10, 0x3f, 0x78, 0x28, 0xc7, 0xf8, 0x01, 0x88, 0x7f, 0x00, - 0x71, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x40, 0xbc, 0x01, 0x88, 0x77, 0x00, 0xf1, 0x89, 0x47, 0x40, - 0x75, 0x40, 0xfc, 0x00, 0x88, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xbc, 0xd6, 0x4b, 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 0dad6569..00000000 --- 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 1f9d30c5..00000000 --- a/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go +++ /dev/null @@ -1,541 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: group.proto -// DO NOT EDIT! - -/* -Package group is a generated protocol buffer package. - -It is generated from these files: - group.proto - -It has these top-level messages: - Groups1 - Groups2 -*/ -package group - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestGroups1Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups1_GProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups2Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups2_GProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups1JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups1_GJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1_G{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups2JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups2_GJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2_G{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGroups1ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups1ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups1_GProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups1_GProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2_GProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroups2_GProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGroupDescription(t *testing.T) { - GroupDescription() -} -func TestGroups1VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups1_GVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups1_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups2VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups2_GVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2_G(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups2_G{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGroups1GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups1_GGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1_G(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups2GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups2_GGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2_G(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestGroups1Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGroups1_GStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1_G(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGroups2Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGroups2_GStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2_G(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/Makefile b/vendor/github.com/gogo/protobuf/test/importdedup/Makefile deleted file mode 100644 index 21d823a6..00000000 --- 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 8bdcc623..00000000 --- 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 713e5d1d..00000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package importdedup is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Object -*/ -package importdedup - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" - -import github_com_gogo_protobuf_test_importdedup_subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=customField,customtype=github.com/gogo/protobuf/test/importdedup/subpkg.CustomType" json:"CustomField,omitempty"` - SubObject *subpkg.SubObject `protobuf:"bytes,2,opt,name=SubObject,json=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{ - // 178 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0xc4, 0x9d, 0x8c, 0x30, 0x53, 0x48, 0x9f, 0x8b, 0x33, 0xb8, - 0x34, 0x09, 0x62, 0x9f, 0x04, 0x13, 0xd0, 0x02, 0x6e, 0x23, 0x41, 0x3d, 0xa8, 0x1e, 0xb8, 0x44, - 0x10, 0x67, 0x31, 0x8c, 0x09, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x33, 0xcb, 0x76, 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 5d9c9c82..00000000 --- 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/importdedup/subpkg/customtype.go b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go deleted file mode 100644 index 59ccf729..00000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go +++ /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. - -package subpkg - -type CustomType struct{} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go deleted file mode 100644 index 6a8a3146..00000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: subpkg/subproto.proto -// DO NOT EDIT! - -/* -Package subpkg is a generated protocol buffer package. - -It is generated from these files: - subpkg/subproto.proto - -It has these top-level messages: - SubObject -*/ -package subpkg - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 SubObject struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubObject) Reset() { *m = SubObject{} } -func (m *SubObject) String() string { return proto.CompactTextString(m) } -func (*SubObject) ProtoMessage() {} -func (*SubObject) Descriptor() ([]byte, []int) { return fileDescriptorSubproto, []int{0} } - -func init() { - proto.RegisterType((*SubObject)(nil), "subpkg.SubObject") -} - -func init() { proto.RegisterFile("subpkg/subproto.proto", fileDescriptorSubproto) } - -var fileDescriptorSubproto = []byte{ - // 88 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0x4d, 0x2a, - 0xc8, 0x4e, 0xd7, 0x07, 0x51, 0x45, 0xf9, 0x25, 0xf9, 0x7a, 0x60, 0x52, 0x88, 0x0d, 0x22, 0x2c, - 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e, - 0xaf, 0x0f, 0x96, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x4d, 0x89, 0x9b, - 0x8b, 0x33, 0xb8, 0x34, 0xc9, 0x3f, 0x29, 0x2b, 0x35, 0xb9, 0x04, 0x10, 0x00, 0x00, 0xff, 0xff, - 0x4e, 0x38, 0xf3, 0x28, 0x5b, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto deleted file mode 100644 index b8df5e47..00000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.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 subpkg; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message SubObject { - -} 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 0a2f73ac..00000000 --- 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/index.pb.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go deleted file mode 100644 index a9ae7aef..00000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: index.proto -// DO NOT EDIT! - -/* - Package index is a generated protocol buffer package. - - It is generated from these files: - index.proto - - It has these top-level messages: - IndexQuery -*/ -package index - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 IndexQuery struct { - Key *string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=Value,json=value" json:"Value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *IndexQuery) Reset() { *m = IndexQuery{} } -func (m *IndexQuery) String() string { return proto.CompactTextString(m) } -func (*IndexQuery) ProtoMessage() {} -func (*IndexQuery) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{0} } - -func (m *IndexQuery) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *IndexQuery) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -func init() { - proto.RegisterType((*IndexQuery)(nil), "index.IndexQuery") -} -func (this *IndexQuery) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*IndexQuery) - if !ok { - that2, ok := that.(IndexQuery) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Key != nil && that1.Key != nil { - if *this.Key != *that1.Key { - return false - } - } else if this.Key != nil { - return false - } else if that1.Key != nil { - return false - } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *IndexQuery) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *IndexQuery) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Key != nil { - data[i] = 0xa - i++ - i = encodeVarintIndex(data, i, uint64(len(*m.Key))) - i += copy(data[i:], *m.Key) - } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintIndex(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Index(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Index(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintIndex(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedIndexQuery(r randyIndex, easy bool) *IndexQuery { - this := &IndexQuery{} - if r.Intn(10) != 0 { - v1 := randStringIndex(r) - this.Key = &v1 - } - if r.Intn(10) != 0 { - v2 := randStringIndex(r) - this.Value = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIndex(r, 3) - } - return this -} - -type randyIndex interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIndex(r randyIndex) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringIndex(r randyIndex) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneIndex(r) - } - return string(tmps) -} -func randUnrecognizedIndex(r randyIndex, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldIndex(data, r, fieldNumber, wire) - } - return data -} -func randFieldIndex(data []byte, r randyIndex, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateIndex(data, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - data = encodeVarintPopulateIndex(data, uint64(v4)) - case 1: - data = encodeVarintPopulateIndex(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateIndex(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateIndex(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateIndex(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateIndex(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *IndexQuery) Size() (n int) { - var l int - _ = l - if m.Key != nil { - l = len(*m.Key) - n += 1 + l + sovIndex(uint64(l)) - } - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovIndex(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovIndex(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIndex(x uint64) (n int) { - return sovIndex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IndexQuery) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IndexQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IndexQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIndex - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Key = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIndex - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Value = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIndex(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIndex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIndex(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthIndex - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipIndex(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("index.proto", fileDescriptorIndex) } - -var fileDescriptorIndex = []byte{ - // 139 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcc, 0x4b, 0x49, - 0xad, 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, 0x99, 0x70, 0x71, 0x79, 0x82, 0xf4, - 0x05, 0x96, 0xa6, 0x16, 0x55, 0x0a, 0x09, 0x70, 0x31, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, - 0x6a, 0x70, 0x06, 0x31, 0x67, 0xa7, 0x56, 0x0a, 0x89, 0x70, 0xb1, 0x86, 0x25, 0xe6, 0x94, 0xa6, - 0x4a, 0x30, 0x81, 0xc5, 0x58, 0xcb, 0x40, 0x1c, 0x27, 0x89, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, - 0x92, 0x63, 0xdc, 0x01, 0xc4, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0x62, 0x40, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xed, 0x22, 0xeb, 0x68, 0x93, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto deleted file mode 100644 index 3f79b4aa..00000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.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 = "proto2"; - -package index; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -message IndexQuery { - optional string Key = 1; - optional string Value = 2; -} diff --git a/vendor/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 7e915f6b..00000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: index.proto -// DO NOT EDIT! - -/* -Package index is a generated protocol buffer package. - -It is generated from these files: - index.proto - -It has these top-level messages: - IndexQuery -*/ -package index - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestIndexQueryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIndexQueryMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIndexQueryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IndexQuery{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQuerySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 a56da42d..00000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go +++ /dev/null @@ -1,472 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: indeximport.proto -// DO NOT EDIT! - -/* - Package indeximport is a generated protocol buffer package. - - It is generated from these files: - indeximport.proto - - It has these top-level messages: - IndexQueries -*/ -package indeximport - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import index "github.com/gogo/protobuf/test/indeximport-issue72/index" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*IndexQueries) - if !ok { - that2, ok := that.(IndexQueries) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Queries) != len(that1.Queries) { - return false - } - for i := range this.Queries { - if !this.Queries[i].Equal(that1.Queries[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *IndexQueries) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *IndexQueries) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Queries) > 0 { - for _, msg := range m.Queries { - data[i] = 0xa - i++ - i = encodeVarintIndeximport(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Indeximport(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Indeximport(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintIndeximport(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedIndexQueries(r randyIndeximport, easy bool) *IndexQueries { - this := &IndexQueries{} - if r.Intn(10) != 0 { - v1 := r.Intn(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{ - // 163 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x88, 0xbd, 0x10, 0xa2, - 0xc2, 0x49, 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x00, 0xf1, 0x09, 0x20, - 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x51, 0xf2, 0x07, 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 6358b0bf..00000000 --- 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 99d0592b..00000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: indeximport.proto -// DO NOT EDIT! - -/* -Package indeximport is a generated protocol buffer package. - -It is generated from these files: - indeximport.proto - -It has these top-level messages: - IndexQueries -*/ -package indeximport - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/test/indeximport-issue72/index" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestIndexQueriesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIndexQueriesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueriesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIndexQueriesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueriesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IndexQueries{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIndexQueriesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue34/Makefile b/vendor/github.com/gogo/protobuf/test/issue34/Makefile deleted file mode 100644 index ecb3e74e..00000000 --- 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 a9fbde48..00000000 --- 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 ffec5f6f..00000000 --- a/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go +++ /dev/null @@ -1,352 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package issue34 is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Foo - FooWithRepeated -*/ -package issue34 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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{ - // 124 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0xa0, 0x44, 0x38, 0xd0, 0xb0, 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 5531befb..00000000 --- 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 5b8e59bd..00000000 --- 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 124b0624..00000000 --- a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go +++ /dev/null @@ -1,627 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: issue42.proto -// DO NOT EDIT! - -/* - Package issue42 is a generated protocol buffer package. - - It is generated from these files: - issue42.proto - - It has these top-level messages: - UnorderedFields - OrderedFields -*/ -package issue42 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"A,omitempty"` - B *uint64 `protobuf:"fixed64,1,opt,name=B,json=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" json:"B,omitempty"` - A *int64 `protobuf:"varint,10,opt,name=A,json=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++ - i = encodeFixed64Issue42(data, i, uint64(*m.B)) - } - if m.A != nil { - data[i] = 0x50 - i++ - i = encodeVarintIssue42(data, i, uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrderedFields) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OrderedFields) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.B != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Issue42(data, i, uint64(*m.B)) - } - if m.A != nil { - data[i] = 0x50 - i++ - i = encodeVarintIssue42(data, i, uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Issue42(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Issue42(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintIssue42(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedUnorderedFields(r randyIssue42, easy bool) *UnorderedFields { - this := &UnorderedFields{} - if r.Intn(10) != 0 { - v1 := uint64(uint64(r.Uint32())) - this.B = &v1 - } - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.A = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) - } - return this -} - -func NewPopulatedOrderedFields(r randyIssue42, easy bool) *OrderedFields { - this := &OrderedFields{} - if r.Intn(10) != 0 { - v3 := uint64(uint64(r.Uint32())) - this.B = &v3 - } - if r.Intn(10) != 0 { - v4 := int64(r.Int63()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.A = &v4 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) - } - return this -} - -type randyIssue42 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIssue42(r randyIssue42) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringIssue42(r randyIssue42) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneIssue42(r) - } - return string(tmps) -} -func randUnrecognizedIssue42(r randyIssue42, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldIssue42(data, r, fieldNumber, wire) - } - return data -} -func randFieldIssue42(data []byte, r randyIssue42, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateIssue42(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateIssue42(data, uint64(v6)) - case 1: - data = encodeVarintPopulateIssue42(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateIssue42(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateIssue42(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateIssue42(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateIssue42(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *UnorderedFields) Size() (n int) { - var l int - _ = l - if m.B != nil { - n += 9 - } - if m.A != nil { - n += 1 + sovIssue42(uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrderedFields) Size() (n int) { - var l int - _ = l - if m.B != nil { - n += 9 - } - if m.A != nil { - n += 1 + sovIssue42(uint64(*m.A)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovIssue42(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIssue42(x uint64) (n int) { - return sovIssue42(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UnorderedFields) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnorderedFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnorderedFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.B = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.A = &v - default: - iNdEx = preIndex - skippy, err := skipIssue42(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue42 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OrderedFields) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrderedFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrderedFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.B = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue42 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.A = &v - default: - iNdEx = preIndex - skippy, err := skipIssue42(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue42 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIssue42(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthIssue42 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue42 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipIssue42(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthIssue42 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIssue42 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("issue42.proto", fileDescriptorIssue42) } - -var fileDescriptorIssue42 = []byte{ - // 140 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x26, 0x81, 0x78, 0x8e, 0x12, - 0x5c, 0x40, 0x1e, 0x73, 0x10, 0x63, 0xa2, 0x92, 0x36, 0x17, 0xaf, 0x3f, 0xb1, 0x8a, 0x9d, 0x04, - 0x7e, 0x3c, 0x94, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0x02, 0x10, 0x3f, 0x00, 0x62, 0x40, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xad, 0x9a, 0xd1, 0x5b, 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 5e8b77be..00000000 --- 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 571731c7..00000000 --- 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 ecb3e74e..00000000 --- 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 eb8453d2..00000000 --- a/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go +++ /dev/null @@ -1,370 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Foo -*/ -package proto - -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Foo) - if !ok { - that2, ok := that.(Foo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bar != nil && that1.Bar != nil { - if *this.Bar != *that1.Bar { - return false - } - } else if this.Bar != nil { - return false - } else if that1.Bar != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func NewPopulatedFoo(r randyProto, easy bool) *Foo { - this := &Foo{} - v1 := uint64(uint64(r.Uint32())) - this.Bar = &v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedProto(r, 2) - } - return this -} - -type randyProto interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneProto(r randyProto) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringProto(r randyProto) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneProto(r) - } - return string(tmps) -} -func randUnrecognizedProto(r randyProto, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldProto(data, r, fieldNumber, wire) - } - return data -} -func randFieldProto(data []byte, r randyProto, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateProto(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateProto(data, uint64(v3)) - case 1: - data = encodeVarintPopulateProto(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateProto(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateProto(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateProto(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateProto(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Foo) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Foo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Bar = &v - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipProto(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("bar") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") -) - -func init() { proto1.RegisterFile("proto.proto", fileDescriptorProto) } - -var fileDescriptorProto = []byte{ - // 106 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x80, 0xf8, 0x02, 0x10, 0x03, 0x02, 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 2c9bcf46..00000000 --- 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 fd9207b3..00000000 --- a/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go +++ /dev/null @@ -1,108 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - proto.proto - -It has these top-level messages: - Foo -*/ -package proto - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFooProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFooJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFooProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFooProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile b/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile deleted file mode 100644 index 3024c688..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile +++ /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. - -regenerate: - cp header.proto mapsproto2.proto - cat ../theproto3/maps.proto >> mapsproto2.proto - go install github.com/gogo/protobuf/protoc-gen-combo - find combos -type d -not -name combos -exec cp mapsproto2_test.go.in {}/mapsproto2_test.go \; - protoc-gen-combo --version="3.0.0" --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 b1c2141e..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go +++ /dev/null @@ -1,7637 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/both/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps - 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_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{1} } - -type AllMapsOrdered struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{2} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4105 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, - 0x75, 0x5e, 0xde, 0xc9, 0x43, 0x8a, 0x1c, 0x8d, 0xe4, 0x35, 0xad, 0xd8, 0xbb, 0x5e, 0xda, 0x8e, - 0xd7, 0x72, 0x22, 0x39, 0x4a, 0x6c, 0xaf, 0xe9, 0xc4, 0x81, 0x2e, 0x5c, 0xad, 0x1c, 0x5d, 0xd8, - 0xa1, 0x64, 0xaf, 0x5d, 0x18, 0xec, 0x88, 0x1c, 0x52, 0xb4, 0xc9, 0x19, 0x96, 0x33, 0x5c, 0xaf, - 0xf2, 0xe4, 0xc2, 0xbd, 0x20, 0x28, 0x7a, 0x2f, 0x50, 0xc7, 0x71, 0xd2, 0x3a, 0x68, 0xeb, 0x34, - 0xb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, 0xfa, 0xa1, 0x12, 0x75, 0xaf, - 0x77, 0xf6, 0x0f, 0x1f, 0xfb, 0x98, 0x12, 0x73, 0x01, 0x47, 0x4c, 0x10, 0x97, 0x15, 0x3e, 0xba, - 0xa6, 0x24, 0x30, 0x12, 0x72, 0x8c, 0x60, 0xe7, 0x7a, 0x65, 0x0b, 0x35, 0x92, 0x5e, 0x09, 0xea, - 0xa4, 0xd4, 0x39, 0xc8, 0x50, 0xc9, 0xc6, 0xc1, 0xc1, 0xae, 0x92, 0x76, 0x39, 0x6b, 0x87, 0xda, - 0xce, 0xfe, 0xb6, 0x92, 0x71, 0x39, 0xb7, 0xb5, 0x83, 0xa3, 0xaa, 0x02, 0x2e, 0xc3, 0x5e, 0xa5, - 0x56, 0x5b, 0xdf, 0xae, 0x28, 0x59, 0x57, 0x63, 0xe3, 0xb9, 0xc3, 0x4a, 0x4d, 0xc9, 0x79, 0xcc, - 0xc2, 0x5b, 0xcc, 0xb9, 0xb7, 0xa8, 0xec, 0x1f, 0xed, 0x29, 0x79, 0x75, 0x1e, 0xe6, 0xd8, 0x2d, - 0x84, 0x11, 0x05, 0x9f, 0x08, 0x2d, 0x55, 0x46, 0x86, 0x30, 0x96, 0x79, 0x8f, 0x00, 0x35, 0xd4, - 0xd2, 0x26, 0x24, 0x68, 0x74, 0x61, 0x14, 0xe7, 0x77, 0xd7, 0x37, 0x2a, 0xbb, 0xf5, 0x83, 0xea, - 0xe1, 0xce, 0xc1, 0xfe, 0xfa, 0x2e, 0xfa, 0xce, 0x95, 0x69, 0x95, 0x9f, 0x3a, 0xda, 0xd1, 0x2a, - 0x5b, 0xe8, 0x3f, 0x49, 0x56, 0xad, 0xac, 0x1f, 0xa2, 0x2c, 0x56, 0x5a, 0x86, 0xc5, 0xa0, 0x3c, - 0x13, 0xb4, 0x32, 0x4a, 0x5f, 0x8c, 0xc0, 0x42, 0x40, 0xca, 0x0c, 0x5c, 0x45, 0x9f, 0x84, 0x04, - 0x8b, 0x34, 0x56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xb6, 0x6c, 0xbe, 0xef, 0x9d, 0x81, 0xee, 0x0d, 0x4e, 0x57, 0xe0, 0x40, - 0xba, 0x0b, 0x26, 0x5c, 0x4f, 0x40, 0xba, 0x85, 0x1b, 0xa0, 0x19, 0x28, 0x3e, 0xcf, 0x29, 0x52, - 0x44, 0x9f, 0x40, 0xd7, 0x21, 0xd7, 0xb6, 0x78, 0x1a, 0x0e, 0x87, 0x7f, 0x81, 0xc3, 0xb3, 0x02, - 0xc3, 0x29, 0xfa, 0x56, 0x7f, 0xd8, 0x25, 0x39, 0x3a, 0x9c, 0xe2, 0x77, 0x05, 0x85, 0xc0, 0x70, - 0x8a, 0x33, 0xb8, 0xf5, 0xf7, 0x04, 0x85, 0x2d, 0xf9, 0xf3, 0x93, 0xe4, 0xac, 0xb7, 0x7b, 0x6a, - 0x99, 0xb3, 0x18, 0xf1, 0x26, 0x67, 0x00, 0x0e, 0x21, 0x04, 0x4f, 0x42, 0x66, 0xd6, 0x89, 0xf8, - 0x03, 0x0e, 0x4f, 0x1b, 0x62, 0x06, 0x70, 0x9d, 0x89, 0x24, 0x43, 0x7e, 0x5b, 0x09, 0xa7, 0xf8, - 0x43, 0x4e, 0x91, 0x97, 0x60, 0xfc, 0x31, 0x1c, 0xc3, 0x76, 0x70, 0xab, 0x3e, 0x03, 0xc9, 0x5b, - 0xe2, 0x31, 0x38, 0x84, 0xbb, 0xf2, 0xd8, 0x30, 0x1b, 0x27, 0xb3, 0x31, 0x7c, 0x49, 0xb8, 0x52, - 0x60, 0x08, 0x05, 0x66, 0x9e, 0x9e, 0x3e, 0xc0, 0xcd, 0x75, 0x77, 0xa6, 0xe9, 0xf8, 0x23, 0xce, - 0x91, 0x73, 0x41, 0xdc, 0x23, 0x43, 0xf3, 0x2c, 0x34, 0x5f, 0x16, 0x1e, 0x91, 0x60, 0x7c, 0xe9, - 0xe1, 0xce, 0x94, 0x74, 0x12, 0x67, 0x61, 0xfb, 0x63, 0xb1, 0xf4, 0x18, 0x76,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0x01, 0x04, - 0xdc, 0xd0, 0x6d, 0x67, 0x96, 0xe7, 0xfe, 0x1f, 0x01, 0x16, 0x00, 0x62, 0x34, 0xf9, 0xfe, 0x92, - 0x71, 0x1a, 0x86, 0x7d, 0x57, 0x18, 0xcd, 0xf5, 0x31, 0x01, 0x66, 0xc8, 0x57, 0xf6, 0xea, 0x41, - 0x08, 0xf8, 0x7f, 0x39, 0x78, 0x84, 0xd8, 0xb8, 0x14, 0x7c, 0xb4, 0x03, 0xdb, 0xd6, 0xb6, 0xc5, - 0x0e, 0x75, 0xe0, 0xf7, 0x2f, 0xc3, 0xdd, 0xa8, 0x83, 0xf5, 0x75, 0xf5, 0xd8, 0x72, 0x4e, 0x56, - 0x71, 0xc1, 0xd9, 0x54, 0x71, 0x8d, 0x1f, 0xc9, 0x64, 0xf9, 0x15, 0x19, 0x58, 0x3a, 0xdb, 0x71, - 0x4e, 0xe9, 0x1e, 0x98, 0xbb, 0xda, 0xb5, 0x74, 0x07, 0xab, 0x58, 0xd5, 0xea, 0x98, 0x8e, 0x9a, - 0x83, 0x48, 0x8b, 0x1e, 0x79, 0x47, 0xb4, 0x48, 0xab, 0xf4, 0x2d, 0x15, 0x52, 0xd8, 0xb4, 0xe0, - 0x22, 0xb5, 0xd5, 0xe7, 0x60, 0x9e, 0xb5, 0x0a, 0x87, 0xd6, 0x16, 0x3d, 0x5e, 0x44, 0x29, 0x3f, - 0xa5, 0x7b, 0x78, 0x45, 0x32, 0x61, 0x85, 0x03, 0x56, 0xc6, 0xb4, 0xe9, 0x6f, 0x4e, 0xda, 0xbc, - 0xed, 0x97, 0xab, 0xcf, 0x80, 0x22, 0x94, 0xa9, 0x35, 0x84, 0x99, 0x9d, 0xcd, 0x2e, 0x4f, 0x65, - 0x16, 0xca, 0x8c, 0x58, 0xb1, 0x7d, 0x62, 0xf5, 0x29, 0x48, 0xef, 0x98, 0xce, 0x47, 0xd7, 0x08, - 0x1f, 0x7b, 0x17, 0xb0, 0x14, 0xc8, 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ff, - 0xff, 0x58, 0x4b, 0xd1, 0xa0, 0x91, 0x3e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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 *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(*m.F)))) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v34; i++ { - v35 := randStringMapsproto2(r) - this.StringToDoubleMap[v35] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v35] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v36; i++ { - v37 := randStringMapsproto2(r) - this.StringToFloatMap[v37] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v37] *= -1 - } - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v38; i++ { - v39 := int32(r.Int31()) - this.Int32Map[v39] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v40; i++ { - v41 := int64(r.Int63()) - this.Int64Map[v41] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v42; i++ { - v43 := uint32(r.Uint32()) - this.Uint32Map[v43] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v44; i++ { - v45 := uint64(uint64(r.Uint32())) - this.Uint64Map[v45] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v46; i++ { - v47 := int32(r.Int31()) - this.Sint32Map[v47] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v47] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v48; i++ { - v49 := int64(r.Int63()) - this.Sint64Map[v49] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v49] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v50; i++ { - v51 := uint32(r.Uint32()) - this.Fixed32Map[v51] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v52; i++ { - v53 := int32(r.Int31()) - this.Sfixed32Map[v53] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v54; i++ { - v55 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v56; i++ { - v57 := int64(r.Int63()) - this.Sfixed64Map[v57] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v58; i++ { - v59 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v60; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v61; i++ { - v62 := r.Intn(100) - v63 := randStringMapsproto2(r) - this.StringToBytesMap[v63] = make([]byte, v62) - for i := 0; i < v62; i++ { - this.StringToBytesMap[v63][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v64; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v65; 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 { - v66 := r.Intn(100) - tmps := make([]rune, v66) - for i := 0; i < v66; 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)) - v67 := r.Int63() - if r.Intn(2) == 0 { - v67 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v67)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - 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 *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.F = &v2 - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/both/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 968 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xcd, 0x4f, 0x1b, 0x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 0x57, 0x8a, 0x7b, 0xd9, - 0xe1, 0xde, 0x89, 0xd9, 0x61, 0x2f, 0x65, 0xd8, 0x61, 0x98, 0x84, 0xa7, 0x1d, 0x8e, 0xa3, 0xd9, - 0x61, 0xa0, 0x55, 0x14, 0xa9, 0x49, 0x92, 0xda, 0x99, 0x4d, 0x52, 0xc8, 0x02, 0x08, 0xd1, 0x7a, - 0x18, 0x20, 0xd2, 0x62, 0x2b, 0xfa, 0xed, 0xd0, 0x9f, 0xbe, 0x2a, 0x4f, 0xb9, 0x7d, 0x3b, 0x7a, - 0x97, 0xfe, 0xed, 0xe8, 0x6b, 0xfe, 0x06, 0xd6, 0x4e, 0x95, 0xb6, 0xac, 0x92, 0xd2, 0x53, 0xdc, - 0x40, 0xbd, 0xd9, 0x72, 0x03, 0xf5, 0x6d, 0xdc, 0x44, 0x69, 0xbd, 0xb5, 0x3e, 0x1c, 0x0f, 0x54, - 0xac, 0x48, 0xb1, 0x8b, 0xae, 0x58, 0xad, 0x97, 0x51, 0xd3, 0xb2, 0x79, 0x17, 0xef, 0xa1, 0x94, - 0xde, 0xb8, 0x23, 0xd3, 0x97, 0xce, 0x50, 0x66, 0xd1, 0x95, 0xc9, 0x5a, 0x19, 0x32, 0x25, 0x9b, - 0x36, 0x73, 0x9b, 0xe8, 0x73, 0x78, 0x5a, 0x61, 0x11, 0x05, 0x9e, 0xb6, 0x4f, 0xe9, 0x44, 0x8c, - 0xed, 0xab, 0x7f, 0xe2, 0x79, 0x14, 0x7a, 0x76, 0xd8, 0x1f, 0xb7, 0xc9, 0x84, 0x52, 0xa7, 0x24, - 0x5b, 0xac, 0xf8, 0x7f, 0x15, 0x72, 0x1b, 0xe8, 0x33, 0x70, 0x32, 0x79, 0x41, 0xfc, 0x3c, 0x64, - 0x15, 0x25, 0x4d, 0xe3, 0x88, 0x17, 0x87, 0x00, 0x71, 0xc8, 0x2e, 0x9e, 0xfc, 0xc8, 0x78, 0x71, - 0x00, 0x10, 0x07, 0x78, 0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 0x35, 0xa9, 0x37, 0xa4, 0xde, 0x92, 0x3a, 0x27, 0x75, 0x41, 0xea, 0x8a, 0xd4, 0xed, 0x4d, - 0xde, 0x77, 0x47, 0x9e, 0xf7, 0xe4, 0x79, 0xf6, 0x3e, 0xef, 0xfb, 0x10, 0x00, 0x00, 0xff, 0xff, - 0xbb, 0xd1, 0xdf, 0x2d, 0x24, 0x14, 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 1594b1b9..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto +++ /dev/null @@ -1,117 +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; -} - -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 488bc86b..00000000 --- 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 b28199bc..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go +++ /dev/null @@ -1,752 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/both/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 0b6b7278..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go +++ /dev/null @@ -1,3959 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - 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_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{1} } - -type AllMapsOrdered struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{2} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4101 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, - 0x75, 0x36, 0xc5, 0xfb, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, - 0x6b, 0x39, 0xd1, 0x3a, 0x4a, 0x6c, 0xaf, 0xe9, 0xc4, 0x81, 0x2e, 0x5c, 0xad, 0x1c, 0xdd, 0x3a, - 0x94, 0xec, 0x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0xff, 0x49, 0xb2, 0xc3, 0xea, 0xfa, 0x11, 0xca, 0xe2, 0xe5, 0x15, 0x58, 0x52, 0xe5, - 0x19, 0xd5, 0xca, 0x28, 0x7f, 0x31, 0x06, 0x8b, 0x8a, 0x94, 0xa9, 0x5c, 0x45, 0x9f, 0x84, 0x24, - 0x8b, 0x34, 0x56, 0x44, 0x1e, 0x54, 0xe6, 0x5e, 0x1a, 0x77, 0x63, 0x85, 0x84, 0xe2, 0xe4, 0x42, - 0x1a, 0x9f, 0x50, 0x48, 0x09, 0xc5, 0x58, 0x38, 0xbd, 0x1a, 0x83, 0xd2, 0x24, 0xee, 0x88, 0xf5, - 0x3e, 0x17, 0x58, 0xef, 0x4f, 0x84, 0x0d, 0xb8, 0x38, 0xf9, 0x19, 0xc6, 0xac, 0x78, 0x2b, 0x06, - 0xe7, 0xd4, 0xfd, 0x86, 0xd2, 0x86, 0x27, 0x21, 0xd5, 0xb3, 0xbc, 0x1b, 0x8e, 0xa8, 0xb9, 0x1f, - 0x54, 0x64, 0x72, 0x32, 0x1c, 0xf6, 0x15, 0x47, 0xc9, 0xa5, 0x20, 0x3e, 0xa9, 0x69, 0x60, 0xd6, - 0x8c, 0x59, 0xfa, 0x99, 0x39, 0xb8, 0x5d, 0x49, 0xae, 0x34, 0xf4, 0x6e, 0x80, 0x8e, 0xdd, 0x1f, - 0x7a, 0xac, 0xae, 0xb2, 0x34, 0x93, 0xa5, 0x12, 0xba, 0x84, 0x49, 0x0a, 0x19, 0x7a, 0xfe, 0x78, - 0x9c, 0x8e, 0x03, 0x13, 0x51, 0x85, 0x2b, 0x23, 0x43, 0x13, 0xd4, 0xd0, 0xf3, 0x13, 0x9e, 0x74, - 0xac, 0x64, 0x3d, 0x0c, 0x5a, 0xa3, 0xdb, 0xb1, 0x6c, 0xaf, 0xee, 0x7a, 0x03, 0xcb, 0xec, 0x75, - 0xec, 0x36, 0xcd, 0xa3, 0x99, 0x4a, 0xb2, 0x65, 0x76, 0x5d, 0xc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, 0xf7, 0xea, 0x99, 0x7d, 0x0c, - 0x1b, 0x6f, 0x70, 0x4a, 0xbb, 0xb7, 0x8c, 0x91, 0x41, 0x41, 0x95, 0x5c, 0xff, 0xe8, 0xe6, 0x40, - 0xf6, 0xe3, 0x77, 0xe2, 0x90, 0x97, 0x3b, 0x38, 0xd2, 0x10, 0x37, 0x68, 0x9a, 0x8f, 0xd1, 0x2c, - 0x70, 0xef, 0xd4, 0x7e, 0x6f, 0x75, 0x93, 0xe4, 0xff, 0x4a, 0x8a, 0xf5, 0x55, 0x06, 0x43, 0x92, - 0xda, 0x4b, 0x62, 0xcd, 0x62, 0xdd, 0x7a, 0xc6, 0xe0, 0x57, 0x98, 0xec, 0x52, 0x2f, 0xb8, 0x94, - 0x3b, 0x45, 0xb9, 0xef, 0x9b, 0xce, 0xfd, 0x54, 0x8d, 0x92, 0x67, 0x9f, 0xaa, 0xd5, 0xf7, 0x0f, - 0x8c, 0xbd, 0xf5, 0x5d, 0x83, 0xc3, 0xf5, 0x3b, 0x21, 0xd1, 0x35, 0x3f, 0x7d, 0x1a, 0xac, 0x14, - 0x54, 0x34, 0xab, 0xe3, 0x91, 0x81, 0x1c, 0x79, 0x04, 0xf3, 0x33, 0x15, 0xfd, 0x08, 0x43, 0xff, - 0x32, 0x24, 0xa9, 0xbf, 0x74, 0x00, 0xee, 0x31, 0xed, 0x36, 0x3d, 0x03, 0x89, 0xcd, 0x03, 0x83, - 0x84, 0x3f, 0xc6, 0x3b, 0x93, 0xd6, 0x0f, 0x77, 0xaa, 0x9b, 0xb8, 0x02, 0xca, 0x8f, 0x40, 0x8a, - 0x39, 0x81, 0x2c, 0x0d, 0xdf, 0x0d, 0x08, 0x62, 0x97, 0x9c, 0x23, 0x26, 0x46, 0x8f, 0xf7, 0x36, - 0xaa, 0x86, 0x36, 0x27, 0x4f, 0xef, 0xdf, 0xc4, 0x20, 0x27, 0x35, 0x54, 0xa4, 0x94, 0x9b, 0xdd, - 0xae, 0xf3, 0x72, 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, 0x9b, 0xeb, 0xee, 0x4c, 0xd3, - 0xf1, 0x65, 0xce, 0x91, 0xf7, 0x41, 0xdc, 0x23, 0x43, 0xfb, 0x2c, 0x34, 0x5f, 0x11, 0x1e, 0x91, - 0x60, 0x7c, 0xe9, 0xe1, 0xce, 0x94, 0x74, 0x12, 0x67, 0x61, 0xfb, 0x43, 0xb1, 0xf4, 0x18, 0x76, - 0x4f, 0x66, 0xc4, 0x99, 0x76, 0x71, 0x0b, 0x3e, 0x0b, 0xcd, 0x1f, 0x89, 0x99, 0xa6, 0x00, 0x02, - 0x7e, 0x16, 0xee, 0x54, 0xa6, 0xfa, 0x19, 0xc8, 0xfe, 0x98, 0x93, 0x9d, 0x53, 0xa4, 0x7b, 0x9e, - 0x12, 0xce, 0x4a, 0xf9, 0x27, 0x22, 0x25, 0x58, 0x21, 0xae, 0x43, 0xd2, 0xc6, 0xba, 0x66, 0xeb, - 0x6c, 0x5e, 0xfb, 0x53, 0xe1, 0x35, 0x86, 0x0d, 0x78, 0xed, 0x08, 0xce, 0x71, 0xc6, 0xb3, 0xcd, - 0xeb, 0x57, 0x45, 0x62, 0x65, 0xe8, 0xe3, 0xe0, 0xec, 0xfe, 0x34, 0x2c, 0xfb, 0xee, 0x14, 0x1d, - 0x98, 0x5b, 0x27, 0x07, 0x03, 0xd1, 0xcc, 0x5f, 0xe3, 0xcc, 0x22, 0xe3, 0xfb, 0x2d, 0x9c, 0xbb, - 0x67, 0xf6, 0x09, 0xf9, 0x75, 0x28, 0x09, 0xf2, 0xa1, 0x8d, 0x0d, 0xbe, 0xd3, 0xb6, 0x71, 0x1a, - 0x9b, 0x33, 0x50, 0xff, 0x59, 0x68, 0xaa, 0x8e, 0x25, 0x38, 0x61, 0xde, 0x01, 0xcd, 0xef, 0x37, - 0xea, 0x9d, 0x5e, 0xdf, 0xc1, 0xd6, 0x72, 0x3a, 0xe3, 0x9f, 0x8b, 0x99, 0xf2, 0x71, 0x3b, 0x14, - 0x56, 0xa9, 0x42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 0x24, 0x5c, - 0x87, 0x11, 0xa4, 0x4f, 0xd8, 0x15, 0x9d, 0x1d, 0x1a, 0xfa, 0x04, 0x5e, 0x98, 0x36, 0x3b, 0x42, - 0x4b, 0xcc, 0x8e, 0xb8, 0x96, 0x57, 0xe0, 0xc6, 0x29, 0x76, 0x78, 0x84, 0xa9, 0x38, 0xc3, 0x0a, - 0x14, 0xca, 0xa1, 0x15, 0x28, 0xc4, 0x7a, 0x0d, 0x8a, 0x42, 0x95, 0xec, 0xc5, 0x09, 0xad, 0xc6, - 0x5f, 0xee, 0x9a, 0x46, 0xcb, 0x75, 0x19, 0x6b, 0xd1, 0x0d, 0x4a, 0xf5, 0x43, 0x28, 0x08, 0xc5, - 0x3d, 0x97, 0x3e, 0xf4, 0x02, 0xff, 0xc5, 0x60, 0x1a, 0x27, 0x53, 0x65, 0x94, 0x05, 0x37, 0x20, - 0x5c, 0xde, 0x82, 0x73, 0xea, 0x6c, 0x45, 0x5e, 0x0c, 0xc5, 0x5c, 0xcf, 0xdf, 0xe2, 0x21, 0x5f, - 0xc9, 0x0b, 0xa4, 0xe2, 0x2d, 0x35, 0x92, 0x25, 0xd9, 0x45, 0x65, 0xee, 0x4a, 0x6c, 0x79, 0x13, - 0x6e, 0x57, 0x66, 0xa6, 0x28, 0x92, 0x39, 0x99, 0xe4, 0x09, 0x98, 0x0f, 0xa4, 0x23, 0x19, 0x9c, - 0x54, 0x80, 0x93, 0xe3, 0xe0, 0x51, 0x90, 0xc9, 0xe0, 0xb8, 0x02, 0x1c, 0x97, 0xc1, 0x1f, 0x87, - 0x42, 0x30, 0x0f, 0xc9, 0xe8, 0x79, 0x05, 0x7a, 0x5e, 0x81, 0x56, 0xdf, 0x3b, 0xa1, 0x40, 0x27, - 0x42, 0xe8, 0xda, 0xc4, 0x7b, 0x2f, 0x28, 0xd0, 0x0b, 0x0a, 0xb4, 0xfa, 0xde, 0xba, 0x02, 0xad, - 0xcb, 0xe8, 0x4f, 0x40, 0x31, 0x94,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, - 0xf3, 0x4d, 0xfc, 0x7c, 0xeb, 0x7b, 0xa8, 0x8b, 0xff, 0xdf, 0xc1, 0xff, 0xef, 0xe2, 0xff, 0x1f, - 0xe0, 0xff, 0x57, 0xfe, 0xe5, 0xfc, 0x6d, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x34, 0x44, - 0xd5, 0x96, 0x3e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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 *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *FloatingPoint) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(*m.F)))) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v34; i++ { - v35 := randStringMapsproto2(r) - this.StringToDoubleMap[v35] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v35] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v36; i++ { - v37 := randStringMapsproto2(r) - this.StringToFloatMap[v37] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v37] *= -1 - } - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v38; i++ { - v39 := int32(r.Int31()) - this.Int32Map[v39] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v40; i++ { - v41 := int64(r.Int63()) - this.Int64Map[v41] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v42; i++ { - v43 := uint32(r.Uint32()) - this.Uint32Map[v43] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v44; i++ { - v45 := uint64(uint64(r.Uint32())) - this.Uint64Map[v45] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v46; i++ { - v47 := int32(r.Int31()) - this.Sint32Map[v47] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v47] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v48; i++ { - v49 := int64(r.Int63()) - this.Sint64Map[v49] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v49] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v50; i++ { - v51 := uint32(r.Uint32()) - this.Fixed32Map[v51] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v52; i++ { - v53 := int32(r.Int31()) - this.Sfixed32Map[v53] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v54; i++ { - v55 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v56; i++ { - v57 := int64(r.Int63()) - this.Sfixed64Map[v57] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v58; i++ { - v59 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v60; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v61; i++ { - v62 := r.Intn(100) - v63 := randStringMapsproto2(r) - this.StringToBytesMap[v63] = make([]byte, v62) - for i := 0; i < v62; i++ { - this.StringToBytesMap[v63][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v64; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v65; 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 { - v66 := r.Intn(100) - tmps := make([]rune, v66) - for i := 0; i < v66; 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)) - v67 := r.Int63() - if r.Intn(2) == 0 { - v67 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v67)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - 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 *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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{ - // 969 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xcd, 0x4f, 0xe3, 0x46, - 0x18, 0xc6, 0x71, 0xbe, 0x33, 0xf9, 0x72, 0x06, 0x5a, 0x45, 0x91, 0x9a, 0x96, 0xb4, 0x95, 0x42, - 0x68, 0x13, 0x9a, 0x56, 0x55, 0x05, 0x2d, 0x12, 0x81, 0xd0, 0x54, 0x14, 0x8a, 0x48, 0xbf, 0x25, - 0xa4, 0x26, 0xc5, 0x09, 0xd1, 0x26, 0x31, 0x8a, 0x9d, 0xd5, 0x72, 0xe3, 0xcf, 0xd8, 0xeb, 0xde, - 0xf6, 0xb8, 0xc7, 0x3d, 0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, 0xa2, 0x62, 0xdb, 0xc6, 0x9b, - 0x28, 0xf6, 0xcb, 0x48, 0xfd, 0xb6, 0xa6, 0xf1, 0x82, 0x94, 0x57, 0x04, 0x79, 0x46, 0x11, 0xe3, - 0xc4, 0xfa, 0xfa, 0x52, 0xd7, 0x7f, 0xff, 0x9d, 0xa6, 0x0f, 0x79, 0xeb, 0x69, 0xd1, 0x54, 0x4f, - 0x97, 0x78, 0x0b, 0xc5, 0xff, 0x30, 0x60, 0xb9, 0x30, 0x05, 0x7c, 0x0e, 0x02, 0xcc, 0x2a, 0x46, - 0x88, 0x4f, 0x4c, 0x0b, 0x3a, 0x82, 0x79, 0x88, 0xf8, 0x20, 0x38, 0x13, 0x14, 0x61, 0xba, 0x68, - 0x99, 0x2e, 0xa2, 0x1e, 0x88, 0x96, 0xcd, 0x85, 0xc2, 0xbb, 0x68, 0x99, 0x2e, 0x62, 0x3e, 0x08, - 0xde, 0x85, 0x62, 0xba, 0xd8, 0x41, 0x68, 0xb7, 0xff, 0x44, 0x3a, 0x61, 0x36, 0xe2, 0x94, 0xf1, - 0x05, 0xc8, 0x98, 0x96, 0x31, 0x08, 0xea, 0x9a, 0x1b, 0xf8, 0x67, 0x94, 0x68, 0x4d, 0x97, 0x39, - 0x44, 0x31, 0x5f, 0xc2, 0x56, 0xba, 0x36, 0x4e, 0x42, 0xe1, 0x40, 0x86, 0x1d, 0xf6, 0x48, 0x09, - 0x3f, 0x3b, 0xdc, 0x33, 0x31, 0x3b, 0xec, 0xa1, 0x4c, 0x3b, 0x0c, 0x93, 0xf4, 0xb5, 0xc3, 0x71, - 0x74, 0x3b, 0x0c, 0xb4, 0x81, 0xa2, 0x75, 0x59, 0xd6, 0x2a, 0x73, 0x29, 0x0a, 0x59, 0x06, 0x21, - 0x7a, 0x0d, 0x03, 0x44, 0x3b, 0x6c, 0x45, 0xdf, 0x0e, 0xfd, 0xf4, 0x35, 0x79, 0xda, 0xeb, 0xed, - 0x18, 0x55, 0xc6, 0xdb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39, 0x6d, 0x0f, 0xc8, 0x69, 0xfe, 0xe6, 0x5c, 0xe2, 0xda, 0x01, 0x14, 0xd7, 0x66, - 0x30, 0xe7, 0x96, 0xda, 0xea, 0xf6, 0xd4, 0x56, 0xf2, 0x62, 0xc1, 0xe1, 0xad, 0xe9, 0x0c, 0x6f, - 0x65, 0xff, 0xbb, 0x08, 0x65, 0xb8, 0x63, 0xd7, 0x0c, 0x37, 0xd3, 0xe5, 0xf6, 0x8b, 0x72, 0xff, - 0xba, 0x45, 0xb9, 0xb5, 0x59, 0xe8, 0xde, 0x89, 0xee, 0x2f, 0x97, 0x44, 0x57, 0x9d, 0x05, 0x3d, - 0x0f, 0x76, 0xf3, 0x60, 0x37, 0x0f, 0x76, 0xf3, 0x60, 0xf7, 0x61, 0x04, 0xbb, 0xf5, 0xd0, 0xd3, - 0x67, 0x9f, 0x0a, 0xe5, 0x65, 0x14, 0xd5, 0x8f, 0xc6, 0x11, 0x14, 0xd8, 0xdf, 0x12, 0x17, 0xe8, - 0x5c, 0x17, 0x05, 0x3a, 0x6f, 0x8b, 0x81, 0xfa, 0xaf, 0x97, 0x37, 0x85, 0x85, 0x2b, 0x32, 0xae, - 0xc9, 0x78, 0x73, 0x53, 0x10, 0xee, 0xc8, 0xb8, 0x27, 0xe3, 0x81, 0x8c, 0x8b, 0xdb, 0x82, 0xf0, - 0x9c, 0x8c, 0x17, 0x64, 0xbc, 0x24, 0xe3, 0x15, 0x19, 0x97, 0x64, 0x5c, 0xdd, 0x92, 0x5a, 0x32, - 0xdf, 0x91, 0xf9, 0x9e, 0xcc, 0x0f, 0x64, 0xbe, 0x78, 0x5b, 0x58, 0x78, 0x17, 0x00, 0x00, 0xff, - 0xff, 0x0d, 0x6b, 0x00, 0x44, 0x29, 0x14, 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 789f216b..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto +++ /dev/null @@ -1,117 +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; -} - -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 488bc86b..00000000 --- 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 5836eb15..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,752 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 be30ee79..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go +++ /dev/null @@ -1,3189 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/neither/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - 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_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{1} } - -type AllMapsOrdered struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{2} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4105 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, - 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, - 0x6b, 0x39, 0x91, 0x1c, 0x25, 0xb6, 0xd7, 0x74, 0xe2, 0x40, 0x17, 0xae, 0x56, 0x8e, 0x6e, 0x1d, - 0x4a, 0xf6, 0xda, 0x85, 0xc1, 0x8e, 0xc8, 0x21, 0x45, 0x7b, 0x38, 0xc3, 0x72, 0x86, 0xf6, 0x2a, - 0x4f, 0x2e, 0xdc, 0x0b, 0x82, 0xa2, 0xf7, 0x02, 0x75, 0x1c, 0x27, 0xad, 0x03, 0xb4, 0x4e, 0xd3, - 0x5b, 0xd2, 0x1b, 0x8a, 0x3e, 0x05, 0x28, 0xd2, 0xe6, 0xa9, 0x68, 0xfb, 0x94, 0x87, 0x3c, 0x24, - 0xa9, 0x81, 0xba, 0x6d, 0xda, 0xba, 0x80, 0x81, 0x06, 0xf0, 0x4b, 0xcf, 0x7f, 0x1b, 0xfe, 0x33, - 0x1c, 0x72, 0xa8, 0x00, 0xb9, 0x3c, 0xac, 0x00, 0x42, 0x9c, 0xf3, 0x9f, 0xef, 0x9b, 0x33, 0xe7, - 0x3f, 0xff, 0x39, 0xe7, 0xff, 0x39, 0xf0, 0x77, 0x1f, 0x81, 0x7b, 0x3a, 0xb6, 0xdd, 0x31, 0x8d, - 0xd5, 0xfe, 0xc0, 0x76, 0xed, 0x93, 0x61, 0x7b, 0xb5, 0x65, 0x38, 0xcd, 0x41, 0xb7, 0xef, 0xda, - 0x83, 0x15, 0x2a, 0x53, 0x4b, 0x4c, 0x63, 0x45, 0x68, 0x54, 0xf6, 0x60, 0xfe, 0x5a, 0xd7, 0x34, - 0xb6, 0x3c, 0xc5, 0xba, 0xe1, 0xaa, 0x57, 0x21, 0xd9, 0x46, 0x61, 0x39, 0x76, 0x4f, 0xe2, 0x4a, - 0x7e, 0xed, 0xbe, 0x95, 0x00, 0x68, 0xc5, 0x8f, 0x38, 0x24, 0x62, 0x8d, 0x22, 0x2a, 0x6f, 0x27, - 0x61, 0x21, 0x64, 0x54, 0x55, 0x21, 0x69, 0xe9, 0x3d, 0xc2, 0x18, 0xbb, 0x92, 0xd3, 0xe8, 0x77, - 0xb5, 0x0c, 0x99, 0xbe, 0xde, 0x7c, 0x51, 0xef, 0x18, 0xe5, 0x38, 0x15, 0x8b, 0x4b, 0xf5, 0x22, - 0x40, 0xcb, 0xe8, 0x1b, 0x56, 0xcb, 0xb0, 0x9a, 0x67, 0xe5, 0x04, 0x5a, 0x91, 0xd3, 0x24, 0x89, - 0xfa, 0x10, 0xcc, 0xf7, 0x87, 0x27, 0x66, 0xb7, 0xd9, 0x90, 0xd4, 0x00, 0xd5, 0x52, 0x9a, 0xc2, - 0x06, 0xb6, 0x46, 0xca, 0x0f, 0x40, 0xe9, 0x65, 0x43, 0x7f, 0x51, 0x56, 0xcd, 0x53, 0xd5, 0x22, - 0x11, 0x4b, 0x8a, 0x9b, 0x50, 0xe8, 0x19, 0x8e, 0x83, 0x06, 0x34, 0xdc, 0xb3, 0xbe, 0x51, 0x4e, - 0xd2, 0xa7, 0xbf, 0x67, 0xec, 0xe9, 0x83, 0x4f, 0x9e, 0xe7, 0xa8, 0x23, 0x04, 0xa9, 0xeb, 0x90, - 0x33, 0xac, 0x61, 0x8f, 0x31, 0xa4, 0x26, 0xf8, 0xaf, 0x86, 0x1a, 0x41, 0x96, 0x2c, 0x81, 0x71, - 0x8a, 0x8c, 0x63, 0x0c, 0x5e, 0xea, 0x36, 0x8d, 0x72, 0x9a, 0x12, 0x3c, 0x30, 0x46, 0x50, 0x67, - 0xe3, 0x41, 0x0e, 0x81, 0xc3, 0x47, 0xc9, 0x19, 0x37, 0x5d, 0xc3, 0x72, 0xba, 0xb6, 0x55, 0xce, - 0x50, 0x92, 0xfb, 0x43, 0x66, 0xd1, 0x30, 0x5b, 0x41, 0x8a, 0x11, 0x4e, 0x7d, 0x14, 0x32, 0x76, - 0xdf, 0xc5, 0x6f, 0x4e, 0x39, 0x8b, 0xf3, 0x93, 0x5f, 0xbb, 0x2b, 0x34, 0x10, 0x0e, 0x98, 0x8e, - 0x26, 0x94, 0xd5, 0x1d, 0x50, 0x1c, 0x7b, 0x38, 0x68, 0x1a, 0x8d, 0xa6, 0xdd, 0x32, 0x1a, 0x5d, - 0xab, 0x6d, 0x97, 0x73, 0x94, 0xe0, 0xd2, 0xf8, 0x83, 0x50, 0xc5, 0x4d, 0xd4, 0xdb, 0x41, 0x35, - 0xad, 0xe8, 0xf8, 0xae, 0xd5, 0x0b, 0x90, 0x76, 0xce, 0x2c, 0x57, 0xbf, 0x59, 0x2e, 0xd0, 0x08, - 0xe1, 0x57, 0x95, 0xff, 0x4b, 0x41, 0x69, 0x96, 0x10, 0x7b, 0x02, 0x52, 0x6d, 0xf2, 0x94, 0x18, - 0x60, 0xe7, 0xf0, 0x01, 0xc3, 0xf8, 0x9d, 0x98, 0xfe, 0x01, 0x9d, 0xb8, 0x0e, 0x79, 0xcb, 0x70, - 0x5c, 0xa3, 0xc5, 0x22, 0x22, 0x31, 0x63, 0x4c, 0x01, 0x03, 0x8d, 0x87, 0x54, 0xf2, 0x07, 0x0a, - 0xa9, 0x1b, 0x50, 0xf2, 0x4c, 0x6a, 0x0c, 0x74, 0xab, 0x23, 0x62, 0x73, 0x35, 0xca, 0x92, 0x95, - 0x9a, 0xc0, 0x69, 0x04, 0xa6, 0x15, 0x0d, 0xdf, 0xb5, 0xba, 0x05, 0x60, 0x5b, 0x86, 0xdd, 0xc6, - 0xe5, 0xd5, 0x34, 0x31, 0x4e, 0xc2, 0xbd, 0x74, 0x40, 0x54, 0xc6, 0xbc, 0x64, 0x33, 0x69, 0xd3, - 0x54, 0x1f, 0x1f, 0x85, 0x5a, 0x66, 0x42, 0xa4, 0xec, 0xb1, 0x45, 0x36, 0x16, 0x6d, 0xc7, 0x50, - 0x1c, 0x18, 0x24, 0xee, 0xd1, 0xc5, 0xec, 0xc9, 0x72, 0xd4, 0x88, 0x95, 0xc8, 0x27, 0xd3, 0x38, - 0x8c, 0x3d, 0xd8, 0xdc, 0x40, 0xbe, 0x54, 0xef, 0x05, 0x4f, 0xd0, 0xa0, 0x61, 0x05, 0x34, 0x0b, - 0x15, 0x84, 0x70, 0x1f, 0x65, 0x4b, 0x57, 0xa1, 0xe8, 0x77, 0x8f, 0xba, 0x08, 0x29, 0xc7, 0xd5, - 0x07, 0x2e, 0x8d, 0xc2, 0x94, 0xc6, 0x2e, 0x54, 0x05, 0x12, 0x98, 0x64, 0x68, 0x96, 0x4b, 0x69, - 0xe4, 0xeb, 0xd2, 0x63, 0x30, 0xe7, 0xbb, 0xfd, 0xac, 0xc0, 0xca, 0x6b, 0x69, 0x58, 0x0c, 0x8b, - 0xb9, 0xd0, 0xf0, 0xc7, 0xe5, 0x83, 0x11, 0x70, 0x62, 0x0c, 0x30, 0xee, 0x08, 0x03, 0xbf, 0xc2, - 0x88, 0x4a, 0x99, 0xfa, 0x89, 0x61, 0x62, 0x34, 0xc5, 0xae, 0x14, 0xd7, 0x1e, 0x9a, 0x29, 0xaa, - 0x57, 0x76, 0x09, 0x44, 0x63, 0x48, 0xf5, 0x49, 0x48, 0xf2, 0x14, 0x47, 0x18, 0x96, 0x67, 0x63, - 0x20, 0xb1, 0xa8, 0x51, 0x9c, 0xfa, 0x01, 0xc8, 0x91, 0xff, 0xcc, 0xb7, 0x69, 0x6a, 0x73, 0x96, - 0x08, 0x88, 0x5f, 0xd5, 0x25, 0xc8, 0xd2, 0x30, 0x6b, 0x19, 0xa2, 0x34, 0x78, 0xd7, 0x64, 0x62, - 0x5a, 0x46, 0x5b, 0x1f, 0x9a, 0x6e, 0xe3, 0x25, 0xdd, 0x1c, 0x1a, 0x34, 0x60, 0x70, 0x62, 0xb8, - 0xf0, 0x69, 0x22, 0x53, 0x2f, 0x41, 0x9e, 0x45, 0x65, 0x17, 0x31, 0x37, 0x69, 0xf6, 0x49, 0x69, - 0x2c, 0x50, 0x77, 0x88, 0x84, 0xdc, 0xfe, 0x05, 0x07, 0xd7, 0x02, 0x9f, 0x5a, 0x7a, 0x0b, 0x22, - 0xa0, 0xb7, 0x7f, 0x2c, 0x98, 0xf8, 0xee, 0x0e, 0x7f, 0xbc, 0x60, 0x2c, 0x56, 0xfe, 0x3a, 0x0e, - 0x49, 0xba, 0xde, 0x4a, 0x90, 0x3f, 0x7a, 0xf6, 0xb0, 0xd6, 0xd8, 0x3a, 0x38, 0xde, 0xd8, 0xad, - 0x29, 0x31, 0xb5, 0x08, 0x40, 0x05, 0xd7, 0x76, 0x0f, 0xd6, 0x8f, 0x94, 0xb8, 0x77, 0xbd, 0xb3, - 0x7f, 0xf4, 0xe8, 0xc7, 0x94, 0x84, 0x07, 0x38, 0x66, 0x82, 0xa4, 0xac, 0xf0, 0xd1, 0x35, 0x25, - 0x85, 0x91, 0x50, 0x60, 0x04, 0x3b, 0x37, 0x6a, 0x5b, 0xa8, 0x91, 0xf6, 0x4b, 0x50, 0x27, 0xa3, - 0xce, 0x41, 0x8e, 0x4a, 0x36, 0x0e, 0x0e, 0x76, 0x95, 0xac, 0xc7, 0x59, 0x3f, 0xd2, 0x76, 0xf6, - 0xb7, 0x95, 0x9c, 0xc7, 0xb9, 0xad, 0x1d, 0x1c, 0x1f, 0x2a, 0xe0, 0x31, 0xec, 0xd5, 0xea, 0xf5, - 0xf5, 0xed, 0x9a, 0x92, 0xf7, 0x34, 0x36, 0x9e, 0x3d, 0xaa, 0xd5, 0x95, 0x82, 0xcf, 0x2c, 0xbc, - 0xc5, 0x9c, 0x77, 0x8b, 0xda, 0xfe, 0xf1, 0x9e, 0x52, 0x54, 0xe7, 0x61, 0x8e, 0xdd, 0x42, 0x18, - 0x51, 0x0a, 0x88, 0xd0, 0x52, 0x65, 0x64, 0x08, 0x63, 0x99, 0xf7, 0x09, 0x50, 0x43, 0xad, 0x6c, - 0x42, 0x8a, 0x46, 0x17, 0x46, 0x71, 0x71, 0x77, 0x7d, 0xa3, 0xb6, 0xdb, 0x38, 0x38, 0x3c, 0xda, - 0x39, 0xd8, 0x5f, 0xdf, 0x45, 0xdf, 0x79, 0x32, 0xad, 0xf6, 0x53, 0xc7, 0x3b, 0x5a, 0x6d, 0x0b, - 0xfd, 0x27, 0xc9, 0x0e, 0x6b, 0xeb, 0x47, 0x28, 0x4b, 0x54, 0x96, 0x61, 0x31, 0x2c, 0xcf, 0x84, - 0xad, 0x8c, 0xca, 0x17, 0x63, 0xb0, 0x10, 0x92, 0x32, 0x43, 0x57, 0xd1, 0x27, 0x21, 0xc5, 0x22, - 0x8d, 0x15, 0x91, 0x07, 0x43, 0x73, 0x2f, 0x8d, 0xbb, 0xb1, 0x42, 0x42, 0x71, 0x72, 0x21, 0x4d, - 0x4c, 0x28, 0xa4, 0x84, 0x62, 0x2c, 0x9c, 0x5e, 0x8d, 0x41, 0x79, 0x12, 0x77, 0xc4, 0x7a, 0x8f, - 0xfb, 0xd6, 0x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xb6, 0x2b, 0xd3, 0xb8, 0xc2, 0x9b, 0xb7, 0xeb, 0xe3, 0xcd, 0xdb, 0x72, 0xf4, - 0x5a, 0x0c, 0xeb, 0xe1, 0x9e, 0x9f, 0xd8, 0xc3, 0xcd, 0xb4, 0xb8, 0xa3, 0x5a, 0xb9, 0xe7, 0x26, - 0xb5, 0x72, 0x0f, 0xcf, 0xc2, 0x3e, 0xbd, 0xa3, 0x7b, 0x66, 0x42, 0x47, 0xb7, 0x3a, 0x0b, 0xf5, - 0xad, 0xc6, 0xee, 0x56, 0x63, 0x77, 0xab, 0xb1, 0xbb, 0xd5, 0xd8, 0xfd, 0x64, 0x34, 0x76, 0xd5, - 0xe4, 0x6b, 0x6f, 0x5e, 0x8a, 0x2d, 0x5f, 0x86, 0x0c, 0xbf, 0xb5, 0x9a, 0x86, 0xf8, 0xde, 0xba, - 0x72, 0x1b, 0xfd, 0xbf, 0xa1, 0xc4, 0xe8, 0xff, 0x4d, 0x25, 0xbe, 0xb1, 0xfb, 0x8d, 0xef, 0x5c, - 0xbc, 0xed, 0x9f, 0xf0, 0xf3, 0x4d, 0xfc, 0x7c, 0xfb, 0x3b, 0x17, 0x63, 0xef, 0xe0, 0xe7, 0x5d, - 0xfc, 0x7c, 0x1f, 0x3f, 0xaf, 0x7c, 0xf7, 0x62, 0xec, 0x4b, 0xf8, 0xf9, 0x0a, 0x7e, 0xfe, 0x06, - 0x3f, 0x5f, 0xc3, 0xcf, 0x37, 0xbe, 0x8b, 0xfa, 0xf8, 0xf9, 0x36, 0x7e, 0x7f, 0x07, 0xff, 0xbf, - 0x8b, 0xff, 0xbf, 0x8f, 0xff, 0x5f, 0xf9, 0xd7, 0x8b, 0xb7, 0xfd, 0x7f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x88, 0xd1, 0x85, 0x15, 0x94, 0x3e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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 *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v34; i++ { - v35 := randStringMapsproto2(r) - this.StringToDoubleMap[v35] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v35] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v36; i++ { - v37 := randStringMapsproto2(r) - this.StringToFloatMap[v37] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v37] *= -1 - } - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v38; i++ { - v39 := int32(r.Int31()) - this.Int32Map[v39] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v40; i++ { - v41 := int64(r.Int63()) - this.Int64Map[v41] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v42; i++ { - v43 := uint32(r.Uint32()) - this.Uint32Map[v43] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v44; i++ { - v45 := uint64(uint64(r.Uint32())) - this.Uint64Map[v45] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v46; i++ { - v47 := int32(r.Int31()) - this.Sint32Map[v47] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v47] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v48; i++ { - v49 := int64(r.Int63()) - this.Sint64Map[v49] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v49] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v50; i++ { - v51 := uint32(r.Uint32()) - this.Fixed32Map[v51] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v52; i++ { - v53 := int32(r.Int31()) - this.Sfixed32Map[v53] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v54; i++ { - v55 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v56; i++ { - v57 := int64(r.Int63()) - this.Sfixed64Map[v57] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v58; i++ { - v59 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v60; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v61; i++ { - v62 := r.Intn(100) - v63 := randStringMapsproto2(r) - this.StringToBytesMap[v63] = make([]byte, v62) - for i := 0; i < v62; i++ { - this.StringToBytesMap[v63][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v64; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v65; 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 { - v66 := r.Intn(100) - tmps := make([]rune, v66) - for i := 0; i < v66; 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)) - v67 := r.Int63() - if r.Intn(2) == 0 { - v67 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v67)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - 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 *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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{ - // 968 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xbd, 0x6f, 0xdb, 0x46, - 0x18, 0xc6, 0x4d, 0x7d, 0xeb, 0xf4, 0x45, 0x9d, 0xdd, 0x42, 0x10, 0x50, 0xb9, 0x56, 0x5b, 0x40, - 0x96, 0x5b, 0xc9, 0x55, 0x8b, 0xa2, 0xb0, 0x5b, 0x03, 0x96, 0x2d, 0x57, 0x85, 0x6b, 0xd7, 0xb0, - 0xfa, 0x19, 0xc0, 0x40, 0xac, 0x98, 0x52, 0x84, 0x48, 0xa2, 0x21, 0x52, 0x41, 0xbc, 0xf9, 0xcf, - 0xc8, 0x9a, 0x2d, 0x63, 0xc6, 0x8c, 0x19, 0x3d, 0x66, 0xf4, 0x90, 0xc1, 0x76, 0x16, 0x8f, 0x1e, - 0x3d, 0xe6, 0x78, 0x47, 0x52, 0x47, 0xf2, 0x25, 0xa9, 0x6c, 0x19, 0x34, 0x1c, 0x4e, 0x77, 0x7e, - 0x9f, 0xdf, 0x3d, 0x34, 0x79, 0x2f, 0x1e, 0xb4, 0xf8, 0x48, 0x1e, 0xb4, 0x65, 0xa5, 0x3a, 0x94, - 0x7a, 0xea, 0x63, 0x69, 0x54, 0x1d, 0x1c, 0x9f, 0x2a, 0xa7, 0x23, 0x59, 0x95, 0x6b, 0x15, 0x3a, - 0xe1, 0x84, 0xbe, 0xd2, 0xfe, 0x90, 0xff, 0xae, 0x4b, 0xaa, 0xc6, 0xed, 0x0a, 0x11, 0x55, 0xbb, - 0x72, 0x57, 0xae, 0xd2, 0x3f, 0xb6, 0xc7, 0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0xa2, 0x50, 0x5e, 0x42, 0x51, 0xfd, 0x68, 0x1c, 0x41, 0x81, 0xbd, 0x4d, 0x71, 0x8e, 0xce, 0x75, - 0x51, 0xa0, 0xf3, 0x96, 0x18, 0xa8, 0xff, 0x71, 0x71, 0x5d, 0x98, 0x7b, 0x4b, 0xc6, 0x25, 0x19, - 0x57, 0xd7, 0x05, 0xe1, 0x96, 0x8c, 0x3b, 0x32, 0xee, 0xc9, 0x38, 0xbf, 0x29, 0x08, 0x2f, 0xc9, - 0x78, 0x45, 0xc6, 0x6b, 0x32, 0xde, 0x90, 0x71, 0x71, 0x43, 0xea, 0xc9, 0xb8, 0x22, 0xbf, 0x6f, - 0xc9, 0x7c, 0x47, 0xe6, 0x7b, 0x32, 0x9f, 0xbf, 0x2f, 0xcc, 0x7d, 0x08, 0x00, 0x00, 0xff, 0xff, - 0x87, 0xb4, 0x7a, 0x0b, 0x27, 0x14, 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 014b8869..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto +++ /dev/null @@ -1,117 +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; -} - -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 488bc86b..00000000 --- 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 36fdec4f..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go +++ /dev/null @@ -1,668 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/neither/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 ed80a305..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go +++ /dev/null @@ -1,6867 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps - 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_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{1} } - -type AllMapsOrdered struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{2} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4102 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, - 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0xd7, 0x8e, - 0xd7, 0x72, 0x22, 0x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0x97, 0xea, 0x15, 0xf0, 0x04, 0x0d, 0x1a, 0x56, 0x40, 0xb3, - 0x50, 0x41, 0x08, 0xf7, 0x51, 0xb6, 0x74, 0x0d, 0x8a, 0x7e, 0xf7, 0xa8, 0x8b, 0x90, 0x72, 0x5c, - 0x7d, 0xe0, 0xd2, 0x28, 0x4c, 0x69, 0xec, 0x42, 0x55, 0x20, 0x81, 0x49, 0x86, 0x66, 0xb9, 0x94, - 0x46, 0xbe, 0x2e, 0x3d, 0x0a, 0x73, 0xbe, 0xdb, 0xcf, 0x0a, 0xac, 0xbc, 0x9a, 0x86, 0xc5, 0xb0, - 0x98, 0x0b, 0x0d, 0x7f, 0x5c, 0x3e, 0x18, 0x01, 0x27, 0xc6, 0x00, 0xe3, 0x8e, 0x30, 0xf0, 0x2b, - 0x8c, 0xa8, 0x94, 0xa9, 0x9f, 0x18, 0x26, 0x46, 0x53, 0xec, 0x6a, 0x71, 0xed, 0xc1, 0x99, 0xa2, - 0x7a, 0x65, 0x97, 0x40, 0x34, 0x86, 0x54, 0x9f, 0x80, 0x24, 0x4f, 0x71, 0x84, 0x61, 0x79, 0x36, - 0x06, 0x12, 0x8b, 0x1a, 0xc5, 0xa9, 0x1f, 0x80, 0x1c, 0xf9, 0xcf, 0x7c, 0x9b, 0xa6, 0x36, 0x67, - 0x89, 0x80, 0xf8, 0x55, 0x5d, 0x82, 0x2c, 0x0d, 0xb3, 0x96, 0x21, 0x4a, 0x83, 0x77, 0x4d, 0x26, - 0xa6, 0x65, 0xb4, 0xf5, 0xa1, 0xe9, 0x36, 0x5e, 0xd4, 0xcd, 0xa1, 0x41, 0x03, 0x06, 0x27, 0x86, - 0x0b, 0x9f, 0x22, 0x32, 0xf5, 0x12, 0xe4, 0x59, 0x54, 0x76, 0x11, 0x73, 0x8b, 0x66, 0x9f, 0x94, - 0xc6, 0x02, 0x75, 0x87, 0x48, 0xc8, 0xed, 0x9f, 0x77, 0x70, 0x2d, 0xf0, 0xa9, 0xa5, 0xb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, 0x9d, 0x27, 0xd3, 0x6a, 0x3f, 0x75, 0xbc, 0xa3, 0xd5, 0xb6, - 0xd0, 0x7f, 0x92, 0xec, 0xb0, 0xb6, 0x7e, 0x84, 0xb2, 0x44, 0x65, 0x19, 0x16, 0xc3, 0xf2, 0x4c, - 0xd8, 0xca, 0xa8, 0x7c, 0x31, 0x06, 0x0b, 0x21, 0x29, 0x33, 0x74, 0x15, 0x7d, 0x12, 0x52, 0x2c, - 0xd2, 0x58, 0x11, 0x79, 0x20, 0x34, 0xf7, 0xd2, 0xb8, 0x1b, 0x2b, 0x24, 0x14, 0x27, 0x17, 0xd2, - 0xc4, 0x84, 0x42, 0x4a, 0x28, 0xc6, 0xc2, 0xe9, 0x95, 0x18, 0x94, 0x27, 0x71, 0x47, 0xac, 0xf7, - 0xb8, 0x6f, 0xbd, 0x3f, 0x1e, 0x34, 0xe0, 0xf2, 0xe4, 0x67, 0x18, 0xb3, 0xe2, 0xcd, 0x18, 0x5c, - 0x08, 0xef, 0x37, 0x42, 0x6d, 0x78, 0x02, 0xd2, 0x3d, 0xc3, 0x3d, 0xb5, 0x45, 0xcd, 0xfd, 0x60, - 0x48, 0x26, 0x27, 0xc3, 0x41, 0x5f, 0x71, 0x94, 0x5c, 0x0a, 0x12, 0x93, 0x9a, 0x06, 0x66, 0xcd, - 0x98, 0xa5, 0x9f, 0x89, 0xc3, 0xed, 0xa1, 0xe4, 0xa1, 0x86, 0xde, 0x0d, 0xd0, 0xb5, 0xfa, 0x43, - 0x97, 0xd5, 0x55, 0x96, 0x66, 0x72, 0x54, 0x42, 0x97, 0x30, 0x49, 0x21, 0x43, 0xd7, 0x1b, 0x4f, - 0xd0, 0x71, 0x60, 0x22, 0xaa, 0x70, 0x6d, 0x64, 0x68, 0x92, 0x1a, 0x7a, 0x71, 0xc2, 0x93, 0x8e, - 0x95, 0xac, 0x87, 0x40, 0x69, 0x9a, 0x5d, 0xc3, 0x72, 0x1b, 0x8e, 0x3b, 0x30, 0xf4, 0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9f, 0x9e, 0xb4, 0x79, 0x27, 0x28, 0x57, - 0x9f, 0x02, 0x45, 0x28, 0x53, 0x6b, 0x08, 0x33, 0x3b, 0xa2, 0x5d, 0x9e, 0xca, 0x2c, 0x94, 0x19, - 0xb1, 0xe2, 0x04, 0xc4, 0xea, 0x13, 0x90, 0xdd, 0xb1, 0xdc, 0x8f, 0xae, 0x11, 0x3e, 0xf6, 0x4a, - 0x60, 0x25, 0x94, 0x4f, 0x28, 0x31, 0x9e, 0x6c, 0x97, 0x5f, 0x72, 0xfc, 0x23, 0x1f, 0x23, 0xf8, - 0xe4, 0x74, 0x3c, 0x55, 0x1a, 0xe1, 0xe9, 0x25, 0x79, 0xa5, 0xf0, 0x58, 0x90, 0xf1, 0x37, 0x01, - 0xaf, 0x84, 0x12, 0x78, 0x5a, 0x8c, 0x21, 0x37, 0xf4, 0x4c, 0xe0, 0x14, 0xcc, 0x86, 0x74, 0x04, - 0x85, 0x64, 0x04, 0xa5, 0xf0, 0xac, 0xa8, 0x7b, 0x56, 0x64, 0xa6, 0x50, 0xd4, 0x03, 0x56, 0x38, - 0xb2, 0x15, 0x75, 0xcf, 0x8a, 0x6c, 0x04, 0x85, 0x6c, 0x85, 0xe3, 0x59, 0xb1, 0x05, 0x70, 0xbd, - 0x7b, 0xcb, 0x68, 0x31, 0x33, 0x72, 0xfc, 0xb0, 0x3f, 0x8c, 0x63, 0xa4, 0xc6, 0x48, 0xa0, 0xed, - 0x09, 0xd4, 0x6d, 0xc8, 0xd7, 0x47, 0x97, 0xf4, 0x6d, 0x41, 0xf2, 0x22, 0x64, 0xa8, 0x29, 0xed, - 0x00, 0x4f, 0xde, 0x91, 0x88, 0x84, 0x39, 0xec, 0x91, 0xf2, 0x51, 0xe6, 0x48, 0xcf, 0xc4, 0xcc, - 0x61, 0x0f, 0xe5, 0x99, 0xc3, 0x68, 0x0a, 0x91, 0xe6, 0x48, 0x3c, 0xdc, 0x1c, 0x46, 0x84, 0x05, - 0x67, 0xc3, 0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 0xef, 0xad, 0x86, 0xa0, 0x55, 0x19, 0xfd, - 0x09, 0x28, 0x05, 0x52, 0x8e, 0x0c, 0xcf, 0x84, 0xc0, 0x33, 0x32, 0xfc, 0x09, 0x5c, 0x3a, 0xed, - 0xc9, 0xf8, 0x52, 0x08, 0xbe, 0x14, 0x76, 0xfb, 0x70, 0xeb, 0xd3, 0x21, 0xf0, 0x74, 0xe8, 0xed, - 0xc3, 0xf1, 0x4a, 0x08, 0x5e, 0x91, 0xf1, 0x55, 0x28, 0xc8, 0x59, 0x45, 0xc6, 0x66, 0x43, 0xb0, - 0xd9, 0xa0, 0xdf, 0x7d, 0x29, 0x25, 0x2a, 0xd2, 0x73, 0x13, 0x96, 0x8b, 0x2f, 0x8d, 0x44, 0x91, - 0x14, 0x64, 0x92, 0x9b, 0xb0, 0x18, 0x96, 0x34, 0x42, 0x38, 0x96, 0x65, 0x8e, 0xe2, 0xda, 0xa2, - 0x2f, 0x59, 0x50, 0xdc, 0xb0, 0x27, 0x33, 0x3f, 0x07, 0x0b, 0x21, 0xa9, 0x23, 0x84, 0xf8, 0x21, - 0x99, 0x38, 0xbf, 0xb6, 0xe4, 0x23, 0xf6, 0x75, 0x57, 0x12, 0x7d, 0xe5, 0xdb, 0x0b, 0x50, 0xe4, - 0x29, 0xea, 0x60, 0xd0, 0x32, 0x06, 0xd8, 0xf2, 0xff, 0xcc, 0xe4, 0x0e, 0x6b, 0x2d, 0x2c, 0xb5, - 0x71, 0xdc, 0x39, 0x1a, 0xad, 0xe7, 0x26, 0x36, 0x5a, 0x1f, 0x99, 0xe5, 0x06, 0x51, 0xfd, 0x56, - 0x6d, 0xac, 0xdf, 0x7a, 0x60, 0x1a, 0xed, 0xa4, 0xb6, 0xab, 0x36, 0xd6, 0x76, 0x45, 0xd1, 0x84, - 0x76, 0x5f, 0x37, 0xc6, 0xbb, 0xaf, 0xe5, 0x69, 0x3c, 0x93, 0x9b, 0xb0, 0x1b, 0xe3, 0x4d, 0x58, - 0x24, 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, 0x5f, 0xc2, 0xcf, 0x57, 0xf1, 0xf3, 0xd7, 0xf8, 0xf9, 0x3a, - 0x7e, 0xbe, 0xf9, 0x3d, 0xd4, 0xc7, 0xff, 0xdf, 0xc1, 0xcf, 0xdb, 0xf8, 0xfd, 0x1d, 0xfc, 0xff, - 0x03, 0xfc, 0xff, 0xf2, 0xbf, 0x5c, 0xbc, 0xed, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x22, 0x46, - 0x25, 0x7d, 0x98, 0x3e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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 *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v34; i++ { - v35 := randStringMapsproto2(r) - this.StringToDoubleMap[v35] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v35] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v36; i++ { - v37 := randStringMapsproto2(r) - this.StringToFloatMap[v37] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v37] *= -1 - } - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v38; i++ { - v39 := int32(r.Int31()) - this.Int32Map[v39] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v40; i++ { - v41 := int64(r.Int63()) - this.Int64Map[v41] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v42; i++ { - v43 := uint32(r.Uint32()) - this.Uint32Map[v43] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v44; i++ { - v45 := uint64(uint64(r.Uint32())) - this.Uint64Map[v45] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v46; i++ { - v47 := int32(r.Int31()) - this.Sint32Map[v47] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v47] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v48; i++ { - v49 := int64(r.Int63()) - this.Sint64Map[v49] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v49] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v50; i++ { - v51 := uint32(r.Uint32()) - this.Fixed32Map[v51] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v52; i++ { - v53 := int32(r.Int31()) - this.Sfixed32Map[v53] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v54; i++ { - v55 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v56; i++ { - v57 := int64(r.Int63()) - this.Sfixed64Map[v57] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v58; i++ { - v59 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v60; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v61; i++ { - v62 := r.Intn(100) - v63 := randStringMapsproto2(r) - this.StringToBytesMap[v63] = make([]byte, v62) - for i := 0; i < v62; i++ { - this.StringToBytesMap[v63][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v64; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v65; 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 { - v66 := r.Intn(100) - tmps := make([]rune, v66) - for i := 0; i < v66; 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)) - v67 := r.Int63() - if r.Intn(2) == 0 { - v67 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v67)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - 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 *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.F = &v2 - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unmarshaler/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 970 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 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x24, 0xe3, 0x89, 0x8c, 0x67, 0x32, 0xae, 0x1f, 0x4a, 0xc2, - 0x5f, 0x64, 0xfc, 0x4d, 0xc6, 0x3f, 0x64, 0xfc, 0x4b, 0xc6, 0xcd, 0x03, 0xa9, 0x27, 0xf3, 0x1d, - 0x19, 0x8f, 0xe4, 0xf7, 0x13, 0x99, 0x9f, 0xc9, 0x7c, 0xfd, 0xa2, 0xb4, 0xf4, 0x32, 0x00, 0x00, - 0xff, 0xff, 0x7f, 0x9b, 0x8a, 0x9e, 0x2b, 0x14, 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 853b38d1..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto +++ /dev/null @@ -1,117 +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; -} - -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 488bc86b..00000000 --- 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 a6dfcca1..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,668 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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/unsafeboth/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go deleted file mode 100644 index 90ee1ade..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go +++ /dev/null @@ -1,7632 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps - 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_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{1} } - -type AllMapsOrdered struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{2} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4104 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, - 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, - 0x6b, 0x39, 0x91, 0x1c, 0x25, 0xb6, 0xd7, 0x74, 0xe2, 0x40, 0x17, 0xae, 0x56, 0x8e, 0x6e, 0x1d, - 0x4a, 0xf6, 0xda, 0x85, 0xc1, 0x8e, 0xc8, 0x21, 0x45, 0x7b, 0x38,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ab, - 0x0f, 0x5c, 0x1a, 0x85, 0x29, 0x8d, 0x5d, 0xa8, 0x0a, 0x24, 0x30, 0xc9, 0xd0, 0x2c, 0x97, 0xd2, - 0xc8, 0xd7, 0xa5, 0x47, 0x60, 0xce, 0x77, 0xfb, 0x59, 0x81, 0x95, 0x57, 0xd2, 0xb0, 0x18, 0x16, - 0x73, 0xa1, 0xe1, 0x8f, 0xcb, 0x07, 0x23, 0xe0, 0xc4, 0x18, 0x60, 0xdc, 0x11, 0x06, 0x7e, 0x85, - 0x11, 0x95, 0x32, 0xf5, 0x13, 0xc3, 0xc4, 0x68, 0x8a, 0x5d, 0x29, 0xae, 0x3d, 0x30, 0x53, 0x54, - 0xaf, 0xec, 0x12, 0x88, 0xc6, 0x90, 0xea, 0xe3, 0x90, 0xe4, 0x29, 0x8e, 0x30, 0x2c, 0xcf, 0xc6, - 0x40, 0x62, 0x51, 0xa3, 0x38, 0xf5, 0x43, 0x90, 0x23, 0xff, 0x99, 0x6f, 0xd3, 0xd4, 0xe6, 0x2c, - 0x11, 0x10, 0xbf, 0xaa, 0x4b, 0x90, 0xa5, 0x61, 0xd6, 0x32, 0x44, 0x69, 0xf0, 0xae, 0xc9, 0xc4, - 0xb4, 0x8c, 0xb6, 0x3e, 0x34, 0xdd, 0xc6, 0x0b, 0xba, 0x39, 0x34, 0x68, 0xc0, 0xe0, 0xc4, 0x70, - 0xe1, 0x93, 0x44, 0xa6, 0x5e, 0x82, 0x3c, 0x8b, 0xca, 0x2e, 0x62, 0x6e, 0xd2, 0xec, 0x93, 0xd2, - 0x58, 0xa0, 0xee, 0x10, 0x09, 0xb9, 0xfd, 0x73, 0x0e, 0xae, 0x05, 0x3e, 0xb5, 0xf4, 0x16, 0x44, - 0x40, 0x6f, 0xff, 0x48, 0x30, 0xf1, 0xdd, 0x19, 0xfe, 0x78, 0xc1, 0x58, 0xac, 0xfc, 0x75, 0x1c, - 0x92, 0x74, 0xbd, 0x95, 0x20, 0x7f, 0xf4, 0xf4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0x10, 0x6a, 0xc7, 0x0e, 0x26, 0x33, 0xa1, 0x24, 0xa6, 0xe7, 0x06, 0x2c, 0x0e, 0xad, - 0xae, 0x85, 0x21, 0x8e, 0x23, 0x04, 0xcc, 0x16, 0x6c, 0xf9, 0xdf, 0x32, 0x13, 0x9a, 0xee, 0x63, - 0x59, 0x9b, 0x05, 0x89, 0xb6, 0x30, 0x1c, 0x17, 0x56, 0xaa, 0x50, 0x90, 0x63, 0x47, 0xcd, 0x01, - 0x8b, 0x1e, 0xac, 0x6e, 0x58, 0x51, 0x37, 0x0f, 0xb6, 0x48, 0x2d, 0x7c, 0xa6, 0x86, 0x85, 0x0d, - 0x6b, 0xf2, 0xee, 0xce, 0x51, 0xad, 0xa1, 0x1d, 0xef, 0x1f, 0xed, 0xec, 0xd5, 0x94, 0xc4, 0x72, - 0x2e, 0xfb, 0x76, 0x46, 0x79, 0x09, 0xff, 0xe2, 0x95, 0x6f, 0xc4, 0xa1, 0xe8, 0xef, 0x83, 0xd5, - 0x4f, 0xc2, 0x6d, 0x62, 0xd3, 0xea, 0x18, 0x6e, 0xe3, 0xc5, 0xee, 0x80, 0x86, 0x73, 0x4f, 0x67, - 0x9d, 0xa4, 0x37, 0x13, 0x8b, 0x5c, 0x0b, 0xb7, 0xf7, 0x4f, 0xa1, 0xce, 0x35, 0xaa, 0xa2, 0xee, - 0xc2, 0x25, 0x74, 0x19, 0xf6, 0x9a, 0x56, 0x4b, 0x1f, 0xb4, 0x1a, 0xa3, 0xe3, 0x82, 0x86, 0xde, - 0xc4, 0x38, 0x70, 0x6c, 0x56, 0x49, 0x3c, 0x96, 0x3b, 0x2c, 0xbb, 0xce, 0x95, 0x47, 0x29, 0x76, - 0x9d, 0xab, 0x06, 0xa2, 0x26, 0x31, 0x29, 0x6a, 0xb0, 0xf7, 0xea, 0xe9, 0x7d, 0x0c, 0x1b, 0x77, - 0x70, 0x46, 0xbb, 0xb7, 0xac, 0x96, 0x45, 0x41, 0x8d, 0x5c, 0xff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3e, 0x66, 0xe0, 0xfc, 0x02, 0xe7, 0x54, 0x39, 0x56, 0x4c, 0x0b, 0x61, 0x7c, 0x02, 0xe6, 0x71, - 0xa7, 0x7e, 0x62, 0x3b, 0x7c, 0xdf, 0x3b, 0x03, 0xdd, 0x6b, 0x9c, 0xae, 0xc4, 0x81, 0x74, 0x17, - 0x4c, 0xb8, 0x1e, 0x85, 0x6c, 0x1b, 0x37, 0x40, 0x33, 0x50, 0x7c, 0x91, 0x53, 0x64, 0x88, 0x3e, - 0x81, 0xae, 0x43, 0xa1, 0x63, 0xf3, 0x34, 0x1c, 0x0d, 0xff, 0x12, 0x87, 0xe7, 0x05, 0x86, 0x53, - 0xf4, 0xed, 0xfe, 0xd0, 0x24, 0x39, 0x3a, 0x9a, 0xe2, 0x77, 0x05, 0x85, 0xc0, 0x70, 0x8a, 0x73, - 0xb8, 0xf5, 0xf7, 0x04, 0x85, 0x23, 0xf9, 0xf3, 0xd3, 0xe4, 0xac, 0xd7, 0x3c, 0xb3, 0xad, 0x59, - 0x8c, 0x78, 0x9d, 0x33, 0x00, 0x87, 0x10, 0x82, 0xc7, 0x20, 0x37, 0xeb, 0x44, 0xfc, 0x3e, 0x87, - 0x67, 0x0d, 0x31, 0x03, 0xb8, 0xce, 0x44, 0x92, 0x21, 0xbf, 0xad, 0x44, 0x53, 0xfc, 0x01, 0xa7, - 0x28, 0x4a, 0x30, 0xfe, 0x18, 0xae, 0xe1, 0xb8, 0xb8, 0x55, 0x9f, 0x81, 0xe4, 0x0d, 0xf1, 0x18, - 0x1c, 0xc2, 0x5d, 0x79, 0x62, 0x58, 0xcd, 0xd3, 0xd9, 0x18, 0xbe, 0x22, 0x5c, 0x29, 0x30, 0x84, - 0x02, 0x33, 0x4f, 0x4f, 0x1f, 0xe0, 0xe6, 0xda, 0x9c, 0x69, 0x3a, 0xfe, 0x90, 0x73, 0x14, 0x3c, - 0x10, 0xf7, 0xc8, 0xd0, 0x3a, 0x0f, 0xcd, 0x9b, 0xc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, 0xdf, 0x43, 0x7d, 0xfc, 0x7c, 0x07, 0xbf, 0xbf, 0x8d, 0xff, 0xdf, - 0xc1, 0xff, 0x3f, 0xc0, 0xcf, 0x4b, 0xff, 0x7a, 0x31, 0xf6, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x19, 0x7f, 0xee, 0x57, 0x97, 0x3e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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 *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v34; i++ { - v35 := randStringMapsproto2(r) - this.StringToDoubleMap[v35] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v35] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v36; i++ { - v37 := randStringMapsproto2(r) - this.StringToFloatMap[v37] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v37] *= -1 - } - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v38; i++ { - v39 := int32(r.Int31()) - this.Int32Map[v39] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v40; i++ { - v41 := int64(r.Int63()) - this.Int64Map[v41] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v42; i++ { - v43 := uint32(r.Uint32()) - this.Uint32Map[v43] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v44; i++ { - v45 := uint64(uint64(r.Uint32())) - this.Uint64Map[v45] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v46; i++ { - v47 := int32(r.Int31()) - this.Sint32Map[v47] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v47] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v48; i++ { - v49 := int64(r.Int63()) - this.Sint64Map[v49] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v49] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v50; i++ { - v51 := uint32(r.Uint32()) - this.Fixed32Map[v51] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v52; i++ { - v53 := int32(r.Int31()) - this.Sfixed32Map[v53] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v54; i++ { - v55 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v56; i++ { - v57 := int64(r.Int63()) - this.Sfixed64Map[v57] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v58; i++ { - v59 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v60; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v61; i++ { - v62 := r.Intn(100) - v63 := randStringMapsproto2(r) - this.StringToBytesMap[v63] = make([]byte, v62) - for i := 0; i < v62; i++ { - this.StringToBytesMap[v63][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v64; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v65; 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 { - v66 := r.Intn(100) - tmps := make([]rune, v66) - for i := 0; i < v66; 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)) - v67 := r.Int63() - if r.Intn(2) == 0 { - v67 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v67)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - 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 *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.F - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.F = &v - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2Unsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeboth/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 970 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xbd, 0x4f, 0xeb, 0x56, - 0x18, 0xc6, 0x71, 0xbe, 0x73, 0xf2, 0xe5, 0x1c, 0x68, 0x15, 0x45, 0x6a, 0x5a, 0xd2, 0x56, 0x0a, - 0xa1, 0x4d, 0x68, 0x5a, 0x55, 0x15, 0xb4, 0x48, 0x04, 0x42, 0x53, 0x51, 0x28, 0x22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, 0x75, 0x7a, 0x79, 0x92, 0x57, 0x9c, 0xeb, 0xf8, 0x47, 0x24, 0x9a, 0xc5, 0xd4, - 0x8d, 0x4e, 0x0e, 0x51, 0x72, 0xd5, 0x97, 0x6c, 0x16, 0x33, 0xb0, 0xa8, 0x38, 0x96, 0xf1, 0x36, - 0x4a, 0x7c, 0x33, 0x51, 0x3f, 0x6d, 0xe8, 0xbc, 0x30, 0xe5, 0x95, 0x41, 0x9e, 0x59, 0xc4, 0x38, - 0x89, 0xa1, 0x31, 0x35, 0xf4, 0x9f, 0x7f, 0xa6, 0xeb, 0x23, 0xfe, 0x7a, 0x5a, 0x34, 0xd3, 0xd3, - 0x29, 0xde, 0x41, 0xc9, 0x1f, 0x4c, 0x58, 0x21, 0x4a, 0x01, 0xef, 0x83, 0x00, 0xab, 0x8a, 0x11, - 0x92, 0x9a, 0x65, 0xc1, 0x40, 0x30, 0x0f, 0xb1, 0x00, 0x04, 0x67, 0x82, 0x22, 0x2c, 0x17, 0x1d, - 0xcb, 0x45, 0xdc, 0x07, 0xd1, 0x71, 0xb8, 0x50, 0x78, 0x17, 0x1d, 0xcb, 0x45, 0x22, 0x00, 0xc1, - 0xbb, 0x50, 0x2c, 0x17, 0x7b, 0x08, 0xed, 0x0f, 0xff, 0x92, 0xce, 0x98, 0x8d, 0x24, 0x65, 0x7c, - 0x00, 0x32, 0x66, 0x65, 0x0c, 0x82, 0xfa, 0xd6, 0x02, 0xfe, 0x1a, 0xa5, 0x3a, 0xb3, 0x69, 0x01, - 0x51, 0xcc, 0x87, 0xb0, 0x95, 0xbe, 0x83, 0x93, 0x52, 0x38, 0x90, 0x69, 0x87, 0x3d, 0x52, 0x2a, - 0xc8, 0x0e, 0xf7, 0x4c, 0xcc, 0x0e, 0x7b, 0x28, 0xcb, 0x0e, 0xc3, 0xa4, 0x03, 0xed, 0x70, 0x1c, - 0xc3, 0x0e, 0x03, 0x6d, 0xa1, 0x78, 0x53, 0x96, 0xf5, 0xca, 0x42, 0x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, 0x00, 0x00, - 0xff, 0xff, 0x41, 0x47, 0x97, 0x39, 0x2a, 0x14, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto deleted file mode 100644 index 4812b49b..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto +++ /dev/null @@ -1,117 +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) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -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/unsafeboth/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2_test.go deleted file mode 100644 index 488bc86b..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/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/unsafeboth/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go deleted file mode 100644 index a9b09af7..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go +++ /dev/null @@ -1,752 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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/unsafemarshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go deleted file mode 100644 index 4ef99995..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go +++ /dev/null @@ -1,3962 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - 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_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" - -// 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 AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{1} } - -type AllMapsOrdered struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{2} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4104 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, - 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, - 0x6b, 0x39, 0x91, 0x1c, 0x25, 0xb6, 0xd7, 0x74, 0xe2, 0x40, 0x17, 0xae, 0x56, 0x8e, 0x6e, 0x1d, - 0x4a, 0xf6, 0xda, 0x85, 0xc1, 0x8e, 0xc8, 0x21, 0x45, 0x7b, 0x38, 0xc3, 0x72, 0x86, 0xf6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e5, 0x99, - 0xb0, 0x95, 0x51, 0xf9, 0x62, 0x0c, 0x16, 0x42, 0x52, 0x66, 0xe8, 0x2a, 0xfa, 0x24, 0xa4, 0x58, - 0xa4, 0xb1, 0x22, 0xf2, 0x60, 0x68, 0xee, 0xa5, 0x71, 0x37, 0x56, 0x48, 0x28, 0x4e, 0x2e, 0xa4, - 0x89, 0x09, 0x85, 0x94, 0x50, 0x8c, 0x85, 0xd3, 0xab, 0x31, 0x28, 0x4f, 0xe2, 0x8e, 0x58, 0xef, - 0x71, 0xdf, 0x7a, 0x7f, 0x22, 0x68, 0xc0, 0xe5, 0xc9, 0xcf, 0x30, 0x66, 0xc5, 0x5b, 0x31, 0xb8, - 0x10, 0xde, 0x6f, 0x84, 0xda, 0xf0, 0x24, 0xa4, 0x7b, 0x86, 0x7b, 0x6a, 0x8b, 0x9a, 0xfb, 0xc1, - 0x90, 0x4c, 0x4e, 0x86, 0x83, 0xbe, 0xe2, 0x28, 0xb9, 0x14, 0x24, 0x26, 0x35, 0x0d, 0xcc, 0x9a, - 0x31, 0x4b, 0x3f, 0x13, 0x87, 0xdb, 0x43, 0xc9, 0x43, 0x0d, 0xbd, 0x1b, 0xa0, 0x6b, 0xf5, 0x87, - 0x2e, 0xab, 0xab, 0x2c, 0xcd, 0xe4, 0xa8, 0x84, 0x2e, 0x61, 0x92, 0x42, 0x86, 0xae, 0x37, 0x9e, - 0xa0, 0xe3, 0xc0, 0x44, 0x54, 0xe1, 0xea, 0xc8, 0xd0, 0x24, 0x35, 0xf4, 0xe2, 0x84, 0x27, 0x1d, - 0x2b, 0x59, 0x0f, 0x83, 0xd2, 0x34, 0xbb, 0x86, 0xe5, 0x36, 0x1c, 0x77, 0x60, 0xe8, 0xbd, 0xae, - 0xd5, 0xa1, 0x79, 0x34, 0x5b, 0x4d, 0xb5, 0x75, 0xd3, 0x31, 0xb4, 0x12, 0x1b, 0xae, 0x8b, 0x51, - 0x82, 0xa0, 0xc5, 0x62, 0x20, 0x21, 0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xb0, 0x2b, 0x3a, 0x3b, 0x34, 0xf4, 0x09, 0xbc, 0x38, 0x6d, 0x76, 0x84, 0x96, - 0x98, 0x1d, 0x71, 0x2d, 0xaf, 0xc0, 0x8d, 0x33, 0xec, 0xf3, 0x08, 0x53, 0x69, 0x86, 0x15, 0x28, - 0x94, 0x03, 0x2b, 0x50, 0x88, 0xd5, 0x3a, 0x94, 0x84, 0x2a, 0xd9, 0x91, 0x13, 0x5a, 0x85, 0xbf, - 0xe2, 0x35, 0x8d, 0x96, 0xeb, 0x32, 0xd6, 0x92, 0xe3, 0x97, 0xaa, 0x87, 0x50, 0x14, 0x8a, 0x7b, - 0x0e, 0x7d, 0xe8, 0x79, 0xfe, 0xbb, 0xc1, 0x34, 0x4e, 0xa6, 0xca, 0x28, 0x8b, 0x8e, 0x4f, 0xb8, - 0xb4, 0x05, 0x17, 0xc2, 0xb3, 0x15, 0x79, 0x3d, 0x14, 0x33, 0x3e, 0x7f, 0x97, 0x87, 0x7c, 0x25, - 0xaf, 0x91, 0x8a, 0x77, 0xd5, 0x48, 0x96, 0x64, 0x17, 0xd5, 0xf8, 0xd5, 0xd8, 0xd2, 0x26, 0xdc, - 0x1e, 0x9a, 0x99, 0xa2, 0x48, 0xe2, 0x32, 0xc9, 0x13, 0x30, 0xe7, 0x4b, 0x47, 0x32, 0x38, 0x15, - 0x02, 0x4e, 0x8d, 0x83, 0x47, 0x41, 0x26, 0x83, 0x13, 0x21, 0xe0, 0x84, 0x0c, 0xfe, 0x38, 0x14, - 0xfd, 0x79, 0x48, 0x46, 0xcf, 0x85, 0xa0, 0xe7, 0x42, 0xd0, 0xe1, 0xf7, 0x4e, 0x86, 0xa0, 0x93, - 0x01, 0x74, 0x7d, 0xe2, 0xbd, 0xe7, 0x43, 0xd0, 0xf3, 0x21, 0xe8, 0xf0, 0x7b, 0xab, 0x21, 0x68, - 0x55, 0x46, 0x7f, 0x02, 0x4a, 0x81, 0x94, 0x23, 0xc3, 0x33, 0x21, 0xf0,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e6, 0xf7, 0x50, 0x1f, 0x3f, 0xdf, 0xc1, 0xef, 0xef, 0xe0, 0xff, 0x77, - 0xf1, 0xff, 0x0f, 0xf0, 0xf3, 0xca, 0xbf, 0x5c, 0xbc, 0xed, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x40, 0xb7, 0xf5, 0x58, 0x9c, 0x3e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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 *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v34; i++ { - v35 := randStringMapsproto2(r) - this.StringToDoubleMap[v35] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v35] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v36; i++ { - v37 := randStringMapsproto2(r) - this.StringToFloatMap[v37] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v37] *= -1 - } - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v38; i++ { - v39 := int32(r.Int31()) - this.Int32Map[v39] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v40; i++ { - v41 := int64(r.Int63()) - this.Int64Map[v41] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v42; i++ { - v43 := uint32(r.Uint32()) - this.Uint32Map[v43] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v44; i++ { - v45 := uint64(uint64(r.Uint32())) - this.Uint64Map[v45] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v46; i++ { - v47 := int32(r.Int31()) - this.Sint32Map[v47] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v47] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v48; i++ { - v49 := int64(r.Int63()) - this.Sint64Map[v49] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v49] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v50; i++ { - v51 := uint32(r.Uint32()) - this.Fixed32Map[v51] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v52; i++ { - v53 := int32(r.Int31()) - this.Sfixed32Map[v53] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v54; i++ { - v55 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v56; i++ { - v57 := int64(r.Int63()) - this.Sfixed64Map[v57] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v58; i++ { - v59 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v60; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v61; i++ { - v62 := r.Intn(100) - v63 := randStringMapsproto2(r) - this.StringToBytesMap[v63] = make([]byte, v62) - for i := 0; i < v62; i++ { - this.StringToBytesMap[v63][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v64; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v65; 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 { - v66 := r.Intn(100) - tmps := make([]rune, v66) - for i := 0; i < v66; 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)) - v67 := r.Int63() - if r.Intn(2) == 0 { - v67 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v67)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - 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 *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.F != nil { - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = *m.F - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - i = encodeVarintMapsproto2(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintMapsproto2(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n1, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Mapsproto2(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Mapsproto2(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Mapsproto2(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Mapsproto2(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMapsproto2(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} - -func init() { proto.RegisterFile("combos/unsafemarshaler/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 974 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xbd, 0x6f, 0xeb, 0x54, - 0x18, 0xc6, 0xeb, 0x7c, 0xe7, 0xe4, 0xcb, 0x39, 0x2d, 0x28, 0x8a, 0x44, 0xa0, 0x01, 0x44, 0x9a, - 0x42, 0x52, 0x02, 0x42, 0xa8, 0x85, 0x4a, 0x4d, 0x9b, 0x12, 0x54, 0x5a, 0xaa, 0x86, 0x6f, 0xa9, - 0x12, 0x09, 0x75, 0xd2, 0x88, 0x24, 0xae, 0x62, 0x1b, 0xd1, 0xad, 0x7f, 0x06, 0x2b, 0x1b, 0x23, - 0x23, 0x23, 0x63, 0xc7, 0x3b, 0x76, 0xb8, 0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 0xfb, 0xd0, 0xd7, 0x98, 0x6f, 0x4e, 0x3b, 0x00, 0x72, 0x5a, 0xb0, 0x39, 0x8f, 0xb8, 0x76, - 0x04, 0xc5, 0xb5, 0x39, 0xcc, 0x79, 0xa5, 0xb6, 0xa6, 0x33, 0xb5, 0x55, 0xfc, 0x58, 0x70, 0x78, - 0x6b, 0xbb, 0xc3, 0x5b, 0x35, 0xf8, 0x2c, 0x42, 0x19, 0xee, 0xd4, 0x33, 0xc3, 0xcd, 0x75, 0xb8, - 0x83, 0xa2, 0xdc, 0x2f, 0x5e, 0x51, 0x6e, 0x63, 0x1e, 0xba, 0x7f, 0xa2, 0xfb, 0xd1, 0x23, 0xd1, - 0xd5, 0xe7, 0x41, 0x2f, 0x82, 0xdd, 0x22, 0xd8, 0x2d, 0x82, 0xdd, 0x22, 0xd8, 0xbd, 0x1e, 0xc1, - 0x6e, 0x33, 0xf2, 0xd7, 0xdf, 0x6f, 0x0b, 0xd5, 0x55, 0x14, 0x37, 0xb6, 0xc6, 0x31, 0x14, 0x3a, - 0xdc, 0x11, 0x97, 0xe8, 0xb5, 0x29, 0x0a, 0xf4, 0xba, 0x2b, 0x86, 0x9a, 0xdf, 0x5c, 0xdf, 0x95, - 0x96, 0x9e, 0x91, 0x71, 0x43, 0xc6, 0xed, 0x5d, 0x49, 0x78, 0x20, 0xe3, 0x91, 0x8c, 0x27, 0x32, - 0xae, 0xee, 0x4b, 0xc2, 0x3f, 0x64, 0xfc, 0x4b, 0xc6, 0x7f, 0x64, 0xfc, 0x4f, 0xc6, 0xf5, 0x3d, - 0xa9, 0x27, 0xe3, 0x96, 0xdc, 0x3f, 0x90, 0xeb, 0x23, 0xb9, 0x3e, 0x91, 0x71, 0xf5, 0xa2, 0xb4, - 0xf4, 0x32, 0x00, 0x00, 0xff, 0xff, 0x90, 0x58, 0x7f, 0x30, 0x2f, 0x14, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto deleted file mode 100644 index fb6d0053..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto +++ /dev/null @@ -1,117 +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) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -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/unsafemarshaler/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2_test.go deleted file mode 100644 index 488bc86b..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/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/unsafemarshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go deleted file mode 100644 index 0d1e7df3..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,752 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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/unsafeunmarshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go deleted file mode 100644 index f8dd7637..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go +++ /dev/null @@ -1,6860 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* - Package proto2_maps is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/mapsproto2.proto - - It has these top-level messages: - FloatingPoint - AllMaps - 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_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 AllMaps struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{1} } - -type AllMapsOrdered struct { - StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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{2} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - 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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4103 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, - 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, - 0x6b, 0x39, 0x91, 0x1c, 0x25, 0xb6, 0xd7, 0x74, 0xe2, 0x40, 0x17, 0xae, 0x56, 0x8e, 0x6e, 0x1d, - 0x4a, 0xf6, 0xda, 0x85, 0xc1, 0x8e, 0xc8, 0x21, 0x45, 0x7b, 0x38, 0xc3, 0x72, 0x86, 0xf6, 0x2a, - 0x4f, 0x2e, 0xdc, 0x0b, 0x82, 0xa2, 0xf7, 0x02, 0x75, 0x1c, 0x27, 0xad, 0x03, 0xb4, 0x4e, 0xd3, - 0x5b, 0xdc, 0x1b, 0x8a, 0x3e, 0x05, 0x28, 0xd2, 0xe6, 0xa9, 0x68, 0xfb, 0x94, 0x87, 0x3c, 0x24, - 0xa9, 0x81, 0xba, 0x6d, 0xda, 0xba, 0x80, 0x81, 0x06, 0xf0, 0x4b, 0xcf, 0x7f, 0x1b, 0xfe, 0x33, - 0x1c, 0x72, 0xa8, 0x00, 0x49, 0xfc, 0x60, 0x01, 0x84, 0x38, 0xe7, 0x3f, 0xdf, 0x37, 0x67, 0xce, - 0x7f, 0xfe, 0x73, 0xce, 0xff, 0x73, 0xe0, 0xef, 0x3e, 0x06, 0x77, 0x75, 0x6c, 0xbb, 0x63, 0x1a, - 0xab, 0xfd, 0x81, 0xed, 0xda, 0x27, 0xc3, 0xf6, 0x6a, 0xcb, 0x70, 0x9a, 0x83, 0x6e, 0xdf, 0xb5, - 0x07, 0x2b, 0x54, 0xa6, 0x96, 0x98, 0xc6, 0x8a, 0xd0, 0xa8, 0xec, 0xc1, 0xfc, 0xb5, 0xae, 0x69, - 0x6c, 0x79, 0x8a, 0x75, 0xc3, 0x55, 0xaf, 0x42, 0xb2, 0x8d, 0xc2, 0x72, 0xec, 0xae, 0xc4, 0x95, - 0xfc, 0xda, 0x3d, 0x2b, 0x01, 0xd0, 0x8a, 0x1f, 0x71, 0x48, 0xc4, 0x1a, 0x45, 0x54, 0xde, 0x4a, - 0xc2, 0x42, 0xc8, 0xa8, 0xaa, 0x42, 0xd2, 0xd2, 0x7b, 0x84, 0x31, 0x76, 0x25, 0xa7, 0xd1, 0xef, - 0x6a, 0x19, 0x32, 0x7d, 0xbd, 0xf9, 0xbc, 0xde, 0x31, 0xca, 0x71, 0x2a, 0x16, 0x97, 0xea, 0x45, - 0x80, 0x96, 0xd1, 0x37, 0xac, 0x96, 0x61, 0x35, 0xcf, 0xca, 0x09, 0xb4, 0x22, 0xa7, 0x49, 0x12, - 0xf5, 0x01, 0x98, 0xef,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, - 0xc8, 0xd7, 0xa5, 0x47, 0x60, 0xce, 0x77, 0xfb, 0x59, 0x81, 0x95, 0x57, 0xd2, 0xb0, 0x18, 0x16, - 0x73, 0xa1, 0xe1, 0x8f, 0xcb, 0x07, 0x23, 0xe0, 0xc4, 0x18, 0x60, 0xdc, 0x11, 0x06, 0x7e, 0x85, - 0x11, 0x95, 0x32, 0xf5, 0x13, 0xc3, 0xc4, 0x68, 0x8a, 0x5d, 0x29, 0xae, 0x3d, 0x30, 0x53, 0x54, - 0xaf, 0xec, 0x12, 0x88, 0xc6, 0x90, 0xea, 0xe3, 0x90, 0xe4, 0x29, 0x8e, 0x30, 0x2c, 0xcf, 0xc6, - 0x40, 0x62, 0x51, 0xa3, 0x38, 0xf5, 0x43, 0x90, 0x23, 0xff, 0x99, 0x6f, 0xd3, 0xd4, 0xe6, 0x2c, - 0x11, 0x10, 0xbf, 0xaa, 0x4b, 0x90, 0xa5, 0x61, 0xd6, 0x32, 0x44, 0x69, 0xf0, 0xae, 0xc9, 0xc4, - 0xb4, 0x8c, 0xb6, 0x3e, 0x34, 0xdd, 0xc6, 0x0b, 0xba, 0x39, 0x34, 0x68, 0xc0, 0xe0, 0xc4, 0x70, - 0xe1, 0x93, 0x44, 0xa6, 0x5e, 0x82, 0x3c, 0x8b, 0xca, 0x2e, 0x62, 0x6e, 0xd2, 0xec, 0x93, 0xd2, - 0x58, 0xa0, 0xee, 0x10, 0x09, 0xb9, 0xfd, 0x73, 0x0e, 0xae, 0x05, 0x3e, 0xb5, 0xf4, 0x16, 0x44, - 0x40, 0x6f, 0xff, 0x48, 0x30, 0xf1, 0xdd, 0x19, 0xfe, 0x78, 0xc1, 0x58, 0xac, 0xfc, 0x75, 0x1c, - 0x92, 0x74, 0xbd, 0x95, 0x20, 0x7f, 0xf4, 0xf4, 0x61, 0xad, 0xb1, 0x75, 0x70, 0xbc, 0xb1, 0x5b, - 0x53, 0x62, 0x6a, 0x11, 0x80, 0x0a, 0xae, 0xed, 0x1e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 0x8e, 0x23, 0x04, 0xcc, 0x16, 0x6c, 0xf9, 0xdf, 0x32, 0x13, 0x9a, 0xee, 0x63, - 0x59, 0x9b, 0x05, 0x89, 0xb6, 0x30, 0x1c, 0x17, 0x56, 0xaa, 0x50, 0x90, 0x63, 0x47, 0xcd, 0x01, - 0x8b, 0x1e, 0xac, 0x6e, 0x58, 0x51, 0x37, 0x0f, 0xb6, 0x48, 0x2d, 0x7c, 0xa6, 0x86, 0x85, 0x0d, - 0x6b, 0xf2, 0xee, 0xce, 0x51, 0xad, 0xa1, 0x1d, 0xef, 0x1f, 0xed, 0xec, 0xd5, 0x94, 0xc4, 0x72, - 0x2e, 0xfb, 0x76, 0x46, 0x79, 0x09, 0xff, 0xe2, 0x95, 0x6f, 0xc4, 0xa1, 0xe8, 0xef, 0x83, 0xd5, - 0x4f, 0xc2, 0x6d, 0x62, 0xd3, 0xea, 0x18, 0x6e, 0xe3, 0xc5, 0xee, 0x80, 0x86, 0x73, 0x4f, 0x67, - 0x9d, 0xa4, 0x37, 0x13, 0x8b, 0x5c, 0x0b, 0xb7, 0xf7, 0x4f, 0xa1, 0xce, 0x35, 0xaa, 0xa2, 0xee, - 0xc2, 0x25, 0x74, 0x19, 0xf6, 0x9a, 0x56, 0x4b, 0x1f, 0xb4, 0x1a, 0xa3, 0xe3, 0x82, 0x86, 0xde, - 0xc4, 0x38, 0x70, 0x6c, 0x56, 0x49, 0x3c, 0x96, 0x3b, 0x2c, 0xbb, 0xce, 0x95, 0x47, 0x29, 0x76, - 0x9d, 0xab, 0x06, 0xa2, 0x26, 0x31, 0x29, 0x6a, 0xb0, 0xf7, 0xea, 0xe9, 0x7d, 0x0c, 0x1b, 0x77, - 0x70, 0x46, 0xbb, 0xb7, 0xac, 0x96, 0x45, 0x41, 0x8d, 0x5c, 0xff, 0xe8, 0xe6, 0x40, 0xf6, 0xe3, - 0xb7, 0x13, 0x50, 0x90, 0x3b, 0x38, 0xd2, 0x10, 0x37, 0x69, 0x9a, 0x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e, 0x62, 0x3b, 0x7c, 0xdf, 0x3b, 0x03, 0xdd, 0x6b, 0x9c, 0xae, 0xc4, 0x81, 0x74, 0x17, - 0x4c, 0xb8, 0x1e, 0x85, 0x6c, 0x1b, 0x37, 0x40, 0x33, 0x50, 0x7c, 0x91, 0x53, 0x64, 0x88, 0x3e, - 0x81, 0xae, 0x43, 0xa1, 0x63, 0xf3, 0x34, 0x1c, 0x0d, 0xff, 0x12, 0x87, 0xe7, 0x05, 0x86, 0x53, - 0xf4, 0xed, 0xfe, 0xd0, 0x24, 0x39, 0x3a, 0x9a, 0xe2, 0x77, 0x05, 0x85, 0xc0, 0x70, 0x8a, 0x73, - 0xb8, 0xf5, 0xf7, 0x04, 0x85, 0x23, 0xf9, 0xf3, 0xd3, 0xe4, 0xac, 0xd7, 0x3c, 0xb3, 0xad, 0x59, - 0x8c, 0x78, 0x9d, 0x33, 0x00, 0x87, 0x10, 0x82, 0xc7, 0x20, 0x37, 0xeb, 0x44, 0xfc, 0x3e, 0x87, - 0x67, 0x0d, 0x31, 0x03, 0xb8, 0xce, 0x44, 0x92, 0x21, 0xbf, 0xad, 0x44, 0x53, 0xfc, 0x01, 0xa7, - 0x28, 0x4a, 0x30, 0xfe, 0x18, 0xae, 0xe1, 0xb8, 0xb8, 0x55, 0x9f, 0x81, 0xe4, 0x0d, 0xf1, 0x18, - 0x1c, 0xc2, 0x5d, 0x79, 0x62, 0x58, 0xcd, 0xd3, 0xd9, 0x18, 0xbe, 0x22, 0x5c, 0x29, 0x30, 0x84, - 0x02, 0x33, 0x4f, 0x4f, 0x1f, 0xe0, 0xe6, 0xda, 0x9c, 0x69, 0x3a, 0xfe, 0x90, 0x73, 0x14, 0x3c, - 0x10, 0xf7, 0xc8, 0xd0, 0x3a, 0x0f, 0xcd, 0x57, 0x85, 0x47, 0x24, 0x18, 0x5f, 0x7a, 0xb8, 0x33, - 0x25, 0x9d, 0xc4, 0x79, 0xd8, 0xfe, 0x48, 0x2c, 0x3d, 0x86, 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, 0xdc, 0xd4, - 0x1d, 0x77, 0x96, 0xe7, 0xfe, 0x1f, 0x01, 0x16, 0x00, 0x62, 0x34, 0xf9, 0xfe, 0xbc, 0x71, 0x16, - 0x85, 0x7d, 0x47, 0x18, 0xcd, 0xf5, 0x31, 0x01, 0xe6, 0xc8, 0x57, 0xf6, 0xea, 0x41, 0x04, 0xf8, - 0x7f, 0x39, 0x78, 0x84, 0xd8, 0xb8, 0x1c, 0x7e, 0xb4, 0x03, 0xdb, 0xf6, 0xb6, 0xcd, 0x0e, 0x75, - 0xe0, 0xcd, 0x2b, 0x70, 0x3f, 0xea, 0x60, 0x7d, 0x5d, 0x65, 0x6b, 0x52, 0x5a, 0xcf, 0xab, 0xb8, - 0xfa, 0x1c, 0x8a, 0x5a, 0xe3, 0xe7, 0x33, 0x79, 0x7e, 0x45, 0x06, 0x96, 0xce, 0x77, 0xb6, 0x53, - 0xb9, 0x13, 0xe6, 0xae, 0x99, 0xb6, 0xee, 0x62, 0x49, 0x3b, 0xb4, 0xbb, 0x96, 0xab, 0x16, 0x20, - 0xd6, 0xa6, 0xe7, 0xdf, 0x31, 0x2d, 0xd6, 0xae, 0x7c, 0x4b, 0x85, 0x0c, 0x76, 0x30, 0xb8, 0x62, - 0x1d, 0xf5, 0x69, 0x98, 0x67, 0x7d, 0xc3, 0x91, 0xbd, 0x45, 0xcf, 0x1a, 0x51, 0xca, 0x8f, 0xec, - 0x1e, 0x58, 0x91, 0x4c, 0x58, 0xe1, 0x80, 0x95, 0x31, 0x6d, 0xfa, 0x03, 0x94, 0x36, 0xef, 0x04, - 0xe5, 0xea, 0x93, 0xa0, 0x08, 0x65, 0x6a, 0x0d, 0x61, 0x66, 0x07, 0xb5, 0xcb, 0x53, 0x99, 0x85, - 0x32, 0x23, 0x56, 0x9c, 0x80, 0x58, 0x7d, 0x1c, 0xb2, 0x3b, 0x96, 0xfb, 0xf1, 0x35, 0xc2, 0xc7, - 0x5e, 0x0c, 0xac, 0x84, 0xf2, 0x09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00, 0xff, 0xff, 0xbf, - 0x19, 0x35, 0x8f, 0x9e, 0x3e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != nil && that1.F != nil { - if *this.F != *that1.F { - return false - } - } else if this.F != nil { - return false - } else if that1.F != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() *float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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 *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMapsproto2(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMapsproto2(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { - this := &FloatingPoint{} - if r.Intn(10) != 0 { - v1 := float64(r.Float64()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.F = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v2; i++ { - v3 := randStringMapsproto2(r) - this.StringToDoubleMap[v3] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v3] *= -1 - } - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v4; i++ { - v5 := randStringMapsproto2(r) - this.StringToFloatMap[v5] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v5] *= -1 - } - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v6; i++ { - v7 := int32(r.Int31()) - this.Int32Map[v7] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v8; i++ { - v9 := int64(r.Int63()) - this.Int64Map[v9] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v10; i++ { - v11 := uint32(r.Uint32()) - this.Uint32Map[v11] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v12; i++ { - v13 := uint64(uint64(r.Uint32())) - this.Uint64Map[v13] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v14; i++ { - v15 := int32(r.Int31()) - this.Sint32Map[v15] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v15] *= -1 - } - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v16; i++ { - v17 := int64(r.Int63()) - this.Sint64Map[v17] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v17] *= -1 - } - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v18; i++ { - v19 := uint32(r.Uint32()) - this.Fixed32Map[v19] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v20; i++ { - v21 := int32(r.Int31()) - this.Sfixed32Map[v21] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v22; i++ { - v23 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v24; i++ { - v25 := int64(r.Int63()) - this.Sfixed64Map[v25] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v26; i++ { - v27 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v28; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v29 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v29; i++ { - v30 := r.Intn(100) - v31 := randStringMapsproto2(r) - this.StringToBytesMap[v31] = make([]byte, v30) - for i := 0; i < v30; i++ { - this.StringToBytesMap[v31][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v32; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v33; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v34 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v34; i++ { - v35 := randStringMapsproto2(r) - this.StringToDoubleMap[v35] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v35] *= -1 - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v36; i++ { - v37 := randStringMapsproto2(r) - this.StringToFloatMap[v37] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v37] *= -1 - } - } - } - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v38; i++ { - v39 := int32(r.Int31()) - this.Int32Map[v39] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v40; i++ { - v41 := int64(r.Int63()) - this.Int64Map[v41] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v42; i++ { - v43 := uint32(r.Uint32()) - this.Uint32Map[v43] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v44; i++ { - v45 := uint64(uint64(r.Uint32())) - this.Uint64Map[v45] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v46; i++ { - v47 := int32(r.Int31()) - this.Sint32Map[v47] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v47] *= -1 - } - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v48; i++ { - v49 := int64(r.Int63()) - this.Sint64Map[v49] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v49] *= -1 - } - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v50; i++ { - v51 := uint32(r.Uint32()) - this.Fixed32Map[v51] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v52; i++ { - v53 := int32(r.Int31()) - this.Sfixed32Map[v53] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v54; i++ { - v55 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v56; i++ { - v57 := int64(r.Int63()) - this.Sfixed64Map[v57] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v58; i++ { - v59 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v60; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v61; i++ { - v62 := r.Intn(100) - v63 := randStringMapsproto2(r) - this.StringToBytesMap[v63] = make([]byte, v62) - for i := 0; i < v62; i++ { - this.StringToBytesMap[v63][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v64; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v65; 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 { - v66 := r.Intn(100) - tmps := make([]rune, v66) - for i := 0; i < v66; 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)) - v67 := r.Int63() - if r.Intn(2) == 0 { - v67 *= -1 - } - data = encodeVarintPopulateMapsproto2(data, uint64(v67)) - case 1: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMapsproto2(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMapsproto2(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *FloatingPoint) Size() (n int) { - var l int - _ = l - if m.F != nil { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMaps) Size() (n int) { - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k, v := range m.StringToDoubleMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToFloatMap) > 0 { - for k, v := range m.StringToFloatMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int32Map) > 0 { - for k, v := range m.Int32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Int64Map) > 0 { - for k, v := range m.Int64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint32Map) > 0 { - for k, v := range m.Uint32Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint64Map) > 0 { - for k, v := range m.Uint64Map { - _ = k - _ = v - mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint32Map) > 0 { - for k, v := range m.Sint32Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sint64Map) > 0 { - for k, v := range m.Sint64Map { - _ = k - _ = v - mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed32Map) > 0 { - for k, v := range m.Fixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed32Map) > 0 { - for k, v := range m.Sfixed32Map { - _ = k - _ = v - mapEntrySize := 1 + 4 + 1 + 4 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Fixed64Map) > 0 { - for k, v := range m.Fixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Sfixed64Map) > 0 { - for k, v := range m.Sfixed64Map { - _ = k - _ = v - mapEntrySize := 1 + 8 + 1 + 8 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.BoolMap) > 0 { - for k, v := range m.BoolMap { - _ = k - _ = v - mapEntrySize := 1 + 1 + 1 + 1 - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringMap) > 0 { - for k, v := range m.StringMap { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.StringToBytesMap) > 0 { - for k, v := range m.StringToBytesMap { - _ = k - _ = v - 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 *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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 ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.F = &v - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMapsproto2Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMapsproto2Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMapsproto2Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMapsproto2Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMapsproto2Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMapsproto2Unsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeunmarshaler/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 976 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xcd, 0x4f, 0xe3, 0x46, - 0x18, 0xc6, 0x71, 0xbe, 0x33, 0xf9, 0x72, 0x06, 0x5a, 0x45, 0x91, 0x9a, 0x96, 0xb4, 0x95, 0x42, - 0x68, 0x13, 0x9a, 0x56, 0x55, 0x05, 0x2d, 0x12, 0x81, 0xd0, 0x54, 0x14, 0x8a, 0x48, 0xbf, 0x25, - 0xa4, 0x26, 0xc5, 0x09, 0x51, 0x93, 0x18, 0xc5, 0x76, 0x55, 0x6e, 0xfc, 0x19, 0xbd, 0xf6, 0xd6, - 0x63, 0x8f, 0x3d, 0xee, 0x91, 0xe3, 0x1e, 0x39, 0xec, 0x01, 0xd8, 0x0b, 0x47, 0x8e, 0x1c, 0x77, - 0x3c, 0x63, 0x3b, 0x63, 0xfb, 0xb5, 0x9d, 0xbd, 0xed, 0x21, 0x87, 0xd1, 0x64, 0x86, 0xf7, 0xf9, - 0xcd, 0x63, 0xec, 0x79, 0xf5, 0xa0, 0xb5,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, - 0xe0, 0xf0, 0xd6, 0x76, 0x87, 0xb7, 0x6a, 0xf0, 0x5d, 0x84, 0x32, 0xdc, 0xa9, 0x67, 0x86, 0x9b, - 0xeb, 0x72, 0x07, 0x45, 0xb9, 0x5f, 0xbd, 0xa2, 0xdc, 0xc6, 0x3c, 0x74, 0xff, 0x44, 0xf7, 0x93, - 0x47, 0xa2, 0xab, 0xcf, 0x83, 0x5e, 0x04, 0xbb, 0x45, 0xb0, 0x5b, 0x04, 0xbb, 0x45, 0xb0, 0x7b, - 0x33, 0x82, 0xdd, 0x66, 0xe4, 0xef, 0x7f, 0xde, 0x15, 0xaa, 0xab, 0x28, 0x6e, 0x1c, 0x8d, 0x63, - 0x28, 0x74, 0xb8, 0x23, 0x2e, 0xd1, 0xb9, 0x29, 0x0a, 0x74, 0xde, 0x15, 0x43, 0xcd, 0x6f, 0xaf, - 0xef, 0x4a, 0x4b, 0xcf, 0xc9, 0xb8, 0x21, 0xe3, 0xf6, 0xae, 0x24, 0x3c, 0x90, 0xf1, 0x48, 0xc6, - 0x13, 0x19, 0x57, 0xf7, 0x25, 0xe1, 0x5f, 0x32, 0xfe, 0x23, 0xe3, 0x7f, 0x32, 0x9e, 0x91, 0x71, - 0x7d, 0x4f, 0xea, 0xc9, 0xb8, 0x25, 0xbf, 0x1f, 0xc8, 0xfc, 0x48, 0xe6, 0x27, 0x32, 0x5f, 0xbd, - 0x2c, 0x09, 0xaf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xce, 0x63, 0x16, 0xb2, 0x31, 0x14, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto deleted file mode 100644 index 136f8036..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto +++ /dev/null @@ -1,117 +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) = true; - -message FloatingPoint { - optional double f = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -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/unsafeunmarshaler/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2_test.go deleted file mode 100644 index 488bc86b..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/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/unsafeunmarshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go deleted file mode 100644 index 6d8570df..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,668 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/mapsproto2.proto -// DO NOT EDIT! - -/* -Package proto2_maps is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/mapsproto2.proto - -It has these top-level messages: - FloatingPoint - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapsproto2Description(t *testing.T) { - Mapsproto2Description() -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 4276bac3..00000000 --- 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 8b3e832a..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto +++ /dev/null @@ -1,69 +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; -} 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 014b8869..00000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto +++ /dev/null @@ -1,117 +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; -} - -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 5ccc8660..00000000 --- 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/marshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt deleted file mode 100644 index b35291ce..00000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoMarshal-4 1000000 1912 ns/op 194.48 MB/s -BenchmarkNinOptNativeProtoMarshal-4 1000000 2207 ns/op 154.04 MB/s -BenchmarkNidRepNativeProtoMarshal-4 50000 36321 ns/op 195.12 MB/s -BenchmarkNinRepNativeProtoMarshal-4 50000 36979 ns/op 191.65 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-4 50000 29607 ns/op 115.41 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-4 50000 29781 ns/op 114.73 MB/s -BenchmarkNidOptStructProtoMarshal-4 500000 6986 ns/op 201.40 MB/s -BenchmarkNinOptStructProtoMarshal-4 500000 7044 ns/op 180.14 MB/s -BenchmarkNidRepStructProtoMarshal-4 50000 40141 ns/op 219.87 MB/s -BenchmarkNinRepStructProtoMarshal-4 50000 40930 ns/op 215.63 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-4 500000 4595 ns/op 163.62 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-4 500000 4502 ns/op 158.37 MB/s -BenchmarkNidNestedStructProtoMarshal-4 10000 171850 ns/op 215.28 MB/s -BenchmarkNinNestedStructProtoMarshal-4 10000 150174 ns/op 246.19 MB/s -BenchmarkNidOptCustomProtoMarshal-4 1000000 1867 ns/op 38.02 MB/s -BenchmarkNinOptCustomProtoMarshal-4 1000000 1799 ns/op 37.24 MB/s -BenchmarkNidRepCustomProtoMarshal-4 500000 4120 ns/op 43.93 MB/s -BenchmarkNinRepCustomProtoMarshal-4 500000 4059 ns/op 44.58 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-4 1000000 1316 ns/op 23.54 MB/s -BenchmarkNinOptStructUnionProtoMarshal-4 1000000 1945 ns/op 57.06 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-4 1000000 2861 ns/op 84.22 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-4 1000000 2490 ns/op 52.60 MB/s -BenchmarkTreeProtoMarshal-4 1000000 2293 ns/op 109.89 MB/s -BenchmarkOrBranchProtoMarshal-4 500000 4401 ns/op 124.74 MB/s -BenchmarkAndBranchProtoMarshal-4 500000 4394 ns/op 124.93 MB/s -BenchmarkLeafProtoMarshal-4 1000000 1696 ns/op 142.68 MB/s -BenchmarkDeepTreeProtoMarshal-4 500000 3740 ns/op 79.40 MB/s -BenchmarkADeepBranchProtoMarshal-4 500000 4677 ns/op 71.41 MB/s -BenchmarkAndDeepBranchProtoMarshal-4 500000 6597 ns/op 96.25 MB/s -BenchmarkDeepLeafProtoMarshal-4 500000 3179 ns/op 91.21 MB/s -BenchmarkNilProtoMarshal-4 1000000 1326 ns/op 26.39 MB/s -BenchmarkNidOptEnumProtoMarshal-4 1000000 1360 ns/op 27.20 MB/s -BenchmarkNinOptEnumProtoMarshal-4 1000000 1360 ns/op 26.46 MB/s -BenchmarkNidRepEnumProtoMarshal-4 1000000 1314 ns/op 32.72 MB/s -BenchmarkNinRepEnumProtoMarshal-4 1000000 1311 ns/op 32.78 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-4 1000000 1349 ns/op 26.67 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-4 1000000 1369 ns/op 26.29 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 1000000 1341 ns/op 26.84 MB/s -BenchmarkTimerProtoMarshal-4 1000000 1604 ns/op 65.45 MB/s -BenchmarkMyExtendableProtoMarshal-4 1000000 1545 ns/op 51.75 MB/s -BenchmarkOtherExtenableProtoMarshal-4 1000000 2704 ns/op 58.04 MB/s -BenchmarkNestedDefinitionProtoMarshal-4 500000 4177 ns/op 108.92 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 1000000 2473 ns/op 95.43 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 1000000 1616 ns/op 131.14 MB/s -BenchmarkNestedScopeProtoMarshal-4 500000 4058 ns/op 110.14 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-4 500000 2863 ns/op 118.72 MB/s -BenchmarkCustomContainerProtoMarshal-4 1000000 2289 ns/op 47.17 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 152.674s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt deleted file mode 100644 index 08a35975..00000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoMarshal-4 5000000 558 ns/op 665.90 MB/s -BenchmarkNinOptNativeProtoMarshal-4 5000000 632 ns/op 537.89 MB/s -BenchmarkNidRepNativeProtoMarshal-4 200000 9070 ns/op 781.29 MB/s -BenchmarkNinRepNativeProtoMarshal-4 200000 8943 ns/op 792.42 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-4 200000 8142 ns/op 419.65 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-4 200000 8114 ns/op 421.11 MB/s -BenchmarkNidOptStructProtoMarshal-4 1000000 2018 ns/op 697.03 MB/s -BenchmarkNinOptStructProtoMarshal-4 1000000 1919 ns/op 661.19 MB/s -BenchmarkNidRepStructProtoMarshal-4 100000 11442 ns/op 771.31 MB/s -BenchmarkNinRepStructProtoMarshal-4 200000 10742 ns/op 821.60 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-4 1000000 1203 ns/op 624.73 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-4 1000000 1135 ns/op 627.68 MB/s -BenchmarkNidNestedStructProtoMarshal-4 50000 56182 ns/op 658.50 MB/s -BenchmarkNinNestedStructProtoMarshal-4 50000 49802 ns/op 742.37 MB/s -BenchmarkNidOptCustomProtoMarshal-4 5000000 303 ns/op 233.89 MB/s -BenchmarkNinOptCustomProtoMarshal-4 10000000 280 ns/op 238.94 MB/s -BenchmarkNidRepCustomProtoMarshal-4 5000000 604 ns/op 299.21 MB/s -BenchmarkNinRepCustomProtoMarshal-4 5000000 599 ns/op 301.77 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-4 10000000 196 ns/op 158.04 MB/s -BenchmarkNinOptStructUnionProtoMarshal-4 5000000 384 ns/op 288.81 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-4 5000000 662 ns/op 363.93 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-4 5000000 502 ns/op 260.48 MB/s -BenchmarkTreeProtoMarshal-4 5000000 558 ns/op 451.53 MB/s -BenchmarkOrBranchProtoMarshal-4 2000000 992 ns/op 553.08 MB/s -BenchmarkAndBranchProtoMarshal-4 2000000 998 ns/op 550.04 MB/s -BenchmarkLeafProtoMarshal-4 5000000 523 ns/op 462.20 MB/s -BenchmarkDeepTreeProtoMarshal-4 5000000 691 ns/op 429.41 MB/s -BenchmarkADeepBranchProtoMarshal-4 2000000 787 ns/op 424.31 MB/s -BenchmarkAndDeepBranchProtoMarshal-4 1000000 1329 ns/op 477.67 MB/s -BenchmarkDeepLeafProtoMarshal-4 5000000 639 ns/op 453.35 MB/s -BenchmarkNilProtoMarshal-4 10000000 189 ns/op 184.92 MB/s -BenchmarkNidOptEnumProtoMarshal-4 10000000 216 ns/op 170.86 MB/s -BenchmarkNinOptEnumProtoMarshal-4 10000000 209 ns/op 171.60 MB/s -BenchmarkNidRepEnumProtoMarshal-4 10000000 237 ns/op 180.80 MB/s -BenchmarkNinRepEnumProtoMarshal-4 10000000 235 ns/op 182.93 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-4 10000000 209 ns/op 171.51 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-4 10000000 211 ns/op 170.44 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 10000000 214 ns/op 167.95 MB/s -BenchmarkTimerProtoMarshal-4 5000000 344 ns/op 305.21 MB/s -BenchmarkMyExtendableProtoMarshal-4 5000000 695 ns/op 115.09 MB/s -BenchmarkOtherExtenableProtoMarshal-4 1000000 1295 ns/op 121.15 MB/s -BenchmarkNestedDefinitionProtoMarshal-4 2000000 906 ns/op 501.69 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 5000000 537 ns/op 438.85 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 5000000 479 ns/op 442.52 MB/s -BenchmarkNestedScopeProtoMarshal-4 2000000 862 ns/op 518.19 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-4 2000000 758 ns/op 448.10 MB/s -BenchmarkCustomContainerProtoMarshal-4 5000000 390 ns/op 276.58 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 190.796s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go b/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go deleted file mode 100644 index b8e447c8..00000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go +++ /dev/null @@ -1,138 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import ( - "fmt" - "io/ioutil" - "os" - "os/exec" - "strings" -) - -type MixMatch struct { - Old []string - New []string -} - -func (this *MixMatch) Regenerate() { - fmt.Printf("mixbench\n") - uuidData, err := ioutil.ReadFile("../uuid.go") - if err != nil { - panic(err) - } - if err = ioutil.WriteFile("./testdata/uuid.go", uuidData, 0666); err != nil { - panic(err) - } - data, err := ioutil.ReadFile("../thetest.proto") - if err != nil { - panic(err) - } - content := string(data) - for i, old := range this.Old { - content = strings.Replace(content, old, this.New[i], -1) - } - if err = ioutil.WriteFile("./testdata/thetest.proto", []byte(content), 0666); err != nil { - panic(err) - } - var regenerate = exec.Command("protoc", "--gogo_out=.", "-I=../../:../../protobuf/:../../../../../:.", "./testdata/thetest.proto") - fmt.Printf("regenerating\n") - out, err := regenerate.CombinedOutput() - fmt.Printf("regenerate output: %v\n", string(out)) - if err != nil { - panic(err) - } -} - -func (this *MixMatch) Bench(rgx string, outFileName string) { - if err := os.MkdirAll("./testdata", 0777); err != nil { - panic(err) - } - this.Regenerate() - var test = exec.Command("go", "test", "-test.timeout=20m", "-test.v", "-test.run=XXX", "-test.bench="+rgx, "./testdata/") - fmt.Printf("benching\n") - out, err := test.CombinedOutput() - fmt.Printf("bench output: %v\n", string(out)) - if err != nil { - panic(err) - } - if err := ioutil.WriteFile(outFileName, out, 0666); err != nil { - panic(err) - } - if err := os.RemoveAll("./testdata"); err != nil { - panic(err) - } -} - -func NewMixMatch(marshaler, unmarshaler, unsafe_marshaler, unsafe_unmarshaler bool) *MixMatch { - mm := &MixMatch{} - if marshaler { - mm.Old = append(mm.Old, "option (gogoproto.marshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.marshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.marshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.marshaler_all) = false;") - } - if unmarshaler { - mm.Old = append(mm.Old, "option (gogoproto.unmarshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.unmarshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.unmarshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.unmarshaler_all) = false;") - } - if unsafe_marshaler { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_marshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.unsafe_marshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_marshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.unsafe_marshaler_all) = false;") - } - if unsafe_unmarshaler { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_unmarshaler_all) = false;") - mm.New = append(mm.New, "option (gogoproto.unsafe_unmarshaler_all) = true;") - } else { - mm.Old = append(mm.Old, "option (gogoproto.unsafe_unmarshaler_all) = true;") - mm.New = append(mm.New, "option (gogoproto.unsafe_unmarshaler_all) = false;") - } - return mm -} - -func main() { - NewMixMatch(true, true, false, false).Bench("ProtoMarshal", "marshaler.txt") - NewMixMatch(false, false, false, false).Bench("ProtoMarshal", "marshal.txt") - NewMixMatch(false, false, true, true).Bench("ProtoMarshal", "unsafe_marshaler.txt") - NewMixMatch(true, true, false, false).Bench("ProtoUnmarshal", "unmarshaler.txt") - NewMixMatch(false, false, false, false).Bench("ProtoUnmarshal", "unmarshal.txt") - NewMixMatch(false, false, true, true).Bench("ProtoUnmarshal", "unsafe_unmarshaler.txt") - fmt.Println("Running benchcmp will show the performance difference between using reflect and generated code for marshalling and unmarshalling of protocol buffers") - fmt.Println("$GOROOT/misc/benchcmp marshal.txt marshaler.txt") - fmt.Println("$GOROOT/misc/benchcmp unmarshal.txt unmarshaler.txt") - fmt.Println("$GOROOT/misc/benchcmp marshal.txt unsafe_marshaler.txt") - fmt.Println("$GOROOT/misc/benchcmp unmarshal.txt unsafe_unmarshaler.txt") -} diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt deleted file mode 100644 index 2b958fd9..00000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoUnmarshal-4 1000000 2006 ns/op 185.44 MB/s -BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1960 ns/op 173.41 MB/s -BenchmarkNidRepNativeProtoUnmarshal-4 50000 36241 ns/op 195.55 MB/s -BenchmarkNinRepNativeProtoUnmarshal-4 50000 35648 ns/op 198.80 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 18641 ns/op 183.30 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 18398 ns/op 185.72 MB/s -BenchmarkNidOptStructProtoUnmarshal-4 500000 5938 ns/op 236.92 MB/s -BenchmarkNinOptStructProtoUnmarshal-4 500000 5871 ns/op 216.14 MB/s -BenchmarkNidRepStructProtoUnmarshal-4 50000 46237 ns/op 190.88 MB/s -BenchmarkNinRepStructProtoUnmarshal-4 50000 39915 ns/op 221.12 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-4 500000 3946 ns/op 190.56 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-4 500000 3997 ns/op 178.35 MB/s -BenchmarkNidNestedStructProtoUnmarshal-4 10000 207132 ns/op 178.61 MB/s -BenchmarkNinNestedStructProtoUnmarshal-4 10000 170116 ns/op 217.33 MB/s -BenchmarkNidOptCustomProtoUnmarshal-4 1000000 2321 ns/op 30.58 MB/s -BenchmarkNinOptCustomProtoUnmarshal-4 1000000 1947 ns/op 34.40 MB/s -BenchmarkNidRepCustomProtoUnmarshal-4 200000 7884 ns/op 22.96 MB/s -BenchmarkNinRepCustomProtoUnmarshal-4 200000 7926 ns/op 22.83 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-4 1000000 1242 ns/op 24.94 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-4 1000000 1550 ns/op 71.58 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 1000000 2209 ns/op 109.07 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-4 1000000 1954 ns/op 67.02 MB/s -BenchmarkTreeProtoUnmarshal-4 1000000 1785 ns/op 141.12 MB/s -BenchmarkOrBranchProtoUnmarshal-4 1000000 2769 ns/op 198.23 MB/s -BenchmarkAndBranchProtoUnmarshal-4 500000 2680 ns/op 204.84 MB/s -BenchmarkLeafProtoUnmarshal-4 1000000 1407 ns/op 171.92 MB/s -BenchmarkDeepTreeProtoUnmarshal-4 1000000 2387 ns/op 124.40 MB/s -BenchmarkADeepBranchProtoUnmarshal-4 1000000 2621 ns/op 127.39 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-4 500000 3853 ns/op 164.79 MB/s -BenchmarkDeepLeafProtoUnmarshal-4 1000000 2027 ns/op 143.02 MB/s -BenchmarkNilProtoUnmarshal-4 1000000 1472 ns/op 23.78 MB/s -BenchmarkNidOptEnumProtoUnmarshal-4 1000000 1597 ns/op 23.16 MB/s -BenchmarkNinOptEnumProtoUnmarshal-4 1000000 1557 ns/op 23.12 MB/s -BenchmarkNidRepEnumProtoUnmarshal-4 1000000 1746 ns/op 24.62 MB/s -BenchmarkNinRepEnumProtoUnmarshal-4 1000000 1779 ns/op 24.16 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-4 1000000 1607 ns/op 22.39 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-4 1000000 1545 ns/op 23.29 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 1000000 1578 ns/op 22.81 MB/s -BenchmarkTimerProtoUnmarshal-4 1000000 1572 ns/op 66.79 MB/s -BenchmarkMyExtendableProtoUnmarshal-4 1000000 2610 ns/op 30.64 MB/s -BenchmarkOtherExtenableProtoUnmarshal-4 500000 3792 ns/op 41.40 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-4 500000 2987 ns/op 152.29 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1898 ns/op 124.30 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 1000000 1326 ns/op 159.87 MB/s -BenchmarkNestedScopeProtoUnmarshal-4 1000000 2956 ns/op 151.20 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 2244 ns/op 151.45 MB/s -BenchmarkCustomContainerProtoUnmarshal-4 1000000 2652 ns/op 40.71 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 167.715s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt deleted file mode 100644 index 9c78ef06..00000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoUnmarshal-4 2000000 792 ns/op 469.35 MB/s -BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1167 ns/op 291.16 MB/s -BenchmarkNidRepNativeProtoUnmarshal-4 100000 25302 ns/op 280.09 MB/s -BenchmarkNinRepNativeProtoUnmarshal-4 100000 25069 ns/op 282.70 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 16569 ns/op 206.22 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 16323 ns/op 209.33 MB/s -BenchmarkNidOptStructProtoUnmarshal-4 1000000 3107 ns/op 452.75 MB/s -BenchmarkNinOptStructProtoUnmarshal-4 500000 3262 ns/op 388.98 MB/s -BenchmarkNidRepStructProtoUnmarshal-4 100000 26090 ns/op 338.28 MB/s -BenchmarkNinRepStructProtoUnmarshal-4 100000 26086 ns/op 338.34 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-4 1000000 1785 ns/op 421.14 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-4 1000000 1838 ns/op 387.83 MB/s -BenchmarkNidNestedStructProtoUnmarshal-4 10000 119933 ns/op 308.47 MB/s -BenchmarkNinNestedStructProtoUnmarshal-4 10000 106914 ns/op 345.81 MB/s -BenchmarkNidOptCustomProtoUnmarshal-4 5000000 485 ns/op 146.36 MB/s -BenchmarkNinOptCustomProtoUnmarshal-4 5000000 648 ns/op 103.26 MB/s -BenchmarkNidRepCustomProtoUnmarshal-4 1000000 1743 ns/op 103.83 MB/s -BenchmarkNinRepCustomProtoUnmarshal-4 1000000 1766 ns/op 102.44 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-4 10000000 187 ns/op 165.31 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-4 5000000 519 ns/op 213.49 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 2000000 971 ns/op 247.99 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-4 2000000 801 ns/op 163.54 MB/s -BenchmarkTreeProtoUnmarshal-4 2000000 789 ns/op 319.14 MB/s -BenchmarkOrBranchProtoUnmarshal-4 1000000 1553 ns/op 353.47 MB/s -BenchmarkAndBranchProtoUnmarshal-4 1000000 1552 ns/op 353.60 MB/s -BenchmarkLeafProtoUnmarshal-4 5000000 654 ns/op 369.63 MB/s -BenchmarkDeepTreeProtoUnmarshal-4 1000000 1219 ns/op 243.63 MB/s -BenchmarkADeepBranchProtoUnmarshal-4 1000000 1504 ns/op 222.02 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-4 1000000 2327 ns/op 272.88 MB/s -BenchmarkDeepLeafProtoUnmarshal-4 1000000 1083 ns/op 267.74 MB/s -BenchmarkNilProtoUnmarshal-4 5000000 401 ns/op 87.26 MB/s -BenchmarkNidOptEnumProtoUnmarshal-4 5000000 412 ns/op 89.66 MB/s -BenchmarkNinOptEnumProtoUnmarshal-4 5000000 451 ns/op 79.80 MB/s -BenchmarkNidRepEnumProtoUnmarshal-4 5000000 670 ns/op 64.12 MB/s -BenchmarkNinRepEnumProtoUnmarshal-4 5000000 667 ns/op 64.40 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-4 5000000 450 ns/op 79.88 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-4 5000000 449 ns/op 80.15 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 5000000 448 ns/op 80.24 MB/s -BenchmarkTimerProtoUnmarshal-4 5000000 575 ns/op 182.50 MB/s -BenchmarkMyExtendableProtoUnmarshal-4 1000000 1450 ns/op 55.14 MB/s -BenchmarkOtherExtenableProtoUnmarshal-4 1000000 2567 ns/op 61.15 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-4 1000000 1889 ns/op 240.85 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1080 ns/op 218.42 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 5000000 693 ns/op 305.86 MB/s -BenchmarkNestedScopeProtoUnmarshal-4 1000000 1843 ns/op 242.49 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 1342 ns/op 253.25 MB/s -BenchmarkCustomContainerProtoUnmarshal-4 2000000 831 ns/op 129.82 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 170.829s diff --git a/vendor/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 8cbf22f4..00000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoMarshal-4 5000000 531 ns/op 700.19 MB/s -BenchmarkNinOptNativeProtoMarshal-4 5000000 594 ns/op 572.27 MB/s -BenchmarkNidRepNativeProtoMarshal-4 200000 8087 ns/op 876.29 MB/s -BenchmarkNinRepNativeProtoMarshal-4 500000 8344 ns/op 849.34 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-4 200000 7595 ns/op 449.89 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-4 500000 7342 ns/op 465.38 MB/s -BenchmarkNidOptStructProtoMarshal-4 1000000 1928 ns/op 729.46 MB/s -BenchmarkNinOptStructProtoMarshal-4 1000000 1859 ns/op 682.32 MB/s -BenchmarkNidRepStructProtoMarshal-4 100000 10993 ns/op 802.82 MB/s -BenchmarkNinRepStructProtoMarshal-4 200000 10088 ns/op 874.84 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-4 1000000 1179 ns/op 637.53 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-4 1000000 1077 ns/op 661.58 MB/s -BenchmarkNidNestedStructProtoMarshal-4 50000 53464 ns/op 691.97 MB/s -BenchmarkNinNestedStructProtoMarshal-4 50000 47677 ns/op 775.46 MB/s -BenchmarkNidOptCustomProtoMarshal-4 5000000 303 ns/op 234.13 MB/s -BenchmarkNinOptCustomProtoMarshal-4 10000000 284 ns/op 235.56 MB/s -BenchmarkNidRepCustomProtoMarshal-4 5000000 598 ns/op 302.19 MB/s -BenchmarkNinRepCustomProtoMarshal-4 5000000 593 ns/op 304.87 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-4 10000000 190 ns/op 162.47 MB/s -BenchmarkNinOptStructUnionProtoMarshal-4 5000000 374 ns/op 296.15 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-4 5000000 652 ns/op 369.55 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-4 5000000 474 ns/op 275.97 MB/s -BenchmarkTreeProtoMarshal-4 5000000 567 ns/op 444.16 MB/s -BenchmarkOrBranchProtoMarshal-4 1000000 1007 ns/op 544.72 MB/s -BenchmarkAndBranchProtoMarshal-4 1000000 1061 ns/op 517.27 MB/s -BenchmarkLeafProtoMarshal-4 5000000 511 ns/op 473.41 MB/s -BenchmarkDeepTreeProtoMarshal-4 5000000 716 ns/op 414.59 MB/s -BenchmarkADeepBranchProtoMarshal-4 2000000 811 ns/op 411.60 MB/s -BenchmarkAndDeepBranchProtoMarshal-4 1000000 1324 ns/op 479.34 MB/s -BenchmarkDeepLeafProtoMarshal-4 5000000 636 ns/op 455.66 MB/s -BenchmarkNilProtoMarshal-4 10000000 189 ns/op 184.91 MB/s -BenchmarkNidOptEnumProtoMarshal-4 10000000 211 ns/op 174.55 MB/s -BenchmarkNinOptEnumProtoMarshal-4 10000000 207 ns/op 173.24 MB/s -BenchmarkNidRepEnumProtoMarshal-4 10000000 231 ns/op 185.80 MB/s -BenchmarkNinRepEnumProtoMarshal-4 10000000 230 ns/op 186.79 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-4 10000000 208 ns/op 172.65 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-4 10000000 207 ns/op 173.15 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 10000000 209 ns/op 171.99 MB/s -BenchmarkTimerProtoMarshal-4 5000000 320 ns/op 327.65 MB/s -BenchmarkMyExtendableProtoMarshal-4 5000000 702 ns/op 113.85 MB/s -BenchmarkOtherExtenableProtoMarshal-4 1000000 1329 ns/op 118.07 MB/s -BenchmarkNestedDefinitionProtoMarshal-4 2000000 904 ns/op 502.96 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 5000000 542 ns/op 434.70 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 5000000 465 ns/op 455.00 MB/s -BenchmarkNestedScopeProtoMarshal-4 2000000 857 ns/op 521.49 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-4 5000000 734 ns/op 462.95 MB/s -BenchmarkCustomContainerProtoMarshal-4 5000000 378 ns/op 285.67 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 192.235s diff --git a/vendor/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 9a85e936..00000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt +++ /dev/null @@ -1,49 +0,0 @@ -PASS -BenchmarkNidOptNativeProtoUnmarshal-4 2000000 760 ns/op 488.86 MB/s -BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1130 ns/op 300.67 MB/s -BenchmarkNidRepNativeProtoUnmarshal-4 100000 23698 ns/op 299.05 MB/s -BenchmarkNinRepNativeProtoUnmarshal-4 100000 23400 ns/op 302.86 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 15286 ns/op 223.53 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 15375 ns/op 222.23 MB/s -BenchmarkNidOptStructProtoUnmarshal-4 1000000 3019 ns/op 466.02 MB/s -BenchmarkNinOptStructProtoUnmarshal-4 500000 3169 ns/op 400.35 MB/s -BenchmarkNidRepStructProtoUnmarshal-4 100000 25167 ns/op 350.69 MB/s -BenchmarkNinRepStructProtoUnmarshal-4 100000 25199 ns/op 350.25 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-4 1000000 1714 ns/op 438.65 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-4 1000000 1793 ns/op 397.49 MB/s -BenchmarkNidNestedStructProtoUnmarshal-4 10000 115531 ns/op 320.22 MB/s -BenchmarkNinNestedStructProtoUnmarshal-4 10000 109260 ns/op 338.39 MB/s -BenchmarkNidOptCustomProtoUnmarshal-4 5000000 487 ns/op 145.63 MB/s -BenchmarkNinOptCustomProtoUnmarshal-4 5000000 644 ns/op 103.94 MB/s -BenchmarkNidRepCustomProtoUnmarshal-4 1000000 1733 ns/op 104.42 MB/s -BenchmarkNinRepCustomProtoUnmarshal-4 1000000 1734 ns/op 104.34 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-4 10000000 186 ns/op 166.02 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-4 5000000 512 ns/op 216.66 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 2000000 954 ns/op 252.56 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-4 2000000 788 ns/op 166.15 MB/s -BenchmarkTreeProtoUnmarshal-4 2000000 790 ns/op 318.98 MB/s -BenchmarkOrBranchProtoUnmarshal-4 1000000 1553 ns/op 353.43 MB/s -BenchmarkAndBranchProtoUnmarshal-4 1000000 1554 ns/op 353.09 MB/s -BenchmarkLeafProtoUnmarshal-4 5000000 642 ns/op 376.78 MB/s -BenchmarkDeepTreeProtoUnmarshal-4 1000000 1236 ns/op 240.13 MB/s -BenchmarkADeepBranchProtoUnmarshal-4 1000000 1493 ns/op 223.62 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-4 1000000 2327 ns/op 272.81 MB/s -BenchmarkDeepLeafProtoUnmarshal-4 1000000 1068 ns/op 271.46 MB/s -BenchmarkNilProtoUnmarshal-4 5000000 396 ns/op 88.30 MB/s -BenchmarkNidOptEnumProtoUnmarshal-4 5000000 410 ns/op 90.10 MB/s -BenchmarkNinOptEnumProtoUnmarshal-4 5000000 448 ns/op 80.25 MB/s -BenchmarkNidRepEnumProtoUnmarshal-4 5000000 672 ns/op 63.91 MB/s -BenchmarkNinRepEnumProtoUnmarshal-4 5000000 667 ns/op 64.38 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-4 5000000 446 ns/op 80.63 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-4 5000000 449 ns/op 80.09 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 5000000 449 ns/op 80.08 MB/s -BenchmarkTimerProtoUnmarshal-4 5000000 554 ns/op 189.24 MB/s -BenchmarkMyExtendableProtoUnmarshal-4 1000000 1445 ns/op 55.36 MB/s -BenchmarkOtherExtenableProtoUnmarshal-4 1000000 2544 ns/op 61.70 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-4 1000000 1847 ns/op 246.34 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1071 ns/op 220.23 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 5000000 688 ns/op 308.09 MB/s -BenchmarkNestedScopeProtoUnmarshal-4 1000000 1803 ns/op 247.86 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 1330 ns/op 255.61 MB/s -BenchmarkCustomContainerProtoUnmarshal-4 2000000 803 ns/op 134.48 MB/s -ok github.com/gogo/protobuf/test/mixbench/testdata 168.327s diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile b/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile deleted file mode 100644 index 0d4f698d..00000000 --- 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 20b66ab2..00000000 --- a/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go +++ /dev/null @@ -1,343 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: md.proto -// DO NOT EDIT! - -/* - Package moredefaults is a generated protocol buffer package. - - It is generated from these files: - md.proto - - It has these top-level messages: - MoreDefaultsB - MoreDefaultsA -*/ -package moredefaults - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import test "github.com/gogo/protobuf/test/example" - -import bytes "bytes" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" 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,json=field1,def=1234" json:"Field1,omitempty"` - Field2 int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2"` - B1 *MoreDefaultsB `protobuf:"bytes,3,opt,name=B1,json=b1" json:"B1,omitempty"` - B2 MoreDefaultsB `protobuf:"bytes,4,opt,name=B2,json=b2" json:"B2"` - A1 *test.A `protobuf:"bytes,5,opt,name=A1,json=a1" json:"A1,omitempty"` - A2 test.A `protobuf:"bytes,6,opt,name=A2,json=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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MoreDefaultsB) - if !ok { - that2, ok := that.(MoreDefaultsB) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MoreDefaultsA) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MoreDefaultsA) - if !ok { - that2, ok := that.(MoreDefaultsA) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.B1.Equal(that1.B1) { - return false - } - if !this.B2.Equal(&that1.B2) { - return false - } - if !this.A1.Equal(that1.A1) { - return false - } - if !this.A2.Equal(&that1.A2) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func NewPopulatedMoreDefaultsB(r randyMd, easy bool) *MoreDefaultsB { - this := &MoreDefaultsB{} - if r.Intn(10) != 0 { - v1 := randStringMd(r) - this.Field1 = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMd(r, 2) - } - return this -} - -func NewPopulatedMoreDefaultsA(r randyMd, easy bool) *MoreDefaultsA { - this := &MoreDefaultsA{} - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - this.Field2 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - if r.Intn(10) != 0 { - this.B1 = NewPopulatedMoreDefaultsB(r, easy) - } - v3 := NewPopulatedMoreDefaultsB(r, easy) - this.B2 = *v3 - if r.Intn(10) != 0 { - this.A1 = test.NewPopulatedA(r, easy) - } - v4 := test.NewPopulatedA(r, easy) - this.A2 = *v4 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMd(r, 7) - } - return this -} - -type randyMd interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMd(r randyMd) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMd(r randyMd) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneMd(r) - } - return string(tmps) -} -func randUnrecognizedMd(r randyMd, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMd(data, r, fieldNumber, wire) - } - return data -} -func randFieldMd(data []byte, r randyMd, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMd(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateMd(data, uint64(v6)) - case 1: - data = encodeVarintPopulateMd(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMd(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMd(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMd(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateMd(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} - -func init() { proto.RegisterFile("md.proto", fileDescriptorMd) } - -var fileDescriptorMd = []byte{ - // 252 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x0b, 0xb4, 0xd3, 0x05, 0x6a, 0xa7, 0x93, - 0x90, 0x18, 0x17, 0x9b, 0x5b, 0x66, 0x6a, 0x4e, 0x8a, 0xa1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, - 0x10, 0x5b, 0x1a, 0x98, 0xa7, 0xf4, 0x98, 0x11, 0x55, 0xa5, 0xa3, 0x90, 0x0c, 0x8a, 0x4a, 0x66, - 0x2b, 0x16, 0x43, 0x23, 0x63, 0x13, 0x98, 0x7a, 0xb8, 0xac, 0x91, 0x04, 0x13, 0x48, 0xd6, 0x89, - 0xe5, 0xc4, 0x3d, 0x79, 0x06, 0xa8, 0xac, 0x91, 0x90, 0x36, 0x17, 0x93, 0x93, 0xa1, 0x04, 0x33, - 0x50, 0x86, 0xdb, 0x48, 0x5a, 0x0f, 0xd9, 0xd7, 0x7a, 0x28, 0xce, 0x09, 0x62, 0x4a, 0x32, 0x14, - 0x32, 0x04, 0x2a, 0x36, 0x92, 0x60, 0x21, 0xa8, 0x18, 0x6a, 0x07, 0x53, 0x92, 0x91, 0x90, 0x38, - 0x17, 0x93, 0xa3, 0xa1, 0x04, 0x2b, 0x58, 0x0b, 0xbb, 0x1e, 0xc8, 0xff, 0x7a, 0x8e, 0x41, 0x4c, - 0x89, 0x86, 0x42, 0xb2, 0x40, 0x09, 0x23, 0x09, 0x36, 0x14, 0x09, 0x98, 0xbe, 0x44, 0x23, 0x27, - 0x81, 0x13, 0x0f, 0xe5, 0x18, 0x7f, 0x00, 0xf1, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x80, 0x18, 0x10, - 0x00, 0x00, 0xff, 0xff, 0x0f, 0x4e, 0xe8, 0x88, 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 7f5b2190..00000000 --- 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 45a8eac5..00000000 --- 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 85fe2640..00000000 --- a/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: md.proto -// DO NOT EDIT! - -/* -Package moredefaults is a generated protocol buffer package. - -It is generated from these files: - md.proto - -It has these top-level messages: - MoreDefaultsB - MoreDefaultsA -*/ -package moredefaults - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/example" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMoreDefaultsBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMoreDefaultsAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMoreDefaultsBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsB{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMoreDefaultsAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsA{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMoreDefaultsBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MoreDefaultsB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMoreDefaultsBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MoreDefaultsB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMoreDefaultsAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MoreDefaultsA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMoreDefaultsAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MoreDefaultsA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/Makefile b/vendor/github.com/gogo/protobuf/test/nopackage/Makefile deleted file mode 100644 index 0aa49e25..00000000 --- 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 d99b4869..00000000 --- a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go +++ /dev/null @@ -1,413 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: nopackage.proto -// DO NOT EDIT! - -/* -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 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++ - i = encodeFixed64Nopackage(data, i, uint64(math.Float64bits(float64(v)))) - } - } - return i, nil -} - -func encodeFixed64Nopackage(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 encodeFixed32Nopackage(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 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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNopackage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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 - if m.F == nil { - m.F = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNopackage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.F[mapkey] = mapvalue - } else { - var mapvalue float64 - 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{ - // 129 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x81, 0x8a, 0x18, 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, 0x11, - 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0xa0, 0x18, 0x63, 0x10, 0x84, 0x63, 0xc5, - 0x64, 0xc1, 0xe8, 0xc4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x05, 0x20, 0x7e, 0x00, 0xc4, 0x49, 0x6c, - 0x60, 0x8b, 0x8c, 0x01, 0x01, 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 cfaed76b..00000000 --- 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 3318a29c..00000000 --- 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 f79aa28e..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/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: - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="2.6.0" --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 180de6d9..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go +++ /dev/null @@ -1,5662 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/both/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=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,json=stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=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,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3729 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xe7, - 0xb5, 0x36, 0xc5, 0x45, 0xe4, 0x21, 0x45, 0x51, 0x23, 0xd9, 0xa6, 0x95, 0xc4, 0x8a, 0xe9, 0x2c, - 0x8e, 0x93, 0x48, 0xb6, 0x64, 0x79, 0x61, 0xee, 0x4d, 0x20, 0x4a, 0xb4, 0x22, 0x43, 0x12, 0x75, - 0x47, 0x62, 0xe2, 0xe4, 0x3e, 0x0c, 0x46, 0xe4, 0x88, 0xa2, 0x4d, 0xce, 0xf0, 0x72, 0x86, 0xb6, - 0x95, 0xa7, 0x5c, 0xe4, 0x2e, 0x08, 0x2e, 0x6e, 0x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b, 0x85, 0x65, - 0xf2, 0x75, 0xf4, 0x14, 0x0c, 0x78, 0x6e, 0xdf, 0x2b, 0x30, 0xf3, 0x78, 0x04, 0x46, 0xba, 0xc5, - 0x5c, 0xd7, 0xf0, 0xc7, 0xed, 0x83, 0x11, 0xb0, 0xae, 0x35, 0x31, 0xee, 0x08, 0x03, 0xbf, 0xc2, - 0x88, 0x0a, 0xd7, 0xd4, 0x75, 0xad, 0x86, 0xd1, 0x14, 0x38, 0x92, 0x9c, 0xbc, 0xbd, 0xa7, 0xa8, - 0x1e, 0x5f, 0x24, 0x10, 0x99, 0x21, 0xa5, 0xbb, 0x21, 0xc4, 0x53, 0x1c, 0x61, 0x38, 0xda, 0x1b, - 0x03, 0x89, 0x45, 0x99, 0xe2, 0xa4, 0xeb, 0x20, 0x46, 0xfe, 0x33, 0xdf, 0x46, 0xe8, 0x98, 0xa3, - 0x44, 0x40, 0xfc, 0x2a, 0x8d, 0x42, 0x94, 0x86, 0x59, 0x59, 0x13, 0xa5, 0xc1, 0xbe, 0x26, 0x0b, - 0x53, 0xd6, 0x36, 0xd4, 0x56, 0xcd, 0x52, 0x2e, 0xa9, 0xb5, 0x96, 0x46, 0x03, 0x06, 0x17, 0x86, - 0x0b, 0xef, 0x23, 0x32, 0x69, 0x0c, 0xe2, 0x2c, 0x2a, 0xab, 0x88, 0xb9, 0x42, 0xb3, 0x4f, 0x58, - 0x66, 0x81, 0xba, 0x40, 0x24, 0xe4, 0xf6, 0x17, 0x4c, 0xdc, 0x0b, 0x7c, 0x69, 0xe9, 0x2d, 0x88, - 0x80, 0xde, 0xfe, 0x54, 0x7b, 0xe2, 0xbb, 0xa1, 0xfb, 0xf4, 0xda, 0x63, 0x31, 0xf3, 0xdd, 0x3e, - 0x08, 0xd1, 0xfd, 0x36, 0x08, 0xf1, 0xb5, 0x07, 0x56, 0xf2, 0xca, 0x5c, 0xa1, 0x98, 0x5b, 0xcc, - 0xa7, 0x02, 0x52, 0x12, 0x80, 0x0a, 0xce, 0x2e, 0x16, 0x66, 0xd6, 0x52, 0x7d, 0xf6, 0xf5, 0xc2, - 0xf2, 0xda, 0xc9, 0x13, 0xa9, 0xa0, 0x0d, 0x28, 0x32, 0x41, 0xc8, 0x6d, 0x30, 0x35, 0x99, 0x0a, - 0x63, 0x24, 0x24, 0x18, 0xc1, 0xc2, 0xf9, 0xfc, 0x1c, 0x5a, 0x44, 0xbc, 0x12, 0xb4, 0xe9, 0x97, - 0x06, 0x20, 0x46, 0x25, 0xb9, 0x42, 0x61, 0x31, 0x15, 0xb5, 0x39, 0x57, 0xd7, 0xe4, 0x85, 0xe5, - 0xf9, 0x54, 0xcc, 0xe6, 0x9c, 0x97, 0x0b, 0xc5, 0x95, 0x14, 0xd8, 0x0c, 0x4b, 0xf9, 0xd5, 0xd5, - 0x99, 0xf9, 0x7c, 0x2a, 0x6e, 0x5b, 0xe4, 0x1e, 0x58, 0xcb, 0xaf, 0xa6, 0x12, 0x9e, 0x61, 0xe1, - 0x2d, 0x06, 0xec, 0x5b, 0xe4, 0x97, 0x8b, 0x4b, 0xa9, 0xa4, 0x34, 0x04, 0x03, 0xec, 0x16, 0x62, - 0x10, 0x83, 0x6d, 0x22, 0x1c, 0x69, 0xca, 0x19, 0x08, 0x63, 0x19, 0xf2, 0x08, 0xd0, 0x42, 0xca, - 0xcc, 0x42, 0x98, 0x46, 0x17, 0x46, 0x71, 0x72, 0x71, 0x26, 0x97, 0x5f, 0x54, 0x0a, 0x2b, 0x6b, - 0x0b, 0x85, 0xe5, 0x99, 0x45, 0xf4, 0x9d, 0x2d, 0x93, 0xf3, 0xff, 0x56, 0x5c, 0x90, 0xf3, 0x73, - 0xe8, 0x3f, 0x97, 0x6c, 0x25, 0x3f, 0xb3, 0x86, 0xb2, 0x60, 0xe6, 0x28, 0x8c, 0x74, 0xcb, 0x33, - 0xdd, 0x76, 0x46, 0xe6, 0xf9, 0x00, 0x0c, 0x77, 0x49, 0x99, 0x5d, 0x77, 0xd1, 0x3d, 0x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 0x58, 0x07, 0xf8, - 0x74, 0x00, 0x92, 0xde, 0x0e, 0xac, 0x6d, 0x78, 0x87, 0x3e, 0xd6, 0xe1, 0x3d, 0x15, 0x80, 0x01, - 0x4f, 0xdf, 0xf5, 0x4f, 0x35, 0xba, 0x27, 0x83, 0x30, 0xdc, 0x05, 0x87, 0x09, 0x88, 0x35, 0xa8, - 0xac, 0x67, 0xbe, 0xb3, 0x97, 0x7b, 0x8d, 0x93, 0xfa, 0xb7, 0xa2, 0x36, 0x2d, 0xde, 0xcf, 0x62, - 0xbd, 0xac, 0x96, 0x31, 0xa9, 0x56, 0x37, 0xaa, 0xd8, 0xbe, 0xb1, 0x27, 0x16, 0xd6, 0xb5, 0x0e, - 0x3a, 0x72, 0xf6, 0x78, 0x7c, 0x07, 0x48, 0x0d, 0xc3, 0xac, 0x5a, 0xd5, 0x4b, 0xe4, 0x78, 0x4e, - 0x3c, 0x48, 0x93, 0x2e, 0x36, 0x24, 0xa7, 0x84, 0x66, 0x41, 0xb7, 0x6c, 0x6b, 0x5d, 0xab, 0xa8, - 0x6d, 0xd6, 0x24, 0x0d, 0x05, 0xe5, 0x94, 0xd0, 0xd8, 0xd6, 0xd8, 0x68, 0x96, 0x8d, 0x16, 0x69, - 0x08, 0x98, 0x1d, 0xc9, 0x7a, 0x01, 0x39, 0xce, 0x64, 0xb6, 0x09, 0xef, 0xd8, 0x9c, 0x27, 0xf8, - 0x84, 0x1c, 0x67, 0x32, 0x66, 0x72, 0x2b, 0x0c, 0xaa, 0x95, 0x4a, 0x93, 0x90, 0x0b, 0x22, 0xd6, - 0x86, 0x26, 0x6d, 0x31, 0x35, 0x1c, 0x3d, 0x07, 0x51, 0xe1, 0x07, 0x52, 0x58, 0x88, 0x27, 0xb0, - 0xe6, 0xd3, 0x73, 0x94, 0x3e, 0xf2, 0x50, 0xaf, 0x0b, 0x25, 0xde, 0xb4, 0x6a, 0x2a, 0xce, 0x81, - 0x5e, 0x1f, 0xea, 0xa3, 0x72, 0x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b, 0x4e, 0x2e, 0xe2, 0x2e, 0x00, - 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 573 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0xda, 0x40, - 0x14, 0x00, 0x70, 0xcc, 0x7f, 0x0e, 0x68, 0xa8, 0xa5, 0x4a, 0xaf, 0x19, 0xa0, 0xa2, 0xad, 0xd4, - 0xa1, 0xc1, 0xe0, 0x3f, 0x40, 0xc6, 0x3a, 0x55, 0xd5, 0x85, 0x22, 0x91, 0x64, 0x8e, 0x30, 0x35, - 0x04, 0x09, 0xb8, 0x28, 0x77, 0x28, 0xf2, 0x96, 0xcf, 0xd0, 0x4f, 0xd1, 0xb1, 0x63, 0x3f, 0x42, - 0x46, 0xc6, 0xaa, 0x03, 0x4a, 0xe8, 0xd2, 0x31, 0x63, 0xd4, 0xa9, 0xef, 0xce, 0xe4, 0xae, 0x52, - 0x55, 0x75, 0xc9, 0xf0, 0x64, 0x3f, 0x7e, 0x77, 0x8f, 0xf7, 0x7c, 0x36, 0x79, 0x32, 0xa2, 0xf3, - 0x80, 0x32, 0x2b, 0xa0, 0xfc, 0xd4, 0xa2, 0x8b, 0xb0, 0x71, 0x76, 0x4e, 0x39, 0x35, 0x53, 0x78, - 0xbb, 0xbb, 0x37, 0x99, 0xf2, 0xd3, 0x65, 0xd0, 0xc0, 0x25, 0xd6, 0x84, 0x4e, 0xa8, 0x25, 0x2d, - 0x58, 0x8e, 0x65, 0x26, 0x13, 0x79, 0x17, 0xef, 0xa9, 0x3f, 0x25, 0x99, 0xc3, 0x65, 0x10, 0x44, - 0x66, 0x85, 0xa4, 0xd8, 0x32, 0x00, 0xe3, 0x99, 0xf1, 0xaa, 0x30, 0x10, 0xb7, 0xf5, 0x75, 0x8a, - 0x94, 0xdf, 0xcc, 0x66, 0x47, 0xd1, 0x59, 0xc8, 0xfa, 0x8b, 0xb0, 0x3f, 0x36, 0x81, 0x64, 0xdf, - 0x4d, 0xc3, 0xd9, 0xc7, 0x96, 0x5c, 0x66, 0xbc, 0x4f, 0x0c, 0xb2, 0x63, 0x99, 0x2b, 0xb1, 0x21, - 0x89, 0x92, 0x54, 0x62, 0x2b, 0x71, 0x20, 0x85, 0x92, 0x51, 0xe2, 0x28, 0x71, 0x21,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, 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 a72dde02..00000000 --- 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 562e89e4..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/both/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 4bfbe48a..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go +++ /dev/null @@ -1,4746 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=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,json=stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=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,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3724 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xe5, - 0xd5, 0x5e, 0xc7, 0x97, 0xd8, 0xc7, 0x8e, 0xe3, 0x4c, 0xc2, 0xae, 0x37, 0xc0, 0x86, 0xf5, 0x72, - 0x59, 0x16, 0x48, 0x76, 0x93, 0xcd, 0x5e, 0xcc, 0xf7, 0x81, 0xe2, 0xc4, 0x1b, 0xb2, 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 0x28, 0x6b, 0x4a, 0x55, 0xdf, - 0x30, 0xd2, 0x31, 0x4a, 0x30, 0xd6, 0x39, 0x11, 0x6a, 0x38, 0x8b, 0x76, 0x0b, 0x68, 0x26, 0x27, - 0x4d, 0xcf, 0xb5, 0xb4, 0x17, 0x22, 0xe6, 0x96, 0x6e, 0xa9, 0x97, 0xd3, 0x09, 0x1a, 0x21, 0xfc, - 0x2a, 0xf3, 0x8f, 0x30, 0x0c, 0xf6, 0x12, 0x62, 0x77, 0x42, 0x78, 0x83, 0xcc, 0x12, 0x03, 0x6c, - 0x17, 0x3e, 0x60, 0x18, 0xaf, 0x13, 0x23, 0x1f, 0xd0, 0x89, 0x33, 0x10, 0xd7, 0x35, 0xd3, 0xd2, - 0xca, 0x2c, 0x22, 0x82, 0x3d, 0xc6, 0x14, 0x30, 0x50, 0x67, 0x48, 0x85, 0x3e, 0x50, 0x48, 0x9d, - 0x83, 0x41, 0x7b, 0x48, 0x4a, 0x53, 0xd5, 0x2b, 0x22, 0x36, 0x27, 0xfc, 0x46, 0x32, 0x9e, 0x17, - 0x38, 0x99, 0xc0, 0xe4, 0xa4, 0xe6, 0xb9, 0x96, 0xe6, 0x00, 0x0c, 0x5d, 0x33, 0x36, 0x70, 0x7b, - 0x95, 0x6a, 0x18, 0x27, 0xdd, 0xbd, 0x54, 0x20, 0x26, 0x1d, 0x5e, 0x32, 0x98, 0xb4, 0x54, 0x93, - 0x4e, 0x3b, 0xa1, 0xd6, 0xbf, 0x4d, 0xa4, 0x2c, 0xb1, 0x4d, 0xd6, 0x11, 0x6d, 0x45, 0x48, 0x36, - 0x35, 0x12, 0xf7, 0xe8, 0x62, 0x36, 0xb3, 0x18, 0x1d, 0xc4, 0xb8, 0xef, 0xcc, 0x64, 0x0e, 0x63, - 0x13, 0x1b, 0x68, 0xba, 0x2f, 0xa5, 0x43, 0x60, 0x0b, 0x14, 0x1a, 0x56, 0x40, 0xb3, 0x50, 0x42, - 0x08, 0x97, 0x51, 0x36, 0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xcc, 0xfc, 0xb0, 0x0f, 0x42, - 0x74, 0xbf, 0x0d, 0x42, 0x7c, 0xed, 0xfe, 0x95, 0xbc, 0x32, 0x57, 0x28, 0xe6, 0x16, 0xf3, 0xa9, - 0x80, 0x94, 0x04, 0xa0, 0x82, 0x33, 0x8b, 0x85, 0x99, 0xb5, 0x54, 0x9f, 0x7d, 0xbd, 0xb0, 0xbc, - 0x76, 0xe2, 0x78, 0x2a, 0x68, 0x03, 0x8a, 0x4c, 0x10, 0x72, 0x1b, 0x4c, 0x4d, 0xa6, 0xc2, 0x18, - 0x09, 0x09, 0x46, 0xb0, 0x70, 0x2e, 0x3f, 0x87, 0x16, 0x11, 0xaf, 0x04, 0x6d, 0xfa, 0xa5, 0x01, - 0x88, 0x51, 0x49, 0xae, 0x50, 0x58, 0x4c, 0x45, 0x6d, 0xce, 0xd5, 0x35, 0x79, 0x61, 0x79, 0x3e, - 0x15, 0xb3, 0x39, 0xe7, 0xe5, 0x42, 0x71, 0x25, 0x05, 0x36, 0xc3, 0x52, 0x7e, 0x75, 0x75, 0x66, - 0x3e, 0x9f, 0x8a, 0xdb, 0x16, 0xb9, 0xfb, 0xd7, 0xf2, 0xab, 0xa9, 0x84, 0x67, 0x58, 0x78, 0x8b, - 0x01, 0xfb, 0x16, 0xf9, 0xe5, 0xe2, 0x52, 0x2a, 0x29, 0x0d, 0xc1, 0x00, 0xbb, 0x85, 0x18, 0xc4, - 0x60, 0x9b, 0x08, 0x47, 0x9a, 0x72, 0x06, 0xc2, 0x58, 0x86, 0x3c, 0x02, 0xb4, 0x90, 0x32, 0xb3, - 0x10, 0xa6, 0xd1, 0x85, 0x51, 0x9c, 0x5c, 0x9c, 0xc9, 0xe5, 0x17, 0x95, 0xc2, 0xca, 0xda, 0x42, - 0x61, 0x79, 0x66, 0x11, 0x7d, 0x67, 0xcb, 0xe4, 0xfc, 0xff, 0x14, 0x17, 0xe4, 0xfc, 0x1c, 0xfa, - 0xcf, 0x25, 0x5b, 0xc9,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 0xf5, 0x01, 0x2a, 0x9a, 0x21, 0x92, 0x5e, 0xfd, 0xf7, 0x6f, - 0x89, 0xcd, 0x67, 0x02, 0x90, 0x6a, 0x6f, 0xc6, 0xda, 0x06, 0x18, 0xf8, 0x48, 0x07, 0xf8, 0x54, - 0x00, 0x92, 0xde, 0x0e, 0xac, 0x6d, 0x78, 0x07, 0x3f, 0xd2, 0xe1, 0x3d, 0x19, 0x80, 0x01, 0x4f, - 0xdf, 0xf5, 0x1f, 0x35, 0xba, 0x27, 0x82, 0x30, 0xdc, 0x05, 0x87, 0x09, 0x88, 0x35, 0xa8, 0xac, - 0x67, 0xbe, 0xa3, 0x97, 0x7b, 0x8d, 0x93, 0xfa, 0xb7, 0xa2, 0x36, 0x2d, 0xde, 0xcf, 0x62, 0xbd, - 0xac, 0x96, 0x31, 0xa9, 0x56, 0x37, 0xaa, 0xd8, 0xbe, 0xb1, 0x27, 0x16, 0xd6, 0xb5, 0x0e, 0x3a, - 0x72, 0xf6, 0x78, 0x7c, 0x3b, 0x48, 0x0d, 0xc3, 0xac, 0x5a, 0xd5, 0x8b, 0xe4, 0x78, 0x4e, 0x3c, - 0x48, 0x93, 0x2e, 0x36, 0x24, 0xa7, 0x84, 0x66, 0x41, 0xb7, 0x6c, 0x6b, 0x5d, 0xab, 0xa8, 0x6d, - 0xd6, 0x24, 0x0d, 0x05, 0xe5, 0x94, 0xd0, 0xd8, 0xd6, 0xd8, 0x68, 0x96, 0x8d, 0x16, 0x69, 0x08, - 0x98, 0x1d, 0xc9, 0x7a, 0x01, 0x39, 0xce, 0x64, 0xb6, 0x09, 0xef, 0xd8, 0x9c, 0x27, 0xf8, 0x84, - 0x1c, 0x67, 0x32, 0x66, 0x72, 0x0b, 0x0c, 0xaa, 0x95, 0x4a, 0x93, 0x90, 0x0b, 0x22, 0xd6, 0x86, - 0x26, 0x6d, 0x31, 0x35, 0x1c, 0x3d, 0x0b, 0x51, 0xe1, 0x07, 0x52, 0x58, 0x88, 0x27, 0x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x1d, 0xab, 0x4b, 0x68, 0x57, 0x40, 0xc8, - 0xed, 0xf5, 0xe8, 0x81, 0xf3, 0x49, 0xce, 0x29, 0x71, 0xac, 0x58, 0x16, 0xc2, 0x78, 0x16, 0x86, - 0xf0, 0x49, 0x7d, 0xdd, 0x30, 0xf9, 0x73, 0x6f, 0x0f, 0x74, 0x4f, 0x71, 0xba, 0x41, 0x0e, 0xa4, - 0x4f, 0xc1, 0x84, 0xeb, 0x34, 0x44, 0x37, 0xf0, 0x01, 0xa8, 0x07, 0x8a, 0xa7, 0x39, 0x45, 0x3f, - 0xb1, 0x27, 0xd0, 0x19, 0x48, 0x54, 0x0c, 0x9e, 0x86, 0xfd, 0xe1, 0xcf, 0x70, 0x78, 0x5c, 0x60, - 0x38, 0x45, 0xc3, 0x68, 0xb4, 0x6a, 0x24, 0x47, 0xfb, 0x53, 0x7c, 0x59, 0x50, 0x08, 0x0c, 0xa7, - 0xd8, 0x85, 0x5b, 0xbf, 0x22, 0x28, 0x4c, 0x97, 0x3f, 0xef, 0x26, 0x67, 0xbd, 0xb5, 0x2d, 0x43, - 0xef, 0x65, 0x10, 0xcf, 0x72, 0x06, 0xe0, 0x10, 0x42, 0x70, 0x27, 0xc4, 0x7a, 0x5d, 0x88, 0xaf, - 0x72, 0x78, 0x54, 0x13, 0x2b, 0x80, 0xfb, 0x4c, 0x24, 0x19, 0xf2, 0x6e, 0xc5, 0x9f, 0xe2, 0x6b, - 0x9c, 0x22, 0xe9, 0x82, 0xf1, 0x69, 0x58, 0x9a, 0x69, 0xe1, 0xa3, 0x7a, 0x0f, 0x24, 0xcf, 0x8b, - 0x69, 0x70, 0x08, 0x77, 0xe5, 0xba, 0xa6, 0x97, 0x36, 0x7b, 0x63, 0x78, 0x41, 0xb8, 0x52, 0x60, - 0x08, 0x05, 0x66, 0x9e, 0xba, 0xda, 0xc4, 0x87, 0xeb, 0x5a, 0x4f, 0xcb, 0xf1, 0x75, 0xce, 0x91, - 0xb0, 0x41, 0xdc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 0xad, 0x39, 0x41, 0x8f, - 0x37, 0x43, 0xb6, 0xe6, 0x84, 0xad, 0x39, 0x49, 0x4f, 0x35, 0x87, 0x6c, 0xcd, 0x49, 0x5b, 0x73, - 0x8a, 0x9e, 0x64, 0x4a, 0xb6, 0xe6, 0x94, 0xad, 0x39, 0x4d, 0x5f, 0x42, 0xf7, 0xdb, 0x9a, 0xd3, - 0xd2, 0x28, 0xf4, 0xb3, 0x99, 0x1e, 0xa5, 0x2f, 0x6d, 0x06, 0x51, 0xd5, 0xcf, 0xa6, 0x7a, 0xd4, - 0xd1, 0x1d, 0xa3, 0x2f, 0x9a, 0x23, 0x8e, 0xee, 0x98, 0xa3, 0x9b, 0xa4, 0x3f, 0x9c, 0x4c, 0x39, - 0xba, 0x49, 0x47, 0x37, 0x95, 0x1e, 0x20, 0x3b, 0xd5, 0xd1, 0x4d, 0x39, 0xba, 0xe3, 0xe9, 0x24, - 0x59, 0x01, 0x47, 0x77, 0xdc, 0xd1, 0x4d, 0xa7, 0x07, 0xc9, 0x81, 0xad, 0xa3, 0x9b, 0x96, 0xee, - 0x80, 0x38, 0x2e, 0x95, 0xc2, 0xdf, 0x31, 0xd2, 0x17, 0xda, 0xf1, 0x49, 0x18, 0x27, 0x31, 0x41, - 0x97, 0x15, 0x6d, 0x01, 0x0d, 0x78, 0x82, 0xca, 0x25, 0x80, 0x3e, 0xb8, 0x2a, 0xf4, 0x07, 0x59, - 0x99, 0xd7, 0x02, 0x10, 0x5b, 0xbb, 0x64, 0xd0, 0xdf, 0xee, 0x98, 0xff, 0xe2, 0xc5, 0x15, 0x83, - 0x9e, 0x3a, 0x9e, 0xce, 0xd0, 0x09, 0x05, 0xf8, 0xa0, 0xa7, 0x9c, 0x09, 0x4d, 0x4d, 0xa7, 0x0f, - 0xd1, 0x09, 0xd9, 0xba, 0x69, 0x69, 0x02, 0x12, 0xae, 0x09, 0x4d, 0xd2, 0x77, 0xd4, 0xde, 0x19, - 0x05, 0xe4, 0xb8, 0x33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xf4, 0xfb, 0x03, 0x7b, 0xfe, 0x19, - 0x00, 0x00, 0xff, 0xff, 0xc2, 0x89, 0xd3, 0xd0, 0xe7, 0x2e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x6f, 0x1a, 0x3f, - 0x14, 0x00, 0x70, 0x8e, 0xdf, 0x18, 0xf8, 0x86, 0xef, 0x4d, 0xaf, 0x0c, 0x50, 0xd1, 0x56, 0xea, - 0xd0, 0x70, 0x70, 0x3f, 0x80, 0x8c, 0xbd, 0x54, 0x55, 0x17, 0x8a, 0x44, 0x92, 0x39, 0xe2, 0xe8, - 0x41, 0x90, 0x00, 0x47, 0xd8, 0x28, 0xba, 0x2d, 0x7f,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, 0x90, 0x78, 0xa9, 0xb8, 0xe1, 0x71, 0x25, 0x7e, 0xeb, 0xcb, 0xb6, - 0xfe, 0xe2, 0x8f, 0x5f, 0x90, 0x78, 0x77, 0xd6, 0x58, 0xee, 0x69, 0x9e, 0xcd, 0x96, 0xbc, 0x6d, - 0xf7, 0xc4, 0x0b, 0x1e, 0xab, 0x2c, 0xe6, 0x19, 0xc9, 0x1f, 0x8f, 0x18, 0x97, 0x19, 0x45, 0xe9, - 0x69, 0xbf, 0xfb, 0x63, 0x5b, 0x77, 0xfe, 0x92, 0x11, 0x77, 0x70, 0xdc, 0xd1, 0xec, 0x47, 0x22, - 0x6b, 0xc7, 0x15, 0xdb, 0x31, 0x71, 0x7e, 0xbc, 0x4f, 0x65, 0xda, 0x0f, 0xa5, 0xbe, 0x1d, 0x2d, - 0x42, 0x78, 0x26, 0x3e, 0x17, 0xbf, 0xb2, 0xdb, 0xd6, 0x4b, 0xfd, 0x48, 0xff, 0xae, 0x4b, 0x11, - 0x33, 0x3f, 0x4f, 0xb2, 0xf1, 0xcc, 0x7f, 0x75, 0x73, 0x5b, 0x4b, 0x6c, 0x30, 0x3e, 0x63, 0x7c, - 0xbd, 0xad, 0x19, 0x77, 0x18, 0xf7, 0x18, 0xd7, 0xbb, 0x9a, 0xf1, 0x01, 0xe3, 0x23, 0xc6, 0x27, - 0x8c, 0x1b, 0x8c, 0xcd, 0x0e, 0xd7, 0xe0, 0xf8, 0x1d, 0xc7, 0x3b, 0x1c, 0xef, 0x71, 0xbc, 0xfe, - 0x56, 0x4b, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x02, 0x28, 0x50, 0xa1, 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 d9a8204e..00000000 --- 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 eac19ae2..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 1b2a87b9..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go +++ /dev/null @@ -1,4366 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=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,json=stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=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,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3728 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xe5, - 0xd5, 0x5e, 0xc7, 0x97, 0xd8, 0xc7, 0x8e, 0xe3, 0x4c, 0xc2, 0xee, 0x6c, 0x80, 0x0d, 0xeb, 0xe5, - 0xb2, 0x2c, 0x90, 0xec, 0x26, 0x9b, 0xbd, 0x98, 0xef, 0x03, 0xc5, 0x89, 0x37, 0x64, 0x95, 0xc4, - 0xf9, 0x26, 0x31, 0x2c, 0x7c, 0x3f, 0x46, 0x13, 0x7b, 0xe2, 0x78, 0xd7, 0x9e, 0xf1, 0xe7, 0x19, - 0xef, 0x6e, 0xf8, 0xc5, 0x27, 0x7a, 0x11, 0xaa, 0x7a, 0xa3, 0x95, 0xca, 0xbd, 0x05, 0xa9, 0x85, - 0xd2, 0x1b, 0xf4, 0xa6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, - 0xe9, 0xbf, 0x87, 0x61, 0xb0, 0x97, 0x10, 0xbb, 0x13, 0xc2, 0x1b, 0x64, 0x96, 0x18, 0x60, 0xbb, - 0xf0, 0x01, 0xc3, 0xb4, 0x3a, 0x31, 0xf2, 0x01, 0x9d, 0x38, 0x03, 0x71, 0x43, 0xb7, 0x6c, 0xbd, - 0xc4, 0x22, 0x22, 0xd8, 0x63, 0x4c, 0x01, 0x03, 0x75, 0x86, 0x54, 0xe8, 0x03, 0x85, 0xd4, 0x39, - 0x18, 0x74, 0x86, 0xa4, 0x36, 0x34, 0xa3, 0x2c, 0x62, 0x73, 0xc2, 0x6f, 0x24, 0xe3, 0x39, 0x81, - 0x53, 0x08, 0x4c, 0x49, 0xea, 0x2d, 0xd7, 0xd2, 0x1c, 0x80, 0x69, 0xe8, 0xe6, 0x06, 0x6e, 0xaf, - 0x62, 0x15, 0xe3, 0xa4, 0xbb, 0x97, 0xf2, 0xc4, 0xa4, 0xc3, 0x4b, 0x26, 0x93, 0x16, 0xab, 0xd2, - 0x69, 0x37, 0xd4, 0xfa, 0xb7, 0x89, 0x94, 0x25, 0xb6, 0xc9, 0x3a, 0xa2, 0xad, 0x00, 0xc9, 0x86, - 0x4e, 0xe2, 0x1e, 0x5d, 0xcc, 0x66, 0x16, 0xa3, 0x83, 0x18, 0xf7, 0x9d, 0x99, 0xc2, 0x61, 0x6c, - 0x62, 0x03, 0x0d, 0xef, 0xa5, 0x74, 0x08, 0x1c, 0x81, 0x4a, 0xc3, 0x0a, 0x68, 0x16, 0x4a, 0x08, - 0xe1, 0x32, 0xca, 0x46, 0x4f, 0x41, 0xb2, 0xd5, 0x3d, 0xd2, 0x08, 0x84, 0x2d, 0x5b, 0x6b, 0xd8, - 0x34, 0x0a, 0xc3, 0x0a, 0xbb, 0x90, 0x52, 0x10, 0xc4, 0x24, 0x43, 0xb3, 0x5c, 0x58, 0x21, 0x5f, - 0x47, 0x4f, 0xc2, 0x40, 0xcb, 0xed, 0x7b, 0x05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x58, 0x5e, - 0x3b, 0x71, 0x3c, 0x15, 0x74, 0x00, 0x05, 0x26, 0x08, 0x79, 0x0d, 0xa6, 0x26, 0x53, 0x61, 0x8c, - 0x84, 0x04, 0x23, 0x58, 0x38, 0x97, 0x9b, 0x43, 0x8b, 0x48, 0xab, 0x04, 0x6d, 0xfa, 0xa5, 0x01, - 0x88, 0x51, 0x49, 0x36, 0x9f, 0x5f, 0x4c, 0x45, 0x1d, 0xce, 0xd5, 0x35, 0x65, 0x61, 0x79, 0x3e, - 0x15, 0x73, 0x38, 0xe7, 0x95, 0x7c, 0x61, 0x25, 0x05, 0x0e, 0xc3, 0x52, 0x6e, 0x75, 0x75, 0x66, - 0x3e, 0x97, 0x8a, 0x3b, 0x16, 0xd9, 0xfb, 0xd7, 0x72, 0xab, 0xa9, 0x44, 0xcb, 0xb0, 0xf0, 0x16, - 0x03, 0xce, 0x2d, 0x72, 0xcb, 0x85, 0xa5, 0x54, 0x52, 0x1a, 0x82, 0x01, 0x76, 0x0b, 0x31, 0x88, - 0xc1, 0x36, 0x11, 0x8e, 0x34, 0xe5, 0x0e, 0x84, 0xb1, 0x0c, 0xb5, 0x08, 0xd0, 0x42, 0x4a, 0xcf, - 0x42, 0x98, 0x46, 0x17, 0x46, 0x71, 0x72, 0x71, 0x26, 0x9b, 0x5b, 0x54, 0xf3, 0x2b, 0x6b, 0x0b, - 0xf9, 0xe5, 0x99, 0x45, 0xf4, 0x9d, 0x23, 0x53, 0x72, 0xff, 0x53, 0x58, 0x50, 0x72, 0x73, 0xe8, - 0x3f, 0x8f, 0x6c, 0x25, 0x37, 0xb3, 0x86, 0xb2, 0x60, 0xfa, 0x08, 0x8c, 0x74, 0xcb, 0x33, 0xdd, - 0x76, 0x46, 0xfa, 0xb9, 0x00, 0x0c, 0x77, 0x49, 0x99, 0x5d, 0x77, 0xd1, 0xdd, 0x10, 0x66, 0x91, - 0xc6, 0x8a, 0xc8, 0xad, 0x5d, 0x73, 0x2f, 0x8d, 0xbb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 0x96, 0x76, - 0x8b, 0x0f, 0x03, 0x7d, 0xc7, 0xfa, 0xb4, 0x2d, 0x49, 0x01, 0x60, 0xa6, 0x24, 0xc2, 0xd9, 0x48, - 0xb2, 0x47, 0x7f, 0x73, 0x65, 0xec, 0xf6, 0x6d, 0x77, 0x10, 0xf1, 0xdd, 0x04, 0xcb, 0x6f, 0xe3, - 0x85, 0x8a, 0x61, 0x1f, 0x9b, 0x3c, 0x45, 0x1c, 0x5c, 0x74, 0x58, 0xa4, 0x02, 0x44, 0x67, 0x71, - 0x3f, 0x53, 0x46, 0x32, 0xf4, 0x50, 0xf6, 0xe4, 0x3f, 0xae, 0x8c, 0x4d, 0xf9, 0x30, 0xf2, 0xd4, - 0x33, 0xbe, 0xb4, 0x45, 0x58, 0x4f, 0x1c, 0x27, 0x70, 0x24, 0xa6, 0x39, 0x89, 0xd2, 0x4e, 0x8a, - 0xa1, 0x92, 0x03, 0x77, 0xfa, 0x2a, 0x3e, 0x98, 0x4d, 0xbd, 0x79, 0x65, 0x2c, 0xb1, 0xb4, 0xe5, - 0xca, 0xdd, 0xa1, 0x90, 0xab, 0x6c, 0x14, 0x22, 0xec, 0x2a, 0x3b, 0xf7, 0xea, 0x1b, 0x07, 0xf6, - 0xbc, 0x86, 0x9f, 0x5f, 0xe3, 0xe7, 0xf5, 0x37, 0x0e, 0x04, 0xde, 0xc5, 0xcf, 0x7b, 0xf8, 0x79, - 0xe8, 0xcd, 0x03, 0x81, 0x17, 0xf0, 0xf3, 0x12, 0x7e, 0x7e, 0x84, 0x9f, 0x57, 0xdf, 0x44, 0x3b, - 0xfc, 0xbc, 0x8e, 0xdf, 0xdf, 0xc6, 0xff, 0xef, 0xe2, 0xff, 0xf7, 0xf0, 0xff, 0x43, 0xbf, 0x3b, - 0xb0, 0xe7, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0xcf, 0xed, 0x16, 0xe5, 0x2e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 573 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0xbd, 0x6e, 0x1a, 0x4f, - 0x10, 0x00, 0x70, 0x8e, 0x6f, 0x06, 0xf8, 0x9b, 0xff, 0x55, 0x13, 0x17, 0x10, 0x91, 0x44, 0x4a, - 0x11, 0x73, 0x70, 0x1f, 0x80, 0xcb, 0x9c, 0xa3, 0x28, 0x0d, 0x41, 0xc2, 0x76, 0x6d, 0x71, 0xe4, - 0x20, 0x48, 0xc0, 0x5a, 0xdc, 0x22, 0x8b, 0xce, 0xcf, 0x90, 0xa7, 0x48, 0x99, 0x32, 0x8f, 0xe0, - 0xd2, 0x65, 0x94, 0x02, 0xd9, 0xa4, 0x49, 0xe9, 0xd2, 0x4a, 0x95, 0xd9, 0x3d, 0xbc, 0x1b, 0x29, - 0x8a, 0xd2, 0xa4, 0x18, 0xed, 0xee, 0xfd, 0x76, 0x87, 0x99, 0xdb, 0x03, 0x70, 0xc4, 0xe6, 0x01, - 0x8b, 0xac, 0x45, 0x38, 0xe5, 0xef, 0xc3, 0xa5, 0xc5, 0x16, 0x61, 0xe3, 0x7c, 0xc9, 0x38, 0x33, - 0x53, 0x34, 0xdd, 0x3f, 0x98, 0xd0, 0xe3, 0x55, 0xd0, 0xa0, 0x5d, 0xd6, 0x84, 0x4d, 0x98, 0x25, - 0x2d, 0x58, 0x8d, 0xe5, 0x4a, 0x2e, 0xe4,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f, 0xd9, 0x6e, 0x6a, 0xa5, 0xde, 0x5a, 0x3f, 0xd7, 0xa5, 0x88, 0x95, 0x9f, 0x87, - 0x6c, 0xbc, 0xf2, 0x5f, 0x5d, 0xdd, 0x56, 0x13, 0xd7, 0x14, 0x5f, 0x28, 0x6e, 0x6e, 0xab, 0xc6, - 0x1d, 0xc5, 0x3d, 0xc5, 0xe5, 0xb6, 0x6a, 0x7c, 0xa4, 0xf8, 0x44, 0xf1, 0x99, 0xe2, 0x6a, 0x4b, - 0xfb, 0x28, 0x6e, 0x68, 0xfe, 0x9d, 0xc6, 0x3b, 0x1a, 0xef, 0x69, 0xbc, 0xfc, 0x56, 0x4d, 0xfc, - 0x0c, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xaa, 0xe1, 0x2b, 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 66d4b449..00000000 --- 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 fdbacc07..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 c1597892..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go +++ /dev/null @@ -1,5282 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=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,json=stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=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,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3727 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xe7, - 0xb5, 0x36, 0xc5, 0x45, 0xe4, 0x21, 0x45, 0x51, 0x23, 0xc5, 0xa6, 0x15, 0xc7, 0x8a, 0xe9, 0x2c, - 0x8e, 0x93, 0x48, 0xb6, 0x64, 0x79, 0x61, 0xee, 0x4d, 0x20, 0x4a, 0xb4, 0x22, 0x43, 0x12, 0x75, - 0x47, 0x62, 0xe2, 0xe4, 0x3e, 0x0c, 0x46, 0xe4, 0x88, 0xa2, 0x4d, 0xce, 0xf0, 0x72, 0x86, 0xb6, - 0x95, 0xa7, 0x5c, 0xe4, 0x2e, 0x08, 0x2e, 0x6e, 0x97, 0xb4, 0x40, 0xb3, 0xb7, 0x09, 0xd0, 0x26, - 0x4d, 0xb7, 0xa4, 0x1b, 0x8a, 0x3e, 0x15, 0x28, 0xd2, 0xe6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, 0xc3, 0x60, 0x2f, 0x21, 0x76, 0x17, 0x84, 0x37, 0xc8, 0x2c, 0x31, - 0xc0, 0x76, 0xe1, 0x03, 0x86, 0xf1, 0x3a, 0x31, 0xf2, 0x21, 0x9d, 0x38, 0x03, 0x71, 0x5d, 0x33, - 0x2d, 0xad, 0xcc, 0x22, 0x22, 0xd8, 0x63, 0x4c, 0x01, 0x03, 0x75, 0x86, 0x54, 0xe8, 0x43, 0x85, - 0xd4, 0x79, 0x18, 0xb4, 0x87, 0xa4, 0x34, 0x55, 0xbd, 0x22, 0x62, 0x73, 0xc2, 0x6f, 0x24, 0xe3, - 0x79, 0x81, 0x93, 0x09, 0x4c, 0x4e, 0x6a, 0x9e, 0x6b, 0x69, 0x0e, 0xc0, 0xd0, 0x35, 0x63, 0x03, - 0xb7, 0x57, 0xa9, 0x86, 0x71, 0xd2, 0xdd, 0x4b, 0x05, 0x62, 0xd2, 0xe1, 0x25, 0x83, 0x49, 0x4b, - 0x35, 0xe9, 0x8c, 0x13, 0x6a, 0xfd, 0xdb, 0x44, 0xca, 0x12, 0xdb, 0x64, 0x1d, 0xd1, 0x56, 0x84, - 0x64, 0x53, 0x23, 0x71, 0x8f, 0x2e, 0x66, 0x33, 0x8b, 0xd1, 0x41, 0x8c, 0xfb, 0xce, 0x4c, 0xe6, - 0x30, 0x36, 0xb1, 0x81, 0xa6, 0xfb, 0x52, 0x3a, 0x0c, 0xb6, 0x40, 0xa1, 0x61, 0x05, 0x34, 0x0b, - 0x25, 0x84, 0x70, 0x19, 0x65, 0xa3, 0xa7, 0x21, 0xe9, 0x75, 0x8f, 0x34, 0x02, 0x61, 0xd3, 0x52, - 0x9b, 0x16, 0x8d, 0xc2, 0xb0, 0xcc, 0x2e, 0xa4, 0x14, 0x04, 0x31, 0xc9, 0xd0, 0x2c, 0x17, 0x96, - 0xc9, 0xd7, 0xd1, 0x53, 0x30, 0xe0, 0xb9, 0x7d, 0xaf, 0xc0, 0xcc, 0xe3, 0x11, 0x18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87, 0x81, 0xbe, 0x63, 0xbd, 0xda, 0x96, 0x24, 0x03, 0x30, 0x53, 0x12, 0xe1, 0x6c, 0x24, 0xb9, - 0x63, 0xbf, 0xb8, 0x3a, 0x76, 0xc7, 0xb6, 0x3b, 0x88, 0xf8, 0x6e, 0x82, 0xe5, 0xb8, 0xf1, 0x62, - 0x55, 0xb7, 0x8e, 0x4f, 0x9e, 0x26, 0x0e, 0x2e, 0xd9, 0x2c, 0x52, 0x11, 0xa2, 0xb3, 0xb8, 0xa7, - 0x29, 0x23, 0x19, 0x7a, 0x28, 0x77, 0xea, 0x2f, 0x57, 0xc7, 0xa6, 0x7c, 0x18, 0x79, 0xfa, 0x19, - 0x5f, 0xda, 0x22, 0xac, 0x27, 0x4f, 0x10, 0x38, 0x12, 0xd3, 0xbc, 0x44, 0x69, 0x27, 0xc5, 0x50, - 0xc9, 0xa1, 0x3b, 0x7d, 0x1d, 0x1f, 0xcc, 0xa5, 0xde, 0xba, 0x3a, 0x96, 0x58, 0xda, 0x72, 0xe4, - 0xce, 0x50, 0xc8, 0x55, 0x2e, 0x0a, 0x11, 0x76, 0x95, 0x9b, 0x7b, 0xed, 0xcd, 0x83, 0x7b, 0x5e, - 0xc7, 0xcf, 0xcf, 0xf1, 0xf3, 0xc6, 0x9b, 0x07, 0x03, 0xef, 0xe1, 0xe7, 0x7d, 0xfc, 0x3c, 0xfc, - 0xd6, 0xc1, 0xc0, 0x8b, 0xf8, 0x79, 0x19, 0x3f, 0xdf, 0xc3, 0xcf, 0x6b, 0x6f, 0xa1, 0x1d, 0xfe, - 0x7f, 0x03, 0x3f, 0xef, 0xe0, 0xf7, 0xf7, 0xf0, 0xff, 0xfb, 0xf8, 0xff, 0xe1, 0x5f, 0x1d, 0xdc, - 0xf3, 0xb7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x30, 0x06, 0x19, 0xe9, 0x2e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 578 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0x1a, 0x31, - 0x14, 0x00, 0x70, 0x8e, 0xff, 0x18, 0x68, 0xe8, 0x4d, 0xaf, 0x51, 0x05, 0x15, 0x6d, 0xa5, 0x0e, - 0x0d, 0x07, 0xf7, 0x07, 0xc8, 0xd8, 0x4b, 0x55, 0x75, 0xa1, 0x48, 0x24, 0x99, 0x23, 0x8e, 0x1e, - 0x04, 0x09, 0x70, 0x84, 0x7d, 0x8a, 0xd8, 0xf2, 0x19, 0xfa, 0x29, 0x3a, 0x76, 0xec, 0x47, 0xc8, - 0x98, 0xb1, 0xea, 0x80, 0x12, 0xba, 0x74, 0xcc, 0x18, 0x75, 0xea, 0xb3, 0x8f, 0xd8, 0x95, 0xaa, - 0xaa, 0x4b, 0x86, 0x27, 0xdb, 0xfc, 0xec, 0xc7, 0x7b, 0xe7, 0x3b, 0xf2, 0x74, 0x44, 0xe7, 0x01, - 0x65, 0x56, 0xb4, 0x98, 0x0f, 0x97, 0xec, 0x74, 0x38, 0x0b, 0x97, 0x16, 0x5d, 0x84, 0x8d, 0xb3, - 0x25, 0xe5, 0xd4, 0x4c, 0xe1, 0x74, 0x77, 0x6f, 0x32, 0xe5, 0xa7, 0x51, 0xd0, 0xc0, 0x9d, 0xd6, - 0x84, 0x4e, 0xa8, 0x25, 0x2d, 0x88, 0xc6, 0x72, 0x25, 0x17, 0x72, 0x16, 0x9f, 0xa9, 0x3f, 0x21, - 0x99, 0xc3, 0x28, 0x08, 0x56, 0x66, 0x85, 0xa4, 0x58, 0x14, 0x80, 0xf1, 0xcc, 0x78, 0x55, 0x18, - 0x88, 0x69, 0x7d, 0x9d, 0x22, 0xe5, 0x37, 0xb3, 0xd9, 0xd1, 0xea, 0x2c, 0x64, 0xfd, 0x45, 0xd8, - 0x1f, 0x9b, 0x40, 0xb2, 0xef, 0xa6, 0xe1, 0xec, 0x63, 0x4b, 0x6e, 0x33, 0xde, 0x27, 0x06, 0xd9, - 0xb1, 0x5c, 0x2b, 0xb1, 0x21, 0x89, 0x92, 0x54, 0x62, 0x2b, 0x71, 0x20, 0x85, 0x92, 0x51, 0xe2, - 0x28, 0x71, 0x21, 0x8d, 0x92, 0x52, 0xe2, 0x2a, 0xf1, 0x20, 0x83, 0x52, 0x56, 0xe2, 0x29, 0x69, - 0x43, 0x16, 0x25, 0xad, 0xa4, 0xad, 0xa4, 0x03, 0x39, 0x94, 0xc7, 0x4a, 0x3a, 0x4a, 0xba, 0x90, - 0x47, 0x31, 0x95, 0x74, 0x95, 0xec, 0x43, 0x01, 0x25, 0xa7, 0x64, 0xdf, 0xdc, 0x25, 0xb9, 0xb8, - 0xd3, 0x26, 0x10, 0xa4, 0x1d, 0xa4, 0x5c, 0xdc, 0x6a, 0x53, 0x5b, 0x0b, 0x8a, 0x68, 0x59, 0x6d, - 0x2d, 0x6d, 0x36, 0x94, 0xd0, 0x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f, 0x86, 0x8c, 0xcb, 0x8c, 0xa2, - 0xf4, 0xb4, 0xdf, 0xf9, 0xb5, 0xae, 0x39, 0xff, 0xc9, 0x88, 0x27, 0x38, 0x9e, 0x68, 0xf4, 0x56, - 0x22, 0x6b, 0xdb, 0x15, 0xc7, 0x31, 0x71, 0x7e, 0xb4, 0x4d, 0x65, 0xda, 0xf7, 0xa5, 0x7e, 0x18, - 0xce, 0x43, 0x78, 0x29, 0x3e, 0x17, 0xbf, 0xb2, 0x59, 0xd7, 0x4a, 0xbd, 0x95, 0xfe, 0x5d, 0x97, - 0x22, 0x56, 0x7e, 0x9e, 0x64, 0xe3, 0x95, 0xff, 0xf6, 0xf2, 0xa6, 0x9a, 0xb8, 0xc2, 0xf8, 0x86, - 0x71, 0x7d, 0x53, 0x35, 0x6e, 0x31, 0xee, 0x30, 0x2e, 0x36, 0x55, 0xe3, 0x33, 0xc6, 0x17, 0x8c, - 0xaf, 0x18, 0x97, 0x1b, 0xdc, 0x87, 0xe3, 0x35, 0xc6, 0x4f, 0x9c, 0xdf, 0xe2, 0x78, 0x87, 0xe3, - 0xc5, 0x8f, 0x6a, 0xe2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0x91, 0xf4, 0xfe, 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 633f0122..00000000 --- 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 fd53b248..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.pb.go deleted file mode 100644 index 81207283..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.pb.go +++ /dev/null @@ -1,5631 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=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,json=stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=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,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3727 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xe5, - 0xd5, 0xc6, 0xf1, 0x25, 0xf6, 0xb1, 0xe3, 0x38, 0x93, 0xb0, 0xeb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df, 0x35, 0x10, 0x0a, 0xcc, 0x46, 0x16, - 0xc6, 0xd2, 0x02, 0xa4, 0x4c, 0xa3, 0xd5, 0x2c, 0x69, 0x4a, 0xc9, 0x28, 0x6b, 0x4a, 0x55, 0xdf, - 0x30, 0xd2, 0x31, 0x4a, 0x30, 0xd6, 0x39, 0x11, 0x6a, 0x38, 0x8b, 0x76, 0x0b, 0x68, 0x26, 0x27, - 0x4d, 0xcf, 0xb5, 0xb4, 0x07, 0x22, 0xe6, 0x96, 0x6e, 0xa9, 0x97, 0xd2, 0x09, 0x1a, 0x21, 0xfc, - 0x2a, 0xf3, 0xf7, 0x30, 0x0c, 0xf6, 0x12, 0x62, 0x77, 0x41, 0x78, 0x83, 0xcc, 0x12, 0x03, 0x6c, - 0x17, 0x3e, 0x60, 0x18, 0xaf, 0x13, 0x23, 0x1f, 0xd0, 0x89, 0x33, 0x10, 0xd7, 0x35, 0xd3, 0xd2, - 0xca, 0x2c, 0x22, 0x82, 0x3d, 0xc6, 0x14, 0x30, 0x50, 0x67, 0x48, 0x85, 0x3e, 0x50, 0x48, 0x9d, - 0x85, 0x41, 0x7b, 0x48, 0x4a, 0x53, 0xd5, 0x2b, 0x22, 0x36, 0x27, 0xfc, 0x46, 0x32, 0x9e, 0x17, - 0x38, 0x99, 0xc0, 0xe4, 0xa4, 0xe6, 0xb9, 0x96, 0xe6, 0x00, 0x0c, 0x5d, 0x33, 0x36, 0x70, 0x7b, - 0x95, 0x6a, 0x18, 0x27, 0xdd, 0xbd, 0x54, 0x20, 0x26, 0x1d, 0x5e, 0x32, 0x98, 0xb4, 0x54, 0x93, - 0x4e, 0x39, 0xa1, 0xd6, 0xbf, 0x4d, 0xa4, 0x2c, 0xb1, 0x4d, 0xd6, 0x11, 0x6d, 0x45, 0x48, 0x36, - 0x35, 0x12, 0xf7, 0xe8, 0x62, 0x36, 0xb3, 0x18, 0x1d, 0xc4, 0xb8, 0xef, 0xcc, 0x64, 0x0e, 0x63, - 0x13, 0x1b, 0x68, 0xba, 0x2f, 0xa5, 0x83, 0x60, 0x0b, 0x14, 0x1a, 0x56, 0x40, 0xb3, 0x50, 0x42, - 0x08, 0x97, 0x51, 0x36, 0x7a, 0x12, 0x92, 0x5e, 0xf7, 0x48, 0x23, 0x10, 0x36, 0x2d, 0xb5, 0x69, - 0xd1, 0x28, 0x0c, 0xcb, 0xec, 0x42, 0x4a, 0x41, 0x10, 0x93, 0x0c, 0xcd, 0x72, 0x61, 0x99, 0x7c, - 0x1d, 0x3d, 0x01, 0x03, 0x9e, 0xdb, 0xf7, 0x0a, 0xcc, 0x3c, 0x1e, 0x81, 0x91, 0x6e, 0x31, 0xd7, - 0x35, 0xfc, 0x71, 0xfb, 0x60, 0x04, 0xac, 0x6b, 0x4d, 0x8c, 0x3b, 0xc2, 0xc0, 0xaf, 0x30, 0xa2, - 0xc2, 0x35, 0x75, 0x5d, 0xab, 0x61, 0x34, 0x05, 0x0e, 0x25, 0x27, 0x6f, 0xef, 0x29, 0xaa, 0xc7, - 0x17, 0x09, 0x44, 0x66, 0x48, 0xe9, 0x6e, 0x08, 0xf1, 0x14, 0x47, 0x18, 0x0e, 0xf7, 0xc6, 0x40, - 0x62, 0x51, 0xa6, 0x38, 0xe9, 0x3a, 0x88, 0x91, 0xff, 0xcc, 0xb7, 0x11, 0x3a, 0xe6, 0x28, 0x11, - 0x10, 0xbf, 0x4a, 0xa3, 0x10, 0xa5, 0x61, 0x56, 0xd6, 0x44, 0x69, 0xb0, 0xaf, 0xc9, 0xc2, 0x94, - 0xb5, 0x0d, 0xb5, 0x55, 0xb3, 0x94, 0x0b, 0x6a, 0xad, 0xa5, 0xd1, 0x80, 0xc1, 0x85, 0xe1, 0xc2, - 0xfb, 0x88, 0x4c, 0x1a, 0x83, 0x38, 0x8b, 0xca, 0x2a, 0x62, 0x2e, 0xd1, 0xec, 0x13, 0x96, 0x59, - 0xa0, 0x2e, 0x10, 0x09, 0xb9, 0xfd, 0x39, 0x13, 0xf7, 0x02, 0x5f, 0x5a, 0x7a, 0x0b, 0x22, 0xa0, - 0xb7, 0x3f, 0xd1, 0x9e, 0xf8, 0x6e, 0xe8, 0x3e, 0xbd, 0xf6, 0x58, 0xcc, 0xfc, 0xb0, 0x0f, 0x42, - 0x74, 0xbf, 0x0d, 0x42, 0x7c, 0xed, 0x81, 0x95, 0xbc, 0x32, 0x57, 0x28, 0xe6, 0x16, 0xf3, 0xa9, - 0x80, 0x94, 0x04, 0xa0, 0x82, 0xd3, 0x8b, 0x85, 0x99, 0xb5, 0x54, 0x9f, 0x7d, 0xbd, 0xb0, 0xbc, - 0x76, 0xfc, 0x58, 0x2a, 0x68, 0x03, 0x8a, 0x4c, 0x10, 0x72, 0x1b, 0x4c, 0x4d, 0xa6, 0xc2, 0x18, - 0x09, 0x09, 0x46, 0xb0, 0x70, 0x36, 0x3f, 0x87, 0x16, 0x11, 0xaf, 0x04, 0x6d, 0xfa, 0xa5, 0x01, - 0x88, 0x51, 0x49, 0xae, 0x50, 0x58, 0x4c, 0x45, 0x6d, 0xce, 0xd5, 0x35, 0x79, 0x61, 0x79, 0x3e, - 0x15, 0xb3, 0x39, 0xe7, 0xe5, 0x42, 0x71, 0x25, 0x05, 0x36, 0xc3, 0x52, 0x7e, 0x75, 0x75, 0x66, - 0x3e, 0x9f, 0x8a, 0xdb, 0x16, 0xb9, 0x07, 0xd6, 0xf2, 0xab, 0xa9, 0x84, 0x67, 0x58, 0x78, 0x8b, - 0x01, 0xfb, 0x16, 0xf9, 0xe5, 0xe2, 0x52, 0x2a, 0x29, 0x0d, 0xc1, 0x00, 0xbb, 0x85, 0x18, 0xc4, - 0x60, 0x9b, 0x08, 0x47, 0x9a, 0x72, 0x06, 0xc2, 0x58, 0x86, 0x3c, 0x02, 0xb4, 0x90, 0x32, 0xb3, - 0x10, 0xa6, 0xd1, 0x85, 0x51, 0x9c, 0x5c, 0x9c, 0xc9, 0xe5, 0x17, 0x95, 0xc2, 0xca, 0xda, 0x42, - 0x61, 0x79, 0x66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0xfb, 0xf8, 0x79, - 0xf8, 0xad, 0xfd, 0x81, 0x17, 0xf1, 0xf3, 0x32, 0x7e, 0x7e, 0x84, 0x9f, 0xd7, 0xde, 0x42, 0x3b, - 0xfc, 0xbc, 0x81, 0xdf, 0xdf, 0xc1, 0xff, 0xef, 0xe1, 0xff, 0xf7, 0xf1, 0xf3, 0xf0, 0xef, 0xf6, - 0x07, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x23, 0x0a, 0x13, 0xbd, 0xe8, 0x2e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.One = &TwoOneofs_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.One = &TwoOneofs_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeboth/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0x1a, 0x31, - 0x14, 0x00, 0xf0, 0x1c, 0xff, 0x31, 0xd0, 0xd0, 0x9b, 0x5e, 0x53, 0x09, 0x2a, 0xda, 0x4a, 0x1d, - 0x1a, 0x0e, 0xee, 0x0f, 0x90, 0xb1, 0x97, 0xaa, 0xea, 0x42, 0x91, 0x48, 0x32, 0x47, 0x1c, 0x3d, - 0x08, 0x12, 0xe0, 0x28, 0xf6, 0x29, 0xba, 0x2d, 0x9f, 0xa1, 0x9f, 0xa2, 0x63, 0xc7, 0x7e, 0x84, - 0x8c, 0x19, 0xab, 0x0e, 0x28, 0xa1, 0x4b, 0xc7, 0x8c, 0x51, 0xa7, 0x3e, 0xfb, 0x88, 0x5d, 0xa9, - 0xaa, 0xba, 0x64, 0x78, 0x3a, 0x9b, 0x9f, 0xfd, 0x78, 0xef, 0xec, 0x23, 0x4f, 0xc7, 0x74, 0x11, - 0x50, 0x66, 0x45, 0x4b, 0x36, 0x9a, 0x84, 0x01, 0xe5, 0x27, 0x16, 0x5d, 0x86, 0xcd, 0xd3, 0x33, - 0xca, 0xa9, 0x99, 0xc6, 0xe1, 0xce, 0xee, 0x74, 0xc6, 0x4f, 0xa2, 0xa0, 0x89, 0x0b, 0xad, 0x29, - 0x9d, 0x52, 0x4b, 0x5a, 0x10, 0x4d, 0xe4, 0x4c, 0x4e, 0xe4, 0x28, 0xd9, 0xd3, 0x78, 0x42, 0xb2, - 0x07, 0x51, 0x10, 0xc4, 0x66, 0x95, 0xa4, 0x59, 0x14, 0x80, 0xf1, 0xcc, 0x78, 0x55, 0x1c, 0x8a, - 0x61, 0x63, 0x95, 0x26, 0x95, 0x37, 0xf3, 0xf9, 0x61, 0x7c, 0x1a, 0xb2, 0xc1, 0x32, 0x1c, 0x4c, - 0x4c, 0x20, 0xb9, 0x77, 0xb3, 0x70, 0xfe, 0xb1, 0x2d, 0x97, 0x19, 0xef, 0xb7, 0x86, 0xb9, 0x89, - 0x9c, 0x2b, 0xb1, 0x21, 0x85, 0x92, 0x52, 0x62, 0x2b, 0x71, 0x20, 0x8d, 0x92, 0x55, 0xe2, 0x28, - 0x71, 0x21, 0x83, 0x92, 0x56, 0xe2, 0x2a, 0xf1, 0x20, 0x8b, 0x52, 0x51, 0xe2, 0x29, 0xe9, 0x40, - 0x0e, 0x25, 0xa3, 0xa4, 0xa3, 0xa4, 0x0b, 0x79, 0x94, 0xc7, 0x4a, 0xba, 0x4a, 0x7a, 0x50, 0x40, - 0x31, 0x95, 0xf4, 0x94, 0xec, 0x41, 0x11, 0x25, 0xaf, 0x64, 0xcf, 0xdc, 0x21, 0xf9, 0xa4, 0xd3, - 0x16, 0x10, 0xa4, 0x6d, 0xa4, 0x7c, 0xd2, 0x6a, 0x4b, 0x5b, 0x1b, 0x4a, 0x68, 0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, 0xc1, 0x63, 0x95, 0xc5, 0x3c, 0x22, 0x85, 0xfd, 0x11, 0xe3, 0x32, 0xa3, 0x28, 0x3d, - 0xe3, 0x77, 0x7f, 0xad, 0xea, 0xce, 0x7f, 0x32, 0xe2, 0x0e, 0x8e, 0x3b, 0x9a, 0xfd, 0x58, 0x64, - 0xed, 0xb8, 0x62, 0x3b, 0x26, 0x2e, 0x8c, 0x37, 0xa9, 0x4c, 0xfb, 0xbe, 0xd4, 0x0f, 0xa3, 0x45, - 0x08, 0x2f, 0xc5, 0xe7, 0xe2, 0x57, 0xd7, 0xab, 0x7a, 0xb9, 0x1f, 0xeb, 0xdf, 0x75, 0x29, 0x62, - 0xe6, 0x17, 0x48, 0x2e, 0x99, 0xf9, 0x6f, 0x2f, 0x6f, 0x6a, 0x5b, 0x57, 0x18, 0xdf, 0x30, 0xae, - 0x6f, 0x6a, 0xc6, 0x2d, 0xc6, 0x1d, 0xc6, 0xc5, 0xba, 0x66, 0x7c, 0xc6, 0xf8, 0x82, 0xf1, 0x15, - 0xe3, 0x72, 0x8d, 0xeb, 0x30, 0xae, 0x71, 0xfc, 0x13, 0x9f, 0xb7, 0xf8, 0xbc, 0xc3, 0xb8, 0xf8, - 0x51, 0x33, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x68, 0x7e, 0x05, 0xec, 0x7b, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.proto deleted file mode 100644 index 3e17abed..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/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) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go deleted file mode 100644 index 469b47d6..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go deleted file mode 100644 index 0e6fcf73..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go +++ /dev/null @@ -1,4757 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=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,json=stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=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,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3728 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0xe7, - 0x95, 0x36, 0xc5, 0x8b, 0xc8, 0x43, 0x8a, 0xa2, 0x46, 0x8a, 0x4d, 0x2b, 0x89, 0x65, 0xd3, 0xb9, - 0x38, 0x4e, 0x22, 0xd9, 0x92, 0xe5, 0x0b, 0xb3, 0x9b, 0x40, 0x94, 0x68, 0x45, 0x86, 0x24, 0x6a, - 0x47, 0x62, 0xe2, 0x64, 0x1f, 0x06, 0x23, 0x72, 0x44, 0xd1, 0x26, 0x67, 0xb8, 0x9c, 0xa1, 0x6d, - 0xe5, 0xc9, 0x8b, 0xec, 0x05, 0xc1, 0x62, 0x77, 0xdb, 0xb4, 0x40, 0x73, 0x6f, 0x13, 0xa0, 0x4d, - 0x9a, 0xde, 0x92, 0xde, 0x50, 0xf4, 0xa9, 0x40, 0x91, 0x36, 0x4f, 0x45,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21, 0x76, 0x0f, 0x84, 0x37, 0xc8, 0x2c, 0x31, - 0xc0, 0x76, 0xe1, 0x03, 0x86, 0xf1, 0x3a, 0x31, 0xf2, 0x11, 0x9d, 0x38, 0x03, 0x71, 0x5d, 0x33, - 0x2d, 0xad, 0xcc, 0x22, 0x22, 0xd8, 0x63, 0x4c, 0x01, 0x03, 0x75, 0x86, 0x54, 0xe8, 0x23, 0x85, - 0xd4, 0x79, 0x18, 0xb4, 0x87, 0xa4, 0x34, 0x55, 0xbd, 0x22, 0x62, 0x73, 0xc2, 0x6f, 0x24, 0xe3, - 0x79, 0x81, 0x93, 0x09, 0x4c, 0x4e, 0x6a, 0x9e, 0x6b, 0x69, 0x0e, 0xc0, 0xd0, 0x35, 0x63, 0x03, - 0xb7, 0x57, 0xa9, 0x86, 0x71, 0xd2, 0xdd, 0x4b, 0x05, 0x62, 0xd2, 0xe1, 0x25, 0x83, 0x49, 0x4b, - 0x35, 0xe9, 0x8c, 0x13, 0x6a, 0xfd, 0xdb, 0x44, 0xca, 0x12, 0xdb, 0x64, 0x1d, 0xd1, 0x56, 0x84, - 0x64, 0x53, 0x23, 0x71, 0x8f, 0x2e, 0x66, 0x33, 0x8b, 0xd1, 0x41, 0x8c, 0xfb, 0xce, 0x4c, 0xe6, - 0x30, 0x36, 0xb1, 0x81, 0xa6, 0xfb, 0x52, 0x3a, 0x0c, 0xb6, 0x40, 0xa1, 0x61, 0x05, 0x34, 0x0b, - 0x25, 0x84, 0x70, 0x19, 0x65, 0xa3, 0xa7, 0x21, 0xe9, 0x75, 0x8f, 0x34, 0x02, 0x61, 0xd3, 0x52, - 0x9b, 0x16, 0x8d, 0xc2, 0xb0, 0xcc, 0x2e, 0xa4, 0x14, 0x04, 0x31, 0xc9, 0xd0, 0x2c, 0x17, 0x96, - 0xc9, 0xd7, 0xd1, 0x53, 0x30, 0xe0, 0xb9, 0x7d, 0xaf, 0xc0, 0xcc, 0x13, 0x11, 0x18, 0xe9, 0x16, - 0x73, 0x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, 0xc8, 0x04, 0x21, 0xb7, 0xc1, 0xd4, 0x64, 0x2a, - 0x8c, 0x91, 0x90, 0x60, 0x04, 0x0b, 0xe7, 0xf3, 0x73, 0x68, 0x11, 0xf1, 0x4a, 0xd0, 0xa6, 0x5f, - 0x1a, 0x80, 0x18, 0x95, 0xe4, 0x0a, 0x85, 0xc5, 0x54, 0xd4, 0xe6, 0x5c, 0x5d, 0x93, 0x17, 0x96, - 0xe7, 0x53, 0x31, 0x9b, 0x73, 0x5e, 0x2e, 0x14, 0x57, 0x52, 0x60, 0x33, 0x2c, 0xe5, 0x57, 0x57, - 0x67, 0xe6, 0xf3, 0xa9, 0xb8, 0x6d, 0x91, 0x7b, 0x68, 0x2d, 0xbf, 0x9a, 0x4a, 0x78, 0x86, 0x85, - 0xb7, 0x18, 0xb0, 0x6f, 0x91, 0x5f, 0x2e, 0x2e, 0xa5, 0x92, 0xd2, 0x10, 0x0c, 0xb0, 0x5b, 0x88, - 0x41, 0x0c, 0xb6, 0x89, 0x70, 0xa4, 0x29, 0x67, 0x20, 0x8c, 0x65, 0xc8, 0x23, 0x40, 0x0b, 0x29, - 0x33, 0x0b, 0x61, 0x1a, 0x5d, 0x18, 0xc5, 0xc9, 0xc5, 0x99, 0x5c, 0x7e, 0x51, 0x29, 0xac, 0xac, - 0x2d, 0x14, 0x96, 0x67, 0x16, 0xd1, 0x77, 0xb6, 0x4c, 0xce, 0xff, 0x4b, 0x71, 0x41, 0xce, 0xcf, - 0xa1, 0xff, 0x5c, 0xb2, 0x95, 0xfc, 0xcc, 0x1a, 0xca, 0x82, 0x99, 0xa3, 0x30, 0xd2, 0x2d, 0xcf, - 0x74, 0xdb, 0x19, 0x99, 0x17, 0x02, 0x30, 0xdc, 0x25, 0x65, 0x76, 0xdd, 0x45, 0xf7, 0x41, 0x98, - 0x45, 0x1a, 0x2b, 0x22, 0x77, 0x74, 0xcd, 0xbd, 0x34, 0xee, 0x3a, 0x0a, 0x09, 0xc5, 0xb9, 0x0b,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xf5, 0x55, 0x32, 0x43, 0x92, - 0xda, 0x4b, 0x62, 0x4d, 0x63, 0xdd, 0x7a, 0x54, 0xe6, 0x57, 0x98, 0xec, 0x22, 0x17, 0x4c, 0xca, - 0x1d, 0xa1, 0xdc, 0xb7, 0xec, 0xcc, 0x7d, 0x6e, 0x95, 0x92, 0xc7, 0xce, 0xad, 0x2a, 0xcb, 0x05, - 0x79, 0x69, 0x66, 0x51, 0xe6, 0x70, 0x69, 0x3f, 0x84, 0x6a, 0xea, 0x23, 0x5b, 0xde, 0x4a, 0x41, - 0x45, 0xbd, 0x3a, 0x1e, 0x19, 0xc8, 0x91, 0x87, 0x37, 0x3f, 0x53, 0xd1, 0xc7, 0x18, 0xfa, 0x13, - 0x10, 0xa6, 0xfe, 0x92, 0x00, 0xb8, 0xc7, 0x52, 0x7b, 0xa4, 0x28, 0x84, 0x66, 0x0b, 0x32, 0x09, - 0x7f, 0x8c, 0x77, 0x26, 0x55, 0x56, 0x16, 0xf2, 0xb3, 0xb8, 0x03, 0x32, 0xd3, 0x10, 0x61, 0x4e, - 0x20, 0x5b, 0xc3, 0x76, 0x03, 0x82, 0xd8, 0x25, 0xe7, 0x08, 0x08, 0x6d, 0x71, 0x29, 0x97, 0x97, - 0x53, 0x7d, 0xee, 0xe5, 0xfd, 0x7e, 0x00, 0xe2, 0xae, 0x86, 0x8a, 0x94, 0x72, 0xb5, 0x56, 0x33, - 0x2e, 0x2b, 0x6a, 0xad, 0x8a, 0x19, 0x8a, 0xad, 0x0f, 0x50, 0xd1, 0x0c, 0x91, 0xf4, 0xea, 0xbf, - 0xbf, 0x4b, 0x6c, 0x3e, 0x17, 0x80, 0x54, 0x7b, 0x33, 0xd6, 0x36, 0xc0, 0xc0, 0x27, 0x3a, 0xc0, - 0x67, 0x02, 0x90, 0xf4, 0x76, 0x60, 0x6d, 0xc3, 0x3b, 0xf4, 0x89, 0x0e, 0xef, 0xe9, 0x00, 0x0c, - 0x78, 0xfa, 0xae, 0x7f, 0x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, 0x6b, 0x5b, 0x92, 0x0c, 0xc0, 0x4c, 0x49, 0x84, 0xb3, - 0x91, 0xe4, 0x8e, 0xfd, 0xe2, 0xda, 0xd8, 0x5d, 0xdb, 0xee, 0x20, 0xe2, 0xbb, 0x09, 0x96, 0xe7, - 0xc6, 0x8b, 0x55, 0xdd, 0x3a, 0x3e, 0x79, 0x9a, 0x38, 0xb8, 0x64, 0xb3, 0x48, 0x45, 0x88, 0xce, - 0xe2, 0xbe, 0xa6, 0x8c, 0x64, 0xe8, 0xa1, 0xdc, 0xa9, 0xbf, 0x5c, 0x1b, 0x9b, 0xf2, 0x61, 0xe4, - 0x29, 0x68, 0x7c, 0x69, 0x8b, 0xb0, 0x9e, 0x3c, 0x41, 0xe0, 0x48, 0x4c, 0x73, 0x13, 0xa5, 0x9d, - 0x14, 0x43, 0x25, 0x07, 0xef, 0xf4, 0x95, 0x7c, 0x30, 0x97, 0x7a, 0xfb, 0xda, 0x58, 0x62, 0x69, - 0xcb, 0x91, 0x3b, 0x43, 0x21, 0x57, 0xb9, 0x28, 0x44, 0xd8, 0x55, 0x6e, 0xee, 0xf5, 0xb7, 0x0e, - 0xec, 0x79, 0x03, 0x3f, 0x3f, 0xc7, 0xcf, 0x9b, 0x6f, 0x1d, 0x08, 0xbc, 0x8f, 0x9f, 0x0f, 0xf0, - 0x73, 0xf5, 0xed, 0x03, 0x81, 0x97, 0xf0, 0xf3, 0x0a, 0x7e, 0xbe, 0x87, 0x9f, 0xd7, 0xdf, 0x46, - 0x3b, 0xfc, 0xbc, 0x89, 0xdf, 0xdf, 0xc5, 0xff, 0xef, 0xe3, 0xff, 0x0f, 0xf0, 0x73, 0xf5, 0x57, - 0x07, 0xf6, 0xfc, 0x35, 0x00, 0x00, 0xff, 0xff, 0x93, 0x59, 0x7f, 0xe0, 0xed, 0x2e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Sub != nil { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(*m.Sub))) - i += copy(data[i:], *m.Sub) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *TwoOneofs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.One != nil { - nn3, err := m.One.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.Two != nil { - nn4, err := m.Two.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field34))) - i += copy(data[i:], m.Field34) - return i, nil -} -func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field35 != nil { - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field35))) - i += copy(data[i:], m.Field35) - } - return i, nil -} -func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage2 != nil { - data[i] = 0xa2 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) - n5, err := m.SubMessage2.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CustomOneof) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CustomOneof) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Custom != nil { - nn6, err := m.Custom.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x92 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Stringy))) - i += copy(data[i:], m.Stringy) - return i, nil -} -func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9a - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) - n7, err := m.CustomType.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - return i, nil -} -func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.CastType)) - return i, nil -} -func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintOne(data, i, uint64(m.MyCustomName)) - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} - -func init() { proto.RegisterFile("combos/unsafemarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 580 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0xda, 0x40, - 0x14, 0x00, 0x70, 0xcc, 0x7f, 0x0e, 0x68, 0xa8, 0xa7, 0xd7, 0x0c, 0x10, 0xd1, 0x56, 0xea, 0xd0, - 0x60, 0xf0, 0x1f, 0x20, 0x63, 0x9d, 0xaa, 0xea, 0x42, 0x91, 0x48, 0x32, 0x47, 0x36, 0x35, 0x04, - 0x09, 0xb8, 0x88, 0xb3, 0x15, 0x79, 0xcb, 0x67, 0xe8, 0xa7, 0xe8, 0xd8, 0xb1, 0x1f, 0x21, 0x63, - 0xc6, 0xaa, 0x03, 0x4a, 0xe8, 0xd2, 0x31, 0x63, 0xd4, 0xa9, 0xef, 0xce, 0xe4, 0xae, 0x52, 0x55, - 0x75,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- 0x6c, 0x19, 0x76, 0xcc, 0x3e, 0x7f, 0xc1, 0x63, 0x99, 0x45, 0x3f, 0x21, 0xc5, 0x43, 0x8f, 0x85, - 0x22, 0x23, 0x2f, 0x3d, 0xeb, 0xf6, 0x7e, 0xad, 0x1b, 0xd6, 0x7f, 0x32, 0xe2, 0x8e, 0x10, 0x77, - 0xb4, 0x06, 0x31, 0xcf, 0xda, 0xb5, 0xf9, 0x76, 0x4c, 0x5c, 0x1c, 0x6f, 0x53, 0xe9, 0xe6, 0x43, - 0xa9, 0x1f, 0xbc, 0x45, 0x00, 0x2f, 0xf9, 0xe7, 0xe2, 0xd6, 0x36, 0xeb, 0x46, 0x65, 0x10, 0xab, - 0xdf, 0x55, 0x29, 0x7c, 0xe6, 0x16, 0x49, 0x3e, 0x99, 0xb9, 0x6f, 0xaf, 0x6e, 0xeb, 0xa9, 0x6b, - 0x8c, 0x6f, 0x18, 0x37, 0xb7, 0x75, 0xed, 0x0e, 0xe3, 0x1e, 0xe3, 0x72, 0x53, 0xd7, 0x3e, 0x63, - 0x7c, 0xc1, 0xf8, 0x8a, 0x71, 0xb5, 0xc1, 0x75, 0x18, 0x37, 0x38, 0xfe, 0x89, 0xcf, 0x3b, 0x7c, - 0xde, 0x63, 0x5c, 0xfe, 0xa8, 0xa7, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x77, 0xee, 0xde, - 0x80, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.proto deleted file mode 100644 index 3d29620a..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/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) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go deleted file mode 100644 index ca2ff287..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go deleted file mode 100644 index 8f70ed11..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go +++ /dev/null @@ -1,5243 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/one.proto - - It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,oneof"` -} -type AllTypesOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type AllTypesOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type AllTypesOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` -} -type AllTypesOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` -} -type AllTypesOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` -} -type AllTypesOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` -} -type AllTypesOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` -} -type AllTypesOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` -} -type AllTypesOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` -} -type AllTypesOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` -} -type AllTypesOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` -} -type AllTypesOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` -} -type AllTypesOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` -} -type AllTypesOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,oneof"` -} -type TwoOneofs_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` -} -type TwoOneofs_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` -} -type TwoOneofs_Field34 struct { - Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` -} -type TwoOneofs_Field35 struct { - Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=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,json=stringy,oneof"` -} -type CustomOneof_CustomType struct { - CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=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,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` -} -type CustomOneof_MyCustomName struct { - MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3726 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, - 0xf5, 0xc7, 0xf1, 0x25, 0xf6, 0xb1, 0xe3, 0x38, 0x93, 0xb0, 0xeb, 0x0d, 0xb0, 0x61, 0xbd, 0x5c, - 0x96, 0x05, 0x92, 0xdd, 0x64, 0xb3, 0x17, 0xf3, 0xff, 0x83, 0xe2, 0xc4, 0x1b, 0xb2, 0x4a, 0xe2, - 0xfc, 0x27, 0x31, 0x2c, 0xfc, 0x1f, 0x46, 0x13, 0x7b, 0xe2, 0x78, 0xd7, 0x9e, 0x71, 0x3d, 0xe3, - 0xdd, 0x0d, 0x4f, 0xb4, 0xf4, 0x22, 0x54, 0xf5, 0x46, 0x2b, 0x95, 0x7b, 0x0b, 0x52, 0x0b, 0xa5, - 0x37, 0xe8, 0x4d, 0x55, 0x9f, 0x2a, 0x55, 0xb4, 0x3c, 0x55, 0xb4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0x40, 0x78, 0x83, 0xcc, 0x12, 0x03, 0x6c, 0x17, - 0x3e, 0x60, 0x18, 0xaf, 0x13, 0x23, 0xef, 0xd3, 0x89, 0x33, 0x10, 0xd7, 0x35, 0xd3, 0xd2, 0xca, - 0x2c, 0x22, 0x82, 0x3d, 0xc6, 0x14, 0x30, 0x50, 0x67, 0x48, 0x85, 0xde, 0x57, 0x48, 0x9d, 0x85, - 0x41, 0x7b, 0x48, 0x4a, 0x53, 0xd5, 0x2b, 0x22, 0x36, 0x27, 0xfc, 0x46, 0x32, 0x9e, 0x17, 0x38, - 0x99, 0xc0, 0xe4, 0xa4, 0xe6, 0xb9, 0x96, 0xe6, 0x00, 0x0c, 0x5d, 0x33, 0x36, 0x70, 0x7b, 0x95, - 0x6a, 0x18, 0x27, 0xdd, 0xbd, 0x54, 0x20, 0x26, 0x1d, 0x5e, 0x32, 0x98, 0xb4, 0x54, 0x93, 0x4e, - 0x39, 0xa1, 0xd6, 0xbf, 0x4d, 0xa4, 0x2c, 0xb1, 0x4d, 0xd6, 0x11, 0x6d, 0x45, 0x48, 0x36, 0x35, - 0x12, 0xf7, 0xe8, 0x62, 0x36, 0xb3, 0x18, 0x1d, 0xc4, 0xb8, 0xef, 0xcc, 0x64, 0x0e, 0x63, 0x13, - 0x1b, 0x68, 0xba, 0x2f, 0xa5, 0x83, 0x60, 0x0b, 0x14, 0x1a, 0x56, 0x40, 0xb3, 0x50, 0x42, 0x08, - 0x97, 0x51, 0x36, 0x7a, 0x12, 0x92, 0x5e, 0xf7, 0x48, 0x23, 0x10, 0x36, 0x2d, 0xb5, 0x69, 0xd1, - 0x28, 0x0c, 0xcb, 0xec, 0x42, 0x4a, 0x41, 0x10, 0x93, 0x0c, 0xcd, 0x72, 0x61, 0x99, 0x7c, 0x1d, - 0x3d, 0x01, 0x03, 0x9e, 0xdb, 0xf7, 0x0a, 0xcc, 0x3c, 0x1a, 0x81, 0x91, 0x6e, 0x31, 0xd7, 0x35, - 0xfc, 0x71, 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 0x1b, 0x4c, 0x4d, 0xa6, 0xc2, 0x18, 0x09, - 0x09, 0x46, 0xb0, 0x70, 0x36, 0x3f, 0x87, 0x16, 0x11, 0xaf, 0x04, 0x6d, 0xfa, 0xa5, 0x01, 0x88, - 0x51, 0x49, 0xae, 0x50, 0x58, 0x4c, 0x45, 0x6d, 0xce, 0xd5, 0x35, 0x79, 0x61, 0x79, 0x3e, 0x15, - 0xb3, 0x39, 0xe7, 0xe5, 0x42, 0x71, 0x25, 0x05, 0x36, 0xc3, 0x52, 0x7e, 0x75, 0x75, 0x66, 0x3e, - 0x9f, 0x8a, 0xdb, 0x16, 0xb9, 0xfb, 0xd6, 0xf2, 0xab, 0xa9, 0x84, 0x67, 0x58, 0x78, 0x8b, 0x01, - 0xfb, 0x16, 0xf9, 0xe5, 0xe2, 0x52, 0x2a, 0x29, 0x0d, 0xc1, 0x00, 0xbb, 0x85, 0x18, 0xc4, 0x60, - 0x9b, 0x08, 0x47, 0x9a, 0x72, 0x06, 0xc2, 0x58, 0x86, 0x3c, 0x02, 0xb4, 0x90, 0x32, 0xb3, 0x10, - 0xa6, 0xd1, 0x85, 0x51, 0x9c, 0x5c, 0x9c, 0xc9, 0xe5, 0x17, 0x95, 0xc2, 0xca, 0xda, 0x42, 0x61, - 0x79, 0x66, 0x11, 0x7d, 0x67, 0xcb, 0xe4, 0xfc, 0xff, 0x15, 0x17, 0xe4, 0xfc, 0x1c, 0xfa, 0xcf, - 0x25, 0x5b, 0xc9, 0xcf, 0xac, 0xa1, 0x2c, 0x98, 0x39, 0x0c, 0x23, 0xdd, 0xf2, 0x4c, 0xb7, 0x9d, - 0x91, 0x79, 0x36, 0x00, 0xc3, 0x5d, 0x52, 0x66, 0xd7, 0x5d, 0x74, 0x17, 0x84, 0x59, 0xa4, 0xb1, - 0x22, 0x72, 0x4b, 0xd7, 0xdc, 0x4b, 0xe3, 0xae, 0xa3, 0x90, 0x50, 0x9c, 0xbb, 0x90, 0x06, 0xb7, - 0x29, 0xa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0x25, 0x33, 0x24, 0xa9, 0xbd, 0x24, - 0xd6, 0x34, 0xd6, 0xad, 0x47, 0x65, 0x7e, 0x85, 0xc9, 0x2e, 0x72, 0xce, 0xa4, 0xdc, 0x11, 0xca, - 0x7d, 0xc3, 0xce, 0xdc, 0x67, 0x56, 0x29, 0x79, 0xec, 0xcc, 0xaa, 0xb2, 0x5c, 0x90, 0x97, 0x66, - 0x16, 0x65, 0x0e, 0x97, 0xf6, 0x41, 0xa8, 0xa6, 0x3e, 0xb0, 0xe5, 0xad, 0x14, 0x54, 0xd4, 0xab, - 0xe3, 0x91, 0x81, 0x1c, 0x79, 0x78, 0xf3, 0x33, 0x15, 0x7d, 0x80, 0xa1, 0x3f, 0x01, 0x61, 0xea, - 0x2f, 0x09, 0x80, 0x7b, 0x2c, 0x75, 0x95, 0x14, 0x85, 0xd0, 0x6c, 0x41, 0x26, 0xe1, 0x8f, 0xf1, - 0xce, 0xa4, 0xca, 0xca, 0x42, 0x7e, 0x16, 0x77, 0x40, 0x66, 0x1a, 0x22, 0xcc, 0x09, 0x64, 0x6b, - 0xd8, 0x6e, 0x40, 0x10, 0xbb, 0xe4, 0x1c, 0x01, 0xa1, 0x2d, 0x2e, 0xe5, 0xf2, 0x72, 0xaa, 0xcf, - 0xbd, 0xbc, 0x3f, 0x09, 0x40, 0xdc, 0xd5, 0x50, 0x91, 0x52, 0xae, 0xd6, 0x6a, 0xc6, 0x45, 0x45, - 0xad, 0x55, 0x31, 0x43, 0xb1, 0xf5, 0x01, 0x2a, 0x9a, 0x21, 0x92, 0x5e, 0xfd, 0xf7, 0x1f, 0x89, - 0xcd, 0xa7, 0x03, 0x90, 0x6a, 0x6f, 0xc6, 0xda, 0x06, 0x18, 0xf8, 0x50, 0x07, 0xf8, 0x64, 0x00, - 0x92, 0xde, 0x0e, 0xac, 0x6d, 0x78, 0x07, 0x3e, 0xd4, 0xe1, 0x3d, 0x11, 0x80, 0x01, 0x4f, 0xdf, - 0xf5, 0x5f, 0x35,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0x6c, 0x24, 0xb9, 0x23, - 0xbf, 0xbd, 0x3c, 0x76, 0xdb, 0xb6, 0x3b, 0x88, 0xf8, 0x6e, 0x82, 0x65, 0xba, 0xf1, 0x62, 0x55, - 0xb7, 0x8e, 0x4e, 0x9e, 0x24, 0x0e, 0x2e, 0xd9, 0x2c, 0x52, 0x11, 0xa2, 0xb3, 0xb8, 0xb3, 0x29, - 0x23, 0x19, 0x7a, 0x28, 0x77, 0xe2, 0x9f, 0x97, 0xc7, 0xa6, 0x7c, 0x18, 0x79, 0x12, 0x1a, 0x5f, - 0xda, 0x22, 0xac, 0xc7, 0x8f, 0x11, 0x38, 0x12, 0xd3, 0xec, 0x44, 0x69, 0x27, 0xc5, 0x50, 0xc9, - 0xd1, 0x3b, 0x7d, 0x29, 0x1f, 0xcc, 0xa5, 0xde, 0xb8, 0x3c, 0x96, 0x58, 0xda, 0x72, 0xe4, 0xce, - 0x50, 0xc8, 0x55, 0x2e, 0x0a, 0x11, 0x76, 0x95, 0x9b, 0x7b, 0xe5, 0xf5, 0xfd, 0x57, 0xbd, 0x8a, - 0x9f, 0xdf, 0xe0, 0xe7, 0xb5, 0xd7, 0xf7, 0x07, 0xde, 0xc1, 0xcf, 0xbb, 0xf8, 0x79, 0xf0, 0x8d, - 0xfd, 0x81, 0xe7, 0xf1, 0xf3, 0x22, 0x7e, 0x7e, 0x8c, 0x9f, 0x57, 0xde, 0x40, 0x3b, 0xfc, 0xbc, - 0x86, 0xdf, 0xdf, 0xc2, 0xff, 0xef, 0xe0, 0xff, 0x77, 0xf1, 0xff, 0x83, 0xbf, 0xdf, 0x1f, 0xf8, - 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x5d, 0xef, 0xf6, 0xef, 0x2e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != nil && that1.Sub != nil { - if *this.Sub != *that1.Sub { - return false - } - } else if this.Sub != nil { - return false - } else if that1.Sub != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *AllTypesOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *TwoOneofs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") - } - if that1.One == nil { - if this.One != nil { - return fmt.Errorf("this.One != nil && that1.One == nil") - } - } else if this.One == nil { - return fmt.Errorf("this.One == nil && that1.One != nil") - } else if err := this.One.VerboseEqual(that1.One); err != nil { - return err - } - if that1.Two == nil { - if this.Two != nil { - return fmt.Errorf("this.Two != nil && that1.Two == nil") - } - } else if this.Two == nil { - return fmt.Errorf("this.Two == nil && that1.Two != nil") - } else if err := this.Two.VerboseEqual(that1.Two); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field34") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") - } - if this.Field34 != that1.Field34 { - return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) - } - return nil -} -func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_Field35") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") - } - if !bytes.Equal(this.Field35, that1.Field35) { - return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) - } - return nil -} -func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) - } - return nil -} -func (this *TwoOneofs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.One == nil { - if this.One != nil { - return false - } - } else if this.One == nil { - return false - } else if !this.One.Equal(that1.One) { - return false - } - if that1.Two == nil { - if this.Two != nil { - return false - } - } else if this.Two == nil { - return false - } else if !this.Two.Equal(that1.Two) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TwoOneofs_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *TwoOneofs_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *TwoOneofs_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *TwoOneofs_Field34) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field34 != that1.Field34 { - return false - } - return true -} -func (this *TwoOneofs_Field35) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field35, that1.Field35) { - return false - } - return true -} -func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage2.Equal(that1.SubMessage2) { - return false - } - return true -} -func (this *CustomOneof) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") - } - if that1.Custom == nil { - if this.Custom != nil { - return fmt.Errorf("this.Custom != nil && that1.Custom == nil") - } - } else if this.Custom == nil { - return fmt.Errorf("this.Custom == nil && that1.Custom != nil") - } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { - return err - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_Stringy") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") - } - if this.Stringy != that1.Stringy { - return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) - } - return nil -} -func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") - } - if !this.CustomType.Equal(that1.CustomType) { - return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) - } - return nil -} -func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_CastType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") - } - if this.CastType != that1.CastType { - return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) - } - return nil -} -func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") - } - if this.MyCustomName != that1.MyCustomName { - return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) - } - return nil -} -func (this *CustomOneof) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Custom == nil { - if this.Custom != nil { - return false - } - } else if this.Custom == nil { - return false - } else if !this.Custom.Equal(that1.Custom) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomOneof_Stringy) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Stringy != that1.Stringy { - return false - } - return true -} -func (this *CustomOneof_CustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomType.Equal(that1.CustomType) { - return false - } - return true -} -func (this *CustomOneof_CastType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.CastType != that1.CastType { - return false - } - return true -} -func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.MyCustomName != that1.MyCustomName { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - if this.Sub != nil { - s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.AllTypesOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllTypesOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *AllTypesOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func (this *TwoOneofs) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&one.TwoOneofs{") - if this.One != nil { - s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") - } - if this.Two != nil { - s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TwoOneofs_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field34) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field34{` + - `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") - return s -} -func (this *TwoOneofs_Field35) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_Field35{` + - `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") - return s -} -func (this *TwoOneofs_SubMessage2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + - `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") - return s -} -func (this *CustomOneof) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&one.CustomOneof{") - if this.Custom != nil { - s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomOneof_Stringy) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_Stringy{` + - `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") - return s -} -func (this *CustomOneof_CustomType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CustomType{` + - `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") - return s -} -func (this *CustomOneof_CastType) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_CastType{` + - `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") - return s -} -func (this *CustomOneof_MyCustomName) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + - `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := randStringOne(r) - this.Sub = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 2) - } - return this -} - -func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { - this := &AllTypesOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 17) - } - return this -} - -func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { - this := &AllTypesOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { - this := &AllTypesOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { - this := &AllTypesOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { - this := &AllTypesOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { - this := &AllTypesOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { - this := &AllTypesOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { - this := &AllTypesOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { - this := &AllTypesOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { - this := &AllTypesOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { - this := &AllTypesOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { - this := &AllTypesOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { - this := &AllTypesOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { - this := &AllTypesOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { - this := &AllTypesOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { - this := &AllTypesOneOf_Field15{} - v2 := r.Intn(100) - this.Field15 = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { - this := &AllTypesOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { - this := &TwoOneofs{} - oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] - switch oneofNumber_One { - case 1: - this.One = NewPopulatedTwoOneofs_Field1(r, easy) - case 2: - this.One = NewPopulatedTwoOneofs_Field2(r, easy) - case 3: - this.One = NewPopulatedTwoOneofs_Field3(r, easy) - } - oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] - switch oneofNumber_Two { - case 34: - this.Two = NewPopulatedTwoOneofs_Field34(r, easy) - case 35: - this.Two = NewPopulatedTwoOneofs_Field35(r, easy) - case 36: - this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 37) - } - return this -} - -func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { - this := &TwoOneofs_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { - this := &TwoOneofs_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { - this := &TwoOneofs_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { - this := &TwoOneofs_Field34{} - this.Field34 = randStringOne(r) - return this -} -func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { - this := &TwoOneofs_Field35{} - v3 := r.Intn(100) - this.Field35 = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Field35[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { - this := &TwoOneofs_SubMessage2{} - this.SubMessage2 = NewPopulatedSubby(r, easy) - return this -} -func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { - this := &CustomOneof{} - oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] - switch oneofNumber_Custom { - case 34: - this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) - case 35: - this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) - case 36: - this.Custom = NewPopulatedCustomOneof_CastType(r, easy) - case 37: - this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOne(r, 38) - } - return this -} - -func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { - this := &CustomOneof_Stringy{} - this.Stringy = randStringOne(r) - return this -} -func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { - this := &CustomOneof_CustomType{} - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.CustomType = *v4 - return this -} -func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { - this := &CustomOneof_CastType{} - this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - return this -} -func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { - this := &CustomOneof_MyCustomName{} - this.MyCustomName = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MyCustomName *= -1 - } - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v6)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - if m.Sub != nil { - l = len(*m.Sub) - n += 1 + l + sovOne(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllTypesOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *AllTypesOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *AllTypesOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *AllTypesOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *AllTypesOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *AllTypesOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *AllTypesOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *AllTypesOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *AllTypesOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *AllTypesOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *AllTypesOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *AllTypesOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs) Size() (n int) { - var l int - _ = l - if m.One != nil { - n += m.One.Size() - } - if m.Two != nil { - n += m.Two.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TwoOneofs_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *TwoOneofs_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *TwoOneofs_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *TwoOneofs_Field34) Size() (n int) { - var l int - _ = l - l = len(m.Field34) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *TwoOneofs_Field35) Size() (n int) { - var l int - _ = l - if m.Field35 != nil { - l = len(m.Field35) - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *TwoOneofs_SubMessage2) Size() (n int) { - var l int - _ = l - if m.SubMessage2 != nil { - l = m.SubMessage2.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} -func (m *CustomOneof) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - n += m.Custom.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CustomOneof_Stringy) Size() (n int) { - var l int - _ = l - l = len(m.Stringy) - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CustomType) Size() (n int) { - var l int - _ = l - l = m.CustomType.Size() - n += 2 + l + sovOne(uint64(l)) - return n -} -func (m *CustomOneof_CastType) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.CastType)) - return n -} -func (m *CustomOneof_MyCustomName) Size() (n int) { - var l int - _ = l - n += 2 + sovOne(uint64(m.MyCustomName)) - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + valueToStringOne(this.Sub) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *AllTypesOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs{`, - `One:` + fmt.Sprintf("%v", this.One) + `,`, - `Two:` + fmt.Sprintf("%v", this.Two) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field34) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field34{`, - `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_Field35) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_Field35{`, - `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, - `}`, - }, "") - return s -} -func (this *TwoOneofs_SubMessage2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, - `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof{`, - `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_Stringy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_Stringy{`, - `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CustomType{`, - `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_CastType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_CastType{`, - `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, - `}`, - }, "") - return s -} -func (this *CustomOneof_MyCustomName) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomOneof_MyCustomName{`, - `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Sub = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTypesOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTypesOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &AllTypesOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &AllTypesOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &AllTypesOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &AllTypesOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &AllTypesOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &AllTypesOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &AllTypesOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &AllTypesOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TwoOneofs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TwoOneofs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.One = &TwoOneofs_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.One = &TwoOneofs_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.One = &TwoOneofs_Field3{v} - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.Two = &TwoOneofs_Field35{v} - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Two = &TwoOneofs_SubMessage2{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomOneof) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomOneof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var vv github_com_gogo_protobuf_test_custom.Uint128 - v := &vv - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.Custom = &CustomOneof_CustomType{*v} - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) - } - var v github_com_gogo_protobuf_test_casttype.MyUint64Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_CastType{v} - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Custom = &CustomOneof_MyCustomName{v} - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeunmarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 582 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0xd3, 0x40, - 0x14, 0x00, 0xf0, 0x3a, 0xff, 0x73, 0x49, 0x68, 0xf0, 0xf4, 0xe8, 0x90, 0x20, 0x03, 0x12, 0x03, - 0x8d, 0x13, 0x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a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.proto deleted file mode 100644 index a27916a0..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/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) = true; - -message Subby { - optional string sub = 1; -} - -message AllTypesOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - -message TwoOneofs { - oneof one { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - } - - oneof two { - string Field34 = 34; - bytes Field35 = 35; - Subby sub_message2 = 36; - } -} - -message CustomOneof { - oneof custom { - string Stringy = 34; - bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go deleted file mode 100644 index 9ea42ecf..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/one.proto - -It has these top-level messages: - Subby - AllTypesOneOf - TwoOneofs - CustomOneof -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllTypesOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTwoOneofsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomOneofJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllTypesOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTwoOneofsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomOneofProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllTypesOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTwoOneofsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomOneofVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAllTypesOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTwoOneofsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCustomOneofSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllTypesOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTwoOneofsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomOneofStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/doc.go b/vendor/github.com/gogo/protobuf/test/oneof/doc.go deleted file mode 100644 index b9f2ff17..00000000 --- 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 66d4b449..00000000 --- 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 bc6c2532..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/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: - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="3.0.0" --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 61ff0249..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go +++ /dev/null @@ -1,3415 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/both/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3543 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xe7, - 0xb5, 0x36, 0xc5, 0x45, 0xe4, 0xa1, 0x44, 0x51, 0x23, 0xd9, 0xa6, 0x95, 0xc4, 0x8e, 0x95, 0xcd, - 0x71, 0x6e, 0x24, 0x5b, 0xde, 0x99, 0x7b, 0x13, 0x68, 0xa1, 0x15, 0x19, 0xda, 0xee, 0x50, 0x4a, - 0x9c, 0xdc, 0x87, 0xc1, 0x90, 0xfc, 0x45, 0xd1, 0x1e, 0xce, 0xf0, 0x72, 0x86, 0x8e, 0x95, 0xa7, - 0x5c, 0xe4, 0xde, 0x5b, 0x04, 0x45, 0xd7, 0x14, 0x68, 0xf6, 0x36, 0x01, 0xda, 0xa4, 0xe9, 0x96, - 0x74, 0x43, 0xd1, 0xa7, 0x02, 0x45, 0xda, 0x3c, 0x15, 0x69, 0x9f, 0xfa, 0xd0, 0x87, 0x24, 0x0d, - 0xd0, 0xb4, 0x4d, 0xdb, 0x14, 0x30, 0xd0, 0x00, 0x79, 0xe9, 0xf9, 0xb7, 0x59, 0x48, 0x4a, 0x43, - 0x05, 0x48, 0x53, 0x01, 0x84, 0x38, 0xe7, 0x9c, 0xef, 0x9b, 0x7f, 0xce, 0x7f, 0xfe, 0x73, 0xce, - 0xff, 0x0f, 0xe1, 0x67, 0xc7, 0xe1, 0xc6, 0xaa, 0x65, 0x55, 0x0d, 0x32, 0xd9, 0x68, 0x5a, 0x8e, - 0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0xa5, 0x30, - 0x35, 0x43, 0x02, 0xd7, 0xca, 0x1c, 0x80, 0x65, 0x12, 0x6b, 0x03, 0x97, 0x57, 0xd9, 0xc0, 0x38, - 0xe9, 0xee, 0xa5, 0x15, 0x6a, 0xd2, 0xe1, 0x25, 0x8b, 0x4b, 0xcb, 0x86, 0x72, 0xce, 0x0b, 0xb5, - 0xfe, 0x6d, 0x22, 0x65, 0x89, 0x2f, 0xb2, 0x8e, 0x68, 0x5b, 0x87, 0x4c, 0x93, 0xd0, 0xb8, 0x47, - 0x17, 0xf3, 0x27, 0x4b, 0xb1, 0x41, 0x4c, 0x84, 0x3e, 0x99, 0x2a, 0x60, 0xfc, 0xc1, 0x06, 0x9b, - 0xfe, 0x4b, 0xe5, 0x26, 0x70, 0x05, 0x1a, 0x0b, 0x2b, 0x60, 0x59, 0x68, 0x40, 0x0a, 0x97, 0x51, - 0x36, 0x76, 0x16, 0x32, 0x41, 0xf7, 0x28, 0xa3, 0x10, 0xb7, 0x1d, 0xbd, 0xe9, 0xb0, 0x28, 0x8c, - 0xab, 0xfc, 0x42, 0xc9, 0x42, 0x14, 0x93, 0x0c, 0xcb, 0x72, 0x71, 0x95, 0x7e, 0x1d, 0x3b, 0x03, - 0x83, 0x81, 0xdb, 0xf7, 0x0a, 0x1c, 0x7f, 0x22, 0x01, 0xa3, 0xdd, 0x62, 0xae, 0x6b, 0xf8, 0xe3, - 0xf2, 0xc1, 0x08, 0x28, 0x91, 0x26, 0xc6, 0x1d, 0x65, 0x10, 0x57, 0x18, 0x51, 0x71, 0x43, 0x2f, - 0x11, 0x03, 0xa3, 0x29, 0x72, 0x24, 0x33, 0x75, 0x47, 0x4f, 0x51, 0x3d, 0xb1, 0x48, 0x21, 0x2a, - 0x47, 0x2a, 0x77, 0x43, 0x4c, 0xa4, 0x38, 0xca, 0x70, 0xb4, 0x37, 0x06, 0x1a, 0x8b, 0x2a, 0xc3, - 0x29, 0xd7, 0x41, 0x8a, 0xfe, 0xe7, 0xbe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, 0x36, - 0xed, 0x5a, 0xcc, 0x3c, 0xb0, 0x56, 0x28, 0x66, 0x07, 0x02, 0xc3, 0xc2, 0x5b, 0x0c, 0xba, 0xb7, - 0x28, 0x2c, 0xaf, 0x2f, 0x65, 0x33, 0xca, 0x30, 0x0c, 0xf2, 0x5b, 0xc8, 0x41, 0x0c, 0xb5, 0x89, - 0x70, 0xa4, 0x59, 0x6f, 0x20, 0x9c, 0x65, 0x38, 0x20, 0x40, 0x0b, 0x65, 0x7c, 0x16, 0xe2, 0x2c, - 0xba, 0x30, 0x8a, 0x33, 0x8b, 0xd3, 0x33, 0x85, 0x45, 0x6d, 0x65, 0x75, 0x6d, 0x61, 0x65, 0x79, - 0x7a, 0x11, 0x7d, 0xe7, 0xca, 0xd4, 0xc2, 0x7f, 0xae, 0x2f, 0xa8, 0x85, 0x39, 0xf4, 0x9f, 0x4f, - 0xb6, 0x5a, 0x98, 0x5e, 0x43, 0x59, 0x74, 0xfc, 0x28, 0x8c, 0x76, 0xcb, 0x33, 0xdd, 0x56, 0xc6, - 0xf8, 0x0b, 0x11, 0x18, 0xe9, 0x92, 0x32, 0xbb, 0xae, 0xa2, 0x7b, 0x20, 0xce, 0x23, 0x8d, 0x17, - 0x91, 0xdb, 0xbb, 0xe6, 0x5e, 0x16, 0x77, 0x1d, 0x85, 0x84, 0xe1, 0xfc, 0x85, 0x34, 0xba, 0x4d, - 0x21, 0xa5, 0x14, 0x1d, 0xe1, 0xf4, 0x68, 0x04, 0x72, 0xdb, 0x71, 0x87, 0xac, 0xf7, 0xbe, 0xc0, - 0x7a, 0xbf, 0xab, 0x7d, 0x00, 0x87, 0xb7, 0x7f, 0x86, 0x8e, 0x51, 0xbc, 0x18, 0x81, 0x7d, 0xdd, - 0xfb, 0x8d, 0xae, 0x63, 0xb8, 0x1b, 0x12, 0x75, 0xe2, 0x6c, 0x5a, 0xb2, 0xe6, 0xde, 0xda, 0x25, - 0x93, 0x53, 0x75, 0xbb, 0xaf, 0x04, 0xca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, 0xa5, 0xdc, 0x09, 0x69, 0x9c, 0x28, 0x4d, 0xbc, - 0x5c, 0x64, 0x6f, 0xb2, 0xd3, 0x53, 0x30, 0x41, 0x23, 0x82, 0x4d, 0x2a, 0xda, 0x02, 0x1a, 0x88, - 0xcc, 0x34, 0x33, 0x00, 0x6c, 0xc7, 0xaa, 0xb1, 0x5f, 0x62, 0xcd, 0xcc, 0xbd, 0xfe, 0xd6, 0xc1, - 0x3d, 0x6f, 0xe0, 0xe7, 0x37, 0xf8, 0x79, 0xf3, 0xad, 0x83, 0x91, 0xf7, 0xf1, 0xf3, 0x01, 0x7e, - 0x1e, 0x79, 0xfb, 0x60, 0xe4, 0x25, 0xfc, 0xbc, 0x82, 0x9f, 0x1f, 0xe3, 0xe7, 0x75, 0xfc, 0xbc, - 0x81, 0x9f, 0x37, 0xf1, 0xf3, 0xee, 0xdb, 0x07, 0xf7, 0xbc, 0x8f, 0xff, 0x3f, 0xc0, 0xff, 0x8f, - 0xfc, 0xee, 0xe0, 0x9e, 0x52, 0x82, 0x85, 0xd1, 0x89, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x12, - 0xc1, 0x5e, 0x75, 0x00, 0x2d, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 379 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0x07, 0x70, 0xbb, 0x6e, 0xec, 0xf6, 0x9c, 0xd2, 0x60, 0x09, 0xe9, 0xd1, 0xc1, 0x42, 0x9d, - 0x58, 0x1a, 0x37, 0xfe, 0xd1, 0x1f, 0x6b, 0x85, 0x10, 0x0b, 0xaa, 0xd4, 0xfe, 0x01, 0x55, 0x0e, - 0x6c, 0x27, 0x52, 0x92, 0x8b, 0xb0, 0x3d, 0xb0, 0xe5, 0xcf, 0x61, 0x64, 0xe4, 0x4f, 0xc8, 0x98, - 0x91, 0x81, 0x21, 0x09, 0x0b, 0x63, 0xc6, 0x8c, 0x7c, 0x73, 0x96, 0xde, 0x0d, 0x5f, 0xdd, 0x7b, - 0xfa, 0x3c, 0x0f, 0xe7, 0x7b, 0xe2, 0xcd, 0x17, 0x35, 0x95, 0xaa, 0x8a, 0xa4, 0xaa, 0x47, 0x91, - 0x9a, 0xe5, 0xfd, 0xf9, 0x37, 0x55, 0xab, 0xc0, 0x41, 0x79, 0x71, 0x55, 0x8e, 0xeb, 0x51, 0x23, - 0xfb, 0x18, 0x89, 0x4a, 0x55, 0xaa, 0x48, 0x9b, 0x6c, 0x0a, 0xdd, 0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 0x47, 0xc5, 0xac, 0xc0, 0xc0, 0xe7, 0xd6, 0x1f, 0xba, 0x42, 0xd4, 0x79, 0x55, 0xbf, 0xc0, 0x55, - 0xf1, 0xf0, 0x61, 0xb9, 0x09, 0xad, 0x15, 0xf2, 0x1b, 0x59, 0x6f, 0x42, 0x7b, 0x87, 0xec, 0x91, - 0xc5, 0x36, 0xb4, 0x7f, 0x20, 0x3f, 0x91, 0x5f, 0xc8, 0x12, 0x59, 0x21, 0x6b, 0xe4, 0xdf, 0x36, - 0xb4, 0x76, 0x38, 0xf7, 0x38, 0x17, 0x7f, 0x43, 0x4b, 0xba, 0x7a, 0x8d, 0x92, 0xff, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xc7, 0x33, 0xb2, 0x1d, 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 51876e23..00000000 --- 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 f08f66fe..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/both/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 90d48e53..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go +++ /dev/null @@ -1,2850 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3537 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, - 0xf5, 0x5f, 0xc7, 0x97, 0xd8, 0xc7, 0x89, 0xe3, 0x4c, 0xc2, 0xae, 0x37, 0xc0, 0x2e, 0x1b, 0x6e, - 0xcb, 0xf2, 0x27, 0xd9, 0xcd, 0xde, 0xcd, 0xbf, 0xa0, 0x5c, 0xbc, 0x21, 0xab, 0x24, 0x4e, 0xc7, - 0x09, 0x2c, 0xf4, 0x61, 0x34, 0xb1, 0xbf, 0x38, 0xde, 0x1d, 0xcf, 0xb8, 0x9e, 0xf1, 0xb2, 0xe1, - 0x89, 0x8a, 0x5e, 0x84, 0xaa, 0xde, 0x2b, 0x95, 0x7b, 0x0b, 0x52, 0x0b, 0xa5, 0x37, 0xe8, 0x4d, - 0x55, 0x9f, 0x2a, 0x55, 0xb4, 0x3c, 0x55, 0xb4, 0x4f, 0x7d, 0xe8, 0x43, 0xa1, 0x48, 0xa5, 0x2d, - 0x6d, 0xa9, 0xb4, 0x52, 0x91, 0x78, 0xe9, 0xf9, 0x6e, 0x73, 0xb1, 0x9d, 0x8c, 0x83, 0x44, 0x69, - 0x24, 0x2b, 0x9e, 0x73, 0xce, 0xef, 0x37, 0xdf, 0x9c, 0xef, 0x7c, 0xe7, 0x9c, 0xef, 0x1b, 0xc3, - 0x2f, 0x8f, 0xc1, 0x0d, 0x55, 0xcb, 0xaa, 0x1a, 0x64, 0xb2, 0xd1, 0xb4, 0x1c, 0x6b, 0xbd, 0xb5, - 0x31, 0x59, 0x21, 0x76, 0xb9, 0x59, 0x6b, 0x38, 0x56, 0x73, 0x82, 0xc9, 0x94, 0x21, 0x6e, 0x31, - 0x21, 0x2d, 0xc6, 0x97, 0x60, 0xf8, 0x5c, 0xcd, 0x20, 0x73, 0xae, 0x61, 0x89, 0x38, 0xca, 0x19, - 0x88, 0x6d, 0xa0, 0x30, 0x17, 0xb9, 0x21, 0x7a, 0x38, 0x3d, 0x75, 0xd3, 0x44, 0x1b, 0x68, 0x22, - 0x88, 0x58, 0xa1, 0x62, 0x95, 0x21, 0xc6, 0xdf, 0x8c, 0xc1, 0x48, 0x17, 0xad, 0xa2, 0x40, 0xcc, - 0xd4, 0xeb, 0x94, 0x31, 0x72, 0x38, 0xa5, 0xb2, 0xef, 0x4a, 0x0e, 0xfa, 0x1b, 0x7a, 0xf9, 0x92, - 0x5e, 0x25, 0xb9, 0x3e, 0x26, 0x96, 0x97, 0xca, 0x01, 0x80, 0x0a, 0x69, 0x10, 0xb3, 0x42, 0xcc, - 0xf2, 0x56, 0x2e, 0x8a, 0xa3, 0x48, 0xa9, 0x3e, 0x89, 0x72, 0x3b, 0x0c, 0x37, 0x5a, 0xeb, 0x46, - 0xad, 0xac, 0xf9, 0xcc, 0x00, 0xcd, 0xe2, 0x6a, 0x96, 0x2b, 0xe6, 0x3c, 0xe3, 0x5b, 0x61, 0xe8, - 0x41, 0xa2, 0x5f, 0xf2, 0x9b, 0xa6, 0x99, 0x69, 0x86, 0x8a, 0x7d, 0x86, 0xb3, 0x30, 0x50, 0x27, - 0xb6, 0x8d, 0x03, 0xd0, 0x9c, 0xad, 0x06, 0xc9, 0xc5, 0xd8, 0xd3, 0xdf, 0xd0, 0xf1, 0xf4, 0xed, - 0x4f, 0x9e, 0x16, 0xa8, 0x55, 0x04, 0x29, 0xd3, 0x90, 0x22, 0x66, 0xab, 0xce, 0x19, 0xe2, 0xdb, - 0xf8, 0xaf, 0x80, 0x16, 0xed, 0x2c, 0x49, 0x0a, 0x13, 0x14, 0xfd, 0x36, 0x69, 0x5e, 0xae, 0x95, - 0x49, 0x2e, 0xc1, 0x08, 0x6e, 0xed, 0x20, 0x28, 0x71, 0x7d, 0x3b, 0x87, 0xc4, 0xe1, 0xa3, 0xa4, - 0xc8, 0x15, 0x87, 0x98, 0x76, 0xcd, 0x32, 0x73, 0xfd, 0x8c, 0xe4, 0xe6, 0x2e, 0xb3, 0x48, 0x8c, - 0x4a, 0x3b, 0x85, 0x87, 0x53, 0x4e, 0x41, 0xbf, 0xd5, 0x70, 0xf0, 0x9b, 0x9d, 0x4b, 0xe2, 0xfc, - 0xa4, 0xa7, 0xae, 0xeb, 0x1a, 0x08, 0x45, 0x6e, 0xa3, 0x4a, 0x63, 0x65, 0x01, 0xb2, 0xb6, 0xd5, - 0x6a, 0x96, 0x89, 0x56, 0xb6, 0x2a, 0x44, 0xab, 0x99, 0x1b, 0x56, 0x2e, 0xc5, 0x08, 0x0e, 0x76, - 0x3e, 0x08, 0x33, 0x9c, 0x45, 0xbb, 0x05, 0x34, 0x53, 0x33, 0x76, 0xe0, 0x5a, 0xd9, 0x0b, 0x09, - 0x7b, 0xcb, 0x74, 0xf4, 0x2b, 0xb9, 0x01, 0x16, 0x21, 0xe2, 0x6a, 0xfc, 0xdf, 0x71, 0x18, 0xea, - 0x25, 0xc4, 0xee, 0x84, 0xf8, 0x06, 0x7d, 0x4a, 0x0c, 0xb0, 0x5d, 0xf8, 0x80, 0x63, 0x82, 0x4e, - 0x4c, 0xbc, 0x4f, 0x27, 0x4e, 0x43, 0xda, 0x24, 0xb6, 0x43, 0x2a, 0x3c, 0x22, 0xa2, 0x3d, 0xc6, - 0x14, 0x70, 0x50, 0x67, 0x48, 0xc5, 0xde, 0x57, 0x48, 0x5d, 0x80, 0x21, 0x77, 0x48, 0x5a, 0x53, - 0x37, 0xab, 0x32, 0x36, 0x27, 0xc3, 0x46, 0x32, 0x51, 0x90, 0x38, 0x95, 0xc2, 0xd4, 0x0c, 0x09, - 0x5c, 0x2b, 0x73, 0x00, 0x96, 0x49, 0xac, 0x0d, 0x5c, 0x5e, 0x65, 0x03, 0xe3, 0xa4, 0xbb, 0x97, - 0x8a, 0xd4, 0xa4, 0xc3, 0x4b, 0x16, 0x97, 0x96, 0x0d, 0xe5, 0xac, 0x17, 0x6a, 0xfd, 0xdb, 0x44, - 0xca, 0x12, 0x5f, 0x64, 0x1d, 0xd1, 0xb6, 0x06, 0x99, 0x26, 0xa1, 0x71, 0x8f, 0x2e, 0xe6, 0x4f, - 0x96, 0x62, 0x83, 0x98, 0x08, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0x36, 0xfd, 0x97, 0xca, - 0x8d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x80, 0x14, 0x2e, 0xa3, 0x6c, 0xec, 0x0c, - 0x64, 0x82, 0xee, 0x51, 0x46, 0x21, 0x6e, 0x3b, 0x7a, 0xd3, 0x61, 0x51, 0x18, 0x57, 0xf9, 0x85, - 0x92, 0x85, 0x28, 0x26, 0x19, 0x96, 0xe5, 0xe2, 0x2a, 0xfd, 0x3a, 0x76, 0x1a, 0x06, 0x03, 0xb7, - 0xef, 0x15, 0x38, 0xfe, 0x58, 0x02, 0x46, 0xbb, 0xc5, 0x5c, 0xd7, 0xf0, 0xc7, 0xe5, 0x83, 0x11, - 0xb0, 0x4e, 0x9a, 0x18, 0x77, 0x94, 0x41, 0x5c, 0x61, 0x44, 0xc5, 0x0d, 0x7d, 0x9d, 0x18, 0x18, - 0x4d, 0x91, 0xc3, 0x99, 0xa9, 0xdb, 0x7b, 0x8a, 0xea, 0x89, 0x45, 0x0a, 0x51, 0x39, 0x52, 0xb9, - 0x0b, 0x62, 0x22, 0xc5, 0x51, 0x86, 0x23, 0xbd, 0x31, 0xd0, 0x58, 0x54, 0x19, 0x4e, 0xb9, 0x16, - 0x52, 0xf4, 0x3f, 0xf7, 0x6d, 0x82, 0x8d, 0x39, 0x49, 0x05, 0xd4, 0xaf, 0xca, 0x18, 0x24, 0x59, -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c, 0xb4, - 0xda, 0xc4, 0xd1, 0x1e, 0xac, 0x35, 0x59, 0x38, 0xd7, 0x75, 0xde, 0x49, 0xba, 0x33, 0x31, 0x2a, - 0xac, 0x70, 0x7b, 0x7f, 0x1f, 0xda, 0x9c, 0x63, 0x26, 0xca, 0x22, 0x1c, 0x44, 0x97, 0x61, 0xaf, - 0x69, 0x56, 0xf4, 0x66, 0x45, 0xf3, 0x8e, 0x0b, 0x34, 0xbd, 0x8c, 0x71, 0x60, 0x5b, 0xbc, 0x92, - 0xb8, 0x2c, 0xd7, 0x99, 0x56, 0x49, 0x18, 0x7b, 0x29, 0x76, 0x5a, 0x98, 0xb6, 0x45, 0x4d, 0x74, - 0xbb, 0xa8, 0xc1, 0xde, 0xab, 0xae, 0x37, 0x30, 0x6c, 0x9c, 0xe6, 0x16, 0xeb, 0xde, 0x92, 0x6a, - 0x12, 0x05, 0x05, 0x7a, 0xfd, 0xc1, 0xcd, 0x81, 0xdf, 0x8f, 0x7f, 0x88, 0xc2, 0x80, 0xbf, 0x83, - 0xa3, 0x0d, 0x71, 0x99, 0xa5, 0xf9, 0x08, 0xcb, 0x02, 0x37, 0xee, 0xd8, 0xef, 0x4d, 0xcc, 0xd2, - 0xfc, 0x9f, 0x4f, 0xf0, 0xbe, 0x4a, 0xe5, 0x48, 0x5a, 0x7b, 0x69, 0xac, 0x11, 0xde, 0xad, 0x27, - 0x55, 0x71, 0x85, 0xc9, 0x2e, 0x71, 0xd1, 0x66, 0xdc, 0x09, 0xc6, 0x7d, 0xd3, 0xce, 0xdc, 0xe7, - 0x4b, 0x8c, 0x3c, 0x75, 0xbe, 0xa4, 0x2d, 0x17, 0xd5, 0xa5, 0xe9, 0x45, 0x55, 0xc0, 0x95, 0xfd, - 0x10, 0x33, 0xf4, 0x87, 0xb6, 0x82, 0x95, 0x82, 0x89, 0x7a, 0x75, 0x3c, 0x32, 0xd0, 0x23, 0x8f, - 0x60, 0x7e, 0x66, 0xa2, 0x0f, 0x30, 0xf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23, 0x7b, 0x9d, 0x9d, - 0x9e, 0x82, 0x09, 0x1a, 0x11, 0x6c, 0x52, 0xd1, 0x16, 0xd0, 0x40, 0xa4, 0xa7, 0x99, 0x01, 0x60, - 0xdb, 0x56, 0x8d, 0xfd, 0x1c, 0x6b, 0x66, 0xee, 0xd5, 0xd7, 0x0f, 0xec, 0x79, 0x0d, 0x3f, 0xbf, - 0xc7, 0xcf, 0x1f, 0x5f, 0x3f, 0x10, 0x79, 0x07, 0x3f, 0xef, 0xe2, 0xe7, 0xe1, 0x37, 0x0e, 0x44, - 0x5e, 0xc0, 0xcf, 0x4b, 0xf8, 0xf9, 0x19, 0x7e, 0x5e, 0xc5, 0xcf, 0x6b, 0x6f, 0xa0, 0x0d, 0xfe, - 0x7f, 0x0b, 0xff, 0xbf, 0x83, 0xff, 0xdf, 0xc5, 0xff, 0x0f, 0xff, 0xe9, 0xc0, 0x9e, 0xf5, 0x04, - 0x0b, 0xa3, 0xe3, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x20, 0x45, 0x76, 0x91, 0x05, 0x2d, 0x00, - 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - i = encodeFixed32One(data, i, uint32(m.Field9)) - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - i = encodeFixed32One(data, i, uint32(m.Field10)) - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - i = encodeFixed64One(data, i, uint64(m.Field11)) - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - i = encodeFixed64One(data, i, uint64(m.Field12)) - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 381 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x6e, 0xdb, 0x30, - 0x10, 0x07, 0x70, 0x2b, 0x8a, 0xa5, 0x84, 0x72, 0x1a, 0x57, 0xd3, 0xd5, 0x83, 0x50, 0x64, 0xea, - 0x12, 0x2b, 0xd6, 0x47, 0x3e, 0xd6, 0xa0, 0x28, 0xba, 0x14, 0x01, 0x92, 0x07, 0x08, 0xa4, 0x96, - 0x52, 0x02, 0x58, 0xa1, 0x61, 0x49, 0x43, 0x37, 0x3f, 0x4e, 0xc7, 0x8e, 0x7d, 0x04, 0x8f, 0x1e, - 0x3b, 0x74, 0xa8, 0xdd, 0xa5, 0xa3, 0x47, 0x8f, 0xf9, 0x9b, 0x02, 0x8e, 0xc3, 0x1f, 0x77, 0x87, - 0xdf, 0x69, 0xa0, 0x48, 0x31, 0xfa, 0xaa, 0xaa, 0x5c, 0xd5, 0x61, 0x95, 0xcd, 0xeb, 0xa7, 0x6c, - 0x2a, 0xe7, 0xa1, 0x7a, 0x91, 0xe3, 0xd9, 0x5c, 0x35, 0xca, 0xb7, 0xd1, 0x8e, 0xce, 0xcb, 0xe7, - 0xe6, 0xa9, 0xcd, 0xc7, 0xd8, 0x0b, 0x4b, 0x55, 0xaa, 0x50, 0x5b, 0xde, 0x16, 0x7a, 0xd2, 0x83, - 0xee, 0xba, 0x6f, 0xce, 0xde, 0x89, 0xfe, 0x43, 0x9b, 0xe7, 0xdf, 0xfd, 0xa1, 0xb0, 0xeb, 0x36, - 0x27, 0xeb, 0xbd, 0xf5, 0xe1, 0xf8, 0x7e, 0xdf, 0x9e, 0xfd, 0xb1, 0x85, 0xf7, 0x90, 0x55, 0xb3, - 0xa9, 0xbc, 0x7b, 0x91, 0x77, 0x85, 0x4f, 0xc2, 0xf9, 0xf4, 0x2c, 0xa7, 0xdf, 0x26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xba, 0x43, 0x5d, 0xfc, 0x0b, 0x7a, 0xb9, 0xa3, 0x9f, 0x51, 0xfc, - 0x1a, 0x00, 0x00, 0xff, 0xff, 0xed, 0x24, 0x6f, 0xbe, 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 32ea8482..00000000 --- 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 3b3602c5..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 1908cc25..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go +++ /dev/null @@ -1,2643 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3542 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, - 0xf5, 0x5f, 0xc7, 0x97, 0xd8,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 0xa4, 0xa7, 0xae, 0xeb, 0x1a, 0x08, 0x45, 0x6e, 0xa3, 0x4a, 0x63, 0x65, 0x01, 0xb2, 0xb6, - 0xd5, 0x6a, 0x96, 0x89, 0x56, 0xb6, 0x2a, 0x44, 0xab, 0x99, 0x1b, 0x56, 0x2e, 0xc5, 0x08, 0x0e, - 0x76, 0x3e, 0x08, 0x33, 0x9c, 0x45, 0xbb, 0x05, 0x34, 0x53, 0x33, 0x76, 0xe0, 0x5a, 0xd9, 0x0b, - 0x09, 0x7b, 0xcb, 0x74, 0xf4, 0x2b, 0xb9, 0x01, 0x16, 0x21, 0xe2, 0x6a, 0xfc, 0x5f, 0x71, 0x18, - 0xea, 0x25, 0xc4, 0xee, 0x84, 0xf8, 0x06, 0x7d, 0x4a, 0x0c, 0xb0, 0x5d, 0xf8, 0x80, 0x63, 0x82, - 0x4e, 0x4c, 0xbc, 0x4f, 0x27, 0x4e, 0x43, 0xda, 0x24, 0xb6, 0x43, 0x2a, 0x3c, 0x22, 0xa2, 0x3d, - 0xc6, 0x14, 0x70, 0x50, 0x67, 0x48, 0xc5, 0xde, 0x57, 0x48, 0x5d, 0x80, 0x21, 0x77, 0x48, 0x5a, - 0x53, 0x37, 0xab, 0x32, 0x36, 0x27, 0xc3, 0x46, 0x32, 0x51, 0x90, 0x38, 0x95, 0xc2, 0xd4, 0x0c, - 0x09, 0x5c, 0x2b, 0x73, 0x00, 0x96, 0x49, 0xac, 0x0d, 0x5c, 0x5e, 0x65, 0x03, 0xe3, 0xa4, 0xbb, - 0x97, 0x8a, 0xd4, 0xa4, 0xc3, 0x4b, 0x16, 0x97, 0x96, 0x0d, 0xe5, 0xac, 0x17, 0x6a, 0xfd, 0xdb, - 0x44, 0xca, 0x12, 0x5f, 0x64, 0x1d, 0xd1, 0xb6, 0x06, 0x99, 0x26, 0xa1, 0x71, 0x8f, 0x2e, 0xe6, - 0x4f, 0x96, 0x62, 0x83, 0x98, 0x08, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0x36, 0xfd, 0x97, - 0xca, 0x8d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x80, 0x14, 0x2e, 0xa3, 0x6c, 0xec, - 0x0c, 0x64, 0x82, 0xee, 0x51, 0x46, 0x21, 0x6e, 0x3b, 0x7a, 0xd3, 0x61, 0x51, 0x18, 0x57, 0xf9, - 0x85, 0x92, 0x85, 0x28, 0x26, 0x19, 0x96, 0xe5, 0xe2, 0x2a, 0xfd, 0x3a, 0x76, 0x1a, 0x06, 0x03, - 0xb7, 0xef, 0x15, 0x38, 0xfe, 0x58, 0x02, 0x46, 0xbb, 0xc5, 0x5c, 0xd7, 0xf0, 0xc7, 0xe5, 0x83, - 0x11, 0xb0, 0x4e, 0x9a, 0x18, 0x77, 0x94, 0x41, 0x5c, 0x61, 0x44, 0xc5, 0x0d, 0x7d, 0x9d, 0x18, - 0x18, 0x4d, 0x91, 0xc3, 0x99, 0xa9, 0xdb, 0x7b, 0x8a, 0xea, 0x89, 0x45, 0x0a, 0x51, 0x39, 0x52, - 0xb9, 0x0b, 0x62, 0x22, 0xc5, 0x51, 0x86, 0x23, 0xbd, 0x31, 0xd0, 0x58, 0x54, 0x19, 0x4e, 0xb9, - 0x16, 0x52, 0xf4, 0x3f, 0xf7, 0x6d, 0x82, 0x8d, 0x39, 0x49, 0x05, 0xd4, 0xaf, 0xca, 0x18, 0x24, - 0x59, 0x98, 0x55, 0x88, 0x2c, 0x0d, 0xee, 0x35, 0x9d, 0x98, 0x0a, 0xd9, 0xd0, 0x5b, 0x86, 0xa3, - 0x5d, 0xd6, 0x8d, 0x16, 0x61, 0x01, 0x83, 0x13, 0x23, 0x84, 0xf7, 0x52, 0x99, 0x72, 0x10, 0xd2, - 0x3c, 0x2a, 0x6b, 0x88, 0xb9, 0xc2, 0xb2, 0x4f, 0x5c, 0xe5, 0x81, 0xba, 0x40, 0x25, 0xf4, 0xf6, - 0x17, 0x6d, 0x5c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0x17, 0x3f, - 0x0f, 0xbf, 0x71, 0x20, 0xf2, 0x02, 0x7e, 0x5e, 0xc2, 0xcf, 0x4f, 0xf1, 0xf3, 0xea, 0x1b, 0x68, - 0x87, 0x9f, 0xd7, 0xf0, 0xfb, 0x5b, 0xf8, 0xff, 0x1d, 0xfc, 0xff, 0x2e, 0xfe, 0x7f, 0xf8, 0x8f, - 0x07, 0xf6, 0xac, 0x27, 0x58, 0x18, 0x1d, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x60, 0x93, - 0x75, 0x07, 0x03, 0x2d, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 377 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x8e, 0xda, 0x40, - 0x10, 0x07, 0x70, 0x7c, 0x3e, 0xec, 0xbb, 0x35, 0x97, 0x23, 0xae, 0x26, 0x57, 0x58, 0xd1, 0x55, - 0x69, 0x0e, 0x1f, 0xfe, 0xb8, 0x8f, 0xf6, 0x14, 0x45, 0x69, 0x22, 0x24, 0x78, 0x00, 0x84, 0x93, - 0xb5, 0x83, 0x04, 0x2c, 0xc2, 0x76, 0x91, 0x8e, 0xc7, 0x49, 0x99, 0x32, 0x8f, 0x40, 0x99, 0x32, - 0x45, 0x0a, 0x20, 0x4d, 0x4a, 0x4a, 0xca, 0xfc, 0x59, 0x4b, 0xb3, 0xc5, 0x5f, 0x33, 0xc3, 0x6f, - 0x28, 0xd6, 0xbb, 0x82, 0x3e, 0xab, 0x79, 0xa6, 0xca, 0x70, 0x21, 0xa7, 0xd5, 0x57, 0xb9, 0x0a, - 0xd5, 0x42, 0xf6, 0x96, 0x2b, 0x55, 0x29, 0xdf, 0x46, 0x7b, 0x73, 0x57, 0xe0, 0xe7, 0x3a, 0xeb, - 0x61, 0x2b, 0x2c, 0x54, 0xa1, 0x42, 0x6d, 0x59, 0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x7d, 0xa9, - 0xd8, 0x15, 0x58, 0xf8, 0xd4, 0xf8, 0x4b, 0x47, 0x88, 0x4a, 0x96, 0xd5, 0x18, 0xae, 0xf2, 0x97, - 0xf7, 0x9b, 0x5d, 0xd0, 0xfa, 0x85, 0xfc, 0x46, 0xb6, 0xbb, 0xc0, 0x3a, 0x20, 0x47, 0x64, 0xbd, - 0x0f, 0xac, 0xef, 0xc8, 0x0f, 0xe4, 0x27, 0xb2, 0xd9, 0x63, 0x0f, 0xd9, 0xa2, 0xff, 0x87, 0x7a, - 0x40, 0x3d, 0xa2, 0xae, 0xff, 0x06, 0xad, 0xcc, 0xd1, 0xcf, 0x28, 0xfe, 0x1f, 0x00, 0x00, 0xff, - 0xff, 0x08, 0x75, 0xb6, 0x0d, 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 2eca9a07..00000000 --- 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 96aaadb9..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/neither/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/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 6f1aa8ab..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go +++ /dev/null @@ -1,3208 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3542 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xe7, - 0xb5, 0x36, 0xc5, 0x45, 0xe4, 0xa1, 0x44, 0x51, 0x23, 0xc5, 0xa6, 0x15, 0xc7, 0x8e, 0x95, 0xcd, - 0x71, 0x6e, 0x24, 0x5b, 0xde, 0x99, 0x7b, 0x13, 0x68, 0xa1, 0x15, 0x19, 0x92, 0xa8, 0x3b, 0x94, - 0x12, 0x27, 0xf7, 0x61, 0x30, 0x22, 0x7f, 0x51, 0xb4, 0x87, 0x33, 0xbc, 0x9c, 0xa1, 0x63, 0xe5, - 0x29, 0x17, 0xb9, 0xf7, 0x16, 0x41, 0xd1, 0xbd, 0x40, 0x13, 0x67, 0x69, 0x13, 0xa0, 0x4d, 0x9a, - 0x6e, 0x49, 0x37, 0x14, 0x7d, 0x2a, 0x50, 0xa4, 0xcd, 0x53, 0xd1, 0xf6, 0xa9, 0x0f, 0x7d, 0x48, - 0xd2, 0x00, 0x4d, 0xdb, 0xb4, 0x4d, 0x01, 0x03, 0x0d, 0x90, 0x97, 0x9e, 0x7f, 0x9b, 0x85, 0xa4, - 0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0xe6, 0x6c, 0x35, 0x48, 0x2e, 0xc6, 0x9e, 0xfe, - 0xe6, 0x8e, 0xa7, 0x6f, 0x7f, 0xf2, 0xb4, 0x40, 0xad, 0x22, 0x48, 0x99, 0x86, 0x14, 0x31, 0x5b, - 0x75, 0xce, 0x10, 0xdf, 0xc6, 0x7f, 0x05, 0xb4, 0x68, 0x67, 0x49, 0x52, 0x98, 0xa0, 0xe8, 0xb7, - 0x49, 0xf3, 0x4a, 0xad, 0x4c, 0x72, 0x09, 0x46, 0x70, 0x47, 0x07, 0x41, 0x89, 0xeb, 0xdb, 0x39, - 0x24, 0x0e, 0x1f, 0x25, 0x45, 0xae, 0x3a, 0xc4, 0xb4, 0x6b, 0x96, 0x99, 0xeb, 0x67, 0x24, 0xb7, - 0x75, 0x99, 0x45, 0x62, 0x54, 0xda, 0x29, 0x3c, 0x9c, 0x72, 0x1a, 0xfa, 0xad, 0x86, 0x83, 0xdf, - 0xec, 0x5c, 0x12, 0xe7, 0x27, 0x3d, 0x75, 0xa0, 0x6b, 0x20, 0x14, 0xb9, 0x8d, 0x2a, 0x8d, 0x95, - 0x05, 0xc8, 0xda, 0x56, 0xab, 0x59, 0x26, 0x5a, 0xd9, 0xaa, 0x10, 0xad, 0x66, 0x6e, 0x58, 0xb9, - 0x14, 0x23, 0x38, 0xd4, 0xf9, 0x20, 0xcc, 0x70, 0x16, 0xed, 0x16, 0xd0, 0x4c, 0xcd, 0xd8, 0x81, - 0x6b, 0x65, 0x2f, 0x24, 0xec, 0x2d, 0xd3, 0xd1, 0xaf, 0xe6, 0x06, 0x58, 0x84, 0x88, 0xab, 0xf1, - 0xbf, 0xc7, 0x61, 0xa8, 0x97, 0x10, 0xbb, 0x07, 0xe2, 0x1b, 0xf4, 0x29, 0x31, 0xc0, 0x76, 0xe1, - 0x03, 0x8e, 0x09, 0x3a, 0x31, 0xf1, 0x21, 0x9d, 0x38, 0x0d, 0x69, 0x93, 0xd8, 0x0e, 0xa9, 0xf0, - 0x88, 0x88, 0xf6, 0x18, 0x53, 0xc0, 0x41, 0x9d, 0x21, 0x15, 0xfb, 0x50, 0x21, 0x75, 0x11, 0x86, - 0xdc, 0x21, 0x69, 0x4d, 0xdd, 0xac, 0xca, 0xd8, 0x9c, 0x0c, 0x1b, 0xc9, 0x44, 0x41, 0xe2, 0x54, - 0x0a, 0x53, 0x33, 0x24, 0x70, 0xad, 0xcc, 0x01, 0x58, 0x26, 0xb1, 0x36, 0x70, 0x79, 0x95, 0x0d, - 0x8c, 0x93, 0xee, 0x5e, 0x2a, 0x52, 0x93, 0x0e, 0x2f, 0x59, 0x5c, 0x5a, 0x36, 0x94, 0x73, 0x5e, - 0xa8, 0xf5, 0x6f, 0x13, 0x29, 0x4b, 0x7c, 0x91, 0x75, 0x44, 0xdb, 0x1a, 0x64, 0x9a, 0x84, 0xc6, - 0x3d, 0xba, 0x98, 0x3f, 0x59, 0x8a, 0x0d, 0x62, 0x22, 0xf4, 0xc9, 0x54, 0x01, 0xe3, 0x0f, 0x36, - 0xd8, 0xf4, 0x5f, 0x2a, 0xb7, 0x80, 0x2b, 0xd0, 0x58, 0x58, 0x01, 0xcb, 0x42, 0x03, 0x52, 0xb8, - 0x8c, 0xb2, 0xb1, 0xb3, 0x90, 0x09, 0xba, 0x47, 0x19, 0x85, 0xb8, 0xed, 0xe8, 0x4d, 0x87, 0x45, - 0x61, 0x5c, 0xe5, 0x17, 0x4a, 0x16, 0xa2, 0x98, 0x64, 0x58, 0x96, 0x8b, 0xab, 0xf4, 0xeb, 0xd8, - 0x19, 0x18, 0x0c, 0xdc, 0xbe, 0x57, 0xe0, 0xf8, 0x93, 0x09, 0x18, 0xed, 0x16, 0x73, 0x5d, 0xc3, - 0x1f, 0x97, 0x0f, 0x46, 0xc0, 0x3a, 0x69, 0x62, 0xdc, 0x51, 0x06, 0x71, 0x85, 0x11, 0x15, 0x37, - 0xf4, 0x75, 0x62, 0x60, 0x34, 0x45, 0x8e, 0x64, 0xa6, 0xee, 0xea, 0x29, 0xaa, 0x27, 0x16, 0x29, - 0x44, 0xe5, 0x48, 0xe5, 0x5e, 0x88, 0x89, 0x14, 0x47, 0x19, 0x8e, 0xf6, 0xc6, 0x40, 0x63, 0x51, - 0x65, 0x38, 0xe5, 0x46, 0x48, 0xd1, 0xff, 0xdc, 0xb7, 0x09, 0x36, 0xe6, 0x24, 0x15, 0x50, 0xbf, - 0x2a, 0x63, 0x90, 0x64, 0x61, 0x56, 0x21, 0xb2, 0x34, 0xb8, 0xd7, 0x74, 0x62, 0x2a, 0x64, 0x43, - 0x6f, 0x19, 0x8e, 0x76, 0x45, 0x37, 0x5a, 0x84, 0x05, 0x0c, 0x4e, 0x8c, 0x10, 0x3e, 0x40, 0x65, - 0xca, 0x21, 0x48, 0xf3, 0xa8, 0xac, 0x21, 0xe6, 0x2a, 0xcb, 0x3e, 0x71, 0x95, 0x07, 0xea, 0x02, - 0x95, 0xd0, 0xdb, 0x5f, 0xb2, 0x71, 0x2d, 0x88, 0xa9, 0x65, 0xb7, 0xa0, 0x02, 0x76, 0xfb, 0x33, - 0xed, 0x89, 0xef, 0xa6, 0xee, 0x8f, 0xd7, 0x1e, 0x8b, 0xe3, 0x3f, 0xec, 0x83, 0x18, 0x5b, 0x6f, - 0x43, 0x90, 0x5e, 0x7d, 0x68, 0xa5, 0xa0, 0xcd, 0x15, 0xd7, 0x66, 0x16, 0x0b, 0xd9, 0x88, 0x92, - 0x01, 0x60, 0x82, 0xf3, 0x8b, 0xc5, 0xe9, 0xd5, 0x6c, 0x9f, 0x7b, 0xbd, 0xb0, 0xbc, 0x7a, 0xfa, - 0x64, 0x36, 0xea, 0x02, 0xd6, 0xb8, 0x20, 0xe6, 0x37, 0x38, 0x31, 0x95, 0x8d, 0x63, 0x24, 0x0c, - 0x70, 0x82, 0x85, 0x8b, 0x85, 0x39, 0xb4, 0x48, 0x04, 0x25, 0x68, 0xd3, 0xaf, 0x0c, 0x42, 0x8a, - 0x49, 0x66, 0x8a, 0xc5, 0xc5, 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0x94, 0xa7, 0x3b, 0x91, 0x1b, - 0xa4, 0x2b, 0xd5, 0xd3, 0x9d, 0xf0, 0x74, 0x27, 0x73, 0x19, 0xea, 0x7f, 0x4f, 0x77, 0xd2, 0xd3, - 0x9d, 0xca, 0x0d, 0xd1, 0x03, 0x5b, 0x4f, 0x77, 0x4a, 0xb9, 0x1b, 0xd2, 0x38, 0x51, 0x9a, 0x78, - 0xc7, 0xc8, 0x5e, 0x68, 0xa7, 0xa7, 0x60, 0x82, 0x46, 0x04, 0x9b, 0x54, 0xb4, 0x05, 0x34, 0x10, - 0x09, 0x6a, 0x66, 0x00, 0xd8, 0xc6, 0x55, 0x63, 0x3f, 0xc8, 0x9a, 0x99, 0x7b, 0xfd, 0xcd, 0x83, - 0x7b, 0x7e, 0x89, 0x9f, 0xdf, 0xe0, 0xe7, 0x8d, 0x37, 0x0f, 0x46, 0xde, 0xc3, 0xcf, 0xfb, 0xf8, - 0x79, 0xec, 0xad, 0x83, 0x91, 0x97, 0xf0, 0xf3, 0x0a, 0x7e, 0x7e, 0x84, 0x9f, 0xd7, 0xdf, 0x42, - 0x3b, 0xfc, 0xff, 0x06, 0x7e, 0xde, 0xc1, 0xef, 0xef, 0xe1, 0xff, 0xf7, 0xf1, 0xff, 0x63, 0xbf, - 0x3b, 0xb8, 0x67, 0x3d, 0xc1, 0xc2, 0xe8, 0xc4, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x65, 0xc5, - 0x89, 0x4f, 0x07, 0x2d, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOne - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOne - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOne(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOne(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOne - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOne - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOne(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 384 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0x07, 0xf0, 0xb8, 0x6e, 0xec, 0xf6, 0x9c, 0xd2, 0xe0, 0xe9, 0x51, 0x21, 0x0b, 0x75, 0x62, - 0x69, 0xdc, 0xf8, 0x47, 0x7f, 0xac, 0x15, 0x42, 0x2c, 0xa8, 0x52, 0xfb, 0x07, 0x54, 0x36, 0x9c, - 0xdd, 0x4a, 0x71, 0x2e, 0x8a, 0xed, 0x81, 0x2d, 0x7f, 0x0e, 0x23, 0x23, 0x7f, 0x42, 0x46, 0x46, - 0x06, 0x86, 0x24, 0x2c, 0x8c, 0x19, 0x33, 0xf2, 0xcd, 0x59, 0x7a, 0x37, 0x7c, 0xf5, 0xde, 0xd3, - 0xe7, 0x79, 0x38, 0xdf, 0x89, 0xb7, 0x5f, 0x54, 0x95, 0xab, 0x3a, 0x6c, 0xa7, 0x55, 0x36, 0xaf, - 0x9f, 0xb3, 0x89, 0x9c, 0x87, 0x6a, 0x2a, 0x47, 0xb3, 0xb9, 0x6a, 0x94, 0x6f, 0xa3, 0x3d, 0xbb, - 0x28, 0x5f, 0x9a, 0xe7, 0x36, 0x1f, 0x61, 0x33, 0x2c, 0x55, 0xa9, 0x42, 0x6d, 0x79, 0x5b, 0xe8, - 0x49, 0x0f, 0xba, 0xeb, 0xbe, 0x39, 0x7f, 0x23, 0xfa, 0x8f, 0x6d, 0x9e, 0x7f, 0xf3, 0x87, 0xc2, - 0xae, 0xdb, 0x9c, 0xac, 0x77, 0xd6, 0xfb, 0xe3, 0x87, 0x7d, 0x7b, 0xfe, 0xc7, 0x16, 0xde, 0x63, - 0x56, 0xcd, 0x26, 0xf2, 0x7e, 0x2a, 0xef, 0x0b, 0x9f, 0x84, 0xf3, 0xf1, 0x45, 0x4e, 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f, 0xf4, 0x5b, 0xd4, 0x1d, 0xea, 0xe2, 0x6f, 0xd0, 0xcb, 0x1d, 0xfd, - 0x8c, 0xe2, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x8a, 0xb7, 0x0c, 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 d8b55043..00000000 --- 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 26c71b4e..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.pb.go deleted file mode 100644 index 09fe3d3a..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.pb.go +++ /dev/null @@ -1,3393 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3544 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x23, 0xe7, - 0x91, 0x36, 0xc5, 0x43, 0x64, 0x51, 0xa2, 0xa8, 0x96, 0x3c, 0xc3, 0x91, 0xed, 0x19, 0x8f, 0x7c, - 0x8d, 0xc7, 0x6b, 0x69, 0x46, 0x73, 0xd3, 0xbb, 0x36, 0x74, 0x70, 0x64, 0x0d, 0x24, 0x51, 0xdb, - 0x94, 0xec, 0xb1, 0xf7, 0xa1, 0xd1, 0x24, 0x7f, 0x51, 0x9c, 0x69, 0x76, 0x73, 0xd9, 0xcd, 0xf1, - 0xc8, 0x4f, 0x5e, 0x78, 0x0f, 0x18, 0x8b, 0xdd, 0x9c, 0x40, 0x7c, 0x27, 0x36, 0x90, 0xd8, 0x71, - 0x2e, 0x3b, 0x17, 0x82, 0x3c, 0x05, 0x08, 0x9c, 0xf8, 0x29, 0x48, 0xf2, 0x94, 0x87, 0x3c, 0xd8, - 0x8e, 0x81, 0x38, 0x89, 0x93, 0x38, 0xc0, 0x00, 0x31, 0xe0, 0x97, 0xd4, 0x7f, 0xf5, 0x41, 0x52, - 0x6a, 0xca, 0x80, 0xe3, 0x08, 0x20, 0xc4, 0xae, 0xaa, 0xef, 0xeb, 0xbf, 0xeb, 0xaf, 0xbf, 0xaa, - 0xfe, 0xbf, 0x09, 0x3f, 0x3e, 0x0e, 0x37, 0xd7, 0x2c, 0xab, 0x66, 0x90, 0xe9, 0x66, 0xcb, 0x72, - 0xac, 0x72, 0x7b, 0x73, 0xba, 0x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 0x83, 0x36, 0x69, - 0x5d, 0xa9, 0x57, 0x48, 0x2e, 0xc1, 0x08, 0xee, 0xe8, 0x22, 0x28, 0x71, 0x7d, 0x27, 0x87, 0xc4, - 0xe1, 0xa3, 0xa4, 0xc8, 0x55, 0x87, 0x98, 0x76, 0xdd, 0x32, 0x73, 0x83, 0x8c, 0xe4, 0xb6, 0x1e, - 0xb3, 0x48, 0x8c, 0x6a, 0x27, 0x85, 0x87, 0x53, 0x4e, 0xc3, 0xa0, 0xd5, 0x74, 0xf0, 0x9b, 0x9d, - 0x4b, 0xe2, 0xfc, 0xa4, 0x67, 0x6e, 0xec, 0x19, 0x08, 0x45, 0x6e, 0xa3, 0x4a, 0x63, 0x65, 0x09, - 0xb2, 0xb6, 0xd5, 0x6e, 0x55, 0x88, 0x56, 0xb1, 0xaa, 0x44, 0xab, 0x9b, 0x9b, 0x56, 0x2e, 0xc5, - 0x08, 0x0e, 0x75, 0x3f, 0x08, 0x33, 0x9c, 0x47, 0xbb, 0x25, 0x34, 0x53, 0x33, 0x76, 0xe0, 0x5a, - 0xd9, 0x07, 0x09, 0x7b, 0xdb, 0x74, 0xf4, 0xab, 0xb9, 0x21, 0x16, 0x21, 0xe2, 0x6a, 0xf2, 0xaf, - 0x71, 0x18, 0xe9, 0x27, 0xc4, 0xee, 0x81, 0xf8, 0x26, 0x7d, 0x4a, 0x0c, 0xb0, 0x3d, 0xf8, 0x80, - 0x63, 0x82, 0x4e, 0x4c, 0x7c, 0x44, 0x27, 0xce, 0x42, 0xda, 0x24, 0xb6, 0x43, 0xaa, 0x3c, 0x22, - 0xa2, 0x7d, 0xc6, 0x14, 0x70, 0x50, 0x77, 0x48, 0xc5, 0x3e, 0x52, 0x48, 0x5d, 0x84, 0x11, 0x77, - 0x48, 0x5a, 0x4b, 0x37, 0x6b, 0x32, 0x36, 0xa7, 0xc3, 0x46, 0x32, 0x55, 0x90, 0x38, 0x95, 0xc2, - 0xd4, 0x0c, 0x09, 0x5c, 0x2b, 0x0b, 0x00, 0x96, 0x49, 0xac, 0x4d, 0x5c, 0x5e, 0x15, 0x03, 0xe3, - 0xa4, 0xb7, 0x97, 0x8a, 0xd4, 0xa4, 0xcb, 0x4b, 0x16, 0x97, 0x56, 0x0c, 0xe5, 0x9c, 0x17, 0x6a, - 0x83, 0x3b, 0x44, 0xca, 0x0a, 0x5f, 0x64, 0x5d, 0xd1, 0xb6, 0x01, 0x99, 0x16, 0xa1, 0x71, 0x8f, - 0x2e, 0xe6, 0x4f, 0x96, 0x62, 0x83, 0x98, 0x0a, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0xb7, - 0xfc, 0x97, 0xca, 0x2d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x90, 0x14, 0xae, 0xa2, - 0x6c, 0xe2, 0x2c, 0x64, 0x82, 0xee, 0x51, 0xc6, 0x21, 0x6e, 0x3b, 0x7a, 0xcb, 0x61, 0x51, 0x18, - 0x57, 0xf9, 0x85, 0x92, 0x85, 0x28, 0x26, 0x19, 0x96, 0xe5, 0xe2, 0x2a, 0xfd, 0x3a, 0x71, 0x06, - 0x86, 0x03, 0xb7, 0xef, 0x17, 0x38, 0xf9, 0x64, 0x02, 0xc6, 0x7b, 0xc5, 0x5c, 0xcf, 0xf0, 0xc7, - 0xe5, 0x83, 0x11, 0x50, 0x26, 0x2d, 0x8c, 0x3b, 0xca, 0x20, 0xae, 0x30, 0xa2, 0xe2, 0x86, 0x5e, - 0x26, 0x06, 0x46, 0x53, 0xe4, 0x48, 0x66, 0xe6, 0xae, 0xbe, 0xa2, 0x7a, 0x6a, 0x99, 0x42, 0x54, - 0x8e, 0x54, 0xee, 0x85, 0x98, 0x48, 0x71, 0x94, 0xe1, 0x68, 0x7f, 0x0c, 0x34, 0x16, 0x55, 0x86, - 0x53, 0x6e, 0x80, 0x14, 0xfd, 0xcf, 0x7d, 0x9b, 0x60, 0x63, 0x4e, 0x52, 0x01, 0xf5, 0xab, 0x32, - 0x01, 0x49, 0x16, 0x66, 0x55, 0x22, 0x4b, 0x83, 0x7b, 0x4d, 0x27, 0xa6, 0x4a, 0x36, 0xf5, 0xb6, - 0xe1, 0x68, 0x57, 0x74, 0xa3, 0x4d, 0x58, 0xc0, 0xe0, 0xc4, 0x08, 0xe1, 0x03, 0x54, 0xa6, 0x1c, - 0x82, 0x34, 0x8f, 0xca, 0x3a, 0x62, 0xae, 0xb2, 0xec, 0x13, 0x57, 0x79, 0xa0, 0x2e, 0x51, 0x09, - 0xbd, 0xfd, 0x25, 0x1b, 0xd7, 0x82, 0x98, 0x5a, 0x76, 0x0b, 0x2a, 0x60, 0xb7, 0x3f, 0xd3, 0x99, - 0xf8, 0x6e, 0xea, 0xfd, 0x78, 0x9d, 0xb1, 0x38, 0xf9, 0xfd, 0x01, 0x88, 0xb1, 0xf5, 0x36, 0x02, - 0xe9, 0xf5, 0x87, 0xd6, 0x0a, 0xda, 0x42, 0x71, 0x63, 0x6e, 0xb9, 0x90, 0x8d, 0x28, 0x19, 0x00, - 0x26, 0x38, 0xbf, 0x5c, 0x9c, 0x5d, 0xcf, 0x0e, 0xb8, 0xd7, 0x4b, 0xab, 0xeb, 0xa7, 0x4f, 0x66, - 0xa3, 0x2e, 0x60, 0x83, 0x0b, 0x62, 0x7e, 0x83, 0x13, 0x33, 0xd9, 0x38, 0x46, 0xc2, 0x10, 0x27, - 0x58, 0xba, 0x58, 0x58, 0x40, 0x8b, 0x44, 0x50, 0x82, 0x36, 0x83, 0xca, 0x30, 0xa4, 0x98, 0x64, - 0xae, 0x58, 0x5c, 0xce, 0x26, 0x5d, 0xce, 0xd2, 0xba, 0xba, 0xb4, 0xba, 0x98, 0x4d, 0xb9, 0x9c, - 0x8b, 0x6a, 0x71, 0x63, 0x2d, 0x0b, 0x2e, 0xc3, 0x4a, 0xa1, 0x54, 0x9a, 0x5d, 0x2c, 0x64, 0xd3, - 0xae, 0xc5, 0xdc, 0x43, 0xeb, 0x85, 0x52,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0x74, 0x8d, - 0xf4, 0x89, 0x01, 0xb8, 0xbe, 0x27, 0x79, 0xcf, 0x81, 0xde, 0x04, 0x50, 0x37, 0x9b, 0x6d, 0x87, - 0xd7, 0x55, 0x9e, 0x66, 0x52, 0x4c, 0xc2, 0x96, 0x30, 0x4d, 0x21, 0x6d, 0xc7, 0xd5, 0x47, 0x99, - 0x1e, 0xb8, 0x88, 0x19, 0x9c, 0xf5, 0x06, 0x1a, 0x63, 0x03, 0x3d, 0xb8, 0xc3, 0x93, 0x76, 0x95, - 0xac, 0x63, 0x90, 0xad, 0x18, 0x75, 0x62, 0x3a, 0x9a, 0xed, 0xb4, 0x88, 0xde, 0xa8, 0x9b, 0x35, - 0x96, 0x47, 0x93, 0xf9, 0xf8, 0xa6, 0x6e, 0xd8, 0x44, 0x1d, 0xe1, 0xea, 0x92, 0xd4, 0x52, 0x04, - 0x2b, 0x16, 0x2d, 0x1f, 0x22, 0x11, 0x40, 0x70, 0xb5, 0x8b, 0x98, 0xfc, 0xe5, 0x20, 0xa4, 0x7d, - 0xdd, 0x99, 0x72, 0x18, 0x86, 0x2e, 0xe9, 0x57, 0x74, 0x4d, 0x76, 0xdc, 0xdc, 0x13, 0x69, 0x2a, - 0x5b, 0x13, 0x5d, 0xf7, 0x31, 0x18, 0x67, 0x26, 0xf8, 0x8c, 0x78, 0xa3, 0x8a, 0xa1, 0xdb, 0x36, - 0x73, 0x5a, 0x92, 0x99, 0x2a, 0x54, 0x57, 0xa4, 0xaa, 0x79, 0xa9, 0x51, 0x4e, 0xc1, 0x18, 0x43, - 0x34, 0x30, 0xf1, 0xd6, 0x9b, 0x06, 0xd1, 0xe8, 0x1e, 0xc0, 0x66, 0xf9, 0xd4, 0x1d, 0xd9, 0x28, - 0xb5, 0x58, 0x11, 0x06, 0x74, 0x44, 0xb6, 0xb2, 0x08, 0x37, 0x31, 0x58, 0x8d, 0x98, 0xa4, 0xa5, - 0x3b, 0x44, 0x23, 0xff, 0xde, 0x46, 0x5b, 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0xa4, 0x71, 0xa2, - 0x34, 0xf1, 0x8a, 0x91, 0xbd, 0xcf, 0x4e, 0xcf, 0xc0, 0x14, 0x8d, 0x08, 0x36, 0xa9, 0x68, 0x0b, - 0x68, 0x20, 0xf2, 0xd3, 0xdc, 0x10, 0xb0, 0x7d, 0xab, 0xc6, 0x7e, 0x8f, 0x35, 0xb7, 0xf0, 0xc6, - 0x5b, 0x07, 0xaf, 0xfb, 0x39, 0x7e, 0x7e, 0x85, 0x9f, 0x37, 0xdf, 0x3a, 0x18, 0x79, 0x1f, 0x3f, - 0x1f, 0xe0, 0xe7, 0xb1, 0xb7, 0x0f, 0x46, 0x5e, 0xc6, 0xcf, 0xab, 0xf8, 0xf9, 0x01, 0x7e, 0xde, - 0x78, 0x1b, 0xed, 0xf0, 0xf3, 0x26, 0x7e, 0x7f, 0x17, 0xff, 0xbf, 0x8f, 0xff, 0x3f, 0xc0, 0xcf, - 0x63, 0xbf, 0x39, 0x18, 0x29, 0x27, 0x58, 0x18, 0x9d, 0xf8, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xfe, 0xe2, 0xe2, 0x22, 0x06, 0x2d, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeboth/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 381 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x6e, 0xdb, 0x30, - 0x14, 0x05, 0xe0, 0x28, 0x8a, 0xa5, 0x84, 0x72, 0x1a, 0x57, 0xd3, 0x6d, 0x0a, 0x08, 0x45, 0xa6, - 0x2e, 0xb1, 0x62, 0xfd, 0xe4, 0x67, 0x0d, 0x8a, 0xa2, 0x4b, 0x11, 0x20, 0x79, 0x80, 0xc0, 0x6c, - 0x29, 0xd9, 0x80, 0x6d, 0x1a, 0x95, 0x34, 0x74, 0xf3, 0xe3, 0x74, 0xec, 0xd8, 0x47, 0xf0, 0xd8, - 0xb1, 0x43, 0x07, 0xdb, 0x5d, 0x3a, 0x7a, 0xf4, 0x98, 0x63, 0x0a, 0xb8, 0x1c, 0x0e, 0x78, 0x89, - 0xef, 0x68, 0xa0, 0x48, 0xf1, 0xf6, 0x8b, 0x9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, 0xb1, 0xb5, - 0xd4, 0x5a, 0x46, 0xaf, 0xf6, 0xff, 0xdf, 0x5a, 0x66, 0x2d, 0xa7, 0x33, 0x58, 0xd7, 0x5a, 0x1e, - 0x5e, 0x8a, 0x00, 0x17, 0xf5, 0x3c, 0x55, 0x55, 0x35, 0x2c, 0x15, 0xf5, 0xe0, 0x41, 0x22, 0xfa, - 0xfb, 0x17, 0x61, 0x2e, 0x15, 0x5d, 0x81, 0xc2, 0xe7, 0xd6, 0xef, 0xbb, 0x42, 0xd4, 0xaa, 0xaa, - 0x9f, 0xe1, 0xba, 0xb8, 0xff, 0xb0, 0x5c, 0x47, 0x07, 0xbf, 0x91, 0x3f, 0xc8, 0x6a, 0x1d, 0x39, - 0x5b, 0x64, 0x87, 0x2c, 0x36, 0x91, 0xf3, 0x03, 0xf9, 0x89, 0xfc, 0x42, 0x96, 0x1b, 0xf4, 0x90, - 0x15, 0xe6, 0xff, 0x58, 0xb7, 0x58, 0x77, 0xc8, 0xe2, 0x5f, 0xe4, 0x48, 0xcf, 0x3c, 0xa3, 0xf4, - 0x25, 0x00, 0x00, 0xff, 0xff, 0x90, 0x60, 0x36, 0x9e, 0x99, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.proto deleted file mode 100644 index 8c161fbb..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/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) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go deleted file mode 100644 index baf9b22b..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go deleted file mode 100644 index 4ec540a3..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go +++ /dev/null @@ -1,2859 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3541 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xd7, - 0xd5, 0x36, 0xc5, 0x45, 0xe4, 0xa1, 0x44, 0x51, 0x23, 0xc5, 0xa6, 0x95, 0xc4, 0x8b, 0xb2, 0x39, - 0xce, 0x1f, 0xc9, 0x96, 0x77, 0xe6, 0xff, 0x13, 0x68, 0xa1, 0x15, 0x19, 0x92, 0xa8, 0x7f, 0x28, - 0x25, 0x4e, 0xfe, 0x87, 0xc1, 0x88, 0xbc, 0xa2, 0x68, 0x0f, 0x67, 0xf8, 0x73, 0x86, 0x8e, 0x95, - 0xa7, 0x14, 0xe9, 0x82, 0xa0, 0xe8, 0x5e, 0xa0, 0xd9, 0xdb, 0x04, 0x68, 0x93, 0xa6, 0x5b, 0xd2, - 0x0d, 0x45, 0x9f, 0x0a, 0x14, 0x69, 0xf3, 0x54, 0xb4, 0x7d, 0xea, 0x43, 0x1f, 0x92, 0x34, 0x40, - 0xd3, 0x36, 0x6d, 0x53, 0xc0, 0x40, 0x03, 0xe4, 0xa5, 0xe7, 0x6e, 0xb3, 0x90, 0x94, 0x86, 0x0a, - 0x90, 0xa6, 0x02, 0x08, 0x71, 0xce, 0x39, 0xdf, 0x37, 0x77, 0xce, 0x3d, 0xf7, 0x9c, 0x73, 0xef, - 0x10, 0x7e, 0x7e, 0x1c, 0x0e, 0x55, 0x2d, 0xab, 0x6a, 0x90, 0xc9, 0x46, 0xd3, 0x72, 0xac, 0xf5, - 0xd6, 0xc6, 0x64, 0x85, 0xd8, 0xe5, 0x66, 0xad, 0xe1, 0x58, 0xcd, 0x09, 0x26, 0x53, 0x86, 0xb8, - 0xc5, 0x84, 0xb4, 0x18, 0x5f, 0x82, 0xe1, 0xf3, 0x35, 0x83, 0xcc, 0xb9, 0x86, 0x25, 0xe2, 0x28, - 0x67, 0x21, 0xb6, 0x81, 0xc2, 0x5c, 0xe4, 0x50, 0xf4, 0x48, 0x7a, 0xea, 0xe6, 0x89, 0x36, 0xd0, - 0x44, 0x10, 0xb1, 0x42, 0xc5, 0x2a, 0x43, 0x8c, 0xbf, 0x15, 0x83, 0x91, 0x2e, 0x5a, 0x45, 0x81, - 0x98, 0xa9, 0xd7, 0x29, 0x63, 0xe4, 0x48, 0x4a, 0x65, 0xdf, 0x95, 0x1c, 0xf4, 0x37, 0xf4, 0xf2, - 0x65, 0xbd, 0x4a, 0x72, 0x7d, 0x4c, 0x2c, 0x2f, 0x95, 0x03, 0x00, 0x15, 0xd2, 0x20, 0x66, 0x85, - 0x98, 0xe5, 0xad, 0x5c, 0x14, 0x47, 0x91, 0x52, 0x7d, 0x12, 0xe5, 0x0e, 0x18, 0x6e, 0xb4, 0xd6, - 0x8d, 0x5a, 0x59, 0xf3, 0x99, 0x01, 0x9a, 0xc5, 0xd5, 0x2c, 0x57, 0xcc, 0x79, 0xc6, 0xb7, 0xc1, - 0xd0, 0x43, 0x44, 0xbf, 0xec, 0x37, 0x4d, 0x33, 0xd3, 0x0c, 0x15, 0xfb, 0x0c, 0x67, 0x61, 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4e, 0x43, 0xda, 0x24, 0xb6, 0x43, 0x2a, 0x3c, 0x22, 0xa2, 0x3d, - 0xc6, 0x14, 0x70, 0x50, 0x67, 0x48, 0xc5, 0x3e, 0x50, 0x48, 0x5d, 0x84, 0x21, 0x77, 0x48, 0x5a, - 0x53, 0x37, 0xab, 0x32, 0x36, 0x27, 0xc3, 0x46, 0x32, 0x51, 0x90, 0x38, 0x95, 0xc2, 0xd4, 0x0c, - 0x09, 0x5c, 0x2b, 0x73, 0x00, 0x96, 0x49, 0xac, 0x0d, 0x5c, 0x5e, 0x65, 0x03, 0xe3, 0xa4, 0xbb, - 0x97, 0x8a, 0xd4, 0xa4, 0xc3, 0x4b, 0x16, 0x97, 0x96, 0x0d, 0xe5, 0x9c, 0x17, 0x6a, 0xfd, 0xdb, - 0x44, 0xca, 0x12, 0x5f, 0x64, 0x1d, 0xd1, 0xb6, 0x06, 0x99, 0x26, 0xa1, 0x71, 0x8f, 0x2e, 0xe6, - 0x4f, 0x96, 0x62, 0x83, 0x98, 0x08, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0x36, 0xfd, 0x97, - 0xca, 0x4d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x80, 0x14, 0x2e, 0xa3, 0x6c, 0xec, - 0x2c, 0x64, 0x82, 0xee, 0x51, 0x46, 0x21, 0x6e, 0x3b, 0x7a, 0xd3, 0x61, 0x51, 0x18, 0x57, 0xf9, - 0x85, 0x92, 0x85, 0x28, 0x26, 0x19, 0x96, 0xe5, 0xe2, 0x2a, 0xfd, 0x3a, 0x76, 0x06, 0x06, 0x03, - 0xb7, 0xef, 0x15, 0x38, 0xfe, 0x78, 0x02, 0x46, 0xbb, 0xc5, 0x5c, 0xd7, 0xf0, 0xc7, 0xe5, 0x83, - 0x11, 0xb0, 0x4e, 0x9a, 0x18, 0x77, 0x94, 0x41, 0x5c, 0x61, 0x44, 0xc5, 0x0d, 0x7d, 0x9d, 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 0x09, 0xda, 0xf4, 0x2b, 0x83, 0x90, 0x62, 0x92, 0x99, 0x62, - 0x71, 0x31, 0x9b, 0x74, 0x39, 0x4b, 0xab, 0xea, 0xc2, 0xf2, 0x7c, 0x36, 0xe5, 0x72, 0xce, 0xab, - 0xc5, 0xb5, 0x95, 0x2c, 0xb8, 0x0c, 0x4b, 0x85, 0x52, 0x69, 0x7a, 0xbe, 0x90, 0x4d, 0xbb, 0x16, - 0x33, 0x0f, 0xac, 0x16, 0x4a, 0xd9, 0x81, 0xc0, 0xb0, 0xf0, 0x16, 0x83, 0xee, 0x2d, 0x0a, 0xcb, - 0x6b, 0x4b, 0xd9, 0x8c, 0x32, 0x0c, 0x83, 0xfc, 0x16, 0x72, 0x10, 0x43, 0x6d, 0x22, 0x1c, 0x69, - 0xd6, 0x1b, 0x08, 0x67, 0x19, 0x0e, 0x08, 0xd0, 0x42, 0x19, 0x9f, 0x85, 0x38, 0x8b, 0x2e, 0x8c, - 0xe2, 0xcc, 0xe2, 0xf4, 0x4c, 0x61, 0x51, 0x2b, 0xae, 0xac, 0x2e, 0x14, 0x97, 0xa7, 0x17, 0xd1, - 0x77, 0xae, 0x4c, 0x2d, 0xfc, 0xef, 0xda, 0x82, 0x5a, 0x98, 0x43, 0xff, 0xf9, 0x64, 0x2b, 0x85, - 0xe9, 0x55, 0x94, 0x45, 0xc7, 0x8f, 0xc2, 0x68, 0xb7, 0x3c, 0xd3, 0x6d, 0x65, 0x8c, 0x3f, 0x1f, - 0x81, 0x91, 0x2e, 0x29, 0xb3, 0xeb, 0x2a, 0xba, 0x07, 0xe2, 0x3c, 0xd2, 0x78, 0x11, 0xb9, 0xbd, - 0x6b, 0xee, 0x65, 0x71, 0xd7, 0x51, 0x48, 0x18, 0xce, 0x5f, 0x48, 0xa3, 0xdb, 0x14, 0x52, 0x4a, - 0xd1, 0x11, 0x4e, 0x8f, 0x46, 0x20, 0xb7, 0x1d, 0x77, 0xc8, 0x7a, 0xef, 0x0b, 0xac, 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- 0x48, 0xc3, 0xe1, 0xf0, 0x67, 0x05, 0x3c, 0x2d, 0x31, 0x82, 0xa2, 0x61, 0x35, 0x5a, 0x06, 0xcd, - 0xd1, 0xe1, 0x14, 0x5f, 0x95, 0x14, 0x12, 0x23, 0x28, 0x76, 0xe1, 0xd6, 0xaf, 0x49, 0x0a, 0xdb, - 0xe7, 0xcf, 0x7b, 0xe8, 0x59, 0xaf, 0xb1, 0x65, 0x99, 0xbd, 0x0c, 0xe2, 0x39, 0xc1, 0x00, 0x02, - 0x42, 0x09, 0xee, 0x82, 0x54, 0xaf, 0x13, 0xf1, 0x75, 0x01, 0x4f, 0x12, 0x39, 0x03, 0xb8, 0xce, - 0x64, 0x92, 0xa1, 0xef, 0x56, 0xc2, 0x29, 0xbe, 0x21, 0x28, 0x32, 0x3e, 0x98, 0x78, 0x0c, 0x87, - 0xd8, 0x0e, 0x6e, 0xd5, 0x7b, 0x20, 0x79, 0x41, 0x3e, 0x86, 0x80, 0x08, 0x57, 0xae, 0x13, 0xb3, - 0xbc, 0xd9, 0x1b, 0xc3, 0x8b, 0xd2, 0x95, 0x12, 0x43, 0x29, 0x30, 0xf3, 0xd4, 0xf5, 0x26, 0x6e, - 0xae, 0x8d, 0x9e, 0xa6, 0xe3, 0x9b, 0x82, 0x63, 0xc0, 0x05, 0x09, 0x8f, 0xb4, 0xcc, 0xdd, 0xd0, - 0xbc, 0x24, 0x3d, 0xe2, 0x83, 0x89, 0xa5, 0x87, 0x3b, 0x53, 0xda, 0x49, 0xec, 0x86, 0xed, 0x5b, - 0x72, 0xe9, 0x71, 0xec, 0x92, 0x9f, 0x11, 0x67, 0xda, 0xc6, 0x2d, 0x78, 0x2f, 0x34, 0xdf, 0x96, - 0x33, 0xcd, 0x00, 0x14, 0xfc, 0x00, 0xec, 0xef, 0x9a, 0xea, 0x7b, 0x20, 0xfb, 0x8e, 0x20, 0xdb, - 0xdb, 0x25, 0xdd, 0x8b, 0x94, 0xb0, 0x5b, 0xca, 0xef,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- 0xee, 0xb8, 0xa7, 0x9b, 0x62, 0x3f, 0x9e, 0xcc, 0x7a, 0xba, 0x29, 0x4f, 0x77, 0x22, 0x37, 0x48, - 0x57, 0xab, 0xa7, 0x3b, 0xe1, 0xe9, 0x4e, 0xe6, 0x32, 0xd4, 0xff, 0x9e, 0xee, 0xa4, 0xa7, 0x3b, - 0x95, 0x1b, 0xa2, 0x87, 0xb6, 0x9e, 0xee, 0x94, 0x72, 0x27, 0xa4, 0x71, 0xa2, 0x34, 0xf1, 0x9e, - 0x91, 0xbd, 0xd4, 0x4e, 0x4f, 0xc1, 0x04, 0x8d, 0x08, 0x36, 0xa9, 0x68, 0x0b, 0x68, 0x20, 0x92, - 0xd4, 0xcc, 0x00, 0xb0, 0xcd, 0xab, 0xc6, 0x7e, 0x94, 0x35, 0x33, 0xf7, 0xda, 0x1b, 0x07, 0xf6, - 0xfc, 0x1a, 0x3f, 0xbf, 0xc3, 0xcf, 0xeb, 0x6f, 0x1c, 0x88, 0xbc, 0x8b, 0x9f, 0xf7, 0xf0, 0xf3, - 0xc8, 0x9b, 0x07, 0x22, 0x2f, 0xe2, 0xe7, 0x65, 0xfc, 0xfc, 0x04, 0x3f, 0xaf, 0xbd, 0x89, 0x76, - 0xf8, 0x79, 0x1d, 0xbf, 0xbf, 0x8d, 0xff, 0xdf, 0xc5, 0xff, 0xef, 0xe1, 0xe7, 0x91, 0x3f, 0x1c, - 0xd8, 0xb3, 0x9e, 0x60, 0x61, 0x74, 0xe2, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xfc, 0x25, - 0xa8, 0x0b, 0x2d, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Subby) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Sub) > 0 { - data[i] = 0xa - i++ - i = encodeVarintOne(data, i, uint64(len(m.Sub))) - i += copy(data[i:], m.Sub) - } - return i, nil -} - -func (m *SampleOneOf) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TestOneof != nil { - nn1, err := m.TestOneof.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - return i, nil -} - -func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x9 - i++ - *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x15 - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x18 - i++ - i = encodeVarintOne(data, i, uint64(m.Field3)) - return i, nil -} -func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x20 - i++ - i = encodeVarintOne(data, i, uint64(m.Field4)) - return i, nil -} -func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x28 - i++ - i = encodeVarintOne(data, i, uint64(m.Field5)) - return i, nil -} -func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x30 - i++ - i = encodeVarintOne(data, i, uint64(m.Field6)) - return i, nil -} -func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x38 - i++ - i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - return i, nil -} -func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x40 - i++ - i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - return i, nil -} -func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x4d - i++ - *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x55 - i++ - *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 - i += 4 - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x59 - i++ - *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x61 - i++ - *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 - i += 8 - return i, nil -} -func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} -func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { - i := 0 - data[i] = 0x72 - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - return i, nil -} -func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { - i := 0 - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintOne(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - return i, nil -} -func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { - i := 0 - if m.SubMessage != nil { - data[i] = 0x82 - i++ - data[i] = 0x1 - i++ - i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) - n2, err := m.SubMessage.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func encodeFixed64One(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32One(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintOne(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} - -func init() { proto.RegisterFile("combos/unsafemarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x6e, 0xdb, 0x30, - 0x14, 0x05, 0x60, 0x2b, 0x8a, 0xa5, 0x84, 0x72, 0x1a, 0x57, 0xd3, 0x6d, 0x06, 0x21, 0xc8, 0xd4, - 0x25, 0x56, 0xac, 0x9f, 0xfc, 0xac, 0x41, 0x51, 0x74, 0x29, 0x02, 0x24, 0x0f, 0x10, 0x48, 0x2d, - 0xa5, 0x04, 0xb0, 0x4c, 0xc3, 0x92, 0x86, 0x6e, 0x7e, 0x9c, 0x8e, 0x1d, 0xfb, 0x08, 0x1e, 0x3b, - 0x76, 0xe8, 0x60, 0xbb, 0x4b, 0x47, 0x8f, 0x1e, 0x7b, 0x4c, 0x01, 0x97, 0xc3, 0x01, 0x2f, 0xf1, - 0x1d, 0x0d, 0x14, 0x29, 0xce, 0xbf, 0xa8, 0x2a, 0x57, 0x75, 0xd8, 0x4e, 0xeb, 0xac, 0x90, 0x55, - 0x36, 0xaf, 0x5f, 0xb2, 0x89, 0x9c, 0x87, 0x6a, 0x2a, 0x47, 0xb3, 0xb9, 0x6a, 0x94, 0x6f, 0x63, - 0x3c, 0xbb, 0x2c, 0x5f, 0x9b, 0x97, 0x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 0xce, 0x4a, 0x49, 0x43, - 0xb8, 0x17, 0x89, 0xd1, 0xfe, 0x45, 0xe8, 0x4b, 0x45, 0x57, 0xa0, 0xf0, 0xb9, 0xf3, 0xfb, 0x81, - 0x10, 0x8d, 0xac, 0x9b, 0x67, 0xb8, 0x2a, 0xee, 0x3f, 0x2c, 0xd7, 0x41, 0xef, 0x17, 0xf2, 0x1b, - 0x59, 0xad, 0x03, 0x6b, 0x8b, 0xec, 0x90, 0xc5, 0x26, 0xb0, 0xbe, 0x23, 0x3f, 0x90, 0x9f, 0xc8, - 0x72, 0x83, 0x1e, 0xb2, 0xc2, 0xfc, 0x0f, 0xeb, 0x16, 0xeb, 0x0e, 0x59, 0xfc, 0x0d, 0x7a, 0xb9, - 0xa3, 0x9f, 0x51, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xbf, 0xf4, 0xb2, 0x9e, 0x02, 0x00, - 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.proto deleted file mode 100644 index 717dbf2f..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/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) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go deleted file mode 100644 index 34f6ec41..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go deleted file mode 100644 index c141ee0c..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go +++ /dev/null @@ -1,3180 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* - Package one is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/one.proto - - It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=field1,proto3,oneof"` -} -type SampleOneOf_Field2 struct { - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` -} -type SampleOneOf_Field3 struct { - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` -} -type SampleOneOf_Field4 struct { - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` -} -type SampleOneOf_Field5 struct { - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` -} -type SampleOneOf_Field6 struct { - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` -} -type SampleOneOf_Field7 struct { - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` -} -type SampleOneOf_Field8 struct { - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` -} -type SampleOneOf_Field9 struct { - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` -} -type SampleOneOf_Field10 struct { - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` -} -type SampleOneOf_Field11 struct { - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` -} -type SampleOneOf_Field12 struct { - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` -} -type SampleOneOf_Field13 struct { - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` -} -type SampleOneOf_Field14 struct { - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` -} -type SampleOneOf_Field15 struct { - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return OneDescription() -} -func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3538 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, - 0x15, 0xc6, 0xf1, 0x25, 0xf6, 0x71, 0xe2, 0x38, 0x93, 0xb0, 0xeb, 0x0d, 0xb0, 0xcb, 0x86, 0xdb, - 0xb2, 0x94, 0x64, 0x37, 0x7b, 0x37, 0x2d, 0x28, 0x17, 0x6f, 0xc8, 0x2a, 0x89, 0xd3, 0x71, 0x02, - 0x0b, 0x7d, 0x18, 0x4d, 0xec, 0x3f, 0x8e, 0x77, 0xc7, 0x33, 0xae, 0x67, 0xbc, 0x6c, 0x78, 0xa2, - 0xa2, 0x17, 0xa1, 0xaa, 0xf7, 0x4a, 0xe5, 0x5e, 0x40, 0x6a, 0xa1, 0xf4, 0x06, 0xbd, 0xa9, 0xea, - 0x53, 0xa5, 0x8a, 0x96, 0xa7, 0xaa, 0xed, 0x53, 0x1f, 0xfa, 0x00, 0x14, 0xa9, 0xb4, 0xa5, 0x2d, - 0x95, 0x56, 0x2a, 0x12, 0x2f, 0x3d, 0xff, 0x6d, 0x2e, 0xb6, 0x93, 0x71, 0x90, 0x28, 0x8d, 0x64, - 0xc5, 0x73, 0xce, 0xf9, 0xbe, 0xf9, 0xe7, 0xfc, 0xe7, 0x3f, 0xe7, 0xfc,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0x22, 0x48, 0x99, 0x86, 0x14, 0x31, 0x5b, 0x75, 0xce, 0x10, 0xdf, 0xc6, 0x7f, - 0x05, 0xb4, 0x68, 0x67, 0x49, 0x52, 0x98, 0xa0, 0xe8, 0xb7, 0x49, 0xf3, 0x52, 0xad, 0x4c, 0x72, - 0x09, 0x46, 0x70, 0x4b, 0x07, 0x41, 0x89, 0xeb, 0xdb, 0x39, 0x24, 0x0e, 0x1f, 0x25, 0x45, 0x2e, - 0x3b, 0xc4, 0xb4, 0x6b, 0x96, 0x99, 0xeb, 0x67, 0x24, 0x37, 0x75, 0x99, 0x45, 0x62, 0x54, 0xda, - 0x29, 0x3c, 0x9c, 0x72, 0x12, 0xfa, 0xad, 0x86, 0x83, 0xdf, 0xec, 0x5c, 0x12, 0xe7, 0x27, 0x3d, - 0x75, 0x6d, 0xd7, 0x40, 0x28, 0x72, 0x1b, 0x55, 0x1a, 0x2b, 0x0b, 0x90, 0xb5, 0xad, 0x56, 0xb3, - 0x4c, 0xb4, 0xb2, 0x55, 0x21, 0x5a, 0xcd, 0xdc, 0xb0, 0x72, 0x29, 0x46, 0x70, 0xa0, 0xf3, 0x41, - 0x98, 0xe1, 0x2c, 0xda, 0x2d, 0xa0, 0x99, 0x9a, 0xb1, 0x03, 0xd7, 0xca, 0x1e, 0x48, 0xd8, 0x5b, - 0xa6, 0xa3, 0x5f, 0xce, 0x0d, 0xb0, 0x08, 0x11, 0x57, 0xe3, 0xff, 0x89, 0xc3, 0x50, 0x2f, 0x21, - 0x76, 0x07, 0xc4, 0x37, 0xe8, 0x53, 0x62, 0x80, 0xed, 0xc2, 0x07, 0x1c, 0x13, 0x74, 0x62, 0xe2, - 0x7d, 0x3a, 0x71, 0x1a, 0xd2, 0x26, 0xb1, 0x1d, 0x52, 0xe1, 0x11, 0x11, 0xed, 0x31, 0xa6, 0x80, - 0x83, 0x3a, 0x43, 0x2a, 0xf6, 0xbe, 0x42, 0xea, 0x3c, 0x0c, 0xb9, 0x43, 0xd2,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 0x73, 0x5e, 0x2d, 0xae, 0xad, - 0x64, 0xc1, 0x65, 0x58, 0x2a, 0x94, 0x4a, 0xd3, 0xf3, 0x85, 0x6c, 0xda, 0xb5, 0x98, 0xb9, 0x6f, - 0xb5, 0x50, 0xca, 0x0e, 0x04, 0x86, 0x85, 0xb7, 0x18, 0x74, 0x6f, 0x51, 0x58, 0x5e, 0x5b, 0xca, - 0x66, 0x94, 0x61, 0x18, 0xe4, 0xb7, 0x90, 0x83, 0x18, 0x6a, 0x13, 0xe1, 0x48, 0xb3, 0xde, 0x40, - 0x38, 0xcb, 0x70, 0x40, 0x80, 0x16, 0xca, 0xf8, 0x2c, 0xc4, 0x59, 0x74, 0x61, 0x14, 0x67, 0x16, - 0xa7, 0x67, 0x0a, 0x8b, 0x5a, 0x71, 0x65, 0x75, 0xa1, 0xb8, 0x3c, 0xbd, 0x88, 0xbe, 0x73, 0x65, - 0x6a, 0xe1, 0xe3, 0x6b, 0x0b, 0x6a, 0x61, 0x0e, 0xfd, 0xe7, 0x93, 0xad, 0x14, 0xa6, 0x57, 0x51, - 0x16, 0x1d, 0x3f, 0x0c, 0xa3, 0xdd, 0xf2, 0x4c, 0xb7, 0x95, 0x31, 0xfe, 0x5c, 0x04, 0x46, 0xba, - 0xa4, 0xcc, 0xae, 0xab, 0xe8, 0x2e, 0x88, 0xf3, 0x48, 0xe3, 0x45, 0xe4, 0xd6, 0xae, 0xb9, 0x97, - 0xc5, 0x5d, 0x47, 0x21, 0x61, 0x38, 0x7f, 0x21, 0x8d, 0x6e, 0x53, 0x48, 0x29, 0x45, 0x47, 0x38, - 0x3d, 0x1c, 0x81, 0xdc, 0x76, 0xdc, 0x21, 0xeb, 0xbd, 0x2f, 0xb0, 0xde, 0xef, 0x68, 0x1f, 0xc0, - 0xc1, 0xed, 0x9f, 0xa1, 0x63, 0x14, 0xcf, 0x47, 0x60, 0x4f, 0xf7, 0x7e, 0xa3, 0xeb, 0x18, 0xee, - 0x84, 0x44, 0x9d, 0x38, 0x9b, 0x96, 0xac, 0xb9, 0x37, 0x77, 0xc9, 0xe4, 0x54, 0xdd, 0xee, 0x2b, - 0x81, 0xf2, 0x97, 0x82, 0xe8, 0x76, 0x4d, 0x03, 0x1f, 0x4d, 0xc7, 0x48, 0x1f, 0xe9, 0x83, 0xab, - 0xbb, 0x92, 0x77, 0x1d, 0xe8, 0x75, 0x00, 0x35, 0xb3, 0xd1, 0x72, 0x78, 0x5d, 0xe5, 0x69, 0x26, - 0xc5, 0x24, 0x6c, 0x09, 0xd3, 0x14, 0xd2, 0x72, 0x5c, 0x7d, 0x94, 0xe9, 0x81, 0x8b, 0x98, 0xc1, - 0x69, 0x6f, 0xa0, 0x31, 0x36, 0xd0, 0xfd, 0xdb, 0x3c, 0x69, 0x47, 0xc9, 0x3a, 0x02, 0xd9, 0xb2, - 0x51, 0x23, 0xa6, 0xa3, 0xd9, 0x4e, 0x93, 0xe8, 0xf5, 0x9a, 0x59, 0x65, 0x79, 0x34, 0x99, 0x8f, - 0x6f, 0xe8, 0x86, 0x4d, 0xd4, 0x21, 0xae, 0x2e, 0x49, 0x2d, 0x45, 0xb0, 0x62, 0xd1, 0xf4, 0x21, - 0x12, 0x01, 0x04, 0x57, 0xbb, 0x88, 0xf1, 0x3f, 0xf4, 0x43, 0xda, 0xd7, 0x9d, 0x29, 0x07, 0x61, - 0xe0, 0x82, 0x7e, 0x49, 0xd7, 0x64, 0xc7, 0xcd, 0x3d, 0x91, 0xa6, 0xb2, 0x15, 0xd1, 0x75, 0x1f, - 0x81, 0x51, 0x66, 0x82, 0xcf, 0x88, 0x37, 0x2a, 0x1b, 0xba, 0x6d, 0x33, 0xa7, 0x25, 0x99, 0xa9, - 0x42, 0x75, 0x45, 0xaa, 0x9a, 0x95, 0x1a, 0xe5, 0x04, 0x8c, 0x30, 0x44, 0x1d, 0x13, 0x6f, 0xad, - 0x61, 0x10, 0x8d, 0xee, 0x01, 0x6c, 0x96, 0x4f, 0xdd, 0x91, 0x0d, 0x53,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3, 0xb9, 0x0c, 0xf5, 0xbf, 0xa7, 0x3b, 0xee, 0xe9, 0x4e, 0xe4, 0x86, 0xe8, - 0xb1, 0xad, 0xa7, 0x3b, 0xa1, 0xdc, 0x0e, 0x69, 0x9c, 0x28, 0x4d, 0xbc, 0x69, 0x64, 0xaf, 0xb5, - 0xd3, 0x53, 0x30, 0x41, 0x23, 0x82, 0x4d, 0x2a, 0xda, 0x02, 0x1a, 0x88, 0x34, 0x35, 0x33, 0x00, - 0x6c, 0xfb, 0xaa, 0xb1, 0x9f, 0x65, 0xcd, 0xcc, 0xbd, 0xfa, 0xfa, 0xfe, 0xab, 0x7e, 0x87, 0x9f, - 0x3f, 0xe2, 0xe7, 0xb5, 0xd7, 0xf7, 0x47, 0xde, 0xc1, 0xcf, 0xbb, 0xf8, 0x79, 0xe8, 0x8d, 0xfd, - 0x91, 0x17, 0xf0, 0xf3, 0x12, 0x7e, 0x7e, 0x8e, 0x9f, 0x57, 0xdf, 0x40, 0x3b, 0xfc, 0xbc, 0x86, - 0xdf, 0xdf, 0xc2, 0xff, 0xef, 0xe0, 0xff, 0x77, 0xf1, 0xff, 0x43, 0x7f, 0xde, 0x1f, 0x59, 0x4f, - 0xb0, 0x30, 0x3a, 0xf6, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x2b, 0xe8, 0xe7, 0x0d, 0x2d, - 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Sub != that1.Sub { - return false - } - return true -} -func (this *SampleOneOf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") - } - } else if this.TestOneof == nil { - return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") - } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { - return err - } - return nil -} -func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - return nil -} -func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field3") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") - } - if this.Field3 != that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field4") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") - } - if this.Field4 != that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - return nil -} -func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field5") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") - } - if this.Field5 != that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - return nil -} -func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field6") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - return nil -} -func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field7") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - return nil -} -func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field8") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") - } - if this.Field8 != that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - return nil -} -func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field9") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") - } - if this.Field9 != that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - return nil -} -func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field10") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") - } - if this.Field10 != that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - return nil -} -func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field11") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") - } - if this.Field11 != that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - return nil -} -func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field12") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") - } - if this.Field12 != that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - return nil -} -func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field13") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - return nil -} -func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field14") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - return nil -} -func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_Field15") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - return nil -} -func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") - } - if !this.SubMessage.Equal(that1.SubMessage) { - return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) - } - return nil -} -func (this *SampleOneOf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.TestOneof == nil { - if this.TestOneof != nil { - return false - } - } else if this.TestOneof == nil { - return false - } else if !this.TestOneof.Equal(that1.TestOneof) { - return false - } - return true -} -func (this *SampleOneOf_Field1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - return true -} -func (this *SampleOneOf_Field2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != that1.Field2 { - return false - } - return true -} -func (this *SampleOneOf_Field3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field3 != that1.Field3 { - return false - } - return true -} -func (this *SampleOneOf_Field4) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field4 != that1.Field4 { - return false - } - return true -} -func (this *SampleOneOf_Field5) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field5 != that1.Field5 { - return false - } - return true -} -func (this *SampleOneOf_Field6) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field6 != that1.Field6 { - return false - } - return true -} -func (this *SampleOneOf_Field7) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field7 != that1.Field7 { - return false - } - return true -} -func (this *SampleOneOf_Field8) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field8 != that1.Field8 { - return false - } - return true -} -func (this *SampleOneOf_Field9) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field9 != that1.Field9 { - return false - } - return true -} -func (this *SampleOneOf_Field10) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field10 != that1.Field10 { - return false - } - return true -} -func (this *SampleOneOf_Field11) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field11 != that1.Field11 { - return false - } - return true -} -func (this *SampleOneOf_Field12) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field12 != that1.Field12 { - return false - } - return true -} -func (this *SampleOneOf_Field13) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field13 != that1.Field13 { - return false - } - return true -} -func (this *SampleOneOf_Field14) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field14 != that1.Field14 { - return false - } - return true -} -func (this *SampleOneOf_Field15) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - return true -} -func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SubMessage.Equal(that1.SubMessage) { - return false - } - return true -} -func (this *Subby) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&one.Subby{") - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 20) - s = append(s, "&one.SampleOneOf{") - if this.TestOneof != nil { - s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SampleOneOf_Field1) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field1{` + - `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field2) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field2{` + - `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field3) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field3{` + - `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field4) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field4{` + - `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field5) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field5{` + - `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field6) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field6{` + - `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field7) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field7{` + - `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field8) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field8{` + - `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field9) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field9{` + - `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field10) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field10{` + - `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field11) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field11{` + - `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field12) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field12{` + - `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field13) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field13{` + - `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field14) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field14{` + - `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") - return s -} -func (this *SampleOneOf_Field15) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_Field15{` + - `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") - return s -} -func (this *SampleOneOf_SubMessage) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + - `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") - return s -} -func valueToGoStringOne(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringOne(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = randStringOne(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { - this := &SampleOneOf{} - oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] - switch oneofNumber_TestOneof { - case 1: - this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) - case 2: - this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) - case 3: - this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) - case 4: - this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) - case 5: - this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) - case 6: - this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) - case 7: - this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) - case 8: - this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) - case 9: - this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) - case 10: - this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) - case 11: - this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) - case 12: - this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) - case 13: - this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) - case 14: - this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) - case 15: - this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) - case 16: - this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { - this := &SampleOneOf_Field1{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { - this := &SampleOneOf_Field2{} - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { - this := &SampleOneOf_Field3{} - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { - this := &SampleOneOf_Field4{} - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { - this := &SampleOneOf_Field5{} - this.Field5 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { - this := &SampleOneOf_Field6{} - this.Field6 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { - this := &SampleOneOf_Field7{} - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { - this := &SampleOneOf_Field8{} - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { - this := &SampleOneOf_Field9{} - this.Field9 = uint32(r.Uint32()) - return this -} -func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { - this := &SampleOneOf_Field10{} - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { - this := &SampleOneOf_Field11{} - this.Field11 = uint64(uint64(r.Uint32())) - return this -} -func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { - this := &SampleOneOf_Field12{} - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - return this -} -func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { - this := &SampleOneOf_Field13{} - this.Field13 = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { - this := &SampleOneOf_Field14{} - this.Field14 = randStringOne(r) - return this -} -func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { - this := &SampleOneOf_Field15{} - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - return this -} -func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { - this := &SampleOneOf_SubMessage{} - this.SubMessage = NewPopulatedSubby(r, easy) - return this -} - -type randyOne interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOne(r randyOne) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOne(r randyOne) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneOne(r) - } - return string(tmps) -} -func randUnrecognizedOne(r randyOne, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOne(data, r, fieldNumber, wire) - } - return data -} -func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOne(data, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - data = encodeVarintPopulateOne(data, uint64(v3)) - case 1: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOne(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOne(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOne(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOne(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *Subby) Size() (n int) { - var l int - _ = l - l = len(m.Sub) - if l > 0 { - n += 1 + l + sovOne(uint64(l)) - } - return n -} - -func (m *SampleOneOf) Size() (n int) { - var l int - _ = l - if m.TestOneof != nil { - n += m.TestOneof.Size() - } - return n -} - -func (m *SampleOneOf_Field1) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field2) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field3) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field3)) - return n -} -func (m *SampleOneOf_Field4) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field4)) - return n -} -func (m *SampleOneOf_Field5) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field5)) - return n -} -func (m *SampleOneOf_Field6) Size() (n int) { - var l int - _ = l - n += 1 + sovOne(uint64(m.Field6)) - return n -} -func (m *SampleOneOf_Field7) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field7)) - return n -} -func (m *SampleOneOf_Field8) Size() (n int) { - var l int - _ = l - n += 1 + sozOne(uint64(m.Field8)) - return n -} -func (m *SampleOneOf_Field9) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field10) Size() (n int) { - var l int - _ = l - n += 5 - return n -} -func (m *SampleOneOf_Field11) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field12) Size() (n int) { - var l int - _ = l - n += 9 - return n -} -func (m *SampleOneOf_Field13) Size() (n int) { - var l int - _ = l - n += 2 - return n -} -func (m *SampleOneOf_Field14) Size() (n int) { - var l int - _ = l - l = len(m.Field14) - n += 1 + l + sovOne(uint64(l)) - return n -} -func (m *SampleOneOf_Field15) Size() (n int) { - var l int - _ = l - if m.Field15 != nil { - l = len(m.Field15) - n += 1 + l + sovOne(uint64(l)) - } - return n -} -func (m *SampleOneOf_SubMessage) Size() (n int) { - var l int - _ = l - if m.SubMessage != nil { - l = m.SubMessage.Size() - n += 2 + l + sovOne(uint64(l)) - } - return n -} - -func sovOne(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOne(x uint64) (n int) { - return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Subby) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subby{`, - `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf{`, - `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field1{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field2) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field2{`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field3{`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field4) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field4{`, - `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field5) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field5{`, - `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field6) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field6{`, - `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field7) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field7{`, - `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field8) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field8{`, - `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field9) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field9{`, - `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field10) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field10{`, - `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field11) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field11{`, - `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field12) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field12{`, - `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field13) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field13{`, - `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field14) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field14{`, - `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_Field15) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_Field15{`, - `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, - `}`, - }, "") - return s -} -func (this *SampleOneOf_SubMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SampleOneOf_SubMessage{`, - `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringOne(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Subby) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subby: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sub = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SampleOneOf) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SampleOneOf: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field1{v} - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field2{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field3{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field4{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field5{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TestOneof = &SampleOneOf_Field6{v} - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.TestOneof = &SampleOneOf_Field7{v} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.TestOneof = &SampleOneOf_Field8{int64(v)} - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field9{v} - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.TestOneof = &SampleOneOf_Field10{v} - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field11{v} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.TestOneof = &SampleOneOf_Field12{v} - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.TestOneof = &SampleOneOf_Field13{b} - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, data[iNdEx:postIndex]) - m.TestOneof = &SampleOneOf_Field15{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOneUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Subby{} - if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - m.TestOneof = &SampleOneOf_SubMessage{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOneUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOneUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOneUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthOneUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOneUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOneUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeunmarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 387 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x6e, 0xdb, 0x30, - 0x10, 0x07, 0xf0, 0x28, 0x8a, 0xa5, 0x84, 0x72, 0x1a, 0x57, 0xd3, 0x35, 0x83, 0x50, 0x78, 0xea, - 0x12, 0x2b, 0xd6, 0x47, 0x3e, 0xd6, 0xa0, 0x28, 0xba, 0x14, 0x01, 0x92, 0x07, 0x08, 0xa4, 0x96, - 0x52, 0x02, 0x58, 0x62, 0x60, 0x49, 0x43, 0xb7, 0x3c, 0x4e, 0xc7, 0x8e, 0x7d, 0x04, 0x8f, 0x1d, - 0x3b, 0x74, 0xb0, 0xdd, 0xa5, 0xa3, 0x47, 0x8f, 0xf9, 0x9b, 0x02, 0x8e, 0xc3, 0x1f, 0x77, 0x87, - 0xdf, 0x69, 0xa0, 0x48, 0x31, 0xfe, 0xaa, 0xaa, 0x5c, 0x35, 0x61, 0x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 0x1d, 0x1a, 0x8b, 0x8d, 0x25, 0xf4, 0x66, 0xf7, 0xff, 0x8d, 0x25, 0xc6, 0x52, - 0x3a, 0x81, 0x0d, 0x8d, 0xa5, 0xfe, 0x99, 0xf0, 0x70, 0x51, 0x0f, 0x95, 0x6c, 0x9a, 0xac, 0x94, - 0x34, 0x82, 0x7b, 0x91, 0x98, 0xec, 0x5e, 0x84, 0xbe, 0x54, 0xec, 0x0a, 0x2c, 0x7c, 0xe9, 0xfd, - 0x66, 0x28, 0x44, 0x2b, 0x9b, 0xf6, 0x01, 0xae, 0x8a, 0x9b, 0x8f, 0x8b, 0x55, 0xb0, 0xf7, 0x1b, - 0xf9, 0x83, 0x2c, 0x57, 0x81, 0xb5, 0x41, 0xb6, 0xc8, 0xcb, 0x3a, 0xb0, 0x7e, 0x20, 0x3f, 0x91, - 0x5f, 0xc8, 0x62, 0x8d, 0x3d, 0x64, 0x89, 0xfe, 0x3f, 0xea, 0x06, 0x75, 0x8b, 0xfa, 0xf2, 0x2f, - 0xb0, 0x72, 0x47, 0x3f, 0xa3, 0xf8, 0x35, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xa6, 0x0e, 0x56, 0xa0, - 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto deleted file mode 100644 index a9e71137..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/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) = true; - -message Subby { - string sub = 1; -} - -message SampleOneOf { - oneof test_oneof { - double Field1 = 1; - float Field2 = 2; - int32 Field3 = 3; - int64 Field4 = 4; - uint32 Field5 = 5; - uint64 Field6 = 6; - sint32 Field7 = 7; - sint64 Field8 = 8; - fixed32 Field9 = 9; - sfixed32 Field10 = 10; - fixed64 Field11 = 11; - sfixed64 Field12 = 12; - bool Field13 = 13; - string Field14 = 14; - bytes Field15 = 15; - Subby sub_message = 16; - } -} - - diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go deleted file mode 100644 index e9203419..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/one.proto -// DO NOT EDIT! - -/* -Package one is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/one.proto - -It has these top-level messages: - Subby - SampleOneOf -*/ -package one - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSubbyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSampleOneOfJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubbyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubbyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSampleOneOfProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneDescription(t *testing.T) { - OneDescription() -} -func TestSubbyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSampleOneOfVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubbyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSampleOneOfSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubbyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSampleOneOfStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/doc.go b/vendor/github.com/gogo/protobuf/test/oneof3/doc.go deleted file mode 100644 index e668df5e..00000000 --- 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 2eca9a07..00000000 --- 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 c68629fa..00000000 --- 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 aa31425b..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go +++ /dev/null @@ -1,415 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: oneofembed.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - oneofembed.proto - -It has these top-level messages: - Foo - Bar -*/ -package proto - -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Foo) - if !ok { - that2, ok := that.(Foo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Bar.Equal(that1.Bar) { - return false - } - return true -} -func (this *Bar) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Bar) - if !ok { - that2, ok := that.(Bar) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Pick == nil { - if this.Pick != nil { - return false - } - } else if this.Pick == nil { - return false - } else if !this.Pick.Equal(that1.Pick) { - return false - } - return true -} -func (this *Bar_A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Bar_A) - if !ok { - that2, ok := that.(Bar_A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.A != that1.A { - return false - } - return true -} -func (this *Bar_B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Bar_B) - if !ok { - that2, ok := that.(Bar_B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.B != that1.B { - return false - } - return true -} -func NewPopulatedFoo(r randyOneofembed, easy bool) *Foo { - this := &Foo{} - if r.Intn(10) != 0 { - this.Bar = NewPopulatedBar(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBar(r randyOneofembed, easy bool) *Bar { - this := &Bar{} - oneofNumber_Pick := []int32{11, 12}[r.Intn(2)] - switch oneofNumber_Pick { - case 11: - this.Pick = NewPopulatedBar_A(r, easy) - case 12: - this.Pick = NewPopulatedBar_B(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBar_A(r randyOneofembed, easy bool) *Bar_A { - this := &Bar_A{} - this.A = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedBar_B(r randyOneofembed, easy bool) *Bar_B { - this := &Bar_B{} - this.B = bool(bool(r.Intn(2) == 0)) - return this -} - -type randyOneofembed interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOneofembed(r randyOneofembed) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOneofembed(r randyOneofembed) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneOneofembed(r) - } - return string(tmps) -} -func randUnrecognizedOneofembed(r randyOneofembed, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldOneofembed(data, r, fieldNumber, wire) - } - return data -} -func randFieldOneofembed(data []byte, r randyOneofembed, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - data = encodeVarintPopulateOneofembed(data, uint64(v2)) - case 1: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateOneofembed(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateOneofembed(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateOneofembed(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} - -func init() { proto1.RegisterFile("oneofembed.proto", fileDescriptorOneofembed) } - -var fileDescriptorOneofembed = []byte{ - // 167 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x81, 0x22, 0x42, 0x7c, 0x5c, 0x8c, 0x89, 0x12, 0xdc, - 0x40, 0x85, 0x1c, 0x1e, 0x0c, 0x41, 0x8c, 0x89, 0x20, 0x7e, 0x92, 0x04, 0x0f, 0x8c, 0x9f, 0xe4, - 0xc4, 0xc6, 0xc5, 0x52, 0x90, 0x99, 0x9c, 0xed, 0xc4, 0xf3, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, - 0x72, 0x8c, 0x3b, 0x80, 0x38, 0x89, 0x0d, 0x6c, 0xa4, 0x31, 0x20, 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 8c1ee383..00000000 --- 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 25ca293c..00000000 --- a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: oneofembed.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - oneofembed.proto - -It has these top-level messages: - Foo - Bar -*/ -package proto - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto1 "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestFooProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBarProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Bar{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFooJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBarJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Bar{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFooProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFooProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Foo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBarProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Bar{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBarProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Bar{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/packed/Makefile b/vendor/github.com/gogo/protobuf/test/packed/Makefile deleted file mode 100644 index 9d195810..00000000 --- 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 e20ab1e9..00000000 --- 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 b9b30b1b..00000000 --- a/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go +++ /dev/null @@ -1,3419 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: packed.proto -// DO NOT EDIT! - -/* - Package packed is a generated protocol buffer package. - - It is generated from these files: - packed.proto - - It has these top-level messages: - NinRepNative - NinRepPackedNative - NinRepNativeUnsafe - NinRepPackedNativeUnsafe -*/ -package packed - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - default: - iNdEx = preIndex - skippy, err := skipPacked(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPacked - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacked - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipPacked(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPacked(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthPacked - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacked - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPacked(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthPacked = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPacked = fmt.Errorf("proto: integer overflow") -) - -func (m *NinRepNativeUnsafe) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepNativeUnsafe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - default: - iNdEx = preIndex - skippy, err := skipPackedUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPackedUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinRepPackedNativeUnsafe) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinRepPackedNativeUnsafe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepPackedNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } - } else if wireType == 1 { - var v float64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field1 = append(m.Field1, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } - } else if wireType == 5 { - var v float32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field2 = append(m.Field2, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = append(m.Field4, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } - } else if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = append(m.Field5, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = append(m.Field6, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } - } else if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = append(m.Field7, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = append(m.Field8, int64(v)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } - } else if wireType == 5 { - var v uint32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - case 10: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } - } else if wireType == 5 { - var v int32 - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - v = *(*int32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - case 11: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } - } else if wireType == 1 { - var v uint64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - case 12: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } - } else if wireType == 1 { - var v int64 - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - v = *(*int64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - case 13: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPackedUnsafe - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } - } else if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = append(m.Field13, bool(v != 0)) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipPackedUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPackedUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPackedUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthPackedUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPackedUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPackedUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthPackedUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPackedUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("packed.proto", fileDescriptorPacked) } - -var fileDescriptorPacked = []byte{ - // 383 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x92, 0xbd, 0x4e, 0xc2, 0x50, - 0x14, 0xc7, 0xd3, 0x0f, 0x5a, 0xbc, 0x42, 0xc4, 0x0e, 0xe6, 0x84, 0x10, 0x35, 0x4c, 0x2e, 0x02, - 0x6d, 0xf9, 0x74, 0x64, 0x70, 0x24, 0x86, 0xc4, 0x07, 0xe0, 0xa3, 0x60, 0xa3, 0x52, 0xa2, 0xc5, - 0xc7, 0x30, 0x0e, 0xbe, 0x80, 0x6f, 0xe2, 0x43, 0x38, 0xb9, 0xf9, 0x16, 0x8e, 0x1e, 0x6e, 0x4f, - 0x4f, 0x2f, 0x38, 0x3a, 0xb8, 0xb0, 0x71, 0x7f, 0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0x95, - 0x9c, 0x85, 0xe2, 0x96, 0x37, 0xe3, 0xf6, 0xf5, 0x52, 0x16, 0xb8, 0xbc, 0x19, 0x58, 0x71, 0x1e, - 0x3b, 0x8a, 0xac, 0x38, 0x9f, 0x1d, 0x85, 0x56, 0x5c, 0x93, 0x1d, 0xc5, 0x56, 0x5c, 0x8b, 0x1d, - 0x05, 0x57, 0x5c, 0x9b, 0x1d, 0x45, 0x57, 0x5c, 0x87, 0x1d, 0x85, 0x57, 0x5c, 0x97, 0x1d, 0xc5, - 0x57, 0x5c, 0xcf, 0xa9, 0x6c, 0x0d, 0x20, 0x25, 0x8f, 0x50, 0xd9, 0x1a, 0x41, 0xb5, 0x6e, 0x66, - 0x69, 0x08, 0xd5, 0x7a, 0x99, 0xa5, 0x31, 0x54, 0x9b, 0x0e, 0xf2, 0xa9, 0xa7, 0x83, 0x24, 0x53, - 0x5c, 0x2f, 0x1e, 0x47, 0xb3, 0xdd, 0xb5, 0xff, 0xf9, 0xda, 0xdf, 0xd7, 0x71, 0x5f, 0x0d, 0x01, - 0xbf, 0xaf, 0x9d, 0x12, 0xef, 0x6e, 0xfe, 0x1f, 0x6e, 0x7e, 0x3d, 0x4b, 0xdf, 0xfc, 0xfe, 0x3a, - 0xd6, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x4d, 0xb0, 0xaa, 0x27, 0x06, 0x00, 0x00, -} 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 f37df6e3..00000000 --- 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 01ed36b2..00000000 --- a/vendor/github.com/gogo/protobuf/test/packed/packed_test.go +++ /dev/null @@ -1,323 +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" -) - -/* -https://github.com/gogo/protobuf/issues/detail?id=21 -https://developers.google.com/protocol-buffers/docs/proto#options -In 2.3.0 and later, this change is safe, as parsers for packable fields will always accept both formats, -*/ -func TestSafeIssue21(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - msg1 := NewPopulatedNinRepNative(popr, true) - data1, err := proto.Marshal(msg1) - if err != nil { - panic(err) - } - packedmsg := &NinRepPackedNative{} - err = proto.Unmarshal(data1, packedmsg) - if err != nil { - panic(err) - } - if len(packedmsg.XXX_unrecognized) != 0 { - t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") - } - if err := VerboseEqual(msg1, packedmsg); err != nil { - t.Fatalf("%v", err) - } -} - -func TestUnsafeIssue21(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - msg1 := NewPopulatedNinRepNativeUnsafe(popr, true) - data1, err := proto.Marshal(msg1) - if err != nil { - panic(err) - } - packedmsg := &NinRepPackedNativeUnsafe{} - err = proto.Unmarshal(data1, packedmsg) - if err != nil { - panic(err) - } - if len(packedmsg.XXX_unrecognized) != 0 { - t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") - } - if err := VerboseEqualUnsafe(msg1, packedmsg); err != nil { - t.Fatalf("%v", err) - } -} - -func VerboseEqual(this *NinRepNative, that *NinRepPackedNative) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } else if this == nil { - return fmt.Errorf("that != nil && this == nil") - } - - if len(this.Field1) != len(that.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) - } - } - if len(this.Field2) != len(that.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) - } - } - if len(this.Field3) != len(that.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) - } - } - if len(this.Field4) != len(that.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) - } - } - if len(this.Field5) != len(that.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) - } - } - if len(this.Field6) != len(that.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) - } - } - if len(this.Field7) != len(that.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) - } - } - if len(this.Field8) != len(that.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) - } - } - if len(this.Field9) != len(that.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) - } - } - if len(this.Field10) != len(that.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) - } - } - if len(this.Field11) != len(that.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) - } - } - if len(this.Field12) != len(that.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) - } - } - if len(this.Field13) != len(that.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) - } - return nil -} - -func VerboseEqualUnsafe(this *NinRepNativeUnsafe, that *NinRepPackedNativeUnsafe) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } else if this == nil { - return fmt.Errorf("that != nil && this == nil") - } - - if len(this.Field1) != len(that.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) - } - } - if len(this.Field2) != len(that.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) - } - } - if len(this.Field3) != len(that.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) - } - } - if len(this.Field4) != len(that.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) - } - } - if len(this.Field5) != len(that.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) - } - } - if len(this.Field6) != len(that.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) - } - } - if len(this.Field7) != len(that.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) - } - } - if len(this.Field8) != len(that.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) - } - } - if len(this.Field9) != len(that.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) - } - } - if len(this.Field10) != len(that.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) - } - } - if len(this.Field11) != len(that.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) - } - } - if len(this.Field12) != len(that.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) - } - } - if len(this.Field13) != len(that.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) - } - return nil -} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/Makefile b/vendor/github.com/gogo/protobuf/test/protosize/Makefile deleted file mode 100644 index dea154ae..00000000 --- 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 e5dc7213..00000000 --- a/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go +++ /dev/null @@ -1,620 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: protosize.proto -// DO NOT EDIT! - -/* - 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" json:"Equal,omitempty"` - String_ *string `protobuf:"bytes,4,opt,name=String,json=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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SizeMessage) - if !ok { - that2, ok := that.(SizeMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Size != nil && that1.Size != nil { - if *this.Size != *that1.Size { - return false - } - } else if this.Size != nil { - return false - } else if that1.Size != nil { - return false - } - if this.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 encodeFixed64Protosize(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 encodeFixed32Protosize(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 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 := 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{ - // 177 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x81, - 0xda, 0x7c, 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, 0xa0, 0x0c, 0x47, 0x10, 0x6b, 0x2a, 0x88, 0x23, 0x24, 0xc6, 0xc5, 0x16, 0x5c, 0x52, - 0x94, 0x99, 0x97, 0x2e, 0xc1, 0x02, 0x14, 0xe6, 0x0c, 0x62, 0x2b, 0x06, 0xf3, 0x9c, 0x24, 0x7e, - 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0x07, 0x10, 0x9f, 0x00, 0xe2, 0x0b, 0x40, 0xbc, - 0xe0, 0xb1, 0x1c, 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x5d, 0x65, 0x12, 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 f2d10c1c..00000000 --- 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 1a6d4676..00000000 --- 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 175b8406..00000000 --- a/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: protosize.proto -// DO NOT EDIT! - -/* -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 math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSizeMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSizeMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - size := p.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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSizeMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageProtoSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.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 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/required/Makefile b/vendor/github.com/gogo/protobuf/test/required/Makefile deleted file mode 100644 index 34e6f70c..00000000 --- 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 b3b6dc2d..00000000 --- a/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go +++ /dev/null @@ -1,2215 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: requiredexample.proto -// DO NOT EDIT! - -/* - Package required is a generated protocol buffer package. - - It is generated from these files: - requiredexample.proto - - It has these top-level messages: - RequiredExample - NidOptNative - NinOptNative - NestedNinOptNative -*/ -package required - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,req,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,req,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,req,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,req,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,req,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,req,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,req,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,req,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,req,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,req,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,req,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,req,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,req,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,req,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,req,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,req,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,req,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,req,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,req,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,req,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,req,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,req,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,req,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,req,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,req,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,req,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,req,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,req,name=Field15,json=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" 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, github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") - } else { - data[i] = 0xa - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheRequiredString))) - i += copy(data[i:], *m.TheRequiredString) - } - if m.TheOptionalString != nil { - data[i] = 0x12 - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheOptionalString))) - i += copy(data[i:], *m.TheOptionalString) - } - if len(m.TheRepeatedStrings) > 0 { - for _, s := range m.TheRepeatedStrings { - data[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NidOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x9 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(float64(m.Field1)))) - data[i] = 0x15 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(float32(m.Field2)))) - data[i] = 0x18 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field3)) - data[i] = 0x20 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field4)) - data[i] = 0x28 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field5)) - data[i] = 0x30 - i++ - i = encodeVarintRequiredexample(data, i, uint64(m.Field6)) - data[i] = 0x38 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) - data[i] = 0x40 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) - data[i] = 0x4d - i++ - i = encodeFixed32Requiredexample(data, i, uint32(m.Field9)) - data[i] = 0x55 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(m.Field10)) - data[i] = 0x59 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(m.Field11)) - data[i] = 0x61 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(m.Field12)) - data[i] = 0x68 - i++ - if m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x72 - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(m.Field14))) - i += copy(data[i:], m.Field14) - if m.Field15 != nil { - data[i] = 0x7a - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") - } else { - data[i] = 0x9 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(float64(*m.Field1)))) - } - if m.Field2 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") - } else { - data[i] = 0x15 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(float32(*m.Field2)))) - } - if m.Field3 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") - } else { - data[i] = 0x18 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field3)) - } - if m.Field4 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") - } else { - data[i] = 0x20 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field4)) - } - if m.Field5 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") - } else { - data[i] = 0x28 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field5)) - } - if m.Field6 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") - } else { - data[i] = 0x30 - i++ - i = encodeVarintRequiredexample(data, i, uint64(*m.Field6)) - } - if m.Field7 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") - } else { - data[i] = 0x38 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) - } - if m.Field8 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") - } else { - data[i] = 0x40 - i++ - i = encodeVarintRequiredexample(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) - } - if m.Field9 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") - } else { - data[i] = 0x4d - i++ - i = encodeFixed32Requiredexample(data, i, uint32(*m.Field9)) - } - if m.Field10 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") - } else { - data[i] = 0x55 - i++ - i = encodeFixed32Requiredexample(data, i, uint32(*m.Field10)) - } - if m.Field11 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") - } else { - data[i] = 0x59 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(*m.Field11)) - } - if m.Field12 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") - } else { - data[i] = 0x61 - i++ - i = encodeFixed64Requiredexample(data, i, uint64(*m.Field12)) - } - if m.Field13 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") - } else { - data[i] = 0x68 - i++ - if *m.Field13 { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Field14 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") - } else { - data[i] = 0x72 - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(*m.Field14))) - i += copy(data[i:], *m.Field14) - } - if m.Field15 == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") - } else { - data[i] = 0x7a - i++ - i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15))) - i += copy(data[i:], m.Field15) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NestedNinOptNative) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *NestedNinOptNative) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NestedNinOpts) > 0 { - for _, msg := range m.NestedNinOpts { - data[i] = 0xa - i++ - i = encodeVarintRequiredexample(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Requiredexample(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Requiredexample(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintRequiredexample(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedRequiredExample(r randyRequiredexample, easy bool) *RequiredExample { - this := &RequiredExample{} - v1 := randStringRequiredexample(r) - this.TheRequiredString = &v1 - if r.Intn(10) != 0 { - v2 := randStringRequiredexample(r) - this.TheOptionalString = &v2 - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.TheRepeatedStrings = make([]string, v3) - for i := 0; i < v3; i++ { - this.TheRepeatedStrings[i] = randStringRequiredexample(r) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 4) - } - return this -} - -func NewPopulatedNidOptNative(r randyRequiredexample, easy bool) *NidOptNative { - this := &NidOptNative{} - this.Field1 = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Field1 *= -1 - } - this.Field2 = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Field2 *= -1 - } - this.Field3 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field3 *= -1 - } - this.Field4 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field4 *= -1 - } - this.Field5 = uint32(r.Uint32()) - this.Field6 = uint64(uint64(r.Uint32())) - this.Field7 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field7 *= -1 - } - this.Field8 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field8 *= -1 - } - this.Field9 = uint32(r.Uint32()) - this.Field10 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Field10 *= -1 - } - this.Field11 = uint64(uint64(r.Uint32())) - this.Field12 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Field12 *= -1 - } - this.Field13 = bool(bool(r.Intn(2) == 0)) - this.Field14 = randStringRequiredexample(r) - v4 := r.Intn(100) - this.Field15 = make([]byte, v4) - for i := 0; i < v4; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyRequiredexample, easy bool) *NinOptNative { - this := &NinOptNative{} - v5 := float64(r.Float64()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field1 = &v5 - v6 := float32(r.Float32()) - if r.Intn(2) == 0 { - v6 *= -1 - } - this.Field2 = &v6 - v7 := int32(r.Int31()) - if r.Intn(2) == 0 { - v7 *= -1 - } - this.Field3 = &v7 - v8 := int64(r.Int63()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field4 = &v8 - v9 := uint32(r.Uint32()) - this.Field5 = &v9 - v10 := uint64(uint64(r.Uint32())) - this.Field6 = &v10 - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field7 = &v11 - v12 := int64(r.Int63()) - if r.Intn(2) == 0 { - v12 *= -1 - } - this.Field8 = &v12 - v13 := uint32(r.Uint32()) - this.Field9 = &v13 - v14 := int32(r.Int31()) - if r.Intn(2) == 0 { - v14 *= -1 - } - this.Field10 = &v14 - v15 := uint64(uint64(r.Uint32())) - this.Field11 = &v15 - v16 := int64(r.Int63()) - if r.Intn(2) == 0 { - v16 *= -1 - } - this.Field12 = &v16 - v17 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v17 - v18 := randStringRequiredexample(r) - this.Field14 = &v18 - v19 := r.Intn(100) - this.Field15 = make([]byte, v19) - for i := 0; i < v19; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) - } - return this -} - -func NewPopulatedNestedNinOptNative(r randyRequiredexample, easy bool) *NestedNinOptNative { - this := &NestedNinOptNative{} - if r.Intn(10) != 0 { - v20 := r.Intn(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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NidOptNative) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field1 = float64(math.Float64frombits(v)) - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field2 = float32(math.Float32frombits(v)) - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - m.Field3 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field3 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000004) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - m.Field4 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field4 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000008) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - m.Field5 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field5 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000010) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - m.Field6 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Field6 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000020) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = v - hasFields[0] |= uint64(0x00000040) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Field8 = int64(v) - hasFields[0] |= uint64(0x00000080) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - m.Field9 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field9 = uint32(data[iNdEx-4]) - m.Field9 |= uint32(data[iNdEx-3]) << 8 - m.Field9 |= uint32(data[iNdEx-2]) << 16 - m.Field9 |= uint32(data[iNdEx-1]) << 24 - hasFields[0] |= uint64(0x00000100) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - m.Field10 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Field10 = int32(data[iNdEx-4]) - m.Field10 |= int32(data[iNdEx-3]) << 8 - m.Field10 |= int32(data[iNdEx-2]) << 16 - m.Field10 |= int32(data[iNdEx-1]) << 24 - hasFields[0] |= uint64(0x00000200) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - m.Field11 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field11 = uint64(data[iNdEx-8]) - m.Field11 |= uint64(data[iNdEx-7]) << 8 - m.Field11 |= uint64(data[iNdEx-6]) << 16 - m.Field11 |= uint64(data[iNdEx-5]) << 24 - m.Field11 |= uint64(data[iNdEx-4]) << 32 - m.Field11 |= uint64(data[iNdEx-3]) << 40 - m.Field11 |= uint64(data[iNdEx-2]) << 48 - m.Field11 |= uint64(data[iNdEx-1]) << 56 - hasFields[0] |= uint64(0x00000400) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - m.Field12 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Field12 = int64(data[iNdEx-8]) - m.Field12 |= int64(data[iNdEx-7]) << 8 - m.Field12 |= int64(data[iNdEx-6]) << 16 - m.Field12 |= int64(data[iNdEx-5]) << 24 - m.Field12 |= int64(data[iNdEx-4]) << 32 - m.Field12 |= int64(data[iNdEx-3]) << 40 - m.Field12 |= int64(data[iNdEx-2]) << 48 - m.Field12 |= int64(data[iNdEx-1]) << 56 - hasFields[0] |= uint64(0x00000800) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field13 = bool(v != 0) - hasFields[0] |= uint64(0x00001000) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field14 = string(data[iNdEx:postIndex]) - iNdEx = postIndex - hasFields[0] |= uint64(0x00002000) - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") - } - if hasFields[0]&uint64(0x00000010) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") - } - if hasFields[0]&uint64(0x00000020) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") - } - if hasFields[0]&uint64(0x00000040) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") - } - if hasFields[0]&uint64(0x00000080) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") - } - if hasFields[0]&uint64(0x00000100) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") - } - if hasFields[0]&uint64(0x00000200) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") - } - if hasFields[0]&uint64(0x00000400) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") - } - if hasFields[0]&uint64(0x00000800) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") - } - if hasFields[0]&uint64(0x00001000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") - } - if hasFields[0]&uint64(0x00002000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") - } - if hasFields[0]&uint64(0x00004000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NinOptNative) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field1 = &v2 - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field2 = &v2 - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - hasFields[0] |= uint64(0x00000004) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field4 = &v - hasFields[0] |= uint64(0x00000008) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field5 = &v - hasFields[0] |= uint64(0x00000010) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - hasFields[0] |= uint64(0x00000020) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Field7 = &v - hasFields[0] |= uint64(0x00000040) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.Field8 = &v2 - hasFields[0] |= uint64(0x00000080) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Field9 = &v - hasFields[0] |= uint64(0x00000100) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) - } - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = int32(data[iNdEx-4]) - v |= int32(data[iNdEx-3]) << 8 - v |= int32(data[iNdEx-2]) << 16 - v |= int32(data[iNdEx-1]) << 24 - m.Field10 = &v - hasFields[0] |= uint64(0x00000200) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.Field11 = &v - hasFields[0] |= uint64(0x00000400) - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = int64(data[iNdEx-8]) - v |= int64(data[iNdEx-7]) << 8 - v |= int64(data[iNdEx-6]) << 16 - v |= int64(data[iNdEx-5]) << 24 - v |= int64(data[iNdEx-4]) << 32 - v |= int64(data[iNdEx-3]) << 40 - v |= int64(data[iNdEx-2]) << 48 - v |= int64(data[iNdEx-1]) << 56 - m.Field12 = &v - hasFields[0] |= uint64(0x00000800) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Field13 = &b - hasFields[0] |= uint64(0x00001000) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field14 = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00002000) - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field15 = append(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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") - } - if hasFields[0]&uint64(0x00000010) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") - } - if hasFields[0]&uint64(0x00000020) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") - } - if hasFields[0]&uint64(0x00000040) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") - } - if hasFields[0]&uint64(0x00000080) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") - } - if hasFields[0]&uint64(0x00000100) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") - } - if hasFields[0]&uint64(0x00000200) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") - } - if hasFields[0]&uint64(0x00000400) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") - } - if hasFields[0]&uint64(0x00000800) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") - } - if hasFields[0]&uint64(0x00001000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") - } - if hasFields[0]&uint64(0x00002000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") - } - if hasFields[0]&uint64(0x00004000) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NestedNinOptNative) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NestedNinOptNative: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedNinOpts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRequiredexample - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NestedNinOpts = append(m.NestedNinOpts, &NinOptNative{}) - if err := m.NestedNinOpts[len(m.NestedNinOpts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRequiredexample(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRequiredexample(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthRequiredexample - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRequiredexample - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRequiredexample(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthRequiredexample = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRequiredexample = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("requiredexample.proto", fileDescriptorRequiredexample) } - -var fileDescriptorRequiredexample = []byte{ - // 467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0xd4, 0x4d, 0x6e, 0xd3, 0x40, - 0x14, 0xc0, 0x71, 0x6c, 0xa7, 0x49, 0x3a, 0x4d, 0x48, 0x3b, 0x12, 0xa3, 0x27, 0x84, 0x42, 0x94, - 0x55, 0x16, 0xe0, 0x36, 0x4e, 0xd2, 0x0f, 0x89, 0x55, 0x25, 0x58, 0x06, 0xc9, 0x9c, 0x20, 0x25, - 0x53, 0xd7, 0x52, 0x6a, 0x1b, 0xc7, 0x41, 0xac, 0xb9, 0x07, 0xf7, 0xe9, 0x92, 0x03, 0x20, 0x04, - 0x9c, 0x82, 0x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7e, 0xfd, 0xaa, 0xf1, - 0xf7, 0xc7, 0xc3, 0x7e, 0xb2, 0x3f, 0x7c, 0x7d, 0xfc, 0xfb, 0xe7, 0xd0, 0x79, 0xf8, 0x35, 0x74, - 0xbe, 0xe2, 0xf1, 0x03, 0x8f, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x53, 0xd6, 0x6e, 0xf7, 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 33215936..00000000 --- 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 b9c26375..00000000 --- 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/sizeunderscore/Makefile b/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile deleted file mode 100644 index fca7b2af..00000000 --- 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 b79ecebd..00000000 --- a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go +++ /dev/null @@ -1,567 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: sizeunderscore.proto -// DO NOT EDIT! - -/* - Package sizeunderscore is a generated protocol buffer package. - - It is generated from these files: - sizeunderscore.proto - - It has these top-level messages: - SizeMessage -*/ -package sizeunderscore - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Equal,omitempty"` - String_ *string `protobuf:"bytes,3,opt,name=String,json=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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SizeMessage) - if !ok { - that2, ok := that.(SizeMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Size_ != nil && that1.Size_ != nil { - if *this.Size_ != *that1.Size_ { - return false - } - } else if this.Size_ != nil { - return false - } else if that1.Size_ != nil { - return false - } - if this.Equal_ != nil && that1.Equal_ != nil { - if *this.Equal_ != *that1.Equal_ { - return false - } - } else if this.Equal_ != nil { - return false - } else if that1.Equal_ != nil { - return false - } - if this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return false - } - } else if this.String_ != nil { - return false - } else if that1.String_ != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *SizeMessage) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SizeMessage) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Size_ != nil { - data[i] = 0x8 - i++ - i = encodeVarintSizeunderscore(data, i, uint64(*m.Size_)) - } - if m.Equal_ != nil { - data[i] = 0x10 - i++ - if *m.Equal_ { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.String_ != nil { - data[i] = 0x1a - i++ - i = encodeVarintSizeunderscore(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Sizeunderscore(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Sizeunderscore(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintSizeunderscore(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedSizeMessage(r randySizeunderscore, easy bool) *SizeMessage { - this := &SizeMessage{} - if r.Intn(10) != 0 { - v1 := int64(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Size_ = &v1 - } - if r.Intn(10) != 0 { - v2 := bool(bool(r.Intn(2) == 0)) - this.Equal_ = &v2 - } - if r.Intn(10) != 0 { - v3 := randStringSizeunderscore(r) - this.String_ = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedSizeunderscore(r, 4) - } - return this -} - -type randySizeunderscore interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneSizeunderscore(r randySizeunderscore) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringSizeunderscore(r randySizeunderscore) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneSizeunderscore(r) - } - return string(tmps) -} -func randUnrecognizedSizeunderscore(r randySizeunderscore, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldSizeunderscore(data, r, fieldNumber, wire) - } - return data -} -func randFieldSizeunderscore(data []byte, r randySizeunderscore, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateSizeunderscore(data, uint64(v5)) - case 1: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateSizeunderscore(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateSizeunderscore(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateSizeunderscore(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (m *SizeMessage) Size() (n int) { - var l int - _ = l - if m.Size_ != nil { - n += 1 + sovSizeunderscore(uint64(*m.Size_)) - } - if m.Equal_ != nil { - n += 2 - } - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovSizeunderscore(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovSizeunderscore(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozSizeunderscore(x uint64) (n int) { - return sovSizeunderscore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SizeMessage) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SizeMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SizeMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Size_ = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Equal_ = &b - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSizeunderscore - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSizeunderscore(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSizeunderscore - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSizeunderscore(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthSizeunderscore - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSizeunderscore - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipSizeunderscore(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthSizeunderscore = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSizeunderscore = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("sizeunderscore.proto", fileDescriptorSizeunderscore) } - -var fileDescriptorSizeunderscore = []byte{ - // 169 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x18, 0x68, 0x80, 0x6f, 0x6a, 0x71, 0x71, 0x62, 0x7a, - 0xaa, 0x90, 0x10, 0x17, 0x0b, 0xc8, 0x3c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x30, 0x5b, - 0x48, 0x84, 0x8b, 0xd5, 0xb5, 0xb0, 0x34, 0x31, 0x47, 0x82, 0x09, 0x28, 0xc8, 0x11, 0xc4, 0x9a, - 0x0a, 0xe2, 0x08, 0x89, 0x71, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x03, 0x85, - 0x39, 0x83, 0xd8, 0x8a, 0xc1, 0x3c, 0x27, 0x89, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, - 0xdc, 0x01, 0xc4, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0x62, 0x40, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x63, 0xb6, 0xaa, 0x05, 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 922f5322..00000000 --- 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 06916fa1..00000000 --- a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: sizeunderscore.proto -// DO NOT EDIT! - -/* -Package sizeunderscore is a generated protocol buffer package. - -It is generated from these files: - sizeunderscore.proto - -It has these top-level messages: - SizeMessage -*/ -package sizeunderscore - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSizeMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSizeMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSizeMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &SizeMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSizeMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/tags/Makefile b/vendor/github.com/gogo/protobuf/test/tags/Makefile deleted file mode 100644 index e1105dc5..00000000 --- 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 2eee9618..00000000 --- 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 fa9cfd7a..00000000 --- a/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: tags.proto -// DO NOT EDIT! - -/* -Package tags is a generated protocol buffer package. - -It is generated from these files: - tags.proto - -It has these top-level messages: - Outside - Inside -*/ -package tags - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,json=inside,embedded=Inside" json:""` - Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=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=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 := randStringTags(r) - this.Field2 = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTags(r, 3) - } - return this -} - -func NewPopulatedInside(r randyTags, easy bool) *Inside { - this := &Inside{} - if r.Intn(10) != 0 { - v2 := randStringTags(r) - this.Field1 = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTags(r, 2) - } - return this -} - -type randyTags interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTags(r randyTags) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTags(r randyTags) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneTags(r) - } - return string(tmps) -} -func randUnrecognizedTags(r randyTags, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldTags(data, r, fieldNumber, wire) - } - return data -} -func randFieldTags(data []byte, r randyTags, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateTags(data, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - data = encodeVarintPopulateTags(data, uint64(v4)) - case 1: - data = encodeVarintPopulateTags(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateTags(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateTags(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateTags(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateTags(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} - -func init() { proto.RegisterFile("tags.proto", fileDescriptorTags) } - -var fileDescriptorTags = []byte{ - // 202 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0xc4, 0x96, 0x09, 0x16, 0x11, 0x32, 0xe3, 0x62, 0x73, 0xcb, 0x4c, 0xcd, 0x49, - 0x31, 0x92, 0x60, 0x02, 0xaa, 0xe7, 0x74, 0x92, 0x03, 0xca, 0x72, 0xf8, 0x56, 0x42, 0xc4, 0x3e, - 0xdd, 0x93, 0xe7, 0xab, 0xc8, 0xcd, 0xb1, 0x52, 0xd2, 0x01, 0x3a, 0x24, 0x37, 0x35, 0xaf, 0x44, - 0x29, 0x88, 0x2d, 0x0d, 0x2c, 0xa3, 0xe4, 0x08, 0xb3, 0x47, 0xc8, 0x1c, 0x6a, 0x82, 0x21, 0xd8, - 0x46, 0x4e, 0x27, 0x79, 0x24, 0x13, 0x0c, 0x81, 0x26, 0xf0, 0x43, 0x4d, 0xc8, 0x48, 0x2c, 0x4a, - 0x49, 0x2c, 0x49, 0x84, 0x19, 0x61, 0xe8, 0xc4, 0xf2, 0xe3, 0xa1, 0x1c, 0x23, 0x20, 0x00, 0x00, - 0xff, 0xff, 0xd1, 0x94, 0x7c, 0x45, 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 f4ef2a68..00000000 --- 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 460273e4..00000000 --- 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 6520ec83..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/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: - cp header.proto theproto3.proto - cat maps.proto >> theproto3.proto - cat footer.proto >> theproto3.proto - go install github.com/gogo/protobuf/protoc-gen-combo - protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. theproto3.proto - 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 5b87ea9a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go +++ /dev/null @@ -1,125 +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) - } - } -} 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 e004dc5b..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go +++ /dev/null @@ -1,10831 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/both/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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} -} - -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.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7445 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, - 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, - 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89, - 0x5e, 0xb9, 0x92, 0xfc, 0x88, 0x17, 0x4b, 0x50, 0xe4, 0x95, 0x44, 0x9b, 0xba, 0xd4, 0xf2, 0x92, - 0xb6, 0x27, 0x7f, 0x2c, 0xb2, 0xc9, 0x6e, 0x36, 0xd9, 0xc5, 0xee, 0xb6, 0x4d, 0x8b, 0xe6, 0x1d, - 0x3b, 0x45, 0x1a, 0x27, 0x7d, 0x25, 0x69, 0x1a, 0x14, 0x41, 0xdb, 0xb8, 0x28, 0x92, 0x4e, 0xff, - 0x29, 0xdc, 0xf4, 0x9f, 0xa2, 0x28, 0x8c, 0xbc, 0x80, 0xa6, 0x6d, 0xda, 0x26, 0x80, 0x81, 0x04, - 0x48, 0xfe, 0xe8, 0x79, 0xdf, 0x73, 0x0e, 0xef, 0xe5, 0xa5, 0x66, 0xec, 0x38, 0x7f, 0xd8, 0x00, - 0x47, 0xbc, 0xe7, 0x7c, 0xbf, 0xef, 0x7c, 0xe7, 0x7b, 0x9d, 0xef, 0x9e, 0x73, 0x79, 0x0d, 0x7f, - 0x71, 0x1e, 0x4e, 0xed, 0x36, 0x9b, 0xbb, 0x0d, 0xfb, 0xdc, 0x41, 0xab, 0xd9, 0x6e, 0x6e, 0x77, - 0x76, 0xce, 0xd5, 0x6c, 0xb7, 0xda, 0xaa, 0x1f, 0xb4, 0x9b, 0xad, 0x69, 0xd2, 0x66, 0x8e, 0x50, - 0x8a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- 0xa8, 0x68, 0xa0, 0xd2, 0x74, 0x49, 0xfa, 0xa1, 0x28, 0x1c, 0xf3, 0x65, 0xee, 0x2b, 0xe8, 0x9d, - 0x00, 0x75, 0xe7, 0xa0, 0xd3, 0xa6, 0xeb, 0x2a, 0x4d, 0x33, 0x43, 0xa4, 0x85, 0x84, 0x30, 0x4e, - 0x21, 0x9d, 0xb6, 0xe8, 0x37, 0x48, 0x3f, 0xd0, 0x26, 0x42, 0x70, 0xc5, 0x13, 0x34, 0x46, 0x04, - 0x3d, 0x11, 0x30, 0xd3, 0xae, 0x25, 0x6b, 0x06, 0x32, 0xd5, 0x46, 0xdd, 0x76, 0xda, 0x65, 0xb7, - 0xdd, 0xb2, 0x2b, 0xfb, 0x75, 0x67, 0x97, 0xe4, 0xd1, 0x44, 0x3e, 0xbe, 0x53, 0x69, 0xb8, 0xb6, - 0x35, 0x42, 0xbb, 0x37, 0x78, 0x2f, 0x46, 0x90, 0xc5, 0xa2, 0x25, 0x21, 0x06, 0x14, 0x04, 0xed, - 0x16, 0x88, 0xdc, 0xb7, 0x06, 0x21, 0x29, 0x55, 0x67, 0xe6, 0x69, 0x48, 0x3d, 0x53, 0x79, 0xae, - 0x52, 0xe6, 0x15, 0x37, 0xd5, 0x44, 0x12, 0xb7, 0xad, 0xb3, 0xaa, 0x7b, 0x06, 0xc6, 0x08, 0x09, - 0x9a, 0x23, 0x1a, 0xa8, 0xda, 0xa8, 0xb8, 0x2e, 0x51, 0x5a, 0x82, 0x90, 0x9a, 0xb8, 0x6f, 0x0d, - 0x77, 0x15, 0x79, 0x8f, 0x79, 0x11, 0x8e, 0x12, 0xc4, 0x3e, 0x4a, 0xbc, 0xf5, 0x83, 0x86, 0x5d, - 0xc6, 0xf7, 0x00, 0x2e, 0xc9, 0xa7, 0x42, 0xb2, 0x51, 0x4c, 0xb1, 0xc2, 0x08, 0xb0, 0x44, 0xae, - 0x79, 0x15, 0xee, 0x24, 0xb0, 0x5d, 0xdb, 0xb1, 0x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x8e, 0x78, 0xed, 0xf4, 0xf6, 0xf8, 0x3e, 0x30, 0x0f, 0x9a, 0x6e, 0xbd, 0x5d, 0x7f, 0x0e, - 0x6f, 0xcf, 0xf1, 0x1b, 0x69, 0x5c, 0xc5, 0xc6, 0xac, 0x0c, 0xef, 0x59, 0x72, 0xda, 0x82, 0xda, - 0xb1, 0x77, 0x2b, 0x1a, 0x35, 0x4e, 0x43, 0x86, 0x95, 0xe1, 0x3d, 0x82, 0x1a, 0x15, 0x9a, 0xb5, - 0x66, 0x07, 0x17, 0x04, 0x94, 0x0e, 0x67, 0xbd, 0x88, 0x95, 0xa4, 0x6d, 0x82, 0x84, 0x55, 0x6c, - 0xde, 0x1d, 0x7c, 0xca, 0x4a, 0xd2, 0x36, 0x4a, 0x72, 0x0f, 0x8c, 0x54, 0x76, 0x77, 0x5b, 0x98, - 0x39, 0x67, 0x44, 0xcb, 0xd0, 0xb4, 0x68, 0x26, 0x84, 0x13, 0xd7, 0x20, 0xc1, 0xf5, 0x80, 0x17, - 0x16, 0xac, 0x09, 0xb4, 0xe6, 0x93, 0x7d, 0x94, 0x28, 0xbe, 0xa9, 0x77, 0x78, 0x27, 0x1a, 0xb4, - 0xee, 0x96, 0xbd, 0x0d, 0xbd, 0x28, 0xea, 0x4f, 0x58, 0xc9, 0xba, 0x2b, 0x76, 0x70, 0x72, 0x9f, - 0x43, 0xcb, 0xab, 0xba, 0x21, 0x69, 0x2e, 0x40, 0xa2, 0xd1, 0x44, 0xfe, 0x81, 0x11, 0x74, 0x37, - 0x7c, 0x32, 0x64, 0x0f, 0x73, 0x7a, 0x99, 0xd1, 0x5b, 0x02, 0x39, 0xf1, 0xd7, 0x11, 0x48, 0xf0, - 0x66, 0xb4, 0x50, 0xc4, 0x0e, 0x2a, 0xed, 0x3d, 0xc2, 0x2e, 0x5e, 0x88, 0x66, 0x22, 0x16, 0xb9, - 0xc6, 0xed, 0xa8, 0x9a, 0x71, 0x88, 0x0b, 0xb0, 0x76, 0x7c,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 0x6a, 0xff, 0xac, 0xd7, 0x7f, 0x21, 0x3b, 0x8c, 0x63, 0x5b, 0xed, 0xbf, 0xe0, - 0xf5, 0xcf, 0x65, 0xd3, 0xd8, 0x9d, 0xd4, 0xfe, 0x39, 0xaf, 0xff, 0x62, 0x76, 0x04, 0x6f, 0xf5, - 0xaa, 0xfd, 0x17, 0x73, 0xef, 0x23, 0xe6, 0x75, 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0x15, 0x86, 0x1d, - 0x57, 0x0d, 0x2b, 0x4c, 0x3a, 0xae, 0x9a, 0x54, 0x18, 0x73, 0x5c, 0x35, 0xa6, 0x30, 0xe3, 0xb8, - 0x6a, 0x46, 0x61, 0xc0, 0x71, 0xd5, 0x80, 0xc2, 0x74, 0xe3, 0xaa, 0xe9, 0x84, 0xd1, 0xc6, 0x55, - 0xa3, 0x09, 0x73, 0x8d, 0xab, 0xe6, 0x12, 0x86, 0xca, 0x6a, 0x86, 0xf2, 0x4c, 0x94, 0xd5, 0x4c, - 0xe4, 0x19, 0x27, 0xab, 0x19, 0xc7, 0x33, 0x4b, 0x56, 0x33, 0x8b, 0x67, 0x90, 0xac, 0x66, 0x10, - 0xcf, 0x14, 0x59, 0xcd, 0x14, 0x9e, 0x11, 0x58, 0x8c, 0x59, 0xf6, 0x81, 0x4f, 0x8c, 0x19, 0x3d, - 0x63, 0xcc, 0xe8, 0x19, 0x63, 0x46, 0xcf, 0x18, 0x33, 0x7a, 0xc6, 0x98, 0xd1, 0x33, 0xc6, 0x8c, - 0x9e, 0x31, 0x66, 0xf4, 0x8c, 0x31, 0xa3, 0x67, 0x8c, 0x19, 0xbd, 0x63, 0xcc, 0x08, 0x89, 0x31, - 0x23, 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, - 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, - 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, - 0x8a, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, - 0x30, 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xc4, 0x00, 0x93, 0xc6, 0xd8, 0x3a, 0x79, 0x38, 0x80, 0x99, - 0xe2, 0x84, 0x16, 0x69, 0x03, 0xd8, 0x74, 0x19, 0xcf, 0x24, 0x27, 0xb4, 0x58, 0x53, 0xfb, 0x67, - 0x45, 0x3f, 0x8f, 0x36, 0xb5, 0xff, 0x82, 0xe8, 0xe7, 0xf1, 0xa6, 0xf6, 0xcf, 0x89, 0x7e, 0x1e, - 0x71, 0x6a, 0xff, 0x45, 0xd1, 0xcf, 0x63, 0x4e, 0xed, 0xbf, 0x24, 0xfa, 0x79, 0xd4, 0xa9, 0xfd, - 0x97, 0x45, 0x3f, 0x8f, 0x3b, 0xb5, 0xff, 0x8a, 0xe8, 0xe7, 0x91, 0xa7, 0xf6, 0x3f, 0x60, 0x9e, - 0xd2, 0x63, 0x8f, 0x13, 0x08, 0xd3, 0x9e, 0xd2, 0xa3, 0x4f, 0xa3, 0x38, 0xef, 0x51, 0xf0, 0xf8, - 0xd3, 0x28, 0x66, 0x3d, 0x0a, 0x1e, 0x81, 0x1a, 0xc5, 0x85, 0xdc, 0x07, 0x89, 0xf9, 0x1c, 0xdd, - 0x7c, 0x13, 0x9a, 0xf9, 0xa2, 0x92, 0xe9, 0x26, 0x34, 0xd3, 0x45, 0x25, 0xb3, 0x4d, 0x68, 0x66, - 0x8b, 0x4a, 0x26, 0x9b, 0xd0, 0x4c, 0x16, 0x95, 0xcc, 0x35, 0xa1, 0x99, 0x2b, 0x2a, 0x99, 0x6a, - 0x42, 0x33, 0x55, 0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89, 0xcd, 0x47, 0x61, 0x08, 0xab, 0x74, 0x91, 0xbd, 0x88, - 0x07, 0xab, 0xfe, 0x34, 0x2b, 0x51, 0x34, 0x16, 0xac, 0x81, 0xb8, 0x0e, 0x79, 0xe7, 0x0d, 0xc1, - 0xa0, 0x1b, 0x0c, 0x63, 0x75, 0x75, 0x85, 0x2d, 0x6e, 0x73, 0x3d, 0xa1, 0xec, 0x11, 0x18, 0x76, - 0xc5, 0xda, 0xdc, 0x5d, 0xcb, 0x70, 0x56, 0x57, 0x90, 0xdb, 0x44, 0x11, 0x1b, 0x5a, 0xf0, 0x9e, - 0xe9, 0x87, 0x8d, 0x15, 0x75, 0x56, 0x26, 0xfe, 0x2c, 0x02, 0xc3, 0x4a, 0x2b, 0x5a, 0x6d, 0x53, - 0xb4, 0x41, 0x9a, 0xee, 0x80, 0x95, 0x72, 0xa4, 0x36, 0x2e, 0x73, 0xf4, 0x16, 0x65, 0x9e, 0x98, - 0x47, 0x77, 0xed, 0x6a, 0xbb, 0x39, 0x0d, 0xa6, 0xdc, 0xc4, 0x84, 0xa0, 0x2f, 0x31, 0x31, 0x9d, - 0xae, 0x9e, 0xdc, 0x9d, 0x28, 0x0b, 0x0b, 0xbd, 0x8a, 0x77, 0x6f, 0xac, 0x96, 0x36, 0xf0, 0x6b, - 0x33, 0x22, 0xb9, 0xaf, 0x46, 0x20, 0xc9, 0xca, 0xd6, 0x6a, 0xf3, 0xc0, 0x36, 0x0b, 0x10, 0x99, - 0x67, 0x1e, 0x74, 0x73, 0x72, 0x47, 0x2a, 0x68, 0x75, 0x8a, 0x14, 0xfa, 0x37, 0x75, 0x64, 0xdb, - 0x9c, 0x85, 0x48, 0x91, 0x19, 0xb8, 0x3f, 0xcb, 0x44, 0xaa, 0xb9, 0x1f, 0x1b, 0x70, 0x54, 0x2e, - 0xa3, 0x79, 0x3e, 0x39, 0xad, 0xde, 0x37, 0xe5, 0x87, 0xce, 0xcf, 0x5e, 0x98, 0x9b, 0xc6, 0xff, - 0x08, 0x97, 0x3c, 0xad, 0xde, 0x42, 0x75, 0x93, 0x74, 0x3d, 0x26, 0x92, 0x8f, 0x49, 0xbd, 0x5d, - 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x47, - 0x01, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xf7, 0x63, 0x22, - 0xac, 0x3b, 0xf0, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x91, 0x3c, - 0xaa, 0xcf, 0x3a, 0x76, 0xf0, 0xa1, 0x83, 0x8a, 0xef, 0x75, 0x0f, 0xe8, 0x25, 0xe0, 0x35, 0x18, - 0xa1, 0xfb, 0x11, 0x45, 0xfc, 0x84, 0x56, 0xdd, 0x41, 0xa9, 0xf8, 0x21, 0x48, 0xd1, 0x26, 0x7a, - 0x97, 0xe3, 0x77, 0x17, 0x48, 0xfb, 0x59, 0xba, 0x4d, 0x55, 0x25, 0xea, 0xdc, 0xcf, 0x63, 0x30, - 0x4e, 0xbb, 0xf1, 0xcf, 0x08, 0x95, 0x87, 0x8c, 0xce, 0x6a, 0x47, 0x4a, 0x69, 0x0c, 0xff, 0xee, - 0x6b, 0x27, 0x69, 0xeb, 0xbc, 0x70, 0xa6, 0xb3, 0xda, 0xe1, 0x92, 0x4a, 0xe7, 0xad, 0x3f, 0x67, - 0xb5, 0x07, 0x8f, 0x54, 0x3a, 0xb1, 0xdc, 0x08, 0x3a, 0xfe, 0x08, 0x92, 0x4a, 0xb7, 0x20, 0xbc, - 0xec, 0xac, 0xf6, 0x30, 0x92, 0x4a, 0x57, 0x12, 0xfe, 0x76, 0x56, 0x3b, 0x7a, 0x52, 0xe9, 0x16, - 0x85, 0xe7, 0x9d, 0xd5, 0x0e, 0xa1, 0x54, 0x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35, 0x9b, 0x0f, 0x41, 0x62, 0xc9, 0x69, 0x5f, - 0x98, 0xc5, 0xdc, 0xf8, 0xbb, 0xfc, 0xbb, 0xb9, 0x71, 0x12, 0xca, 0x25, 0x51, 0x67, 0x97, 0x0c, - 0x7d, 0x69, 0x0e, 0xa3, 0x63, 0xbd, 0xd0, 0x84, 0xc4, 0x43, 0x93, 0x4b, 0x7c, 0x8e, 0xb2, 0xc5, - 0x59, 0xb1, 0xd7, 0xf7, 0x9f, 0xf6, 0x81, 0x0b, 0x1a, 0x8a, 0x1f, 0xea, 0x88, 0xe1, 0x19, 0x03, - 0x3a, 0xfe, 0x40, 0x4f, 0x06, 0x92, 0x00, 0x84, 0x81, 0x90, 0x60, 0x43, 0x48, 0x30, 0x18, 0xc8, - 0x60, 0x43, 0x93, 0xc0, 0x95, 0x25, 0xd8, 0x10, 0x12, 0x24, 0x7a, 0x32, 0x90, 0x25, 0x70, 0x85, - 0x04, 0x05, 0x80, 0xc5, 0xfa, 0x0b, 0x76, 0x8d, 0x8a, 0x40, 0xdf, 0xf4, 0x9f, 0xf3, 0xe1, 0xe0, - 0x11, 0x51, 0x16, 0xb0, 0x23, 0x1a, 0xcc, 0x12, 0x24, 0x37, 0xbc, 0x4b, 0x96, 0x3e, 0xee, 0xf2, - 0x13, 0x63, 0x47, 0xe3, 0x92, 0x74, 0x25, 0x36, 0x5c, 0x14, 0x3a, 0x99, 0x64, 0x6f, 0x51, 0xa4, - 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x2a, 0x44, 0x14, 0x89, 0x0b, 0x13, 0x85, - 0xb2, 0x41, 0xc9, 0xb0, 0xd0, 0x6c, 0x62, 0x4a, 0x96, 0x95, 0x4e, 0xfa, 0xb0, 0x60, 0x14, 0x2c, - 0x19, 0x6e, 0xd3, 0x2b, 0x62, 0x11, 0xe2, 0xe4, 0x18, 0x9c, 0x0e, 0xb6, 0x08, 0xa7, 0xe1, 0x16, - 0xe1, 0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4, 0xfc, 0x4d, 0xd8, 0x06, 0x0b, 0xa6, 0x4b, 0x1e, 0x16, 0x13, 0xb2, - 0x43, 0xe6, 0xee, 0x84, 0x61, 0x85, 0xb7, 0x99, 0x82, 0xc8, 0x0e, 0xfb, 0xa1, 0x5e, 0x64, 0x07, - 0xff, 0x36, 0x3a, 0xc9, 0x4e, 0xa9, 0xd7, 0x2b, 0xf5, 0x96, 0xf9, 0x18, 0x90, 0x9f, 0xc2, 0xb0, - 0x93, 0xf8, 0x9b, 0xfb, 0x61, 0x26, 0xfd, 0x31, 0xcd, 0x22, 0xd0, 0x5f, 0xca, 0xdc, 0xfc, 0x2f, - 0x4b, 0xe9, 0x0f, 0x6d, 0x6e, 0x44, 0x60, 0x94, 0x3d, 0x44, 0xe9, 0xb2, 0x47, 0x6b, 0xd1, 0x0a, - 0xf9, 0xe5, 0x08, 0x0c, 0x89, 0x2b, 0x73, 0x1b, 0xd2, 0xe2, 0x82, 0x3e, 0xbe, 0x4d, 0x3d, 0x35, - 0x2f, 0x69, 0xb8, 0x8b, 0xc7, 0xb4, 0xcf, 0x37, 0x7a, 0x76, 0x45, 0xd7, 0x64, 0x47, 0x69, 0x9c, - 0x98, 0x87, 0xa3, 0x3e, 0x64, 0x87, 0x59, 0x90, 0xa7, 0x4e, 0xc3, 0x20, 0x0b, 0x6d, 0x7c, 0x56, - 0xb8, 0x82, 0xcf, 0x1a, 0xf1, 0x5f, 0x7c, 0x7e, 0x89, 0xff, 0x16, 0x33, 0xd1, 0xc2, 0xf2, 0x1b, - 0x79, 0x7e, 0xb4, 0x3d, 0x40, 0xe7, 0xfe, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0xbc, 0x9d, - 0x4f, 0x73, 0x79, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type Uint128PairFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message -} - -func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_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 -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_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 valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(m.Score)))) - } - 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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - 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 - } - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - } - 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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - } - 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())) - n7, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - } - } - 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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(m.F)))) - } - 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())) - n8, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - if m.Right != nil { - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) - n9, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n9 - } - 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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - v2 := r.Intn(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 = 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 -} - -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 { - v77 := r.Intn(100) - tmps := make([]rune, v77) - for i := 0; i < v77; 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)) - v78 := r.Int63() - if r.Intn(2) == 0 { - v78 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v78)) - 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 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - 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 sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) - } - m.ResultCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ResultCount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TrueScotsman = bool(v != 0) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Score = float32(math.Float32frombits(v)) - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Terrain[mapkey] = mapvalue - } else { - var mapvalue *Nested - m.Terrain[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Proto2Value[mapkey] = mapvalue - } else { - var mapvalue *test.NinOptEnum - m.Proto2Value[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.NameMapping[mapkey] = mapvalue - } else { - var mapvalue string - m.NameMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MsgMapping[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.MsgMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.ByteMapping[mapkey] = mapvalue - } else { - var mapvalue []byte - m.ByteMapping[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.F = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.NestedMapField == nil { - m.NestedMapField = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.NestedMapField[mapkey] = mapvalue - } else { - var mapvalue float64 - 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 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{ - // 1576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0xbd, 0x6f, 0xdb, 0xc6, - 0x1b, 0x36, 0x25, 0x59, 0x1f, 0xaf, 0xbe, 0xe8, 0x4b, 0x7e, 0x3f, 0xa8, 0x2e, 0x6a, 0x3b, 0x0a, - 0x90, 0x38, 0x41, 0x23, 0xa7, 0x4e, 0xda, 0xa6, 0x6e, 0xda, 0xd4, 0x52, 0x2c, 0xc4, 0x8d, 0xad, - 0xb8, 0x92, 0x1d, 0xb7, 0x08, 0x50, 0x81, 0xb2, 0x29, 0x89, 0xa8, 0x44, 0x1a, 0x24, 0x15, 0xd4, - 0x5b, 0xfe, 0x8c, 0x6e, 0x45, 0xb7, 0x8e, 0x45, 0x86, 0xa2, 0x63, 0xbb, 0x79, 0x0c, 0xd0, 0xa5, - 0xe8, 0x10, 0x24, 0xe9, 0x92, 0x31, 0x63, 0xc6, 0xde, 0x07, 0x49, 0x1d, 0xa9, 0xa3, 0xd8, 0x74, - 0xe9, 0xe2, 0xe1, 0x20, 0xde, 0xcb, 0xe7, 0x79, 0xee, 0xbd, 0xe3, 0xdd, 0xcb, 0x07, 0x14, 0xbc, - 0x7d, 0x60, 0x0c, 0x3b, 0x86, 0xb5, 0xd2, 0x31, 0xec, 0xfe, 0x8a, 0xdd, 0x57, 0x8f, 0x4c, 0xc3, - 0x36, 0xae, 0x55, 0xe8, 0x0f, 0xca, 0x78, 0x81, 0xf9, 0x2b, 0x3d, 0xcd, 0xee, 0x8f, 0x3a, 0x15, - 0x0c, 0x5f, 0xe9, 0x19, 0x3d, 0x63, 0x85, 0xc6, 0x3b, 0xa3, 0x2e, 0xed, 0xd1, 0x0e, 0xbd, 0x62, - 0xcc, 0xf9, 0x0f, 0x43, 0xe1, 0xb6, 0x6a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0x04, 0x19, 0xaf, 0x87, 0x3a, 0x50, 0xf0, 0x3a, 0xf4, 0x23, 0xb8, 0xb3, - 0x53, 0xd7, 0xb8, 0x15, 0x9e, 0xd0, 0xa8, 0x08, 0xae, 0x28, 0xd9, 0x79, 0x27, 0xeb, 0xbe, 0xe0, - 0xfc, 0x3a, 0x9c, 0x11, 0xc0, 0xde, 0xe4, 0x85, 0x7c, 0xf9, 0x1c, 0xa4, 0x9c, 0xa3, 0x8d, 0x92, - 0x10, 0xdb, 0x5e, 0x97, 0x67, 0xe8, 0x6f, 0x55, 0x96, 0xe8, 0x6f, 0x4d, 0x8e, 0x55, 0xb7, 0x4e, - 0x9e, 0x2f, 0xcc, 0x3c, 0xc1, 0xed, 0x0f, 0xdc, 0x9e, 0x3d, 0x5f, 0x90, 0x5e, 0xe2, 0xf6, 0x0a, - 0xb7, 0xd7, 0xb8, 0x3d, 0x7a, 0xb1, 0x20, 0xfd, 0x88, 0xdb, 0x4f, 0xb8, 0xfd, 0x82, 0xdb, 0xaf, - 0xb8, 0x9d, 0xe0, 0xf6, 0x04, 0xb7, 0x67, 0xb8, 0xbd, 0x7c, 0xb1, 0x30, 0xf3, 0x0a, 0xff, 0xbe, - 0xc6, 0xbf, 0x8f, 0xfe, 0x5a, 0x98, 0xe9, 0x24, 0xd9, 0xdc, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, - 0xee, 0x91, 0x65, 0x55, 0x3d, 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 6348b74b..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto +++ /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 -// -// 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; - } -} 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 5ba344b9..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go +++ /dev/null @@ -1,2186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/both/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/both/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUint128PairMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUint128PairFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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 TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUint128PairStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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) - } -} - -//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 5b87ea9a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go +++ /dev/null @@ -1,125 +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) - } - } -} 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 6368ea98..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go +++ /dev/null @@ -1,5876 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/marshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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} -} - -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.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7455 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, - 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, - 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89, - 0x5e, 0xb9, 0x92, 0xfc, 0x88, 0x17, 0x4b, 0x50, 0xe4, 0x95, 0x44, 0x9b, 0xba, 0xd4, 0xf2, 0x92, - 0xb6, 0x27, 0x7f, 0x2c, 0xb2, 0xc9, 0x6e, 0x36, 0xd9, 0xc5, 0xee, 0xb6, 0x4d, 0x8b, 0xe6, 0x1d, - 0x3b, 0x45, 0x1a, 0x27, 0x7d, 0x25, 0x69, 0x1a, 0x14, 0x41, 0xd1, 0xb8, 0x2d, 0x92, 0x4e, 0xff, - 0x29, 0xdc, 0xf4, 0x9f, 0xa2, 0x28, 0x8c, 0xbc, 0x80, 0xa6, 0x6d, 0xda, 0x26, 0x80, 0x81, 0x04, - 0x48, 0xfe, 0xe8, 0x79, 0xdf, 0x73, 0x0e, 0xef, 0xe5, 0xa5, 0x66, 0xec, 0x38, 0x7f, 0xd8, 0x00, - 0x47, 0xbc, 0xe7, 0x7c, 0xbf, 0xef, 0x7c, 0xe7, 0x7b, 0x9d, 0xef, 0x9e, 0x73, 0x79, 0x0d, 0x7f, - 0x71, 0x1e, 0x4e, 0xed, 0x36, 0x9b, 0xbb, 0x0d, 0xfb, 0xd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b, 0xc3, 0x23, 0x30, 0xb0, 0x6f, 0xb7, 0xf7, - 0x9a, 0x7c, 0xcd, 0x3d, 0xeb, 0x93, 0xc9, 0x71, 0xb7, 0xae, 0x2b, 0x86, 0x92, 0x97, 0x02, 0x23, - 0xa8, 0x68, 0xa0, 0xd2, 0x74, 0x49, 0xfa, 0xa1, 0x28, 0x1c, 0xf3, 0x65, 0xee, 0x2b, 0xe8, 0x9d, - 0x00, 0x75, 0xe7, 0xa0, 0xd3, 0xa6, 0xeb, 0x2a, 0x4d, 0x33, 0x43, 0xa4, 0x85, 0x84, 0x30, 0x4e, - 0x21, 0x9d, 0xb6, 0xe8, 0x37, 0x48, 0x3f, 0xd0, 0x26, 0x42, 0x70, 0xc5, 0x13, 0x34, 0x46, 0x04, - 0x3d, 0x11, 0x30, 0xd3, 0xae, 0x25, 0x6b, 0x06, 0x32, 0xd5, 0x46, 0xdd, 0x76, 0xda, 0x65, 0xb7, - 0xdd, 0xb2, 0x2b, 0xfb, 0x75, 0x67, 0x97, 0xe4, 0xd1, 0x44, 0x3e, 0xbe, 0x53, 0x69, 0xb8, 0xb6, - 0x35, 0x42, 0xbb, 0x37, 0x78, 0x2f, 0x46, 0x90, 0xc5, 0xa2, 0x25, 0x21, 0x06, 0x14, 0x04, 0xed, - 0x16, 0x88, 0xdc, 0xb7, 0x06, 0x21, 0x29, 0x55, 0x67, 0xe6, 0x69, 0x48, 0x3d, 0x53, 0x79, 0xae, - 0x52, 0xe6, 0x15, 0x37, 0xd5, 0x44, 0x12, 0xb7, 0xad, 0xb3, 0xaa, 0x7b, 0x06, 0xc6, 0x08, 0x09, - 0x9a, 0x23, 0x1a, 0xa8, 0xda, 0xa8, 0xb8, 0x2e, 0x51, 0x5a, 0x82, 0x90, 0x9a, 0xb8, 0x6f, 0x0d, - 0x77, 0x15, 0x79, 0x8f, 0x79, 0x11, 0x8e, 0x12, 0xc4, 0x3e, 0x4a, 0xbc, 0xf5, 0x83, 0x86, 0x5d, - 0xc6, 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f, 0x7a, 0xa5, 0xd5, 0x66, 0xf5, - 0x2c, 0x5a, 0x2f, 0xeb, 0x35, 0x94, 0x54, 0xeb, 0x3b, 0x75, 0x54, 0xbe, 0xd1, 0x3b, 0x16, 0x5a, - 0xb5, 0x8e, 0x78, 0xed, 0xf4, 0xf6, 0xf8, 0x3e, 0x30, 0x0f, 0x9a, 0x6e, 0xbd, 0x5d, 0x7f, 0x0e, - 0x6f, 0xcf, 0xf1, 0x1b, 0x69, 0x5c, 0xc5, 0xc6, 0xac, 0x0c, 0xef, 0x59, 0x72, 0xda, 0x82, 0xda, - 0xb1, 0x77, 0x2b, 0x1a, 0x35, 0x4e, 0x43, 0x86, 0x95, 0xe1, 0x3d, 0x82, 0x1a, 0x15, 0x9a, 0xb5, - 0x66, 0x07, 0x17, 0x04, 0x94, 0x0e, 0x67, 0xbd, 0x88, 0x95, 0xa4, 0x6d, 0x82, 0x84, 0x55, 0x6c, - 0xde, 0x1d, 0x7c, 0xca, 0x4a, 0xd2, 0x36, 0x4a, 0x72, 0x0f, 0x8c, 0x54, 0x76, 0x77, 0x5b, 0x98, - 0x39, 0x67, 0x44, 0xcb, 0xd0, 0xb4, 0x68, 0x26, 0x84, 0x13, 0xd7, 0x20, 0xc1, 0xf5, 0x80, 0x17, - 0x16, 0xac, 0x09, 0xb4, 0xe6, 0x93, 0x7d, 0x94, 0x28, 0xbe, 0xa9, 0x77, 0x78, 0x27, 0x1a, 0xb4, - 0xee, 0x96, 0xbd, 0x0d, 0xbd, 0x28, 0xea, 0x4f, 0x58, 0xc9, 0xba, 0x2b, 0x76, 0x70, 0x72, 0x9f, - 0x43, 0xcb, 0xab, 0xba, 0x21, 0x69, 0x2e, 0x40, 0xa2, 0xd1, 0x44, 0xfe, 0x81, 0x11, 0x74, 0x37, - 0x7c, 0x32, 0x64, 0x0f, 0x73, 0x7a, 0x99, 0xd1, 0x5b, 0x02, 0x39, 0xf1, 0xd7, 0x11, 0x48, 0xf0, - 0x66, 0xb4, 0x50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8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, - 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, - 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, - 0x8a, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, - 0x30, 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xc4, 0x00, 0x93, 0xc6, 0xd8, 0x3a, 0x79, 0x38, 0x80, 0x99, - 0xe2, 0x84, 0x16, 0x69, 0x03, 0xd8, 0x74, 0x19, 0xcf, 0x24, 0x27, 0xb4, 0x58, 0x53, 0xfb, 0x67, - 0x45, 0x3f, 0x8f, 0x36, 0xb5, 0xff, 0x82, 0xe8, 0xe7, 0xf1, 0xa6, 0xf6, 0xcf, 0x89, 0x7e, 0x1e, - 0x71, 0x6a, 0xff, 0x45, 0xd1, 0xcf, 0x63, 0x4e, 0xed, 0xbf, 0x24, 0xfa, 0x79, 0xd4, 0xa9, 0xfd, - 0x97, 0x45, 0x3f, 0x8f, 0x3b, 0xb5, 0xff, 0x8a, 0xe8, 0xe7, 0x91, 0xa7, 0xf6, 0x3f, 0x60, 0x9e, - 0xd2, 0x63, 0x8f, 0x13, 0x08, 0xd3, 0x9e, 0xd2, 0xa3, 0x4f, 0xa3, 0x38, 0xef, 0x51, 0xf0, 0xf8, - 0xd3, 0x28, 0x66, 0x3d, 0x0a, 0x1e, 0x81, 0x1a, 0xc5, 0x85, 0xdc, 0x07, 0x89, 0xf9, 0x1c, 0xdd, - 0x7c, 0x13, 0x9a, 0xf9, 0xa2, 0x92, 0xe9, 0x26, 0x34, 0xd3, 0x45, 0x25,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, 0x24, 0xbd, 0x1f, 0x15, 0x7a, 0x97, 0xe8, 0x88, 0xee, 0x73, 0x8a, 0xee, 0x99, 0x01, - 0x31, 0x51, 0x97, 0xfe, 0x2f, 0x43, 0x52, 0x1a, 0xc5, 0x9c, 0x64, 0x62, 0x44, 0x75, 0xa0, 0xac, - 0x2b, 0x2c, 0x49, 0xce, 0x86, 0x61, 0x65, 0x60, 0x0c, 0x95, 0x54, 0x1c, 0x00, 0x25, 0x6a, 0x9e, - 0x52, 0xd5, 0xec, 0x4f, 0xca, 0x54, 0x3d, 0x43, 0x75, 0x44, 0xd4, 0x7d, 0x86, 0x3a, 0x67, 0xb0, - 0x11, 0xdb, 0xe8, 0x7b, 0x2e, 0x0e, 0xc6, 0x6a, 0xbd, 0x91, 0x7b, 0x18, 0x80, 0x86, 0x3c, 0x7e, - 0xb8, 0x4a, 0x8b, 0xba, 0x34, 0x57, 0xf0, 0xe6, 0x9e, 0xbd, 0x89, 0xfe, 0x62, 0x12, 0xb5, 0x9e, - 0xc2, 0x09, 0x06, 0x68, 0x88, 0x11, 0xfc, 0xbd, 0xa1, 0x78, 0xdf, 0x4a, 0x0c, 0x93, 0x66, 0x29, - 0xe9, 0x53, 0x76, 0x7b, 0xde, 0x69, 0xb6, 0xf7, 0xec, 0x96, 0x86, 0x98, 0x35, 0x2f, 0x28, 0x01, - 0x9b, 0x9e, 0xbd, 0x43, 0x20, 0x02, 0x41, 0x17, 0x72, 0x5f, 0x24, 0x02, 0xe2, 0x52, 0xa0, 0x6b, - 0x82, 0x46, 0x1f, 0x13, 0x34, 0x2f, 0x29, 0xf5, 0x5b, 0x0f, 0x31, 0xb5, 0x5b, 0xcb, 0x07, 0x94, - 0xfb, 0x9c, 0xde, 0xc2, 0xaa, 0xf7, 0x98, 0x5c, 0xa7, 0x5c, 0xe4, 0x7b, 0x43, 0x45, 0x0e, 0xa8, - 0x6e, 0x0f, 0xab, 0x53, 0xa3, 0x5f, 0x9d, 0x7e, 0x4d, 0x54, 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, - 0xa3, 0xe8, 0x5f, 0xc8, 0x0c, 0xb3, 0x71, 0xff, 0xca, 0x80, 0x0c, 0x2d, 0x75, 0x90, 0x11, 0xeb, - 0x4e, 0xbd, 0xdd, 0x5d, 0xaf, 0x0a, 0x89, 0xcd, 0x47, 0x61, 0x08, 0xab, 0x74, 0x91, 0xbd, 0x88, - 0x07, 0xab, 0xfe, 0x34, 0x2b, 0x51, 0x34, 0x16, 0xac, 0x81, 0xb8, 0x0e, 0x79, 0xe7, 0x0d, 0xc1, - 0xa0, 0x1b, 0x0c, 0x63, 0x75, 0x75, 0x85, 0x2d, 0x6e, 0x73, 0x3d, 0xa1, 0xec, 0x11, 0x18, 0x76, - 0xc5, 0xda, 0xdc, 0x5d, 0xcb, 0x70, 0x56, 0x57, 0x90, 0xdb, 0x44, 0x11, 0x1b, 0x5a, 0xf0, 0x9e, - 0xe9, 0x87, 0x8d, 0x15, 0x75, 0x56, 0x26, 0xfe, 0x34, 0x02, 0xc3, 0x4a, 0x2b, 0x5a, 0x6d, 0x53, - 0xb4, 0x41, 0x9a, 0xee, 0x80, 0x95, 0x72, 0xa4, 0x36, 0x2e, 0x73, 0xf4, 0x16, 0x65, 0x9e, 0x98, - 0x47, 0x77, 0xed, 0x6a, 0xbb, 0x39, 0x0d, 0xa6, 0xdc, 0xc4, 0x84, 0xa0, 0x2f, 0x31, 0x31, 0x9d, - 0xae, 0x9e, 0xdc, 0x9d, 0x28, 0x0b, 0x0b, 0xbd, 0x8a, 0x77, 0x6f, 0xac, 0x96, 0x36, 0xf0, 0x6b, - 0x33, 0x22, 0xb9, 0xaf, 0x46, 0x20, 0xc9, 0xca, 0xd6, 0x6a, 0xf3, 0xc0, 0x36, 0x0b, 0x10, 0x99, - 0x67, 0x1e, 0x74, 0x73, 0x72, 0x47, 0x2a, 0x68, 0x75, 0x8a, 0x14, 0xfa, 0x37, 0x75, 0x64, 0xdb, - 0x9c, 0x85, 0x48, 0x91, 0x19, 0xb8, 0x3f, 0xcb, 0x44, 0xaa, 0xb9, 0x1f, 0x1b, 0x70, 0x54, 0x2e, - 0xa3, 0x79, 0x3e, 0x39, 0xad, 0xde, 0x37, 0xe5, 0x87, 0xce, 0xcf, 0x5e, 0x98, 0x9b, 0xc6, 0xff, - 0x08, 0x97, 0x3c, 0xad, 0xde, 0x42, 0x75, 0x93, 0x74, 0x3d, 0x26, 0x92, 0x8f, 0x49, 0xbd, 0x5d, - 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x47, - 0x01, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xf7, 0x63, 0x22, - 0xac, 0x3b, 0xf0, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x91, 0x3c, - 0xaa, 0xcf, 0x3a, 0x76, 0xf0, 0xa1, 0x83, 0x8a, 0xef, 0x75, 0x0f, 0xe8, 0x25, 0xe0, 0x35, 0x18, - 0xa1, 0xfb, 0x11, 0x45, 0xfc, 0x84, 0x56, 0xdd, 0x41, 0xa9, 0xf8, 0x21, 0x48, 0xd1, 0x26, 0x7a, - 0x97, 0xe3, 0x77, 0x17, 0x48, 0xfb, 0x59, 0xba, 0x4d, 0x55, 0x25, 0xea, 0xdc, 0xcf, 0x63, 0x30, - 0x4e, 0xbb, 0xf1, 0xcf, 0x08, 0x95, 0x87, 0x8c, 0xce, 0x6a, 0x47, 0x4a, 0x69, 0x0c, 0xff, 0xee, - 0x6b, 0x27, 0x69, 0xeb, 0xbc, 0x70, 0xa6, 0xb3, 0xda, 0xe1, 0x92, 0x4a, 0xe7, 0xad, 0x3f, 0x67, - 0xb5, 0x07, 0x8f, 0x54, 0x3a, 0xb1, 0xdc, 0x08, 0x3a, 0xfe, 0x08, 0x92, 0x4a, 0xb7, 0x20, 0xbc, -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0xae, 0xde, 0x6e, 0x6e, 0x42, 0x86, 0x13, 0x2f, 0x36, 0x9a, 0x95, - 0x36, 0xe6, 0x1b, 0x65, 0xaf, 0xf1, 0x0a, 0xe6, 0xcb, 0x49, 0x29, 0xdb, 0x8c, 0xab, 0x35, 0x9b, - 0x0f, 0x41, 0x62, 0xc9, 0x69, 0x5f, 0x98, 0xc5, 0xdc, 0xf8, 0x0b, 0xfd, 0xbb, 0xb9, 0x71, 0x12, - 0xca, 0x25, 0x51, 0x67, 0x97, 0x0c, 0x7d, 0x69, 0x0e, 0xa3, 0x63, 0xbd, 0xd0, 0x84, 0xc4, 0x43, - 0x93, 0x4b, 0x7c, 0x98, 0xb2, 0xc5, 0x59, 0xb1, 0x77, 0xf8, 0x9f, 0xf6, 0x81, 0x0b, 0x1a, 0x8a, - 0x1f, 0xea, 0x88, 0xe1, 0x19, 0x03, 0x3a, 0xfe, 0x40, 0x4f, 0x06, 0x92, 0x00, 0x84, 0x81, 0x90, - 0x60, 0x43, 0x48, 0x30, 0x18, 0xc8, 0x60, 0x43, 0x93, 0xc0, 0x95, 0x25, 0xd8, 0x10, 0x12, 0x24, - 0x7a, 0x32, 0x90, 0x25, 0x70, 0x85, 0x04, 0x05, 0x80, 0xc5, 0xfa, 0x0b, 0x76, 0x8d, 0x8a, 0x40, - 0x5f, 0xf7, 0x9f, 0xf3, 0xe1, 0xe0, 0x11, 0x51, 0x16, 0xb0, 0x23, 0x1a, 0xcc, 0x12, 0x24, 0x37, - 0xbc, 0x4b, 0x96, 0x3e, 0xee, 0xf2, 0x13, 0x63, 0x47, 0xe3, 0x92, 0x74, 0x25, 0x36, 0x5c, 0x14, - 0x3a, 0x99, 0x64, 0x6f, 0x51, 0xa4, 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x2a, - 0x44, 0x14, 0x89, 0x0b, 0x13, 0x85, 0xb2, 0x41, 0xc9, 0xb0, 0xd0, 0x6c, 0x62, 0x4a, 0x96,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xff, 0xdc, 0xbe, 0xa6, 0x69, 0x78, 0x79, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type Uint128PairFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message -} - -func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_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 -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_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 valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(m.Score)))) - } - 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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - 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 - } - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - } - 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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - } - 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())) - n7, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - } - } - 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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(m.F)))) - } - 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())) - n8, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - if m.Right != nil { - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) - n9, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n9 - } - 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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - v2 := r.Intn(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 = 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 -} - -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 { - v77 := r.Intn(100) - tmps := make([]rune, v77) - for i := 0; i < v77; 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)) - v78 := r.Int63() - if r.Intn(2) == 0 { - v78 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v78)) - 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 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if m.ResultCount != 0 { - n += 1 + sovTheproto3(uint64(m.ResultCount)) - } - if m.TrueScotsman { - n += 2 - } - if m.Score != 0 { - n += 5 - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - 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 sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_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 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{ - // 1585 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6f, 0xdb, 0xc6, - 0x16, 0x35, 0x25, 0x59, 0x1f, 0x57, 0x5f, 0xf4, 0x24, 0xef, 0x41, 0xcf, 0xc0, 0xb3, 0x1d, 0x05, - 0x48, 0x9c, 0xe0, 0x45, 0xce, 0x73, 0xd2, 0x36, 0x75, 0xd3, 0xa6, 0x96, 0x62, 0x21, 0x6e, 0x2c, - 0xc5, 0x95, 0xec, 0xb8, 0x45, 0x80, 0x0a, 0x94, 0x4d, 0x49, 0x44, 0x25,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e, 0x5f, 0x2c, 0xcd, 0x3d, 0xc3, 0xed, - 0x57, 0xdc, 0x7e, 0x7f, 0xb1, 0x24, 0xbd, 0xc2, 0xed, 0x35, 0x6e, 0x6f, 0x70, 0x7b, 0xf2, 0x72, - 0x49, 0xfa, 0x0e, 0xb7, 0xef, 0x71, 0xfb, 0x11, 0xb7, 0x9f, 0x70, 0x3b, 0xc5, 0xed, 0xd9, 0x4b, - 0x8c, 0xc5, 0xd7, 0x57, 0xf8, 0xfa, 0x1a, 0x5f, 0xdf, 0xe0, 0xeb, 0x93, 0x3f, 0x96, 0xe6, 0xba, - 0x49, 0x36, 0xf7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x68, 0xb0, 0x04, 0x42, 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 253111b8..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto +++ /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 -// -// 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; - } -} 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 95b3e8f5..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go +++ /dev/null @@ -1,2186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/marshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUint128PairMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUint128PairFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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 TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUint128PairStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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) - } -} - -//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 5b87ea9a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go +++ /dev/null @@ -1,125 +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) - } - } -} 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 ff8b9369..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go +++ /dev/null @@ -1,4774 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/neither/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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} -} - -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.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7457 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x23, 0xd7, - 0x79, 0xef, 0x92, 0x43, 0x4a, 0xd4, 0x47, 0x8a, 0xa2, 0x66, 0xb5, 0x32, 0x2d, 0xaf, 0xf7, 0x41, - 0xaf, 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21, 0xb8, 0xe2, 0x09, 0x1a, 0x23, 0x82, 0x9e, - 0x08, 0x98, 0x69, 0xd7, 0x92, 0x35, 0x03, 0x99, 0x6a, 0xa3, 0x6e, 0x3b, 0xed, 0xb2, 0xdb, 0x6e, - 0xd9, 0x95, 0xfd, 0xba, 0xb3, 0x4b, 0xf2, 0x68, 0x22, 0x1f, 0xdf, 0xa9, 0x34, 0x5c, 0xdb, 0x1a, - 0xa1, 0xdd, 0x1b, 0xbc, 0x17, 0x23, 0xc8, 0x62, 0xd1, 0x92, 0x10, 0x03, 0x0a, 0x82, 0x76, 0x0b, - 0x44, 0xee, 0x5b, 0x83, 0x90, 0x94, 0xaa, 0x33, 0xf3, 0x34, 0xa4, 0x9e, 0xa9, 0x3c, 0x57, 0x29, - 0xf3, 0x8a, 0x9b, 0x6a, 0x22, 0x89, 0xdb, 0xd6, 0x59, 0xd5, 0x3d, 0x03, 0x63, 0x84, 0x04, 0xcd, - 0x11, 0x0d, 0x54, 0x6d, 0x54, 0x5c, 0x97, 0x28, 0x2d, 0x41, 0x48, 0x4d, 0xdc, 0xb7, 0x86, 0xbb, - 0x8a, 0xbc, 0xc7, 0xbc, 0x08, 0x47, 0x09, 0x62, 0x1f, 0x25, 0xde, 0xfa, 0x41, 0xc3, 0x2e, 0xe3, - 0x7b, 0x00, 0x97, 0xe4, 0x53, 0x21, 0xd9, 0x28, 0xa6, 0x58, 0x61, 0x04, 0x58, 0x22, 0xd7, 0xbc, - 0x0a, 0x77, 0x12, 0xd8, 0xae, 0xed, 0xd8, 0xad, 0x4a, 0xdb, 0x2e, 0xdb, 0xff, 0xbd, 0x83, 0x68, - 0xcb, 0x15, 0xa7, 0x56, 0xde, 0xab, 0xb8, 0x7b, 0xd9, 0x31, 0x99, 0xc1, 0xed, 0x98, 0xf6, 0x2a, - 0x23, 0x2d, 0x11, 0xca, 0x79, 0xa7, 0xf6, 0x18, 0xa2, 0x33, 0xf3, 0x30, 0x4e, 0x18, 0x21, 0xa5, - 0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0xbc, 0xc2, 0xb0, 0xe3, 0xaa, - 0x61, 0x85, 0x49, 0xc7, 0x55, 0x93, 0x0a, 0x63, 0x8e, 0xab, 0xc6, 0x14, 0x66, 0x1c, 0x57, 0xcd, - 0x28, 0x0c, 0x38, 0xae, 0x1a, 0x50, 0x98, 0x6e, 0x5c, 0x35, 0x9d, 0x30, 0xda, 0xb8, 0x6a, 0x34, - 0x61, 0xae, 0x71, 0xd5, 0x5c, 0xc2, 0x50, 0x59, 0xcd, 0x50, 0x9e, 0x89, 0xb2, 0x9a, 0x89, 0x3c, - 0xe3, 0x64, 0x35, 0xe3, 0x78, 0x66, 0xc9, 0x6a, 0x66, 0xf1, 0x0c, 0x92, 0xd5, 0x0c, 0xe2, 0x99, - 0x22, 0xab, 0x99, 0xc2, 0x33, 0x02, 0x8b, 0x31, 0xcb, 0x3e, 0xf0, 0x89, 0x31, 0xa3, 0x67, 0x8c, - 0x19, 0x3d, 0x63, 0xcc, 0xe8, 0x19, 0x63, 0x46, 0xcf, 0x18, 0x33, 0x7a, 0xc6, 0x98, 0xd1, 0x33, - 0xc6, 0x8c, 0x9e, 0x31, 0x66, 0xf4, 0x8c, 0x31, 0xa3, 0x77, 0x8c, 0x19, 0x21, 0x31, 0x66, 0x84, - 0xc4, 0x98, 0x11, 0x12, 0x63, 0x46, 0x48, 0x8c, 0x19, 0x21, 0x31, 0x66, 0x04, 0xc6, 0x98, 0x67, - 0xde, 0x71, 0xd5, 0xbc, 0xbe, 0x31, 0x66, 0x04, 0xc4, 0x98, 0x11, 0x10, 0x63, 0x46, 0x40, 0x8c, - 0x19, 0x01, 0x31, 0x66, 0x04, 0xc4, 0x98, 0x11, 0x10, 0x63, 0x46, 0x40, 0x8c, 0x19, 0x41, 0x31, - 0x66, 0x04, 0xc6, 0x98, 0x11, 0x18, 0x63, 0x46, 0x60, 0x8c, 0x19, 0x81, 0x31, 0x66, 0x04, 0xc6, - 0x98, 0x21, 0xc7, 0xd8, 0x9f, 0x19, 0x60, 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, 0x94, 0x06, 0xb7, 0x58, 0xb1, 0x06, 0xfa, 0x97, 0x0d, 0xf8, 0x24, 0x24, 0x38, 0x63, - 0xf3, 0x0c, 0x46, 0xec, 0xb4, 0xd9, 0xb0, 0x0c, 0x81, 0xc5, 0x61, 0x2b, 0x17, 0xc2, 0xed, 0xb4, - 0xcd, 0xb3, 0x10, 0xb7, 0xea, 0xbb, 0x7b, 0x6d, 0x36, 0x78, 0x37, 0x59, 0xbc, 0x85, 0xbb, 0x73, - 0x4f, 0xc1, 0x90, 0x90, 0xe8, 0x0d, 0x66, 0xbd, 0x40, 0xa7, 0x86, 0xee, 0x84, 0xa5, 0xf5, 0x84, - 0xef, 0x5b, 0xb2, 0x1f, 0x79, 0x9e, 0x82, 0x04, 0x52, 0xb3, 0x97, 0xf4, 0x79, 0x45, 0x8a, 0x4f, - 0xe4, 0x49, 0x6b, 0xee, 0x7d, 0x11, 0x48, 0x2c, 0xd8, 0xf6, 0x01, 0x51, 0xf8, 0xdd, 0x10, 0x5b, - 0x68, 0x3e, 0xef, 0x30, 0x01, 0x47, 0x99, 0x46, 0x71, 0x37, 0xd3, 0x69, 0xac, 0x86, 0xba, 0x11, - 0x99, 0xa4, 0xf7, 0xa3, 0x42, 0xef, 0x12, 0x1d, 0xd1, 0x7d, 0x4e, 0xd1, 0x3d, 0x33, 0x20, 0x26, - 0xea, 0xd2, 0xff, 0x65, 0x48, 0x4a, 0xa3, 0x98, 0x93, 0x4c, 0x8c, 0xa8, 0x0e, 0x94, 0x75, 0x85, - 0x25, 0xc9, 0xd9, 0x30, 0xac, 0x0c, 0x8c, 0xa1, 0x92, 0x8a, 0x03, 0xa0, 0x44, 0xcd, 0x53, 0xaa, - 0x9a, 0xfd, 0x49, 0x99, 0xaa, 0x67, 0xa8, 0x8e, 0x88, 0xba, 0xcf, 0x50, 0xe7, 0x0c, 0x36, 0x62, - 0x1b, 0x7d, 0xcf, 0xc5, 0xc1, 0x58, 0xad, 0x37, 0x72, 0x0f, 0x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, 0x84, 0x75, - 0x07, 0x3e, 0x26, 0xa2, 0xf6, 0x77, 0x3f, 0x26, 0xa2, 0xf6, 0x77, 0x3f, 0x26, 0x92, 0x47, 0xf5, - 0x59, 0xc7, 0x0e, 0x3e, 0x74, 0x50, 0xf1, 0xbd, 0xee, 0x01, 0xbd, 0x04, 0xbc, 0x06, 0x23, 0x74, - 0x3f, 0xa2, 0x88, 0x9f, 0xd0, 0xaa, 0x3b, 0x28, 0x15, 0x3f, 0x04, 0x29, 0xda, 0x44, 0xef, 0x72, - 0xfc, 0xee, 0x02, 0x69, 0x3f, 0x4b, 0xb7, 0xa9, 0xaa, 0x44, 0x9d, 0xfb, 0x79, 0x0c, 0xc6, 0x69, - 0x37, 0xfe, 0x19, 0xa1, 0xf2, 0x90, 0xd1, 0x59, 0xed, 0x48, 0x29, 0x8d, 0xe1, 0xdf, 0x7d, 0xed, - 0x24, 0x6d, 0x9d, 0x17, 0xce, 0x74, 0x56, 0x3b, 0x5c, 0x52, 0xe9, 0xbc, 0xf5, 0xe7, 0xac, 0xf6, - 0xe0, 0x91, 0x4a, 0x27, 0x96, 0x1b, 0x41, 0xc7, 0x1f, 0x41, 0x52, 0xe9, 0x16, 0x84, 0x97, 0x9d, - 0xd5, 0x1e, 0x46, 0x52, 0xe9, 0x4a, 0xc2, 0xdf, 0xce, 0x6a, 0x47, 0x4f, 0x2a, 0xdd, 0xa2, 0xf0, - 0xbc, 0xb3, 0xda, 0x21, 0x94, 0x4a, 0x77, 0x55, 0xf8, 0xe0, 0x59, 0xed, 0x51, 0x25, 0x95, 0xee, - 0x31, 0xe1, 0x8d, 0x67, 0xb5, 0x87, 0x96, 0x54, 0xba, 0x25, 0xe1, 0x97, 0x93, 0xfa, 0xe3, 0x4b, - 0x2a, 0xe1, 0x35, 0xcf, 0x43, 0x27, 0xf5, 0x07, 0x99, 0x54, 0xca, 0x77, 0x7a, 0xbe, 0x3a, 0xa9, - 0x3f, 0xd2, 0xa4, 0x52, 0x2e, 0x7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4f, 0xfb, 0xc0, 0x05, 0x0d, 0xc5, - 0x0f, 0x75, 0xc4, 0xf0, 0x8c, 0x01, 0x1d, 0x7f, 0xa0, 0x27, 0x03, 0x49, 0x00, 0xc2, 0x40, 0x48, - 0xb0, 0x21, 0x24, 0x18, 0x0c, 0x64, 0xb0, 0xa1, 0x49, 0xe0, 0xca, 0x12, 0x6c, 0x08, 0x09, 0x12, - 0x3d, 0x19, 0xc8, 0x12, 0xb8, 0x42, 0x82, 0x02, 0xc0, 0x62, 0xfd, 0x05, 0xbb, 0x46, 0x45, 0xa0, - 0x2f, 0xfb, 0xcf, 0xf9, 0x70, 0xf0, 0x88, 0x28, 0x0b, 0xd8, 0x11, 0x0d, 0x66, 0x09, 0x92, 0x1b, - 0xde, 0x25, 0x4b, 0x1f, 0x77, 0xf9, 0x89, 0xb1, 0xa3, 0x71, 0x49, 0xba, 0x12, 0x1b, 0x2e, 0x0a, - 0x9d, 0x4c, 0xb2, 0xb7, 0x28, 0xd2, 0x6c, 0xa8, 0x28, 0x74, 0x3a, 0x42, 0x14, 0xca, 0x24, 0x15, - 0x22, 0x8a, 0xc4, 0x85, 0x89, 0x42, 0xd9, 0xa0, 0x64, 0x58, 0x68, 0x36, 0x31, 0x25, 0xcb, 0x4a, - 0x27, 0x7d, 0x58, 0x30, 0x0a, 0x96, 0x0c, 0xb7, 0xe9, 0x15, 0xb1, 0x08, 0x71, 0x72, 0x0c, 0x4e, - 0x07, 0x5b, 0x84, 0xd3, 0x70, 0x8b, 0xf0, 0x6b, 0x39, 0xce, 0xc8, 0xe3, 0x92, 0x98, 0xcf, 0x48, - 0x68, 0x9c, 0x71, 0x52, 0x2d, 0xce, 0x78, 0xb3, 0xf9, 0x2e, 0x18, 0xe1, 0xa4, 0x38, 0x3d, 0x61, - 0xa6, 0x19, 0xf6, 0xbf, 0x43, 0x09, 0x66, 0xca, 0x28, 0x29, 0xcf, 0x11, 0x57, 0x6d, 0x35, 0x57, - 0x21, 0xcd, 0x09, 0x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 0xd8, 0x61, 0xfc, 0xcd, 0xfd, 0x36, 0x93, 0xfe, 0x9e, 0x66, 0x11, - 0xe8, 0x8f, 0x65, 0x6e, 0xfe, 0xc7, 0xa5, 0xf4, 0xb7, 0x36, 0x37, 0x22, 0x30, 0xca, 0x9e, 0xa3, - 0x74, 0xd9, 0xd3, 0xb5, 0x68, 0x85, 0xfc, 0x72, 0x04, 0x86, 0xc4, 0x95, 0xb9, 0x0d, 0x69, 0x71, - 0x41, 0x9f, 0xe0, 0xa6, 0x9e, 0x9a, 0x97, 0x34, 0xdc, 0xc5, 0x63, 0xda, 0xe7, 0x1b, 0x3d, 0xbe, - 0xa2, 0x6b, 0xb2, 0xa3, 0x34, 0x4e, 0xcc, 0xc3, 0x51, 0x1f, 0xb2, 0xc3, 0x2c, 0xc8, 0x53, 0xa7, - 0x61, 0x90, 0x85, 0x36, 0x3e, 0x2e, 0x5c, 0xc1, 0xc7, 0x8d, 0xf8, 0x2f, 0x3e, 0xc2, 0xc4, 0x7f, - 0x8b, 0x99, 0x68, 0x61, 0xf9, 0x26, 0x8e, 0x90, 0x8e, 0xbc, 0x8a, 0x3e, 0x7e, 0x47, 0x48, 0xdb, - 0x03, 0x74, 0xee, 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x09, 0xf8, 0xe0, 0x19, 0x76, 0x79, 0x00, - 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type Uint128PairFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message -} - -func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_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 -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_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 valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(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 = 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 -} - -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 { - v77 := r.Intn(100) - tmps := make([]rune, v77) - for i := 0; i < v77; 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)) - v78 := r.Int63() - if r.Intn(2) == 0 { - v78 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v78)) - 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 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - 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 sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_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 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{ - // 1582 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6f, 0xdb, 0xc6, - 0x16, 0x35, 0x25, 0x59, 0x1f, 0x57, 0x5f, 0xf4, 0x24, 0xef, 0x41, 0xcf, 0xc0, 0xb3, 0x1d, 0x05, - 0x48, 0x9c, 0xe0, 0x45, 0xce, 0x73, 0xd2, 0x36, 0x75, 0xd3, 0xa6, 0x96, 0x62, 0x21, 0x6e, 0x24, - 0xc5, 0x95, 0xec, 0xb8, 0x45, 0x80, 0x0a, 0x94, 0x4d, 0xc9, 0x44, 0x25, 0xd2, 0x20, 0xa9, 0xa0, - 0xde, 0xe5, 0x67, 0x74, 0x57, 0x74, 0xd7, 0x65, 0x91, 0x45, 0xd1, 0x65, 0xbb, 0xf3, 0xb2, 0x40, - 0x37, 0x45, 0x17, 0x41, 0x92, 0x6e, 0xb2, 0xcc, 0x32, 0xcb, 0xce, 0x07, 0x49, 0x0d, 0xa9, 0xa1, - 0xd8, 0x74, 0xd3, 0x8d, 0x17, 0x63, 0x71, 0x2e, 0xcf, 0x39, 0x73, 0x67, 0x38, 0x73, 0x79, 0x40, - 0xc3, 0xd2, 0x81, 0x31, 0xea, 0x19, 0xd6, 0x9a, 0xae, 0x6a, 0xf6, 0x91, 0x6a, 0xae, 0xe1, 0x3f, - 0xc7, 0xa6, 0x61, 0x1b, 0x37, 0x2a, 0xf4, 0x07, 0x65, 0xbc, 0xc0, 0xe2, 0xb5, 0x01, 0x86, 0x8c, - 0x7b, 0x15, 0xcc, 0x58, 0x1b, 0x18, 0x03, 0x63, 0x8d, 0xc6, 0x7b, 0xe3, 0x3e, 0xed, 0xd1, 0x0e, - 0xbd, 0x62, 0xcc, 0xc5, 0xf7, 0x42, 0xe1, 0xb6, 0x6a, 0xd9, 0x6b, 0xce, 0xb8, 0x3d, 0xc3, 0x3e, - 0x22, 0x83, 0x92, 0x18, 0x23, 0x96, 0x7f, 0x9e, 0x87, 0x54, 0x53, 0xb5, 0x2c, 0x65, 0xa0, 0x22, - 0x04, 0x09, 0x5d, 0x19, 0xa9, 0x25, 0x69, 0x45, 0x5a, 0xcd, 0xb4, 0xe9, 0x35, 0x7a, 0x07, 0xd2, - 0x47, 0xda, 0x50, 0x31, 0x35, 0xfb, 0xa4, 0x14, 0xc3, 0xf1, 0xc2, 0x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a, 0x5e, - 0x2a, 0x4c, 0x24, 0x17, 0x91, 0x0a, 0xa7, 0xe2, 0xa4, 0xc2, 0x64, 0x70, 0x31, 0xac, 0x1a, 0x06, - 0x41, 0x3a, 0x55, 0x69, 0x59, 0x20, 0xe1, 0x20, 0x9c, 0x62, 0xd8, 0x63, 0x3d, 0xfa, 0x44, 0xe8, - 0x26, 0x27, 0xe4, 0x42, 0xf8, 0x13, 0x71, 0x31, 0xee, 0x13, 0x71, 0xfb, 0xfc, 0x39, 0xab, 0x9e, - 0xe0, 0xaa, 0x42, 0x74, 0x8a, 0x91, 0xe7, 0xcc, 0x85, 0x06, 0xce, 0x99, 0x1b, 0x46, 0x9f, 0x42, - 0xd1, 0x85, 0x92, 0xf2, 0x44, 0x44, 0x65, 0x2a, 0x7a, 0x79, 0x86, 0xa8, 0x83, 0x64, 0x9a, 0x45, - 0xcb, 0x1f, 0x45, 0x2d, 0x28, 0xb8, 0xc0, 0xa6, 0x45, 0xa7, 0xbb, 0x40, 0x15, 0x2f, 0xcd, 0x50, - 0x64, 0x40, 0x26, 0x58, 0xb0, 0x7c, 0xc1, 0xc5, 0xbb, 0xf0, 0x6f, 0x71, 0x35, 0xe2, 0xcb, 0x6f, - 0x86, 0x95, 0xdf, 0xf3, 0x7c, 0xf9, 0x95, 0xf8, 0xf2, 0x5d, 0x83, 0x7f, 0x09, 0x6b, 0x4f, 0x94, - 0x48, 0x8c, 0x17, 0xf9, 0x00, 0xf2, 0xbe, 0x92, 0xc3, 0x93, 0xe7, 0x05, 0xe4, 0xf9, 0x69, 0xf2, - 0x64, 0x6b, 0x09, 0xde, 0x1e, 0x3e, 0x72, 0x9c, 0x27, 0xdf, 0x86, 0x82, 0xbf, 0xde, 0xf0, 0xec, - 0xbc, 0x80, 0x9d, 0x17, 0xb0, 0xc5, 0x63, 0x27, 0x04, 0xec, 0x44, 0x80, 0xdd, 0x09, 0x1d, 0x7b, - 0x41, 0xc0, 0x5e, 0x10, 0xb0, 0xc5, 0x63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, 0x92, 0x10, 0x6b, 0x6e, 0xca, 0x73, 0xf4, 0xb7, 0x2a, 0x4b, - 0xf4, 0xb7, 0x26, 0xc7, 0xaa, 0x8d, 0xd3, 0x17, 0x4b, 0x73, 0xbf, 0xe0, 0xf6, 0x1b, 0x6e, 0xcf, - 0x5f, 0x2c, 0x49, 0xaf, 0x70, 0x7b, 0x8d, 0xdb, 0x1b, 0xdc, 0x9e, 0xbc, 0x5c, 0x92, 0xbe, 0xc3, - 0xed, 0x7b, 0xdc, 0x7e, 0xc4, 0xed, 0x27, 0xdc, 0x4e, 0x5f, 0x62, 0x3c, 0x6e, 0xcf, 0xf1, 0xf5, - 0x2b, 0xfc, 0xfb, 0x1a, 0xff, 0xbe, 0xc1, 0xbf, 0x4f, 0xfe, 0x58, 0x9a, 0xeb, 0x25, 0xd9, 0xdc, - 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x89, 0x7d, 0x21, 0xda, 0x40, 0x1a, 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 490e8102..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto +++ /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 -// -// 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; - } -} 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 9112e443..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go +++ /dev/null @@ -1,1934 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/neither/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/neither/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUint128PairProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUint128PairFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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 TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUint128PairStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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) - } -} - -//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 5b87ea9a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go +++ /dev/null @@ -1,125 +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) - } - } -} 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 2fbde0b4..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go +++ /dev/null @@ -1,9730 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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} -} - -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.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7455 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, - 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, - 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89, - 0x5e, 0xb9, 0x92, 0xfc, 0x88, 0x17, 0x4b, 0x50, 0xe4, 0x95, 0x44, 0x9b, 0xba, 0xd4, 0xf2, 0x92, - 0xb6, 0x27, 0x7f, 0x2c, 0xb2, 0xc9, 0x6e, 0x36, 0xd9, 0xc5, 0xee, 0xb6, 0x4d, 0x8b, 0xe6, 0x1d, - 0x3b, 0x45, 0x1a, 0x27, 0x7d, 0x25, 0x69, 0x1a, 0x14, 0x41, 0xd1, 0xb8, 0x68, 0x93, 0x4e, 0xff, - 0x29, 0xdc, 0xf4, 0x9f, 0xa2, 0x28, 0x8c, 0xbc, 0x80, 0xa6, 0x6d, 0xda, 0x26, 0x80, 0x81, 0x04, - 0x48, 0xfe, 0xe8, 0x79, 0xdf, 0x73, 0x0e, 0xef, 0xe5, 0xa5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, - 0x98, 0xcd, 0xc4, 0x91, 0x27, 0xa4, 0x28, 0x83, 0xa5, 0x27, 0x4b, 0x0b, 0x88, 0x62, 0x40, 0x6d, - 0x41, 0x34, 0x83, 0xe6, 0x30, 0x0c, 0x91, 0x96, 0xc2, 0xda, 0xda, 0x72, 0x26, 0x21, 0x78, 0x6e, - 0x6c, 0x5a, 0x4b, 0xab, 0x57, 0x33, 0x43, 0x82, 0xe7, 0x55, 0x6b, 0x6d, 0x6b, 0x3d, 0x03, 0x82, - 0xc3, 0x4a, 0x69, 0x63, 0x63, 0xfe, 0x6a, 0x29, 0x93, 0x14, 0x14, 0x85, 0xa7, 0x36, 0x4b, 0x1b, - 0x99, 0x94, 0x22, 0x16, 0x1a, 0x62, 0x58, 0x0c, 0x51, 0x5a, 0xdd, 0x5a, 0xc9, 0xa4, 0xcd, 0x51, - 0x18, 0xa6, 0x43, 0x70, 0x21, 0x46, 0xb4, 0x26, 0x24, 0x69, 0xc6, 0x13, 0x84, 0x72, 0x19, 0x55, - 0x1a, 0x10, 0x85, 0x99, 0x2b, 0x42, 0x9c, 0x78, 0x17, 0xf2, 0xe2, 0xf4, 0xf2, 0x7c, 0xa1, 0xb4, - 0x5c, 0x5e, 0x5b, 0xdf, 0x5c, 0x5a, 0x5b, 0x9d, 0x5f, 0x46, 0xba, 0x13, 0x6d, 0x56, 0xe9, 0x5d, - 0x5b, 0x4b, 0x56, 0x69, 0x01, 0xe9, 0x4f, 0x6a, 0x5b, 0x2f, 0xcd, 0x6f, 0xa2, 0x36, 0x23, 0x37, - 0x05, 0x63, 0x7e, 0x79, 0xc6, 0x2f, 0x32, 0x72, 0x9f, 0x89, 0xc0, 0x51, 0x9f, 0x94, 0xe9, 0x1b, - 0x45, 0x8f, 0x42, 0x9c, 0x7a, 0x1a, 0x5d, 0x44, 0xee, 0xf5, 0xcd, 0xbd, 0xc4, 0xef, 0xba, 0x16, - 0x12, 0x82, 0x93, 0x17, 0x52, 0x23, 0x60, 0x21, 0xc5, 0x2c, 0xba, 0xdc, 0xe9, 0xfd, 0x11, 0xc8, - 0x06, 0xf1, 0x0e, 0x89, 0xf7, 0xa8, 0x12, 0xef, 0x0f, 0xea, 0x02, 0x9c, 0x0e, 0x9e, 0x43, 0x97, - 0x14, 0x9f, 0x8b, 0xc0, 0xb8, 0x7f, 0xbd, 0xe1, 0x2b, 0xc3, 0x23, 0x30, 0xb0, 0x6f, 0xb7, 0xf7, - 0x9a, 0x7c, 0xcd, 0x3d, 0xeb, 0x93, 0xc9, 0x71, 0xb7, 0xae, 0x2b, 0x86, 0x92, 0x97, 0x02, 0x23, - 0xa8, 0x68, 0xa0, 0xd2, 0x74, 0x49, 0xfa, 0xa1, 0x28, 0x1c, 0xf3, 0x65, 0xee, 0x2b, 0xe8, 0x9d, - 0x00, 0x75, 0xe7, 0xa0, 0xd3, 0xa6, 0xeb, 0x2a, 0x4d, 0x33, 0x43, 0xa4, 0x85, 0x84, 0x30, 0x4e, - 0x21, 0x9d, 0xb6, 0xe8, 0x37, 0x48, 0x3f, 0xd0, 0x26, 0x42, 0x70, 0xc5, 0x13, 0x34, 0x46, 0x04, - 0x3d, 0x11, 0x30, 0xd3, 0xae, 0x25, 0x6b, 0x06, 0x32, 0xd5, 0x46, 0xdd, 0x76, 0xda, 0x65, 0xb7, - 0xdd, 0xb2, 0x2b, 0xfb, 0x75, 0x67, 0x97, 0xe4, 0xd1, 0x44, 0x3e, 0xbe, 0x53, 0x69, 0xb8, 0xb6, - 0x35, 0x42, 0xbb, 0x37, 0x78, 0x2f, 0x46, 0x90, 0xc5, 0xa2, 0x25, 0x21, 0x06, 0x14, 0x04, 0xed, - 0x16, 0x88, 0xdc, 0xb7, 0x06, 0x21, 0x29, 0x55, 0x67, 0xe6, 0x69, 0x48, 0x3d, 0x53, 0x79, 0xae, - 0x52, 0xe6, 0x15, 0x37, 0xd5, 0x44, 0x12, 0xb7, 0xad, 0xb3, 0xaa, 0x7b, 0x06, 0xc6, 0x08, 0x09, - 0x9a,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e8, 0x19, 0x63, 0x46, 0xcf, 0x18, 0x33, 0x7a, 0xc6, 0x98, 0xd1, 0x33, 0xc6, 0x8c, - 0x9e, 0x31, 0x66, 0xf4, 0x8c, 0x31, 0xa3, 0x67, 0x8c, 0x19, 0xbd, 0x63, 0xcc, 0x08, 0x89, 0x31, - 0x23, 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, - 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, - 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, - 0x8a, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, - 0x30, 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xc4, 0x00, 0x93, 0xc6, 0xd8, 0x3a, 0x79, 0x38, 0x80, 0x99, - 0xe2, 0x84, 0x16, 0x69, 0x03, 0xd8, 0x74, 0x19, 0xcf, 0x24, 0x27, 0xb4, 0x58, 0x53, 0xfb, 0x67, - 0x45, 0x3f, 0x8f, 0x36, 0xb5, 0xff, 0x82, 0xe8, 0xe7, 0xf1, 0xa6, 0xf6, 0xcf, 0x89, 0x7e, 0x1e, - 0x71, 0x6a, 0xff, 0x45, 0xd1, 0xcf, 0x63, 0x4e, 0xed, 0xbf, 0x24, 0xfa, 0x79, 0xd4, 0xa9, 0xfd, - 0x97, 0x45, 0x3f, 0x8f, 0x3b, 0xb5, 0xff, 0x8a, 0xe8, 0xe7, 0x91, 0xa7, 0xf6, 0x3f, 0x60, 0x9e, - 0xd2, 0x63, 0x8f, 0x13, 0x08, 0xd3, 0x9e, 0xd2, 0xa3, 0x4f, 0xa3, 0x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, 0x22, 0x4f, 0x5a, 0x73, 0xef, 0x8b, 0x40, 0x62, 0xc1, 0xb6, 0x0f, 0x88, 0xc2, 0xef, 0x86, - 0xd8, 0x42, 0xf3, 0x79, 0x87, 0x09, 0x38, 0xca, 0x34, 0x8a, 0xbb, 0x99, 0x4e, 0x63, 0x35, 0xd4, - 0x8d, 0xc8, 0x24, 0xbd, 0x1f, 0x15, 0x7a, 0x97, 0xe8, 0x88, 0xee, 0x73, 0x8a, 0xee, 0x99, 0x01, - 0x31, 0x51, 0x97, 0xfe, 0x2f, 0x43, 0x52, 0x1a, 0xc5, 0x9c, 0x64, 0x62, 0x44, 0x75, 0xa0, 0xac, - 0x2b, 0x2c, 0x49, 0xce, 0x86, 0x61, 0x65, 0x60, 0x0c, 0x95, 0x54, 0x1c, 0x00, 0x25, 0x6a, 0x9e, - 0x52, 0xd5, 0xec, 0x4f, 0xca, 0x54, 0x3d, 0x43, 0x75, 0x44, 0xd4, 0x7d, 0x86, 0x3a, 0x67, 0xb0, - 0x11, 0xdb, 0xe8, 0x7b, 0x2e, 0x0e, 0xc6, 0x6a, 0xbd, 0x91, 0x7b, 0x18, 0x80, 0x86, 0x3c, 0x7e, - 0xb8, 0x4a, 0x8b, 0xba, 0x34, 0x57, 0xf0, 0xe6, 0x9e, 0xbd, 0x89, 0xfe, 0x62, 0x12, 0xb5, 0x9e, - 0xc2, 0x09, 0x06, 0x68, 0x88, 0x11, 0xfc, 0xbd, 0xa1, 0x78, 0xdf, 0x4a, 0x0c, 0x93, 0x66, 0x29, - 0xe9, 0x53, 0x76, 0x7b, 0xde, 0x69, 0xb6, 0xf7, 0xec, 0x96, 0x86, 0x98, 0x35, 0x2f, 0x28, 0x01, - 0x9b, 0x9e, 0xbd, 0x43, 0x20, 0x02, 0x41, 0x17, 0x72, 0x5f, 0x24, 0x02, 0xe2, 0x52, 0xa0, 0x6b, - 0x82, 0x46, 0x1f, 0x13, 0x34, 0x2f, 0x29, 0xf5, 0x5b, 0x0f, 0x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 0x48, - 0xaf, 0x61, 0xb1, 0x09, 0x8e, 0xc0, 0x4e, 0x41, 0x64, 0x45, 0x2d, 0x84, 0x64, 0xae, 0x56, 0x64, - 0x5f, 0x2b, 0x1f, 0x0d, 0xa1, 0x1e, 0xad, 0x6c, 0x33, 0x44, 0xd9, 0x36, 0x15, 0x4b, 0xa4, 0x33, - 0xa3, 0xe8, 0x5f, 0xc8, 0x0c, 0xb3, 0x71, 0xff, 0xca, 0x80, 0x0c, 0x2d, 0x75, 0x90, 0x11, 0xeb, - 0x4e, 0xbd, 0xdd, 0x5d, 0xaf, 0x0a, 0x89, 0xcd, 0x47, 0x61, 0x08, 0xab, 0x74, 0x91, 0xbd, 0x88, - 0x07, 0xab, 0xfe, 0x34, 0x2b, 0x51, 0x34, 0x16, 0xac, 0x81, 0xb8, 0x0e, 0x79, 0xe7, 0x0d, 0xc1, - 0xa0, 0x1b, 0x0c, 0x63, 0x75, 0x75, 0x85, 0x2d, 0x6e, 0x73, 0x3d, 0xa1, 0xec, 0x11, 0x18, 0x76, - 0xc5, 0xda, 0xdc, 0x5d, 0xcb, 0x70, 0x56, 0x57, 0x90, 0xdb, 0x44, 0x11, 0x1b, 0x5a, 0xf0, 0x9e, - 0xe9, 0x87, 0x8d, 0x15, 0x75, 0x56, 0x26, 0xfe, 0x34, 0x02, 0xc3, 0x4a, 0x2b, 0x5a, 0x6d, 0x53, - 0xb4, 0x41, 0x9a, 0xee, 0x80, 0x95, 0x72, 0xa4, 0x36, 0x2e, 0x73, 0xf4, 0x16, 0x65, 0x9e, 0x98, - 0x47, 0x77, 0xed, 0x6a, 0xbb, 0x39, 0x0d, 0xa6, 0xdc, 0xc4, 0x84, 0xa0, 0x2f, 0x31, 0x31, 0x9d, - 0xae, 0x9e, 0xdc, 0x9d, 0x28, 0x0b, 0x0b, 0xbd, 0x8a, 0x77, 0x6f, 0xac, 0x96, 0x36, 0xf0, 0x6b, - 0x33, 0x22, 0xb9, 0xaf, 0x46, 0x20, 0xc9, 0xca, 0xd6, 0x6a, 0xf3, 0xc0, 0x36, 0x0b, 0x10, 0x99, - 0x67, 0x1e, 0x74, 0x73, 0x72, 0x47, 0x2a, 0x68, 0x75, 0x8a, 0x14, 0xfa, 0x37, 0x75, 0x64, 0xdb, - 0x9c, 0x85, 0x48, 0x91, 0x19, 0xb8, 0x3f, 0xcb, 0x44, 0xaa, 0xb9, 0x1f, 0x1b, 0x70, 0x54, 0x2e, - 0xa3, 0x79, 0x3e, 0x39, 0xad, 0xde, 0x37, 0xe5, 0x87, 0xce, 0xcf, 0x5e, 0x98, 0x9b, 0xc6, 0xff, - 0x08, 0x97, 0x3c, 0xad, 0xde, 0x42, 0x75, 0x93, 0x74, 0x3d, 0x26, 0x92, 0x8f, 0x49, 0xbd, 0x5d, - 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x47, - 0x01, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xf7, 0x63, 0x22, - 0xac, 0x3b, 0xf0, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x91, 0x3c, - 0xaa, 0xcf, 0x3a, 0x76, 0xf0, 0xa1, 0x83, 0x8a, 0xef, 0x75, 0x0f, 0xe8, 0x25, 0xe0, 0x35, 0x18, - 0xa1, 0xfb, 0x11, 0x45, 0xfc, 0x84, 0x56, 0xdd, 0x41, 0xa9, 0xf8, 0x21, 0x48, 0xd1, 0x26, 0x7a, - 0x97, 0xe3, 0x77, 0x17, 0x48, 0xfb, 0x59, 0xba, 0x4d, 0x55, 0x25, 0xea, 0xdc, 0xcf, 0x63, 0x30, - 0x4e, 0xbb, 0xf1, 0xcf, 0x08, 0x95, 0x87, 0x8c, 0xce, 0x6a, 0x47, 0x4a, 0x69, 0x0c, 0xff, 0xee,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 0x36, 0x3e, 0x32, 0x5c, 0xc1, 0x47, 0x8e, 0xf8, 0x2f, 0x3e, 0xc6, 0xc4, 0x7f, - 0x8b, 0x99, 0x68, 0x61, 0xf9, 0x26, 0x8e, 0x91, 0x8e, 0x04, 0x1d, 0x23, 0x6d, 0x0f, 0xd0, 0xb9, - 0xff, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x44, 0x83, 0x84, 0xab, 0x7a, 0x79, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type Uint128PairFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message -} - -func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_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 -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_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 valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(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 = 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 -} - -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 { - v77 := r.Intn(100) - tmps := make([]rune, v77) - for i := 0; i < v77; 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)) - v78 := r.Int63() - if r.Intn(2) == 0 { - v78 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v78)) - 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 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - 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 sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_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 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 - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - m.Score = float32(math.Float32frombits(v)) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Terrain[mapkey] = mapvalue - } else { - var mapvalue *Nested - m.Terrain[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Proto2Value[mapkey] = mapvalue - } else { - var mapvalue *test.NinOptEnum - m.Proto2Value[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.NameMapping[mapkey] = mapvalue - } else { - var mapvalue string - m.NameMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MsgMapping[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.MsgMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3 - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.ByteMapping[mapkey] = mapvalue - } else { - var mapvalue []byte - m.ByteMapping[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - m.F = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTheproto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.NestedMapField == nil { - m.NestedMapField = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.NestedMapField[mapkey] = mapvalue - } else { - var mapvalue float64 - 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 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{ - // 1587 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4b, 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xef, 0x3a, - 0xba, 0x7e, 0xe2, 0x6e, 0x61, 0xd6, 0xa9, 0x3e, 0x45, 0x90, 0x59, 0x1f, 0x0e, 0xb7, 0x95, 0x63, - 0x0b, 0xed, 0xc3, 0x5c, 0xc7, 0x36, 0x35, 0xbd, 0xbf, 0x6b, 0xdc, 0x35, 0x9c, 0xee, 0x50, 0xc5, - 0x51, 0x8c, 0x26, 0x4b, 0x7b, 0x85, 0x9b, 0xb7, 0x0b, 0xaf, 0x4d, 0x60, 0xd9, 0x02, 0xcf, 0x59, - 0xe1, 0x38, 0xda, 0x05, 0xd9, 0x03, 0x37, 0x87, 0x86, 0x62, 0x13, 0xdd, 0x04, 0xd5, 0x5d, 0x9e, - 0xa2, 0xeb, 0x41, 0x99, 0xac, 0x6c, 0x85, 0xc2, 0xe8, 0x36, 0x64, 0x37, 0x75, 0xfb, 0xc6, 0x2a, - 0x51, 0x4b, 0x52, 0xb5, 0x25, 0x81, 0x9a, 0x07, 0x61, 0x2a, 0x59, 0xcd, 0xed, 0xba, 0xec, 0x77, - 0x6f, 0x12, 0x76, 0x6a, 0x1a, 0x9b, 0x42, 0xc6, 0x6c, 0xda, 0x45, 0x77, 0x20, 0xb7, 0xe7, 0x49, - 0xd1, 0x53, 0x93, 0x5f, 0xbd, 0x20, 0xa0, 0xfb, 0x18, 0xc6, 0xcf, 0x39, 0xfe, 0xf0, 0xae, 0x00, - 0x1b, 0x3f, 0x3d, 0x55, 0x80, 0x4b, 0x80, 0x0a, 0xf8, 0x19, 0x74, 0xfc, 0x0c, 0x32, 0x91, 0x02, - 0x9d, 0x50, 0x06, 0x16, 0x9f, 0x41, 0xc7, 0xcf, 0x20, 0x3b, 0x55, 0x80, 0xcf, 0xc0, 0xf2, 0x33, - 0xa8, 0x03, 0x34, 0xb5, 0xaf, 0xd4, 0x23, 0x96, 0x42, 0x8e, 0x2a, 0x54, 0x05, 0x0a, 0x63, 0x10, - 0x93, 0x80, 0x9e, 0x1f, 0x40, 0x1b, 0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d, 0x9d, 0xba, 0xc6, 0xad, 0xf0, - 0x84, 0x46, 0x4d, 0x70, 0x45, 0xc9, 0xee, 0x3b, 0x59, 0x0f, 0x04, 0xe7, 0xd7, 0xe1, 0x9c, 0x00, - 0xf6, 0x36, 0x2f, 0xe4, 0xab, 0x17, 0x20, 0xe3, 0x1e, 0x6d, 0x94, 0x86, 0xc4, 0xf6, 0xba, 0x3c, - 0x43, 0x7f, 0xeb, 0xb2, 0x44, 0x7f, 0x1b, 0x72, 0xa2, 0xbe, 0x75, 0xfa, 0x62, 0x61, 0xe6, 0x17, - 0xdc, 0x7e, 0xc3, 0xed, 0xf9, 0x8b, 0x05, 0xe9, 0x15, 0x6e, 0xaf, 0x71, 0x7b, 0x83, 0xdb, 0x93, - 0x97, 0x0b, 0xd2, 0x77, 0xb8, 0x7d, 0x8f, 0xdb, 0x8f, 0xb8, 0xfd, 0x84, 0xdb, 0xe9, 0x4b, 0x8c, - 0xc7, 0xbf, 0xcf, 0x71, 0x7b, 0x85, 0xaf, 0x5f, 0xe3, 0xdf, 0x37, 0xf8, 0xf7, 0xc9, 0x1f, 0x0b, - 0x33, 0xdd, 0x34, 0x9b, 0xfb, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x63, 0xc3, 0x53, 0x44, - 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 f2509719..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto +++ /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 -// -// 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; - } -} 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 68a6ca71..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go +++ /dev/null @@ -1,1934 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unmarshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUint128PairProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUint128PairFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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 TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUint128PairStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/proto3_test.go deleted file mode 100644 index 5b87ea9a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/proto3_test.go +++ /dev/null @@ -1,125 +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) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go deleted file mode 100644 index 3a5a989a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go +++ /dev/null @@ -1,10822 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeboth/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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} -} - -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.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7457 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xff, 0x0e, 0x87, 0x94, 0xa8, 0x43, 0x8a, 0xa2, 0x66, 0x77, 0x65, 0x5a, 0x5e, 0xef, 0x83, - 0x5e, 0xaf, 0xd7, 0x8a, 0xad, 0xd5, 0x6a, 0x9f, 0xa6, 0x5f, 0x7f, 0x91, 0xa2, 0xd6, 0xda, 0xe8, - 0x95, 0x91, 0xe4, 0x47, 0xfc, 0x47, 0x09, 0x8a, 0x1c, 0x49, 0xb4, 0xa9, 0xa1, 0xca, 0xa1, 0x6c, - 0x6f, 0x3e, 0x14, 0x6e, 0xd2, 0xa6, 0x49, 0x8b, 0x3e, 0xd3, 0xa2, 0x79, 0xc7, 0x4e, 0x91, 0xc6, - 0x49, 0x5f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, 0xd7, 0x8b, 0x0b, 0xe5, 0xac, - 0x61, 0x65, 0x00, 0x48, 0xc3, 0xdc, 0xc2, 0xf2, 0xcc, 0x5a, 0x36, 0x26, 0xae, 0xe7, 0x97, 0xd6, - 0x2e, 0x9e, 0xcf, 0x9a, 0x02, 0xb0, 0x4e, 0x1b, 0xe2, 0x32, 0xc1, 0xb9, 0xe9, 0x6c, 0x02, 0x79, - 0x42, 0x9a, 0x32, 0x98, 0x7f, 0xbc, 0x3c, 0x8b, 0x28, 0x06, 0xd4, 0x16, 0x44, 0x33, 0x68, 0x0d, - 0xc3, 0x10, 0x69, 0x29, 0x2e, 0x2f, 0x2f, 0x64, 0x93, 0x82, 0xe7, 0xea, 0x9a, 0x3d, 0xbf, 0x74, - 0x25, 0x3b, 0x24, 0x78, 0x5e, 0xb1, 0x97, 0xd7, 0x57, 0xb2, 0x20, 0x38, 0x2c, 0x96, 0x57, 0x57, - 0x67, 0xae, 0x94, 0xb3, 0x29, 0x41, 0x51, 0x7c, 0x62, 0xad, 0xbc, 0x9a, 0x4d, 0x2b, 0x62, 0xa1, - 0x21, 0x86, 0xc5, 0x10, 0xe5, 0xa5, 0xf5, 0xc5, 0x6c, 0xc6, 0x1a, 0x85, 0x61, 0x3a, 0x04, 0x17, - 0x62, 0x44, 0x6b, 0x42, 0x92, 0x66, 0x7d, 0x41, 0x28, 0x97, 0x51, 0xa5, 0x01, 0x51, 0x58, 0xf9, - 0x12, 0x24, 0x88, 0x77, 0x21, 0x2f, 0xce, 0x2c, 0xcc, 0x14, 0xcb, 0x0b, 0x95, 0xe5, 0x95, 0xb5, - 0xf9, 0xe5, 0xa5, 0x99, 0x05, 0xa4, 0x3b, 0xd1, 0x66, 0x97, 0xdf, 0xb1, 0x3e, 0x6f, 0x97, 0x67, - 0x91, 0xfe, 0xa4, 0xb6, 0x95, 0xf2, 0xcc, 0x1a, 0x6a, 0x33, 0xf3, 0x13, 0x70, 0x28, 0x28, 0xcf, - 0x04, 0x45, 0x46,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 0xd0, 0x6e, 0x81, 0xc8, 0x7f, 0x63, - 0x10, 0x52, 0x52, 0x75, 0x66, 0x9d, 0x80, 0xf4, 0x53, 0xd5, 0x67, 0xaa, 0x15, 0x5e, 0x71, 0x53, - 0x4d, 0xa4, 0x70, 0xdb, 0x0a, 0xab, 0xba, 0xa7, 0xe0, 0x10, 0x21, 0x41, 0x73, 0x44, 0x03, 0xd5, - 0x9a, 0x55, 0xcf, 0x23, 0x4a, 0x4b, 0x12, 0x52, 0x0b, 0xf7, 0x2d, 0xe3, 0xae, 0x12, 0xef, 0xb1, - 0x2e, 0xc0, 0x41, 0x82, 0xd8, 0x41, 0x89, 0xb7, 0xb1, 0xdb, 0x74, 0x2a, 0xf8, 0x1e, 0xc0, 0x23, - 0xf9, 0x54, 0x48, 0x36, 0x8a, 0x29, 0x16, 0x19, 0x01, 0x96, 0xc8, 0xb3, 0xae, 0xc0, 0xed, 0x04, - 0xb6, 0xe5, 0xb8, 0x4e, 0xbb, 0xda, 0x71, 0x2a, 0xce, 0x2f, 0xee, 0x21, 0xda, 0x4a, 0xd5, 0xad, - 0x57, 0xb6, 0xab, 0xde, 0x76, 0xee, 0x90, 0xcc, 0xe0, 0x56, 0x4c, 0x7b, 0x85, 0x91, 0x96, 0x09, - 0xe5, 0x8c, 0x5b, 0x7f, 0x04, 0xd1, 0x59, 0x05, 0x18, 0x23, 0x8c, 0x90, 0x52, 0xd0, 0x9c, 0x2b, - 0xb5, 0x6d, 0xa7, 0xf6, 0x74, 0x65, 0xaf, 0xb3, 0x79, 0x39, 0x77, 0x9b, 0xcc, 0x81, 0x08, 0xb9, - 0x4a, 0x68, 0x4a, 0x98, 0x64, 0x1d, 0x51, 0x58, 0xab, 0x90, 0xc6, 0xf6, 0xd8, 0x69, 0xbc, 0x0b, - 0x89, 0xdd, 0x6a, 0x93, 0x35, 0x22, 0x13, 0x10, 0xdc, 0x92, 0x12, 0x27, 0x97, 0x19, 0x60, 0x11, - 0xd5, 0xa7, 0x85, 0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 0x0c, 0x45, 0xed, 0x03, 0xa4, 0x69, 0x06, 0xb7, 0xf4, 0xab, 0xbf, 0x9f, 0x89, - 0x6f, 0x7e, 0xdc, 0x80, 0xac, 0x5e, 0x8c, 0x69, 0x02, 0x1a, 0x6f, 0xaa, 0x80, 0x1f, 0x35, 0x20, - 0xa3, 0x56, 0x60, 0x9a, 0x78, 0x27, 0xde, 0x54, 0xf1, 0x3e, 0x62, 0xc0, 0xb0, 0x52, 0x77, 0xfd, - 0x5c, 0x49, 0xf7, 0x61, 0x13, 0x0e, 0x06, 0xe0, 0x50, 0x02, 0xa2, 0x05, 0x2a, 0xad, 0x99, 0xef, - 0xed, 0x67, 0xac, 0x49, 0xbc, 0xfe, 0xad, 0x54, 0xdb, 0x1d, 0x56, 0xcf, 0xa2, 0xf5, 0xb2, 0x51, - 0x47, 0x49, 0xb5, 0xb1, 0xd9, 0x40, 0xe5, 0x1b, 0xbd, 0x63, 0xa1, 0x55, 0xeb, 0x88, 0xdf, 0x4e, - 0x6f, 0x8f, 0xef, 0x01, 0x6b, 0xb7, 0xe5, 0x35, 0x3a, 0x8d, 0x67, 0xf0, 0xf6, 0x1c, 0xbf, 0x91, - 0xc6, 0x55, 0x6c, 0xdc, 0xce, 0xf2, 0x9e, 0x79, 0xb7, 0x23, 0xa8, 0x5d, 0x67, 0xab, 0xaa, 0x51, - 0xe3, 0x34, 0x64, 0xda, 0x59, 0xde, 0x23, 0xa8, 0x51, 0xa1, 0x59, 0x6f, 0xed, 0xe1, 0x82, 0x80, - 0xd2, 0xe1, 0xac, 0x67, 0xd8, 0x29, 0xda, 0x26, 0x48, 0x58, 0xc5, 0xe6, 0xdf, 0xc1, 0xa7, 0xed, - 0x14, 0x6d, 0xa3, 0x24, 0x77, 0xc1, 0x48, 0x75, 0x6b, 0xab, 0x8d, 0x99, 0x73, 0x46, 0xb4, 0x0c, - 0xcd, 0x88, 0x66, 0x42, 0x38, 0x7e, 0x15, 0x92, 0x5c, 0x0f, 0x78, 0x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, - 0x2b, 0x5c, 0x83, 0xb6, 0xb3, 0xd9, 0x74, 0x6a, 0x58, 0x3b, 0xf0, 0xe2, 0x1d, 0x70, 0xef, 0x56, - 0xa3, 0xb3, 0xbd, 0xb7, 0x31, 0x89, 0x46, 0x38, 0xb3, 0xd5, 0xda, 0x6a, 0xf9, 0xc7, 0x19, 0xf8, - 0x8a, 0x5c, 0x90, 0x6f, 0xec, 0x48, 0x63, 0x48, 0xb4, 0x8e, 0x47, 0x9e, 0x7f, 0x14, 0x96, 0xe0, - 0x20, 0x23, 0xae, 0x90, 0x3d, 0x55, 0x5a, 0x82, 0x5a, 0x3d, 0x6f, 0xc8, 0x73, 0x9f, 0xff, 0x2e, - 0x59, 0x12, 0xec, 0x51, 0x06, 0xc5, 0x7d, 0xb4, 0x48, 0x2d, 0xd8, 0x70, 0x58, 0xe1, 0x47, 0x7d, - 0x18, 0xdd, 0x72, 0xf7, 0xe6, 0xf8, 0x35, 0xc6, 0xf1, 0xa0, 0xc4, 0x71, 0x95, 0x41, 0x0b, 0x25, - 0x18, 0xde, 0x0f, 0xaf, 0xaf, 0x33, 0x5e, 0x69, 0x47, 0x66, 0x72, 0x05, 0x46, 0x08, 0x93, 0xda, - 0x9e, 0xd7, 0x69, 0xed, 0x90, 0x04, 0xd1, 0x9b, 0xcd, 0xdf, 0x7f, 0x97, 0x3a, 0x55, 0x06, 0xc3, - 0x4a, 0x02, 0x55, 0x78, 0x14, 0x0e, 0xe1, 0x16, 0x12, 0x83, 0x32, 0xb7, 0xe8, 0x2d, 0x84, 0xdc, - 0x3f, 0xbd, 0x87, 0xfa, 0xde, 0x41, 0xc1, 0x40, 0xe2, 0x2b, 0x59, 0x62, 0xcb, 0xe9, 0xa0, 0xdc, - 0x86, 0xee, 0xff, 0x9a, 0x4d, 0xab, 0xe7, 0x19, 0x43, 0xee, 0x43, 0xdf, 0x57, 0x2d, 0x71, 0x85, - 0x22, 0x67, 0x9a, 0xcd, 0xc2, 0x3a, 0xdc, 0x12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e5, 0x34, 0x13, 0xf9, 0xc6, 0xc9, 0x69, - 0xc6, 0xf1, 0xcd, 0x92, 0xd3, 0xcc, 0xe2, 0x1b, 0x24, 0xa7, 0x19, 0xc4, 0x37, 0x45, 0x4e, 0x33, - 0x85, 0x6f, 0x04, 0x16, 0x63, 0xb6, 0xb3, 0x1b, 0x10, 0x63, 0x66, 0xcf, 0x18, 0x33, 0x7b, 0xc6, - 0x98, 0xd9, 0x33, 0xc6, 0xcc, 0x9e, 0x31, 0x66, 0xf6, 0x8c, 0x31, 0xb3, 0x67, 0x8c, 0x99, 0x3d, - 0x63, 0xcc, 0xec, 0x19, 0x63, 0x66, 0xef, 0x18, 0x33, 0x23, 0x62, 0xcc, 0x8c, 0x88, 0x31, 0x33, - 0x22, 0xc6, 0xcc, 0x88, 0x18, 0x33, 0x23, 0x62, 0xcc, 0x0c, 0x8d, 0x31, 0xdf, 0xbc, 0x63, 0xaa, - 0x79, 0x03, 0x63, 0xcc, 0x0c, 0x89, 0x31, 0x33, 0x24, 0xc6, 0xcc, 0x90, 0x18, 0x33, 0x43, 0x62, - 0xcc, 0x0c, 0x89, 0x31, 0x33, 0x24, 0xc6, 0xcc, 0x90, 0x18, 0x33, 0xc3, 0x62, 0xcc, 0x0c, 0x8d, - 0x31, 0x33, 0x34, 0xc6, 0xcc, 0xd0, 0x18, 0x33, 0x43, 0x63, 0xcc, 0x0c, 0x8d, 0x31, 0x53, 0x8e, - 0xb1, 0xbf, 0x31, 0xc1, 0xa2, 0x31, 0xb6, 0x42, 0x1e, 0x0e, 0x60, 0xa6, 0x38, 0xaa, 0x45, 0xda, - 0x00, 0x36, 0x5d, 0xd6, 0x37, 0xc9, 0x51, 0x2d, 0xd6, 0xd4, 0xfe, 0x69, 0xd1, 0xcf, 0xa3, 0x4d, - 0xed, 0x3f, 0x27, 0xfa, 0x79, 0xbc, 0xa9, 0xfd, 0xe7, 0x45, 0x3f, 0x8f, 0x38, 0xb5, 0xff, 0x82, - 0xe8, 0xe7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 0x93, 0x25, 0xda, 0xb8, 0x3b, 0xff, 0x04, 0x0c, - 0x09, 0x89, 0x5e, 0x67, 0xd6, 0xb3, 0x74, 0x6a, 0xe8, 0x4e, 0x58, 0x5a, 0x4f, 0xf8, 0xbe, 0x25, - 0xfb, 0x91, 0xe7, 0x71, 0x48, 0x22, 0x35, 0xfb, 0x49, 0x9f, 0x57, 0xa4, 0xf8, 0x44, 0x9e, 0xb4, - 0xe6, 0xdf, 0x6d, 0x40, 0x72, 0xd6, 0x71, 0x76, 0x89, 0xc2, 0xef, 0x84, 0xf8, 0x6c, 0xeb, 0x59, - 0x97, 0x09, 0x38, 0xca, 0x34, 0x8a, 0xbb, 0x99, 0x4e, 0xe3, 0x75, 0xd4, 0x8d, 0xc8, 0x24, 0xbd, - 0x1f, 0x14, 0x7a, 0x97, 0xe8, 0x88, 0xee, 0xf3, 0x8a, 0xee, 0x99, 0x01, 0x31, 0x51, 0x97, 0xfe, - 0x2f, 0x41, 0x4a, 0x1a, 0xc5, 0x3a, 0xcd, 0xc4, 0x88, 0xe9, 0x40, 0x59, 0x57, 0x58, 0x92, 0xbc, - 0x03, 0xc3, 0xca, 0xc0, 0x18, 0x2a, 0xa9, 0x38, 0x04, 0x4a, 0xd4, 0x3c, 0xa1, 0xaa, 0x39, 0x98, - 0x94, 0xa9, 0x7a, 0x8a, 0xea, 0x88, 0xa8, 0xfb, 0x24, 0x75, 0xce, 0x70, 0x23, 0x76, 0xd0, 0xf7, - 0x7c, 0x02, 0xcc, 0xa5, 0x46, 0x33, 0xff, 0x20, 0x00, 0x0d, 0x79, 0xfc, 0x70, 0x95, 0x16, 0x75, - 0x19, 0xae, 0xe0, 0xb5, 0x6d, 0x67, 0x0d, 0xfd, 0xc5, 0x24, 0x6a, 0x3d, 0x85, 0x13, 0x0c, 0xd0, - 0x10, 0x23, 0xf8, 0xbb, 0x23, 0xf1, 0x81, 0x95, 0x18, 0x26, 0xcd, 0x51, 0xd2, 0x27, 0x9c, 0xce, - 0x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54, 0x5e, 0x73, 0x3f, 0x08, 0x70, 0xbd, 0xbc, 0xe6, 0x7a, 0x10, - 0xe0, 0x76, 0x79, 0xcd, 0xed, 0x20, 0xc0, 0xe5, 0xf2, 0x9a, 0xcb, 0x41, 0x80, 0xbb, 0xe5, 0x35, - 0x77, 0x83, 0x00, 0x57, 0xcb, 0x6b, 0xae, 0x06, 0x01, 0x6e, 0x96, 0xd7, 0xdc, 0x0c, 0x02, 0x5c, - 0x2c, 0xaf, 0xb9, 0x18, 0x04, 0xb8, 0x57, 0x5e, 0x73, 0x2f, 0x08, 0x70, 0xad, 0x93, 0xba, 0x6b, - 0x41, 0x90, 0x5b, 0x9d, 0xd4, 0xdd, 0x0a, 0x82, 0x5c, 0xea, 0x0e, 0xdd, 0xa5, 0x86, 0x10, 0x55, - 0x02, 0x37, 0x49, 0xde, 0x74, 0x52, 0xf7, 0x26, 0x08, 0xf2, 0xa4, 0x93, 0xba, 0x27, 0x41, 0x90, - 0x17, 0x9d, 0xd4, 0xbd, 0x08, 0x82, 0x3c, 0xe8, 0x65, 0xdd, 0x83, 0xfc, 0x47, 0x7c, 0xf2, 0xda, - 0x89, 0x62, 0x94, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, 0x87, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, - 0x87, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, 0x87, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, 0x8f, 0x07, - 0x99, 0x7d, 0x79, 0x90, 0x19, 0xe6, 0x41, 0x27, 0xf5, 0x07, 0x1e, 0x20, 0x28, 0x21, 0x9d, 0xd4, - 0x4f, 0x3e, 0xa3, 0x5d, 0xc8, 0xec, 0xcb, 0x85, 0xcc, 0x30, 0x17, 0xfa, 0x0a, 0x2a, 0xa4, 0x14, - 0x17, 0x62, 0xc7, 0x43, 0xaf, 0x57, 0x06, 0xba, 0xd8, 0xc7, 0xf3, 0x15, 0x41, 0x3e, 0x75, 0xb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 0x60, 0x21, 0xfe, 0x0a, 0xa6, 0xfe, 0x03, 0x03, 0x0e, 0xcb, 0xe4, - 0x8f, 0x21, 0xdb, 0xcf, 0xbb, 0xb8, 0xa6, 0x7f, 0x10, 0x92, 0x0e, 0x33, 0x1c, 0x7b, 0xed, 0x06, - 0xbb, 0x8d, 0x0c, 0x24, 0x9f, 0x24, 0xff, 0xda, 0x02, 0xa2, 0x6d, 0x71, 0xf0, 0x61, 0xa7, 0xc7, - 0xef, 0x84, 0x04, 0xe5, 0xaf, 0xca, 0x35, 0xac, 0xc9, 0xf5, 0xa9, 0x00, 0xb9, 0x88, 0x1f, 0x59, - 0x57, 0x15, 0xb9, 0xa4, 0xbb, 0xd5, 0x40, 0xf2, 0x49, 0xee, 0x7c, 0xc5, 0x24, 0xae, 0xff, 0x88, - 0x47, 0x45, 0x0b, 0x79, 0x1a, 0x92, 0x65, 0x9d, 0x26, 0x58, 0xce, 0x59, 0x88, 0x2f, 0xe1, 0xb7, - 0x89, 0x1d, 0x62, 0x6f, 0xcf, 0x64, 0x4a, 0x66, 0x6f, 0x68, 0x3d, 0x05, 0xc9, 0xd2, 0x76, 0xa3, - 0x59, 0x6f, 0x3b, 0x2e, 0x3b, 0xb2, 0x67, 0x3b, 0xe8, 0x18, 0x63, 0x27, 0x6b, 0xac, 0x6f, 0x22, - 0x0f, 0x29, 0xc9, 0x25, 0xac, 0x04, 0xba, 0xfd, 0xcf, 0x1e, 0xc0, 0x7f, 0x8a, 0x59, 0x03, 0xff, - 0x29, 0x65, 0x63, 0x13, 0x77, 0xc2, 0x88, 0xb6, 0x41, 0x86, 0x7b, 0x66, 0xb3, 0x80, 0xff, 0x94, - 0xb3, 0xa9, 0xf1, 0xf8, 0xfb, 0xfe, 0xe8, 0xe8, 0x81, 0x89, 0xfb, 0xc1, 0xea, 0xde, 0x4a, 0xb3, - 0x06, 0x20, 0x36, 0x83, 0x59, 0xde, 0x02, 0xb1, 0x22, 0xe2, 0x39, 0x3e, 0xf2, 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 0x04, 0x45, 0x80, 0xb9, 0xc6, 0x73, 0x4e, 0x9d, 0x8a, 0x40, 0xdf, 0xf7, 0x9f, 0x0f, 0xe0, - 0xe0, 0x13, 0x51, 0x16, 0xb0, 0x29, 0x1a, 0xac, 0x32, 0xa4, 0x56, 0xfd, 0x4b, 0x96, 0x3e, 0xee, - 0x08, 0x12, 0x63, 0x53, 0xe3, 0x92, 0xf2, 0x24, 0x36, 0x5c, 0x14, 0x3a, 0x99, 0x54, 0x6f, 0x51, - 0xa4, 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x3a, 0x42, 0x14, 0x89, 0x0b, 0x13, - 0x85, 0xb2, 0x41, 0xc9, 0xb0, 0xd8, 0x6a, 0x61, 0x4a, 0x96, 0x95, 0x8e, 0x05, 0xb0, 0x60, 0x14, - 0x2c, 0x19, 0x6e, 0xd0, 0x2b, 0x62, 0x11, 0xe2, 0xe4, 0x18, 0x9c, 0x09, 0xb7, 0x08, 0xa7, 0xe1, - 0x16, 0xe1, 0xd7, 0x72, 0x9c, 0x91, 0x27, 0x26, 0x31, 0x9f, 0x91, 0xc8, 0x38, 0xe3, 0xa4, 0x5a, - 0x9c, 0xf1, 0x66, 0xeb, 0x1d, 0x30, 0xc2, 0x49, 0x71, 0x7a, 0xc2, 0x4c, 0xb3, 0xec, 0xff, 0x88, - 0x12, 0xce, 0x94, 0x51, 0x52, 0x9e, 0x23, 0x9e, 0xda, 0x6a, 0x2d, 0x41, 0x86, 0x13, 0x2e, 0x7a, - 0x64, 0xba, 0xa3, 0xec, 0x35, 0xe5, 0xe1, 0x1c, 0x29, 0x21, 0x65, 0x98, 0xf1, 0x94, 0xc6, 0xf1, - 0x59, 0x18, 0x0b, 0xce, 0x46, 0x72, 0xfa, 0x1d, 0xa2, 0xe9, 0xf7, 0x90, 0x9c, 0x7e, 0x0d, 0x39, - 0x7d, 0x97, 0xe0, 0x70, 0x60, 0xee, 0x89, 0x62, 0x12, 0x93, 0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 0xa9, 0xa7, - 0x16, 0x24, 0x0d, 0x77, 0xf1, 0x98, 0x0c, 0xf8, 0x46, 0x4f, 0xb0, 0xe8, 0x9a, 0xec, 0x2a, 0x8d, - 0xe3, 0x33, 0x70, 0x30, 0x80, 0x6c, 0x3f, 0x0b, 0xf2, 0xc4, 0x09, 0x18, 0x64, 0xa1, 0x8d, 0x4f, - 0x0c, 0x17, 0xf1, 0x89, 0x23, 0xfe, 0x8b, 0x4f, 0x31, 0xf1, 0xdf, 0x52, 0x36, 0x56, 0x5c, 0xb8, - 0x81, 0x53, 0xa4, 0x03, 0xaf, 0xa0, 0x8f, 0x76, 0x8a, 0x64, 0x3c, 0xff, 0x9d, 0xa3, 0xc6, 0xc6, - 0x00, 0x9d, 0xfb, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x08, 0x5d, 0x44, 0x79, 0x79, 0x00, - 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type Uint128PairFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message -} - -func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_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 -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_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 valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(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 = 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 -} - -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 { - v77 := r.Intn(100) - tmps := make([]rune, v77) - for i := 0; i < v77; 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)) - v78 := r.Int63() - if r.Intn(2) == 0 { - v78 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v78)) - 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 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - 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 sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_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 valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Message) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - } - if m.Hilarity != 0 { - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - data[i] = 0x18 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) - } - if len(m.Data) > 0 { - data[i] = 0x22 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if len(m.Key) > 0 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Score - i += 4 - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - data[i] = 0x52 - i++ - v := m.Terrain[k] - 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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - 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 - } - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - } - 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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - } - 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())) - n7, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - } - } - 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++ - *(*float64)(unsafe.Pointer(&data[i])) = 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())) - n8, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - if m.Right != nil { - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) - n9, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n9 - } - 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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Message) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) - } - m.Hilarity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Hilarity |= (Message_Humour(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) - } - m.HeightInCm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.HeightInCm |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], data[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) - } - m.ResultCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ResultCount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TrueScotsman = bool(v != 0) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Score = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Terrain[mapkey] = mapvalue - } else { - var mapvalue *Nested - m.Terrain[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Proto2Value[mapkey] = mapvalue - } else { - var mapvalue *test.NinOptEnum - m.Proto2Value[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.NameMapping[mapkey] = mapvalue - } else { - var mapvalue string - m.NameMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MsgMapping[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.MsgMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.ByteMapping[mapkey] = mapvalue - } else { - var mapvalue []byte - m.ByteMapping[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.F = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - 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 := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.NestedMapField == nil { - m.NestedMapField = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.NestedMapField[mapkey] = mapvalue - } else { - var mapvalue float64 - m.NestedMapField[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTheproto3Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthTheproto3Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTheproto3Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthTheproto3Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTheproto3Unsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeboth/theproto3.proto", fileDescriptorTheproto3) } - -var fileDescriptorTheproto3 = []byte{ - // 1581 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x1b, 0xc5, - 0x1b, 0xce, 0xda, 0x8e, 0x3f, 0x5e, 0x7f, 0x6d, 0xa6, 0xfd, 0xfd, 0x64, 0x22, 0x91, 0x0f, 0x57, - 0x6a, 0xd3, 0x8a, 0x3a, 0x25, 0x2d, 0x50, 0x42, 0xa1, 0xc4, 0x6e, 0xac, 0x86, 0x26, 0x6e, 0xb0, - 0x93, 0x06, 0x54, 0x89, 0x68, 0x9d, 0xac, 0xe3, 0x15, 0xf6, 0x6e, 0xb4, 0x1f, 0x15, 0xb9, 0xf5, - 0xcf, 0xe0, 0x86, 0xb8, 0x71, 0x44, 0x3d, 0x20, 0x8e, 0x70, 0xcb, 0x11, 0x89, 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xf9, 0xb2, 0x80, 0x2f, 0xf3, - 0xfc, 0x55, 0x28, 0xf0, 0xd5, 0x84, 0xe7, 0x66, 0x05, 0xdc, 0x6c, 0x78, 0xdd, 0x03, 0xc5, 0x24, - 0x6e, 0xa7, 0xe7, 0x22, 0x8e, 0x4b, 0xa0, 0x84, 0xc4, 0x89, 0x14, 0x78, 0x91, 0x07, 0x70, 0x5e, - 0x54, 0x32, 0x04, 0x1a, 0x4b, 0xbc, 0x46, 0x89, 0x78, 0xc4, 0x91, 0xd9, 0x23, 0xac, 0x80, 0x71, - 0x9a, 0x7d, 0x08, 0xe7, 0x04, 0x85, 0x43, 0x20, 0x5b, 0x0b, 0xba, 0xb1, 0x0a, 0x27, 0x4b, 0x8b, - 0x00, 0x96, 0xd8, 0x36, 0xf0, 0xe6, 0xe4, 0x5d, 0xd9, 0x4f, 0xe7, 0xa0, 0xe4, 0x96, 0xa7, 0xfb, - 0xe6, 0xa1, 0x6a, 0x62, 0x77, 0xf5, 0x55, 0xb4, 0x77, 0xba, 0x36, 0x5e, 0xd4, 0x5c, 0xd6, 0x1b, - 0x58, 0xa8, 0x87, 0x91, 0x16, 0x6a, 0x39, 0x5e, 0x3e, 0xce, 0x49, 0x35, 0xc6, 0x9c, 0xd4, 0xa5, - 0x68, 0xd1, 0x28, 0x43, 0xd5, 0x18, 0x33, 0x54, 0x93, 0x45, 0x84, 0xbe, 0xaa, 0x39, 0xee, 0xab, - 0x96, 0xa2, 0x55, 0xa2, 0xed, 0x55, 0x73, 0xdc, 0x5e, 0xc5, 0xe8, 0x88, 0x5d, 0x56, 0x73, 0xdc, - 0x65, 0x4d, 0xd0, 0x89, 0x36, 0x5b, 0xcd, 0x71, 0xb3, 0x15, 0xa3, 0x23, 0xf6, 0x5c, 0x1b, 0x02, - 0xcf, 0x75, 0x39, 0x5a, 0x68, 0x92, 0xf5, 0xda, 0x14, 0x59, 0xaf, 0x2b, 0x13, 0x92, 0x9a, 0xe8, - 0xc0, 0x36, 0x04, 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 0xed, - 0x47, 0xdc, 0x7e, 0xc6, 0xed, 0x17, 0xdc, 0x4e, 0x5f, 0x60, 0x3c, 0x6e, 0xcf, 0xf0, 0xf5, 0x4b, - 0xfc, 0xfb, 0x0a, 0xff, 0xbe, 0xc6, 0xed, 0xf1, 0x5f, 0x73, 0x52, 0x37, 0xcd, 0xe6, 0xfe, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x86, 0x95, 0x85, 0xab, 0x43, 0x1a, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto deleted file mode 100644 index 965cec7b..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto +++ /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 -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message 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; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go deleted file mode 100644 index fc658ce3..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go +++ /dev/null @@ -1,2186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeboth/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeboth/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUint128PairMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUint128PairFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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 TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUint128PairStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go deleted file mode 100644 index 5b87ea9a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go +++ /dev/null @@ -1,125 +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) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go deleted file mode 100644 index 4174d700..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go +++ /dev/null @@ -1,5881 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unsafemarshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import unsafe "unsafe" - -// 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,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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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} -} - -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.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7459 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xff, 0x92, 0x43, 0x4a, 0xd4, 0x21, 0x45, 0x51, 0xb3, 0x5a, 0x99, 0x96, 0xd7, 0xfb, 0xa0, - 0xd7, 0xb2, 0xac, 0xd8, 0x5a, 0xad, 0x56, 0xfb, 0x30, 0xfd, 0xfa, 0x8b, 0x14, 0xb5, 0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 0xc9, 0x9a, 0x86, 0x4c, 0xb5, 0x51, 0xb7, 0x9d, 0x76, 0xd9, 0x6d, 0xb7, 0xec, - 0xca, 0x5e, 0xdd, 0xd9, 0x21, 0x79, 0x34, 0x91, 0x8f, 0x6f, 0x57, 0x1a, 0xae, 0x6d, 0x0d, 0xd1, - 0xee, 0x75, 0xde, 0x8b, 0x11, 0x64, 0xb1, 0x68, 0x49, 0x88, 0x3e, 0x05, 0x41, 0xbb, 0x05, 0x22, - 0xf7, 0x8d, 0x7e, 0x48, 0x4a, 0xd5, 0x99, 0x79, 0x1a, 0x52, 0xcf, 0x54, 0x9e, 0xab, 0x94, 0x79, - 0xc5, 0x4d, 0x35, 0x91, 0xc4, 0x6d, 0x6b, 0xac, 0xea, 0x9e, 0x86, 0x11, 0x42, 0x82, 0xe6, 0x88, - 0x06, 0xaa, 0x36, 0x2a, 0xae, 0x4b, 0x94, 0x96, 0x20, 0xa4, 0x26, 0xee, 0x5b, 0xc5, 0x5d, 0x45, - 0xde, 0x63, 0x5e, 0x80, 0xa3, 0x04, 0xb1, 0x87, 0x12, 0x6f, 0x7d, 0xbf, 0x61, 0x97, 0xf1, 0x35, - 0x80, 0x4b, 0xf2, 0xa9, 0x90, 0x6c, 0x18, 0x53, 0x2c, 0x33, 0x02, 0x2c, 0x91, 0x6b, 0x5e, 0x81, - 0x3b, 0x09, 0x6c, 0xc7, 0x76, 0xec, 0x56, 0xa5, 0x6d, 0x97, 0xed, 0xff, 0x7f, 0x80, 0x68, 0xcb, - 0x15, 0xa7, 0x56, 0xde, 0xad, 0xb8, 0xbb, 0xd9, 0x11, 0x99, 0xc1, 0xed, 0x98, 0xf6, 0x0a, 0x23, - 0x2d, 0x11, 0xca, 0x39, 0xa7, 0xf6, 0x18, 0xa2, 0x33, 0xf3, 0x30, 0x4a, 0x18, 0x21, 0xa5, 0xa0, - 0x39, 0x97, 0xab, 0xbb, 0x76, 0xf5, 0xd9, 0xf2, 0x41, 0x7b, 0xfb, 0x72, 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0x66, - 0xfe, 0x24, 0x64, 0x39, 0xf3, 0x03, 0x07, 0x15, 0xf8, 0xcd, 0x1d, 0x07, 0x99, 0xb1, 0xd6, 0x03, - 0xeb, 0x2f, 0x6a, 0xa6, 0xda, 0x94, 0xe0, 0x98, 0xf3, 0x22, 0x64, 0x44, 0xbd, 0x51, 0xae, 0xef, - 0xed, 0x37, 0x51, 0x69, 0xd9, 0x9d, 0xe3, 0x9f, 0x73, 0x4b, 0x09, 0xdc, 0x22, 0x81, 0xe5, 0x4b, - 0x90, 0x26, 0x3f, 0x7b, 0x75, 0xc9, 0x2f, 0x31, 0x46, 0x83, 0x1e, 0x8a, 0x25, 0x0e, 0x54, 0x29, - 0xa1, 0x9a, 0xb7, 0x97, 0xfc, 0xf7, 0x17, 0x3c, 0x71, 0x30, 0x08, 0xf5, 0xbe, 0x21, 0x6d, 0x25, - 0x36, 0xc3, 0x8e, 0x5f, 0xb3, 0xbf, 0xf8, 0x1a, 0x8b, 0x59, 0x75, 0x21, 0xce, 0x2f, 0x61, 0xf5, - 0xa8, 0xcb, 0x65, 0x38, 0xb3, 0xf7, 0xbe, 0x26, 0x34, 0xa4, 0xac, 0x96, 0xf9, 0x05, 0x18, 0x54, - 0x96, 0xca, 0x70, 0x56, 0xbf, 0xc4, 0x58, 0xa5, 0xe4, 0x95, 0x32, 0x7f, 0x01, 0x62, 0x78, 0xd9, - 0x0b, 0x87, 0xff, 0x32, 0x83, 0x13, 0xf2, 0xfc, 0xc3, 0x90, 0xe0, 0xcb, 0x5d, 0x38, 0xf4, 0x7d, - 0x0c, 0x2a, 0x20, 0x18, 0xce, 0x97, 0xba, 0x70, 0xf8, 0xaf, 0x70, 0x38, 0x87, 0x60, 0x78, 0xef, - 0x2a, 0x7c, 0xf9, 0xd7, 0x62, 0x2c, 0x5d, 0x71, 0xdd, 0xe1, 0x33, 0x1f, 0xba, 0xc6, 0x85, 0xa3, - 0x3f, 0xc0, 0x06, 0xe7, 0x88, 0xfc, 0x25, 0x88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x73, 0x54, 0x35, 0xa6, 0x30, 0xe3, 0xa8, 0x6a, - 0x46, 0x61, 0xc0, 0x51, 0xd5, 0x80, 0xc2, 0x74, 0xa3, 0xaa, 0xe9, 0x84, 0xd1, 0x46, 0x55, 0xa3, - 0x09, 0x73, 0x8d, 0xaa, 0xe6, 0x12, 0x86, 0xca, 0x6a, 0x86, 0xf2, 0x4c, 0x94, 0xd5, 0x4c, 0xe4, - 0x19, 0x27, 0xab, 0x19, 0xc7, 0x33, 0x4b, 0x56, 0x33, 0x8b, 0x67, 0x90, 0xac, 0x66, 0x10, 0xcf, - 0x14, 0x59, 0xcd, 0x14, 0x9e, 0x11, 0x58, 0x8c, 0x59, 0xf6, 0xbe, 0x4f, 0x8c, 0x19, 0x5d, 0x63, - 0xcc, 0xe8, 0x1a, 0x63, 0x46, 0xd7, 0x18, 0x33, 0xba, 0xc6, 0x98, 0xd1, 0x35, 0xc6, 0x8c, 0xae, - 0x31, 0x66, 0x74, 0x8d, 0x31, 0xa3, 0x6b, 0x8c, 0x19, 0xdd, 0x63, 0xcc, 0x08, 0x89, 0x31, 0x23, - 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, 0x3c, - 0xf3, 0x8e, 0xaa, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, - 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, 0x8a, - 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, 0x30, - 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xca, 0x00, 0x93, 0xc6, 0xd8, 0x1a, 0xb9, 0x39, 0x80, 0x99, 0xe2, - 0x84, 0x16, 0x69,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, 0x7c, 0x12, 0x12, 0x9c, 0xb1, - 0x79, 0x06, 0x23, 0xb6, 0xdb, 0x6c, 0x58, 0x86, 0xc0, 0xe2, 0xb0, 0x95, 0x0b, 0xe1, 0xb6, 0xdb, - 0xe6, 0x38, 0xc4, 0xad, 0xfa, 0xce, 0x6e, 0x9b, 0x0d, 0xde, 0x49, 0x16, 0x6f, 0xe1, 0xee, 0xdc, - 0x53, 0x30, 0x20, 0x24, 0x7a, 0x9d, 0x59, 0xcf, 0xd3, 0xa9, 0xa1, 0x2b, 0x61, 0x69, 0x3d, 0xe1, - 0xfb, 0x96, 0xec, 0x21, 0xcf, 0x53, 0x90, 0x40, 0x6a, 0xf6, 0x92, 0x3e, 0xaf, 0x48, 0xf1, 0x89, - 0x3c, 0x69, 0xcd, 0xbd, 0x27, 0x02, 0x89, 0x79, 0xdb, 0xde, 0x27, 0x0a, 0xbf, 0x1b, 0x62, 0xf3, - 0xcd, 0xe7, 0x1d, 0x26, 0xe0, 0x30, 0xd3, 0x28, 0xee, 0x66, 0x3a, 0x8d, 0xd5, 0x50, 0x37, 0x22, - 0x93, 0xf4, 0x7e, 0x54, 0xe8, 0x5d, 0xa2, 0x23, 0xba, 0xcf, 0x29, 0xba, 0x67, 0x06, 0xc4, 0x44, - 0x1d, 0xfa, 0xbf, 0x04, 0x49, 0x69, 0x14, 0x73, 0x82, 0x89, 0x11, 0xd5, 0x81, 0xb2, 0xae, 0xb0, - 0x24, 0x39, 0x1b, 0x06, 0x95, 0x81, 0x31, 0x54, 0x52, 0x71, 0x00, 0x94, 0xa8, 0x79, 0x52, 0x55, - 0xb3, 0x3f, 0x29, 0x53, 0xf5, 0x34, 0xd5, 0x11, 0x51, 0xf7, 0x19, 0xea, 0x9c, 0xc1, 0x46, 0x6c, - 0xa3, 0xef, 0xb9, 0x38, 0x18, 0x2b, 0xf5, 0x46, 0xee, 0x61, 0x00, 0x1a, 0xf2, 0xf8, 0xe6, 0x2a, - 0x2d, 0xea, 0xd2, 0x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 0x1c, 0x88, 0xe1, 0x19, 0x03, 0x3a, 0x7e, 0x5f, 0x57, 0x06, 0x92, 0x00, 0x84, 0x81, 0x90, 0x60, - 0x5d, 0x48, 0xd0, 0x1f, 0xc8, 0x60, 0x5d, 0x93, 0xc0, 0x95, 0x25, 0x58, 0x17, 0x12, 0x24, 0xba, - 0x32, 0x90, 0x25, 0x70, 0x85, 0x04, 0x05, 0x80, 0x85, 0xfa, 0x35, 0xbb, 0x46, 0x45, 0xa0, 0x2f, - 0xfd, 0xcf, 0xf9, 0x70, 0xf0, 0x88, 0x28, 0x0b, 0xd8, 0x16, 0x0d, 0x66, 0x09, 0x92, 0xeb, 0xde, - 0x4f, 0x96, 0x3e, 0xee, 0xf2, 0x13, 0x63, 0x5b, 0xe3, 0x92, 0x74, 0x25, 0x36, 0x5c, 0x14, 0x3a, - 0x99, 0x64, 0x77, 0x51, 0xa4, 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x2a, 0x44, - 0x14, 0x89, 0x0b, 0x13, 0x85, 0xb2, 0x41, 0xc9, 0xb0, 0xd0, 0x6c, 0x62, 0x4a, 0x96, 0x95, 0x4e, - 0xfa, 0xb0, 0x60, 0x14, 0x2c, 0x19, 0x6e, 0xd1, 0x5f, 0xc4, 0x22, 0xc4, 0xc9, 0x31, 0x38, 0x1d, - 0x6c, 0x11, 0x4e, 0xc3, 0x2d, 0xc2, 0x7f, 0xcb, 0x71, 0x46, 0x6e, 0x9b, 0xc4, 0x7c, 0x86, 0x42, - 0xe3, 0x8c, 0x93, 0x6a, 0x71, 0xc6, 0x9b, 0xcd, 0x77, 0xc0, 0x10, 0x27, 0xc5, 0xe9, 0x09, 0x33, - 0xcd, 0xb0, 0xff, 0x2d, 0x4a, 0x30, 0x53, 0x46, 0x49, 0x79, 0x0e, 0xb9, 0x6a, 0xab, 0xb9, 0x02, - 0x69, 0x4e, 0xb8, 0xec, 0x92, 0xe9, 0x0e, 0xb3, 0x77, 0x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f, 0xd5, 0x2c, 0x00, 0x7d, - 0x68, 0xe6, 0xe6, 0x1f, 0x32, 0xa5, 0xcf, 0xdc, 0xdc, 0x88, 0xc0, 0x30, 0xbb, 0x9f, 0xd2, 0x65, - 0x77, 0xd9, 0xa2, 0x15, 0xf2, 0x8b, 0x11, 0x18, 0x10, 0xbf, 0xcc, 0x2d, 0x48, 0x8b, 0x1f, 0xf4, - 0x4e, 0x6e, 0xea, 0xa9, 0x79, 0x49, 0xc3, 0x1d, 0x3c, 0xa6, 0x7c, 0xbe, 0xd1, 0x63, 0x2c, 0xba, - 0x26, 0x3b, 0x4a, 0xe3, 0xd8, 0x1c, 0x1c, 0xf5, 0x21, 0x3b, 0xcc, 0x82, 0x3c, 0x79, 0x1a, 0xfa, - 0x59, 0x68, 0xe3, 0x63, 0xc3, 0x65, 0x7c, 0xec, 0x88, 0xff, 0xe2, 0xa3, 0x4c, 0xfc, 0xb7, 0x98, - 0x89, 0x16, 0x96, 0x6e, 0xe2, 0x28, 0xe9, 0xc8, 0x2b, 0xe8, 0xa3, 0x1d, 0x25, 0x45, 0xf0, 0x51, - 0xd2, 0x56, 0x1f, 0x9d, 0xfb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x77, 0x4b, 0xc0, 0x7e, - 0x79, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type Uint128PairFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message -} - -func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_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 -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_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 valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(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 = 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 -} - -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 { - v77 := r.Intn(100) - tmps := make([]rune, v77) - for i := 0; i < v77; 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)) - v78 := r.Int63() - if r.Intn(2) == 0 { - v78 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v78)) - 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 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - 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 sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_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 valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Message) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - } - if m.Hilarity != 0 { - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) - } - if m.HeightInCm != 0 { - data[i] = 0x18 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) - } - if len(m.Data) > 0 { - data[i] = 0x22 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) - } - if len(m.Key) > 0 { - for _, num := range m.Key { - data[i] = 0x28 - i++ - i = encodeVarintTheproto3(data, i, uint64(num)) - } - } - if m.Nested != nil { - data[i] = 0x32 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) - n1, err := m.Nested.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ResultCount != 0 { - data[i] = 0x38 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) - } - if m.TrueScotsman { - data[i] = 0x40 - i++ - if m.TrueScotsman { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Score != 0 { - data[i] = 0x4d - i++ - *(*float32)(unsafe.Pointer(&data[i])) = m.Score - i += 4 - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - data[i] = 0x52 - i++ - v := m.Terrain[k] - 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())) - n2, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.Proto2Field != nil { - data[i] = 0x5a - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) - n3, err := m.Proto2Field.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - data[i] = 0x6a - i++ - v := m.Proto2Value[k] - 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 - } - } - } - return i, nil -} - -func (m *Nested) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Nested) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bunny) > 0 { - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) - i += copy(data[i:], m.Bunny) - } - return i, nil -} - -func (m *AllMaps) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AllMaps) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - for k := range m.StringToDoubleMap { - data[i] = 0xa - i++ - v := m.StringToDoubleMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - for k := range m.StringToFloatMap { - data[i] = 0x12 - i++ - v := m.StringToFloatMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - for k := range m.Int32Map { - data[i] = 0x1a - i++ - v := m.Int32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Int64Map) > 0 { - for k := range m.Int64Map { - data[i] = 0x22 - i++ - v := m.Int64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint32Map) > 0 { - for k := range m.Uint32Map { - data[i] = 0x2a - i++ - v := m.Uint32Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Uint64Map) > 0 { - for k := range m.Uint64Map { - data[i] = 0x32 - i++ - v := m.Uint64Map[k] - mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64(k)) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64(v)) - } - } - if len(m.Sint32Map) > 0 { - for k := range m.Sint32Map { - data[i] = 0x3a - i++ - v := m.Sint32Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) - } - } - if len(m.Sint64Map) > 0 { - for k := range m.Sint64Map { - data[i] = 0x42 - i++ - v := m.Sint64Map[k] - mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - data[i] = 0x10 - i++ - i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) - } - } - if len(m.Fixed32Map) > 0 { - for k := range m.Fixed32Map { - data[i] = 0x4a - i++ - v := m.Fixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - for k := range m.Sfixed32Map { - data[i] = 0x52 - i++ - v := m.Sfixed32Map[k] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xd - i++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - for k := range m.Fixed64Map { - data[i] = 0x5a - i++ - v := m.Fixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - for k := range m.Sfixed64Map { - data[i] = 0x62 - i++ - v := m.Sfixed64Map[k] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x9 - i++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - for k := range m.BoolMap { - data[i] = 0x6a - i++ - v := m.BoolMap[k] - mapSize := 1 + 1 + 1 + 1 - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0x8 - i++ - if k { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if v { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - } - if len(m.StringMap) > 0 { - for k := range m.StringMap { - data[i] = 0x72 - i++ - v := m.StringMap[k] - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) - i = encodeVarintTheproto3(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintTheproto3(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.StringToBytesMap) > 0 { - for k := range m.StringToBytesMap { - data[i] = 0x7a - i++ - v := m.StringToBytesMap[k] - 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())) - n5, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - } - 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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed32Theproto3(data, i, uint32(k)) - data[i] = 0x15 - i++ - i = encodeFixed32Theproto3(data, i, uint32(v)) - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - github_com_gogo_protobuf_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++ - i = encodeFixed64Theproto3(data, i, uint64(k)) - data[i] = 0x11 - i++ - i = encodeFixed64Theproto3(data, i, uint64(v)) - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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)) - } - github_com_gogo_protobuf_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())) - n6, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - } - 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())) - n7, err := v.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - } - } - 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++ - *(*float64)(unsafe.Pointer(&data[i])) = 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())) - n8, err := m.Left.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - if m.Right != nil { - data[i] = 0x12 - i++ - i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) - n9, err := m.Right.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n9 - } - 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++ - i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) - } - } - return i, nil -} - -func encodeFixed64Theproto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Theproto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintTheproto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} - -func init() { proto.RegisterFile("combos/unsafemarshaler/theproto3.proto", fileDescriptorTheproto3) } - -var fileDescriptorTheproto3 = []byte{ - // 1588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x1b, 0xc5, - 0x1b, 0xce, 0xda, 0x8e, 0x3f, 0x5e, 0x7f, 0x6d, 0xa6, 0xfd, 0xfd, 0x64, 0x22, 0x91, 0xa4, 0xae, - 0x94, 0xa6, 0x15, 0x75, 0x4a, 0x5a, 0xa0, 0x84, 0x42, 0x89, 0xdd, 0x58, 0x0d, 0x4d, 0xdc, 0x60, - 0x27, 0x0d, 0xa8, 0x12, 0xd1, 0x3a, 0x59, 0xc7, 0x2b, 0xec, 0xdd, 0x68, 0x3f, 0x2a, 0x72, 0xeb, - 0x9f, 0xc1, 0x0d, 0x71, 0xe3, 0x88, 0x7a, 0x40, 0x1c, 0xe1, 0x96, 0x23, 0x12, 0x17, 0xc4, 0xa1, - 0x6a, 0xcb, 0xa5, 0xc7, 0x1e, 0x7b, 0x64, 0x3e, 0x76, 0xd7, 0xb3, 0xeb, 0x59, 0x2f, 0xe5, 0xc2, - 0x25, 0x87, 0x91, 0x77, 0xde, 0x7d, 0x9e, 0x67, 0xde, 0x99, 0x9d, 0x79, 0xf7, 0xd1, 0x1a, 0x16, - 0x0f, 0x8c, 0x61, 0xd7, 0xb0, 0x96, 0x1d, 0xdd, 0x52, 0x7a, 0xea, 0x50, 0x31, 0xad, 0xbe, 0x32, - 0x50, 0xcd, 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akk.us.kg/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto deleted file mode 100644 index 59af79fe..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto +++ /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 -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = true; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message 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; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go deleted file mode 100644 index a23306c0..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go +++ /dev/null @@ -1,2186 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafemarshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unsafemarshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUint128PairMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_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 := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUint128PairFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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 TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUint128PairStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go deleted file mode 100644 index 5b87ea9a..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go +++ /dev/null @@ -1,125 +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) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go deleted file mode 100644 index 3a6048a4..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go +++ /dev/null @@ -1,9718 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/theproto3.proto -// DO NOT EDIT! - -/* - Package theproto3 is a generated protocol buffer package. - - It is generated from these files: - combos/unsafeunmarshaler/theproto3.proto - - It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -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 github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" -import unsafe "unsafe" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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,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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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} -} - -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.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) - proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) -} -func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7462 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, - 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, - 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89, - 0x5e, 0xb9, 0x92, 0xfc, 0x88, 0x17, 0x4b, 0x50, 0xe4, 0x95, 0x44, 0x9b, 0xba, 0xd4, 0xf2, 0x92, - 0xb6, 0x27, 0x7f, 0x2c, 0xb2, 0xc9, 0x6e, 0x36, 0xd9, 0xc5, 0xee, 0xb6, 0x4d, 0x8b, 0xe6, 0x1d, - 0x3b, 0x45, 0x1a, 0x27, 0x7d, 0x25, 0x69, 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0x5b, 0x85, 0xe5, 0x52, 0x26, 0x62, 0xa6, 0x01, 0x48, 0xc3, 0xe2, 0xf2, 0xda, 0xfc, 0x66, - 0x26, 0x2a, 0x7e, 0x2f, 0xad, 0x6e, 0x5e, 0x9a, 0xcb, 0x18, 0x02, 0xb0, 0x45, 0x1b, 0x62, 0x32, - 0xc1, 0x85, 0xd9, 0x4c, 0x1c, 0x79, 0x42, 0x8a, 0x32, 0x58, 0x7a, 0xb2, 0xb4, 0x80, 0x28, 0x06, - 0xd4, 0x16, 0x44, 0x33, 0x68, 0x0e, 0xc3, 0x10, 0x69, 0x29, 0xac, 0xad, 0x2d, 0x67, 0x12, 0x82, - 0xe7, 0xc6, 0xa6, 0xb5, 0xb4, 0x7a, 0x35, 0x33, 0x24, 0x78, 0x5e, 0xb5, 0xd6, 0xb6, 0xd6, 0x33, - 0x20, 0x38, 0xac, 0x94, 0x36, 0x36, 0xe6, 0xaf, 0x96, 0x32, 0x49, 0x41, 0x51, 0x78, 0x6a, 0xb3, - 0xb4, 0x91, 0x49, 0x29, 0x62, 0xa1, 0x21, 0x86, 0xc5, 0x10, 0xa5, 0xd5, 0xad, 0x95, 0x4c, 0xda, - 0x1c, 0x85, 0x61, 0x3a, 0x04, 0x17, 0x62, 0x44, 0x6b, 0x42, 0x92, 0x66, 0x3c, 0x41, 0x28, 0x97, - 0x51, 0xa5, 0x01, 0x51, 0x98, 0xb9, 0x22, 0xc4, 0x89, 0x77, 0x21, 0x2f, 0x4e, 0x2f, 0xcf, 0x17, - 0x4a, 0xcb, 0xe5, 0xb5, 0xf5, 0xcd, 0xa5, 0xb5, 0xd5, 0xf9, 0x65, 0xa4, 0x3b, 0xd1, 0x66, 0x95, - 0xde, 0xb5, 0xb5, 0x64, 0x95, 0x16, 0x90, 0xfe, 0xa4, 0xb6, 0xf5, 0xd2, 0xfc, 0x26, 0x6a, 0x33, - 0x72, 0x53, 0x30, 0xe6, 0x97, 0x67, 0xfc, 0x22, 0x23, 0xf7, 0x99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, 0x43, 0x6e, 0x29, 0x81, 0x5b, 0x22, - 0xb0, 0x7c, 0x09, 0xd2, 0xe4, 0x67, 0xbf, 0x2e, 0xf9, 0x15, 0xc6, 0x68, 0xd8, 0x43, 0xb1, 0xc4, - 0x81, 0x2a, 0x25, 0x54, 0xf3, 0xf6, 0x93, 0xff, 0xfe, 0x88, 0x27, 0x0e, 0x06, 0xa1, 0xde, 0x37, - 0xa2, 0xad, 0xc4, 0x66, 0xd8, 0xf1, 0x6b, 0xf6, 0xbf, 0xbf, 0xce, 0x62, 0x56, 0x5d, 0x88, 0xf3, - 0xcb, 0x58, 0x3d, 0xea, 0x72, 0x19, 0xce, 0xec, 0xfd, 0xaf, 0x0b, 0x0d, 0x29, 0xab, 0x65, 0x7e, - 0x11, 0x86, 0x95, 0xa5, 0x32, 0x9c, 0xd5, 0xff, 0x60, 0xac, 0x52, 0xf2, 0x4a, 0x99, 0xbf, 0x08, - 0x31, 0xbc, 0xec, 0x85, 0xc3, 0xff, 0x27, 0x83, 0x13, 0xf2, 0xfc, 0xc3, 0x90, 0xe0, 0xcb, 0x5d, - 0x38, 0xf4, 0x03, 0x0c, 0x2a, 0x20, 0x18, 0xce, 0x97, 0xba, 0x70, 0xf8, 0xff, 0xe2, 0x70, 0x0e, - 0xc1, 0xf0, 0xfe, 0x55, 0xf8, 0xca, 0xff, 0x89, 0xb1, 0x74, 0xc5, 0x75, 0x87, 0xcf, 0x7c, 0xe8, - 0x1a, 0x17, 0x8e, 0xfe, 0x10, 0x1b, 0x9c, 0x23, 0xf2, 0x97, 0x21, 0xde, 0xa7, 0xc2, 0xff, 0x2f, - 0x83, 0x52, 0x7a, 0xb4, 0x82, 0x24, 0xa5, 0x75, 0x2d, 0x1c, 0xfe, 0xff, 0x18, 0x5c, 0x46, 0x61, - 0xd1, 0xd9, 0xba, 0x16, 0xce, 0xe0, 0xff, 0x73, 0xd1, 0x19, 0x02, 0xab, 0x8d, 0x2f, 0x69, 0xe1, - 0xe8, 0x5f, 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 0x44, 0x9e, 0x71, 0xb2, 0x9a, 0x71, 0x3c, 0xb3, 0x64, 0x35, 0xb3, 0x78, 0x06, 0xc9, - 0x6a, 0x06, 0xf1, 0x4c, 0x91, 0xd5, 0x4c, 0xe1, 0x19, 0x81, 0xc5, 0x98, 0x65, 0x1f, 0xf8, 0xc4, - 0x98, 0xd1, 0x33, 0xc6, 0x8c, 0x9e, 0x31, 0x66, 0xf4, 0x8c, 0x31, 0xa3, 0x67, 0x8c, 0x19, 0x3d, - 0x63, 0xcc, 0xe8, 0x19, 0x63, 0x46, 0xcf, 0x18, 0x33, 0x7a, 0xc6, 0x98, 0xd1, 0x3b, 0xc6, 0x8c, - 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, - 0x02, 0x63, 0xcc, 0x33, 0xef, 0xb8, 0x6a, 0x5e, 0xdf, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, 0x88, - 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, - 0xc6, 0x8c, 0xa0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, - 0x18, 0x33, 0x02, 0x63, 0xcc, 0x90, 0x63, 0xec, 0x4f, 0x0c, 0x30, 0x69, 0x8c, 0xad, 0x93, 0x9b, - 0x03, 0x98, 0x29, 0x4e, 0x68, 0x91, 0x36, 0x80, 0x4d, 0x97, 0xf1, 0x4c, 0x72, 0x42, 0x8b, 0x35, - 0xb5, 0x7f, 0x56, 0xf4, 0xf3, 0x68, 0x53, 0xfb, 0x2f, 0x88, 0x7e, 0x1e, 0x6f, 0x6a, 0xff, 0x9c, - 0xe8, 0xe7, 0x11, 0xa7, 0xf6, 0x5f, 0x14, 0xfd, 0x3c, 0xe6, 0xd4, 0x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x16, 0xee, 0xce, 0x3d, 0x05, 0x43, 0x42, 0xa2, 0x37, 0x98, 0xf5, 0x02, 0x9d, 0x1a, 0xba, 0x12, - 0x96, 0xd6, 0x13, 0xbe, 0x6f, 0xc9, 0x1e, 0xf2, 0x3c, 0x05, 0x09, 0xa4, 0x66, 0x2f, 0xe9, 0xf3, - 0x8a, 0x14, 0x9f, 0xc8, 0x93, 0xd6, 0xdc, 0xfb, 0x22, 0x90, 0x58, 0xb0, 0xed, 0x03, 0xa2, 0xf0, - 0xbb, 0x21, 0xb6, 0xd0, 0x7c, 0xde, 0x61, 0x02, 0x8e, 0x32, 0x8d, 0xe2, 0x6e, 0xa6, 0xd3, 0x58, - 0x0d, 0x75, 0x23, 0x32, 0x49, 0xef, 0x47, 0x85, 0xde, 0x25, 0x3a, 0xa2, 0xfb, 0x9c, 0xa2, 0x7b, - 0x66, 0x40, 0x4c, 0xd4, 0xa5, 0xff, 0xcb, 0x90, 0x94, 0x46, 0x31, 0x27, 0x99, 0x18, 0x51, 0x1d, - 0x28, 0xeb, 0x0a, 0x4b, 0x92, 0xb3, 0x61, 0x58, 0x19, 0x18, 0x43, 0x25, 0x15, 0x07, 0x40, 0x89, - 0x9a, 0xa7, 0x54, 0x35, 0xfb, 0x93, 0x32, 0x55, 0xcf, 0x50, 0x1d, 0x11, 0x75, 0x9f, 0xa1, 0xce, - 0x19, 0x6c, 0xc4, 0x36, 0xfa, 0x9e, 0x8b, 0x83, 0xb1, 0x5a, 0x6f, 0xe4, 0x1e, 0x06, 0xa0, 0x21, - 0x8f, 0x6f, 0xae, 0xd2, 0xa2, 0x2e, 0xcd, 0x15, 0xbc, 0xb9, 0x67, 0x6f, 0xa2, 0xbf, 0x98, 0x44, - 0xad, 0xa7, 0x70, 0x82, 0x01, 0x1a, 0x62, 0x04, 0x7f, 0x6f, 0x28, 0xde, 0xb7, 0x12, 0xc3, 0xa4, - 0x59, 0x4a, 0xfa, 0x94, 0xdd, 0x9e, 0x77, 0x9a, 0x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0x60, 0x3e, 0xf6, 0x2a, 0xa6, - 0xfe, 0x8d, 0x08, 0x1c, 0x93, 0xc9, 0x9f, 0x40, 0xb6, 0x5f, 0x72, 0x70, 0x4d, 0xff, 0x30, 0x24, - 0x6c, 0x66, 0x38, 0xf6, 0xda, 0x0d, 0x76, 0x19, 0xe9, 0x4b, 0x3e, 0x4d, 0xfe, 0xb5, 0x04, 0x44, - 0xdb, 0xe2, 0xe0, 0xc3, 0xce, 0x4e, 0xdc, 0x0d, 0x71, 0xca, 0x5f, 0x95, 0x6b, 0x58, 0x93, 0xeb, - 0xb3, 0x3e, 0x72, 0x11, 0x3f, 0x32, 0xaf, 0x29, 0x72, 0x49, 0x57, 0xab, 0xbe, 0xe4, 0xd3, 0xdc, - 0xf9, 0x0a, 0x09, 0x5c, 0xff, 0x11, 0x8f, 0x0a, 0x17, 0x72, 0x12, 0x12, 0x25, 0x9d, 0xc6, 0x5f, - 0xce, 0x05, 0x88, 0xad, 0xe2, 0xb7, 0x89, 0x8d, 0xb1, 0xb7, 0x67, 0x32, 0x25, 0xb3, 0x37, 0xb4, - 0x9e, 0x85, 0x44, 0x71, 0xaf, 0xde, 0xa8, 0xb5, 0x6c, 0x87, 0x1d, 0xd9, 0xb3, 0x1d, 0x74, 0x8c, - 0xb1, 0x12, 0x55, 0xd6, 0x37, 0x95, 0x83, 0xa4, 0xe4, 0x12, 0x66, 0x1c, 0x5d, 0xfe, 0x67, 0x8e, - 0xe0, 0x3f, 0x85, 0x4c, 0x04, 0xff, 0x29, 0x66, 0xa2, 0x53, 0x77, 0xc3, 0x88, 0xb6, 0x41, 0x86, - 0x7b, 0x16, 0x32, 0x80, 0xff, 0x94, 0x32, 0xc9, 0x89, 0xd8, 0x07, 0x7f, 0xeb, 0xc4, 0x91, 0xa9, - 0x07, 0xc1, 0xec, 0xde, 0x4a, 0x33, 0x07, 0x20, 0x3a, 0x8f, 0x59, 0xde, 0x06, 0xd1, 0x02, 0xe2, - 0x39, 0x31, 0xf2, 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0xef, 0xcc, 0x44, 0xf1, 0xf6, 0x72, 0x61, 0x69, 0x79, 0xb9, 0x5c, 0x98, 0x5f, 0x5a, 0x2e, 0x3d, - 0x95, 0x31, 0x72, 0x27, 0x60, 0x80, 0xca, 0x89, 0x0d, 0xbf, 0xdd, 0x71, 0x9c, 0xeb, 0x7c, 0x99, - 0x22, 0x3f, 0x72, 0x5f, 0x36, 0x61, 0x70, 0xbe, 0xd1, 0x40, 0xc9, 0xc0, 0x35, 0x9f, 0x80, 0x51, - 0xfa, 0xec, 0xff, 0x66, 0x73, 0x81, 0xbc, 0x2f, 0x0c, 0xa7, 0x88, 0x08, 0x7b, 0xeb, 0xb2, 0x37, - 0x6f, 0x46, 0x3e, 0xdd, 0x45, 0x4b, 0x15, 0x3c, 0xea, 0xea, 0xed, 0xe6, 0x26, 0x64, 0x38, 0xf1, - 0x62, 0xa3, 0x59, 0x69, 0x63, 0xbe, 0x51, 0xf6, 0x3a, 0xaf, 0x60, 0xbe, 0x9c, 0x94, 0xb2, 0xcd, - 0xb8, 0x5a, 0xb3, 0xf9, 0x10, 0x24, 0x96, 0x9c, 0xf6, 0x85, 0x59, 0xcc, 0x8d, 0xbf, 0xd8, 0xbf, - 0x9b, 0x1b, 0x27, 0xa1, 0x5c, 0x12, 0x75, 0xf6, 0x93, 0xa1, 0x2f, 0xcd, 0x61, 0x74, 0xac, 0x17, - 0x9a, 0x90, 0x78, 0x68, 0xf2, 0x13, 0x1f, 0xaa, 0x6c, 0x71, 0x56, 0xec, 0x5d, 0xfe, 0xa7, 0x7d, - 0xe0, 0x82, 0x86, 0xe2, 0x87, 0x3a, 0x62, 0x78, 0xc6, 0x80, 0x8e, 0x3f, 0xd0, 0x93, 0x81, 0x24, - 0x00, 0x61, 0x20, 0x24, 0xd8, 0x10, 0x12, 0x0c, 0x06, 0x32, 0xd8, 0xd0, 0x24, 0x70, 0x65, 0x09, - 0x36, 0x84, 0x04, 0x89, 0x9e, 0x0c, 0x64, 0x09, 0x5c, 0x21, 0x41, 0x01, 0x60, 0xb1, 0xfe, 0x82, - 0x5d, 0xa3, 0x22, 0xd0, 0xd7, 0xfe, 0xe7, 0x7c, 0x38, 0x78, 0x44, 0x94, 0x05, 0xec, 0x88, 0x06, - 0xb3, 0x04, 0xc9, 0x0d, 0xef, 0x27, 0x4b, 0x1f, 0x77, 0xf9, 0x89, 0xb1, 0xa3, 0x71, 0x49, 0xba, - 0x12, 0x1b, 0x2e, 0x0a, 0x9d, 0x4c, 0xb2, 0xb7, 0x28, 0xd2, 0x6c, 0xa8, 0x28, 0x74, 0x3a, 0x42, - 0x14, 0xca, 0x24, 0x15, 0x22, 0x8a, 0xc4, 0x85, 0x89, 0x42, 0xd9, 0xa0, 0x64, 0x58, 0x68, 0x36, - 0x31, 0x25, 0xcb, 0x4a, 0x27, 0x7d, 0x58, 0x30, 0x0a, 0x96, 0x0c, 0xb7, 0xe9, 0x2f, 0x62, 0x11, - 0xe2, 0xe4, 0x18, 0x9c, 0x0e, 0xb6, 0x08, 0xa7, 0xe1, 0x16, 0xe1, 0xbf, 0xe5, 0x38, 0x23, 0x37, - 0x4e, 0x62, 0x3e, 0x23, 0xa1, 0x71, 0xc6, 0x49, 0xb5, 0x38, 0xe3, 0xcd, 0xe6, 0xbb, 0x60, 0x84, - 0x93, 0xe2, 0xf4, 0x84, 0x99, 0x66, 0xd8, 0xff, 0x18, 0x25, 0x98, 0x29, 0xa3, 0xa4, 0x3c, 0x47, - 0x5c, 0xb5, 0xd5, 0x5c, 0x85, 0x34, 0x27, 0x5c, 0x71, 0xc9, 0x74, 0x47, 0xd9, 0xdb, 0xca, 0x83, - 0x39, 0x52, 0x42, 0xca, 0x30, 0xed, 0x2a, 0x8d, 0x13, 0x0b, 0x30, 0xee, 0x9f, 0x8d, 0xe4, 0xf4, - 0x3b, 0x44, 0xd3, 0xef, 0x98, 0x9c, 0x7e, 0x23, 0x72, 0xfa, 0x2e, 0xc2, 0x31, 0xdf, 0xdc, 0x13, - 0xc6, 0x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0x48, 0x8b, 0x1f, 0xf4, 0x5e, 0x6e, 0xea, 0xa9, 0x79, 0x49, 0xc3, 0x5d, 0x3c, 0xa6, 0x7d, - 0xbe, 0xd1, 0x83, 0x2c, 0xba, 0x26, 0x3b, 0x4a, 0xe3, 0xc4, 0x3c, 0x1c, 0xf5, 0x21, 0x3b, 0xcc, - 0x82, 0x3c, 0x75, 0x1a, 0x06, 0x59, 0x68, 0xe3, 0x83, 0xc3, 0x15, 0x7c, 0xf0, 0x88, 0xff, 0xe2, - 0xc3, 0x4c, 0xfc, 0xb7, 0x98, 0x89, 0x16, 0x96, 0x6f, 0xe2, 0x30, 0xe9, 0xc8, 0xab, 0xe8, 0xe3, - 0x73, 0x98, 0x14, 0xd9, 0x1e, 0xa0, 0x73, 0xff, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x53, - 0xbe, 0xfe, 0x80, 0x79, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Hilarity != that1.Hilarity { - return false - } - if this.HeightInCm != that1.HeightInCm { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ResultCount != that1.ResultCount { - return false - } - if this.TrueScotsman != that1.TrueScotsman { - return false - } - if this.Score != that1.Score { - return false - } - if len(this.Key) != len(that1.Key) { - return false - } - for i := range this.Key { - if this.Key[i] != that1.Key[i] { - return false - } - } - if !this.Nested.Equal(that1.Nested) { - return false - } - if len(this.Terrain) != len(that1.Terrain) { - return false - } - for i := range this.Terrain { - if !this.Terrain[i].Equal(that1.Terrain[i]) { - return false - } - } - if !this.Proto2Field.Equal(that1.Proto2Field) { - return false - } - if len(this.Proto2Value) != len(that1.Proto2Value) { - return false - } - for i := range this.Proto2Value { - if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { - return false - } - } - return true -} -func (this *Nested) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nested") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nested but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nested but is not nil && this == nil") - } - if this.Bunny != that1.Bunny { - return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) - } - return nil -} -func (this *Nested) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Bunny != that1.Bunny { - return false - } - return true -} -func (this *AllMaps) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMaps") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMaps but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) - } - } - if len(this.StringMap) != len(that1.StringMap) { - return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) - } - } - return nil -} -func (this *AllMaps) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { - return false - } - for i := range this.StringToDoubleMap { - if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { - return false - } - } - if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { - return false - } - for i := range this.StringToFloatMap { - if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { - return false - } - } - if len(this.Int32Map) != len(that1.Int32Map) { - return false - } - for i := range this.Int32Map { - if this.Int32Map[i] != that1.Int32Map[i] { - return false - } - } - if len(this.Int64Map) != len(that1.Int64Map) { - return false - } - for i := range this.Int64Map { - if this.Int64Map[i] != that1.Int64Map[i] { - return false - } - } - if len(this.Uint32Map) != len(that1.Uint32Map) { - return false - } - for i := range this.Uint32Map { - if this.Uint32Map[i] != that1.Uint32Map[i] { - return false - } - } - if len(this.Uint64Map) != len(that1.Uint64Map) { - return false - } - for i := range this.Uint64Map { - if this.Uint64Map[i] != that1.Uint64Map[i] { - return false - } - } - if len(this.Sint32Map) != len(that1.Sint32Map) { - return false - } - for i := range this.Sint32Map { - if this.Sint32Map[i] != that1.Sint32Map[i] { - return false - } - } - if len(this.Sint64Map) != len(that1.Sint64Map) { - return false - } - for i := range this.Sint64Map { - if this.Sint64Map[i] != that1.Sint64Map[i] { - return false - } - } - if len(this.Fixed32Map) != len(that1.Fixed32Map) { - return false - } - for i := range this.Fixed32Map { - if this.Fixed32Map[i] != that1.Fixed32Map[i] { - return false - } - } - if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { - return false - } - for i := range this.Sfixed32Map { - if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { - return false - } - } - if len(this.Fixed64Map) != len(that1.Fixed64Map) { - return false - } - for i := range this.Fixed64Map { - if this.Fixed64Map[i] != that1.Fixed64Map[i] { - return false - } - } - if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { - return false - } - for i := range this.Sfixed64Map { - if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { - return false - } - } - if len(this.BoolMap) != len(that1.BoolMap) { - return false - } - for i := range this.BoolMap { - if this.BoolMap[i] != that1.BoolMap[i] { - return false - } - } - if len(this.StringMap) != len(that1.StringMap) { - return false - } - for i := range this.StringMap { - if this.StringMap[i] != that1.StringMap[i] { - return false - } - } - if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { - return false - } - for i := range this.StringToBytesMap { - if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { - return false - } - } - if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { - return false - } - for i := range this.StringToEnumMap { - if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { - return false - } - } - if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { - return false - } - for i := range this.StringToMsgMap { - if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { - return false - } - } - return true -} -func (this *MessageWithMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MessageWithMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") - } - if len(this.NameMapping) != len(that1.NameMapping) { - return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) - } - } - return nil -} -func (this *MessageWithMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NameMapping) != len(that1.NameMapping) { - return false - } - for i := range this.NameMapping { - if this.NameMapping[i] != that1.NameMapping[i] { - return false - } - } - if len(this.MsgMapping) != len(that1.MsgMapping) { - return false - } - for i := range this.MsgMapping { - if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { - return false - } - } - if len(this.ByteMapping) != len(that1.ByteMapping) { - return false - } - for i := range this.ByteMapping { - if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { - return false - } - } - return true -} -func (this *FloatingPoint) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FloatingPoint") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") - } - if this.F != that1.F { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - return nil -} -func (this *FloatingPoint) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} - -type MessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetName() string - GetHilarity() Message_Humour - GetHeightInCm() uint32 - GetData() []byte - GetResultCount() int64 - GetTrueScotsman() bool - GetScore() float32 - GetKey() []uint64 - GetNested() *Nested - GetTerrain() map[int64]*Nested - GetProto2Field() *test.NinOptNative - GetProto2Value() map[int64]*test.NinOptEnum -} - -func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageFromFace(this) -} - -func (this *Message) GetName() string { - return this.Name -} - -func (this *Message) GetHilarity() Message_Humour { - return this.Hilarity -} - -func (this *Message) GetHeightInCm() uint32 { - return this.HeightInCm -} - -func (this *Message) GetData() []byte { - return this.Data -} - -func (this *Message) GetResultCount() int64 { - return this.ResultCount -} - -func (this *Message) GetTrueScotsman() bool { - return this.TrueScotsman -} - -func (this *Message) GetScore() float32 { - return this.Score -} - -func (this *Message) GetKey() []uint64 { - return this.Key -} - -func (this *Message) GetNested() *Nested { - return this.Nested -} - -func (this *Message) GetTerrain() map[int64]*Nested { - return this.Terrain -} - -func (this *Message) GetProto2Field() *test.NinOptNative { - return this.Proto2Field -} - -func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { - return this.Proto2Value -} - -func NewMessageFromFace(that MessageFace) *Message { - this := &Message{} - this.Name = that.GetName() - this.Hilarity = that.GetHilarity() - this.HeightInCm = that.GetHeightInCm() - this.Data = that.GetData() - this.ResultCount = that.GetResultCount() - this.TrueScotsman = that.GetTrueScotsman() - this.Score = that.GetScore() - this.Key = that.GetKey() - this.Nested = that.GetNested() - this.Terrain = that.GetTerrain() - this.Proto2Field = that.GetProto2Field() - this.Proto2Value = that.GetProto2Value() - return this -} - -type NestedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetBunny() string -} - -func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedFromFace(this) -} - -func (this *Nested) GetBunny() string { - return this.Bunny -} - -func NewNestedFromFace(that NestedFace) *Nested { - this := &Nested{} - this.Bunny = that.GetBunny() - return this -} - -type AllMapsFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAllMapsFromFace(this) -} - -func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMaps) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMaps) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMaps) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMaps) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMaps) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMaps) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMaps) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMaps) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMaps) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMaps) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMaps) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMaps) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsFromFace(that AllMapsFace) *AllMaps { - this := &AllMaps{} - this.StringToDoubleMap = that.GetStringToDoubleMap() - this.StringToFloatMap = that.GetStringToFloatMap() - this.Int32Map = that.GetInt32Map() - this.Int64Map = that.GetInt64Map() - this.Uint32Map = that.GetUint32Map() - this.Uint64Map = that.GetUint64Map() - this.Sint32Map = that.GetSint32Map() - this.Sint64Map = that.GetSint64Map() - this.Fixed32Map = that.GetFixed32Map() - this.Sfixed32Map = that.GetSfixed32Map() - this.Fixed64Map = that.GetFixed64Map() - this.Sfixed64Map = that.GetSfixed64Map() - this.BoolMap = that.GetBoolMap() - this.StringMap = that.GetStringMap() - this.StringToBytesMap = that.GetStringToBytesMap() - this.StringToEnumMap = that.GetStringToEnumMap() - this.StringToMsgMap = that.GetStringToMsgMap() - return this -} - -type AllMapsOrderedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetStringToDoubleMap() map[string]float64 - GetStringToFloatMap() map[string]float32 - GetInt32Map() map[int32]int32 - GetInt64Map() map[int64]int64 - GetUint32Map() map[uint32]uint32 - GetUint64Map() map[uint64]uint64 - GetSint32Map() map[int32]int32 - GetSint64Map() map[int64]int64 - GetFixed32Map() map[uint32]uint32 - GetSfixed32Map() map[int32]int32 - GetFixed64Map() map[uint64]uint64 - GetSfixed64Map() map[int64]int64 - GetBoolMap() map[bool]bool - GetStringMap() map[string]string - GetStringToBytesMap() map[string][]byte - GetStringToEnumMap() map[string]MapEnum - GetStringToMsgMap() map[string]*FloatingPoint -} - -func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewMessageWithMapFromFace(this) -} - -func (this *MessageWithMap) GetNameMapping() map[int32]string { - return this.NameMapping -} - -func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - return this.MsgMapping -} - -func (this *MessageWithMap) GetByteMapping() map[bool][]byte { - return this.ByteMapping -} - -func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { - this := &MessageWithMap{} - this.NameMapping = that.GetNameMapping() - this.MsgMapping = that.GetMsgMapping() - this.ByteMapping = that.GetByteMapping() - return this -} - -type FloatingPointFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { - return NewFloatingPointFromFace(this) -} - -func (this *FloatingPoint) GetF() float64 { - return this.F -} - -func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { - this := &FloatingPoint{} - this.F = that.GetF() - return this -} - -type Uint128PairFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_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() github_com_gogo_protobuf_proto.Message -} - -func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_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 -} - -func (this *Message) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 16) - s = append(s, "&theproto3.Message{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") - s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") - s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") - s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - if this.Nested != nil { - s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - if this.Terrain != nil { - s = append(s, "Terrain: "+mapStringForTerrain+",\n") - } - if this.Proto2Field != nil { - s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") - } - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - if this.Proto2Value != nil { - s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Nested) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.Nested{") - s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AllMaps) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMaps{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *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) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - if this.StringToDoubleMap != nil { - s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") - } - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - if this.StringToFloatMap != nil { - s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") - } - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - if this.Int32Map != nil { - s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") - } - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - if this.Int64Map != nil { - s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") - } - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - if this.Uint32Map != nil { - s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") - } - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - if this.Uint64Map != nil { - s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") - } - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - if this.Sint32Map != nil { - s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") - } - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - if this.Sint64Map != nil { - s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") - } - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - if this.Fixed32Map != nil { - s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") - } - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - if this.Sfixed32Map != nil { - s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") - } - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - if this.Fixed64Map != nil { - s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") - } - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - if this.Sfixed64Map != nil { - s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") - } - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - if this.BoolMap != nil { - s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") - } - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - if this.StringMap != nil { - s = append(s, "StringMap: "+mapStringForStringMap+",\n") - } - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - if this.StringToBytesMap != nil { - s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") - } - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - if this.StringToEnumMap != nil { - s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") - } - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - if this.StringToMsgMap != nil { - s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MessageWithMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&theproto3.MessageWithMap{") - keysForNameMapping := make([]int32, 0, len(this.NameMapping)) - for k := range this.NameMapping { - keysForNameMapping = append(keysForNameMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - if this.NameMapping != nil { - s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") - } - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - if this.MsgMapping != nil { - s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") - } - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - if this.ByteMapping != nil { - s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatingPoint) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.FloatingPoint{") - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (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) - } - github_com_gogo_protobuf_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 valueToGoStringTheproto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringTheproto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = randStringTheproto3(r) - this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.HeightInCm = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Data = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ResultCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ResultCount *= -1 - } - this.TrueScotsman = bool(bool(r.Intn(2) == 0)) - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - v2 := r.Intn(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 = 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 -} - -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 { - v77 := r.Intn(100) - tmps := make([]rune, v77) - for i := 0; i < v77; 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)) - v78 := r.Int63() - if r.Intn(2) == 0 { - v78 *= -1 - } - data = encodeVarintPopulateTheproto3(data, uint64(v78)) - 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 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Terrain) > 0 { - for k, v := range m.Terrain { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - 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 sovTheproto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTheproto3(x uint64) (n int) { - return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Message) String() string { - if this == nil { - return "nil" - } - keysForTerrain := make([]int64, 0, len(this.Terrain)) - for k := range this.Terrain { - keysForTerrain = append(keysForTerrain, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) - mapStringForTerrain := "map[int64]*Nested{" - for _, k := range keysForTerrain { - mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) - } - mapStringForTerrain += "}" - keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) - for k := range this.Proto2Value { - keysForProto2Value = append(keysForProto2Value, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) - mapStringForProto2Value := "map[int64]*test.NinOptEnum{" - for _, k := range keysForProto2Value { - mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) - } - mapStringForProto2Value += "}" - s := strings.Join([]string{`&Message{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, - `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, - `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, - `Score:` + fmt.Sprintf("%v", this.Score) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, - `Terrain:` + mapStringForTerrain + `,`, - `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, - `Proto2Value:` + mapStringForProto2Value + `,`, - `}`, - }, "") - return s -} -func (this *Nested) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nested{`, - `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, - `}`, - }, "") - return s -} -func (this *AllMaps) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&AllMaps{`, - `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, - `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, - `Int32Map:` + mapStringForInt32Map + `,`, - `Int64Map:` + mapStringForInt64Map + `,`, - `Uint32Map:` + mapStringForUint32Map + `,`, - `Uint64Map:` + mapStringForUint64Map + `,`, - `Sint32Map:` + mapStringForSint32Map + `,`, - `Sint64Map:` + mapStringForSint64Map + `,`, - `Fixed32Map:` + mapStringForFixed32Map + `,`, - `Sfixed32Map:` + mapStringForSfixed32Map + `,`, - `Fixed64Map:` + mapStringForFixed64Map + `,`, - `Sfixed64Map:` + mapStringForSfixed64Map + `,`, - `BoolMap:` + mapStringForBoolMap + `,`, - `StringMap:` + mapStringForStringMap + `,`, - `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, - `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, - `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, - `}`, - }, "") - return s -} -func (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) - mapStringForStringToDoubleMap := "map[string]float64{" - for _, k := range keysForStringToDoubleMap { - mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) - } - mapStringForStringToDoubleMap += "}" - keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) - for k := range this.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) - mapStringForStringToFloatMap := "map[string]float32{" - for _, k := range keysForStringToFloatMap { - mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) - } - mapStringForStringToFloatMap += "}" - keysForInt32Map := make([]int32, 0, len(this.Int32Map)) - for k := range this.Int32Map { - keysForInt32Map = append(keysForInt32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) - mapStringForInt32Map := "map[int32]int32{" - for _, k := range keysForInt32Map { - mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) - } - mapStringForInt32Map += "}" - keysForInt64Map := make([]int64, 0, len(this.Int64Map)) - for k := range this.Int64Map { - keysForInt64Map = append(keysForInt64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) - mapStringForInt64Map := "map[int64]int64{" - for _, k := range keysForInt64Map { - mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) - } - mapStringForInt64Map += "}" - keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) - for k := range this.Uint32Map { - keysForUint32Map = append(keysForUint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) - mapStringForUint32Map := "map[uint32]uint32{" - for _, k := range keysForUint32Map { - mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) - } - mapStringForUint32Map += "}" - keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) - for k := range this.Uint64Map { - keysForUint64Map = append(keysForUint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) - mapStringForUint64Map := "map[uint64]uint64{" - for _, k := range keysForUint64Map { - mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) - } - mapStringForUint64Map += "}" - keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) - for k := range this.Sint32Map { - keysForSint32Map = append(keysForSint32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) - mapStringForSint32Map := "map[int32]int32{" - for _, k := range keysForSint32Map { - mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) - } - mapStringForSint32Map += "}" - keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) - for k := range this.Sint64Map { - keysForSint64Map = append(keysForSint64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) - mapStringForSint64Map := "map[int64]int64{" - for _, k := range keysForSint64Map { - mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) - } - mapStringForSint64Map += "}" - keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) - for k := range this.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) - mapStringForFixed32Map := "map[uint32]uint32{" - for _, k := range keysForFixed32Map { - mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) - } - mapStringForFixed32Map += "}" - keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) - for k := range this.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, k) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) - mapStringForSfixed32Map := "map[int32]int32{" - for _, k := range keysForSfixed32Map { - mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) - } - mapStringForSfixed32Map += "}" - keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) - for k := range this.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) - mapStringForFixed64Map := "map[uint64]uint64{" - for _, k := range keysForFixed64Map { - mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) - } - mapStringForFixed64Map += "}" - keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) - for k := range this.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) - mapStringForSfixed64Map := "map[int64]int64{" - for _, k := range keysForSfixed64Map { - mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) - } - mapStringForSfixed64Map += "}" - keysForBoolMap := make([]bool, 0, len(this.BoolMap)) - for k := range this.BoolMap { - keysForBoolMap = append(keysForBoolMap, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) - mapStringForBoolMap := "map[bool]bool{" - for _, k := range keysForBoolMap { - mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) - } - mapStringForBoolMap += "}" - keysForStringMap := make([]string, 0, len(this.StringMap)) - for k := range this.StringMap { - keysForStringMap = append(keysForStringMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) - mapStringForStringMap := "map[string]string{" - for _, k := range keysForStringMap { - mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) - } - mapStringForStringMap += "}" - keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) - for k := range this.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) - mapStringForStringToBytesMap := "map[string][]byte{" - for _, k := range keysForStringToBytesMap { - mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) - } - mapStringForStringToBytesMap += "}" - keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) - for k := range this.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) - mapStringForStringToEnumMap := "map[string]MapEnum{" - for _, k := range keysForStringToEnumMap { - mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) - } - mapStringForStringToEnumMap += "}" - keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) - for k := range this.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) - mapStringForStringToMsgMap := "map[string]*FloatingPoint{" - for _, k := range keysForStringToMsgMap { - mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) - } - mapStringForStringToMsgMap += "}" - s := strings.Join([]string{`&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) - } - github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) - mapStringForNameMapping := "map[int32]string{" - for _, k := range keysForNameMapping { - mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) - } - mapStringForNameMapping += "}" - keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) - for k := range this.MsgMapping { - keysForMsgMapping = append(keysForMsgMapping, k) - } - github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) - mapStringForMsgMapping := "map[int64]*FloatingPoint{" - for _, k := range keysForMsgMapping { - mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) - } - mapStringForMsgMapping += "}" - keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) - for k := range this.ByteMapping { - keysForByteMapping = append(keysForByteMapping, k) - } - github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) - mapStringForByteMapping := "map[bool][]byte{" - for _, k := range keysForByteMapping { - mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) - } - mapStringForByteMapping += "}" - s := strings.Join([]string{`&MessageWithMap{`, - `NameMapping:` + mapStringForNameMapping + `,`, - `MsgMapping:` + mapStringForMsgMapping + `,`, - `ByteMapping:` + mapStringForByteMapping + `,`, - `}`, - }, "") - return s -} -func (this *FloatingPoint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatingPoint{`, - `F:` + fmt.Sprintf("%v", this.F) + `,`, - `}`, - }, "") - return s -} -func (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) - } - github_com_gogo_protobuf_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 valueToStringTheproto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Message) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) - } - m.Hilarity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Hilarity |= (Message_Humour(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) - } - m.HeightInCm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.HeightInCm |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ResultCount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TrueScotsman = bool(v != 0) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - if iNdEx+4 > l { - return io.ErrUnexpectedEOF - } - m.Score = *(*float32)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 4 - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Key = append(m.Key, v) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nested == nil { - m.Nested = &Nested{} - } - if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &Nested{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Terrain[mapkey] = mapvalue - } else { - var mapvalue *Nested - m.Terrain[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proto2Field == nil { - m.Proto2Field = &test.NinOptNative{} - } - if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &test.NinOptEnum{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Proto2Value[mapkey] = mapvalue - } else { - var mapvalue *test.NinOptEnum - m.Proto2Value[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nested) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nested: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bunny = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllMaps) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllMaps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.StringToDoubleMap[mapkey] = mapvalue - } else { - var mapvalue float64 - m.StringToDoubleMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvaluetemp = uint32(data[iNdEx-4]) - mapvaluetemp |= uint32(data[iNdEx-3]) << 8 - mapvaluetemp |= uint32(data[iNdEx-2]) << 16 - mapvaluetemp |= uint32(data[iNdEx-1]) << 24 - mapvalue := math.Float32frombits(mapvaluetemp) - m.StringToFloatMap[mapkey] = mapvalue - } else { - var mapvalue float32 - m.StringToFloatMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Int32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Int64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Uint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Uint64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Uint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey := int32(mapkeytemp) - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) - mapvalue := int32(mapvaluetemp) - m.Sint32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sint32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) - mapvalue := int64(mapvaluetemp) - m.Sint64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sint64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = uint32(data[iNdEx-4]) - mapkey |= uint32(data[iNdEx-3]) << 8 - mapkey |= uint32(data[iNdEx-2]) << 16 - mapkey |= uint32(data[iNdEx-1]) << 24 - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = uint32(data[iNdEx-4]) - mapvalue |= uint32(data[iNdEx-3]) << 8 - mapvalue |= uint32(data[iNdEx-2]) << 16 - mapvalue |= uint32(data[iNdEx-1]) << 24 - m.Fixed32Map[mapkey] = mapvalue - } else { - var mapvalue uint32 - m.Fixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapkey = int32(data[iNdEx-4]) - mapkey |= int32(data[iNdEx-3]) << 8 - mapkey |= int32(data[iNdEx-2]) << 16 - mapkey |= int32(data[iNdEx-1]) << 24 - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - mapvalue = int32(data[iNdEx-4]) - mapvalue |= int32(data[iNdEx-3]) << 8 - mapvalue |= int32(data[iNdEx-2]) << 16 - mapvalue |= int32(data[iNdEx-1]) << 24 - m.Sfixed32Map[mapkey] = mapvalue - } else { - var mapvalue int32 - m.Sfixed32Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = uint64(data[iNdEx-8]) - mapkey |= uint64(data[iNdEx-7]) << 8 - mapkey |= uint64(data[iNdEx-6]) << 16 - mapkey |= uint64(data[iNdEx-5]) << 24 - mapkey |= uint64(data[iNdEx-4]) << 32 - mapkey |= uint64(data[iNdEx-3]) << 40 - mapkey |= uint64(data[iNdEx-2]) << 48 - mapkey |= uint64(data[iNdEx-1]) << 56 - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = uint64(data[iNdEx-8]) - mapvalue |= uint64(data[iNdEx-7]) << 8 - mapvalue |= uint64(data[iNdEx-6]) << 16 - mapvalue |= uint64(data[iNdEx-5]) << 24 - mapvalue |= uint64(data[iNdEx-4]) << 32 - mapvalue |= uint64(data[iNdEx-3]) << 40 - mapvalue |= uint64(data[iNdEx-2]) << 48 - mapvalue |= uint64(data[iNdEx-1]) << 56 - m.Fixed64Map[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.Fixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapkey = int64(data[iNdEx-8]) - mapkey |= int64(data[iNdEx-7]) << 8 - mapkey |= int64(data[iNdEx-6]) << 16 - mapkey |= int64(data[iNdEx-5]) << 24 - mapkey |= int64(data[iNdEx-4]) << 32 - mapkey |= int64(data[iNdEx-3]) << 40 - mapkey |= int64(data[iNdEx-2]) << 48 - mapkey |= int64(data[iNdEx-1]) << 56 - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvalue = int64(data[iNdEx-8]) - mapvalue |= int64(data[iNdEx-7]) << 8 - mapvalue |= int64(data[iNdEx-6]) << 16 - mapvalue |= int64(data[iNdEx-5]) << 24 - mapvalue |= int64(data[iNdEx-4]) << 32 - mapvalue |= int64(data[iNdEx-3]) << 40 - mapvalue |= int64(data[iNdEx-2]) << 48 - mapvalue |= int64(data[iNdEx-1]) << 56 - m.Sfixed64Map[mapkey] = mapvalue - } else { - var mapvalue int64 - m.Sfixed64Map[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvaluetemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapvalue := bool(mapvaluetemp != 0) - m.BoolMap[mapkey] = mapvalue - } else { - var mapvalue bool - m.BoolMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.StringMap[mapkey] = mapvalue - } else { - var mapvalue string - m.StringMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.StringToBytesMap[mapkey] = mapvalue - } else { - var mapvalue []byte - m.StringToBytesMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue MapEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (MapEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StringToEnumMap[mapkey] = mapvalue - } else { - var mapvalue MapEnum - m.StringToEnumMap[mapkey] = mapvalue - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.StringToMsgMap[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.StringToMsgMap[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessageWithMap) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessageWithMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkey int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.NameMapping[mapkey] = mapvalue - } else { - var mapvalue string - m.NameMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey := int64(mapkeytemp) - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &FloatingPoint{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.MsgMapping[mapkey] = mapvalue - } else { - var mapvalue *FloatingPoint - m.MsgMapping[mapkey] = mapvalue - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapkeytemp int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapkeytemp |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - mapkey := bool(mapkeytemp != 0) - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapbyteLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := make([]byte, mapbyteLen) - copy(mapvalue, data[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - m.ByteMapping[mapkey] = mapvalue - } else { - var mapvalue []byte - m.ByteMapping[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatingPoint) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatingPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - if iNdEx+8 > l { - return io.ErrUnexpectedEOF - } - m.F = *(*float64)(unsafe.Pointer(&data[iNdEx])) - iNdEx += 8 - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - 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 := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: 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 ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.NestedMapField == nil { - m.NestedMapField = make(map[string]float64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - mapvaluetemp = uint64(data[iNdEx-8]) - mapvaluetemp |= uint64(data[iNdEx-7]) << 8 - mapvaluetemp |= uint64(data[iNdEx-6]) << 16 - mapvaluetemp |= uint64(data[iNdEx-5]) << 24 - mapvaluetemp |= uint64(data[iNdEx-4]) << 32 - mapvaluetemp |= uint64(data[iNdEx-3]) << 40 - mapvaluetemp |= uint64(data[iNdEx-2]) << 48 - mapvaluetemp |= uint64(data[iNdEx-1]) << 56 - mapvalue := math.Float64frombits(mapvaluetemp) - m.NestedMapField[mapkey] = mapvalue - } else { - var mapvalue float64 - m.NestedMapField[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTheproto3Unsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3Unsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTheproto3Unsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthTheproto3Unsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTheproto3Unsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTheproto3Unsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthTheproto3Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTheproto3Unsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unsafeunmarshaler/theproto3.proto", fileDescriptorTheproto3) } - -var fileDescriptorTheproto3 = []byte{ - // 1591 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4b, 0x6f, 0xdb, 0xc6, - 0x16, 0x36, 0x25, 0x59, 0x8f, 0xa3, 0x17, 0x3d, 0xc9, 0xbd, 0xd0, 0x35, 0x70, 0x6d, 0x47, 0x01, - 0x12, 0x27, 0xb8, 0x91, 0x73, 0x9d, 0xb4, 0x4d, 0xdd, 0xb4, 0xa9, 0xa5, 0x58, 0x88, 0x1b, 0x5b, - 0x71, 0x25, 0x3b, 0x6e, 0x11, 0xa0, 0x06, 0x65, 0x53, 0x12, 0x51, 0x89, 0x34, 0xf8, 0x08, 0xea, - 0x5d, 0x7e, 0x46, 0x77, 0x45, 0x77, 0x5d, 0x16, 0x59, 0x14, 0x5d, 0xb6, 0x3b, 0x2f, 0x0b, 0x74, - 0x53, 0x74, 0x11, 0x24, 0xe9, 0x26, 0xcb, 0x2c, 0xb3, 0xec, 0x3c, 0x48, 0x6a, 0x48, 0x0d, 0xc5, - 0xa6, 0x9b, 0x6e, 0xbc, 0x18, 0x88, 0x73, 0xf8, 0x7d, 0xdf, 0x9c, 0x19, 0xce, 0x1c, 0x7e, 0xa0, - 0x60, 0xf9, 0xd0, 0x18, 0x75, 0x0d, 0x6b, 0xc5, 0xd1, 0x2d, 0xa5, 0xa7, 0x3a, 0xfa, 0x48, 0x31, - 0xad, 0x81, 0x32, 0x54, 0xcd, 0x15, 0x7b, 0xa0, 0x1e, 0x9b, 0x86, 0x6d, 0xdc, 0xa8, 0xd1, 0x1f, - 0x94, 0xf3, 0x03, 0xf3, 0xd7, 0xfa, 0x9a, 0x3d, 0x70, 0xba, 0x35, 0xcc, 0x5d, 0xe9, 0x1b, 0x7d, - 0x63, 0x85, 0xc6, 0xb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, 0xd5, 0xaf, 0xbf, - 0xb5, 0x0c, 0xa3, 0x57, 0x4f, 0x25, 0x98, 0x6b, 0x18, 0xba, 0xad, 0x68, 0xba, 0xc5, 0xbe, 0xd6, - 0x92, 0x37, 0xe4, 0x53, 0x09, 0x72, 0x7e, 0x0f, 0x75, 0xa1, 0xe4, 0x77, 0xe8, 0x47, 0x70, 0x77, - 0xa7, 0xae, 0x71, 0x2b, 0x3c, 0xa1, 0x51, 0x13, 0x5c, 0x51, 0xb2, 0xfb, 0x4e, 0xd6, 0x03, 0xc1, - 0xf9, 0x75, 0x38, 0x27, 0x80, 0xbd, 0xcd, 0x0b, 0xf9, 0xea, 0x05, 0xc8, 0xb8, 0x47, 0x1b, 0xa5, - 0x21, 0xb1, 0xbd, 0x2e, 0xcf, 0xd0, 0xdf, 0xba, 0x2c, 0xd1, 0xdf, 0x86, 0x9c, 0xa8, 0x6f, 0x9d, - 0xbe, 0x58, 0x98, 0xf9, 0x05, 0xb7, 0xdf, 0x70, 0x7b, 0xfe, 0x62, 0x41, 0x7a, 0x85, 0xdb, 0x6b, - 0xdc, 0xde, 0xe0, 0xf6, 0xe4, 0xe5, 0x82, 0xf4, 0x1d, 0x6e, 0xdf, 0xe3, 0xf6, 0x23, 0x6e, 0x3f, - 0xe1, 0x76, 0xfa, 0x12, 0xe3, 0x71, 0x7b, 0x8e, 0xaf, 0x5f, 0xe1, 0xdf, 0xd7, 0xf8, 0xf7, 0x0d, - 0xfe, 0x7d, 0xf2, 0xc7, 0x82, 0xd4, 0x4d, 0xb3, 0xb9, 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x21, - 0xd6, 0xef, 0xbc, 0x4a, 0x1a, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto deleted file mode 100644 index 47715d19..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto +++ /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 -// -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package theproto3; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_getters_all) = false; - -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.face_all) = true; -option (gogoproto.description_all) = true; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.unmarshaler_all) = false; -option (gogoproto.marshaler_all) = false; -option (gogoproto.sizer_all) = true; - -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.enum_stringer_all) = true; - -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = true; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - Nested nested = 6; - - map terrain = 10; - test.NinOptNative proto2_field = 11; - map proto2_value = 13; -} - -message Nested { - string bunny = 1; -} - -enum MapEnum { - MA = 0; - MB = 1; - MC = 2; -} - -message AllMaps { - map StringToDoubleMap = 1; - map StringToFloatMap = 2; - map Int32Map = 3; - map Int64Map = 4; - map Uint32Map = 5; - map Uint64Map = 6; - map Sint32Map = 7; - map Sint64Map = 8; - map Fixed32Map = 9; - map Sfixed32Map = 10; - map Fixed64Map = 11; - map Sfixed64Map = 12; - map BoolMap = 13; - map StringMap = 14; - map StringToBytesMap = 15; - map StringToEnumMap = 16; - map StringToMsgMap = 17; -} - -message 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; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go deleted file mode 100644 index c17ea875..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go +++ /dev/null @@ -1,1934 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: combos/unsafeunmarshaler/theproto3.proto -// DO NOT EDIT! - -/* -Package theproto3 is a generated protocol buffer package. - -It is generated from these files: - combos/unsafeunmarshaler/theproto3.proto - -It has these top-level messages: - Message - Nested - AllMaps - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap -*/ -package theproto3 - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/combos/both" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Message{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nested{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AllMaps{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageWithMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MessageWithMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &FloatingPoint{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUint128PairProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageWithMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFloatingPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Message{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageWithMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFloatingPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTheproto3Description(t *testing.T) { - Theproto3Description() -} -func TestMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageWithMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFloatingPointVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsOrderedFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUint128PairFace(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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 TestMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Message, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nested, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNested(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AllMaps, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMaps(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMessageWithMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MessageWithMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMessageWithMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkFloatingPointSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*FloatingPoint, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFloatingPoint(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAllMapsOrderedStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFloatingPointStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUint128PairStringer(t *testing.T) { - popr := math_rand.New(math_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 := math_rand.New(math_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 := math_rand.New(math_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) - } -} - -//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 e559a27b..00000000 --- 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 549f37d4..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto +++ /dev/null @@ -1,21 +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; - } -} 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 314e48f2..00000000 --- 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 18aff7ae..00000000 --- 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 2e75f6aa..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in +++ /dev/null @@ -1,125 +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": []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) - } -} - -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) - } - } -} 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 490e8102..00000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto +++ /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 -// -// 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; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/thetest.pb.go deleted file mode 100644 index 4b7849bc..00000000 --- a/vendor/github.com/gogo/protobuf/test/thetest.pb.go +++ /dev/null @@ -1,24656 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: thetest.proto -// DO NOT EDIT! - -/* - Package test is a generated protocol buffer package. - - It is generated from these files: - thetest.proto - - It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -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 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import compress_gzip "compress/gzip" -import io_ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` - Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` - Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` - Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` - Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=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" json:"Field1"` - Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` - Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` - Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` - Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` - Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` - Field210 bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1"` - Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=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,json=id,customtype=Uuid" json:"Id"` - Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=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,json=id,customtype=Uuid" json:"Id"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=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" json:"Field1,omitempty"` - Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=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" json:"Or,omitempty"` - And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Left"` - Right Tree `protobuf:"bytes,2,opt,name=Right,json=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" json:"Value"` - StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=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" json:"Down,omitempty"` - And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` - Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=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" 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" json:"Left"` - Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=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" 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,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=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,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=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" json:"Time1"` - Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` - Data []byte `protobuf:"bytes,3,opt,name=Data,json=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" 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{ - {100, 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -type OtherExtenable struct { - Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=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{ - {14, 16}, - {10, 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -type NestedDefinition struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` - EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` - NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=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" json:"NestedField1,omitempty"` - NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=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" 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" json:"A,omitempty"` - B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` - C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=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,json=field1,def=1234.1234" json:"Field1,omitempty"` - Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` - Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` - Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` - Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` - Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` - Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` - Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` - Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` - Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` - Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` - Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` - Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` - Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` - Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=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.1234 -const Default_NinOptNativeDefault_Field3 int32 = 1234 -const Default_NinOptNativeDefault_Field4 int64 = 1234 -const Default_NinOptNativeDefault_Field5 uint32 = 1234 -const Default_NinOptNativeDefault_Field6 uint64 = 1234 -const Default_NinOptNativeDefault_Field7 int32 = 1234 -const Default_NinOptNativeDefault_Field8 int64 = 1234 -const Default_NinOptNativeDefault_Field9 uint32 = 1234 -const Default_NinOptNativeDefault_Field10 int32 = 1234 -const Default_NinOptNativeDefault_Field11 uint64 = 1234 -const Default_NinOptNativeDefault_Field12 int64 = 1234 -const Default_NinOptNativeDefault_Field13 bool = true -const Default_NinOptNativeDefault_Field14 string = "1234" - -func (m *NinOptNativeDefault) GetField1() float64 { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptNativeDefault_Field1 -} - -func (m *NinOptNativeDefault) GetField2() float32 { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptNativeDefault_Field2 -} - -func (m *NinOptNativeDefault) GetField3() int32 { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptNativeDefault_Field3 -} - -func (m *NinOptNativeDefault) GetField4() int64 { - if m != nil && m.Field4 != nil { - return *m.Field4 - } - return Default_NinOptNativeDefault_Field4 -} - -func (m *NinOptNativeDefault) GetField5() uint32 { - if m != nil && m.Field5 != nil { - return *m.Field5 - } - return Default_NinOptNativeDefault_Field5 -} - -func (m *NinOptNativeDefault) GetField6() uint64 { - if m != nil && m.Field6 != nil { - return *m.Field6 - } - return Default_NinOptNativeDefault_Field6 -} - -func (m *NinOptNativeDefault) GetField7() int32 { - if m != nil && m.Field7 != nil { - return *m.Field7 - } - return Default_NinOptNativeDefault_Field7 -} - -func (m *NinOptNativeDefault) GetField8() int64 { - if m != nil && m.Field8 != nil { - return *m.Field8 - } - return Default_NinOptNativeDefault_Field8 -} - -func (m *NinOptNativeDefault) GetField9() uint32 { - if m != nil && m.Field9 != nil { - return *m.Field9 - } - return Default_NinOptNativeDefault_Field9 -} - -func (m *NinOptNativeDefault) GetField10() int32 { - if m != nil && m.Field10 != nil { - return *m.Field10 - } - return Default_NinOptNativeDefault_Field10 -} - -func (m *NinOptNativeDefault) GetField11() uint64 { - if m != nil && m.Field11 != nil { - return *m.Field11 - } - return Default_NinOptNativeDefault_Field11 -} - -func (m *NinOptNativeDefault) GetField12() int64 { - if m != nil && m.Field12 != nil { - return *m.Field12 - } - return Default_NinOptNativeDefault_Field12 -} - -func (m *NinOptNativeDefault) GetField13() bool { - if m != nil && m.Field13 != nil { - return *m.Field13 - } - return Default_NinOptNativeDefault_Field13 -} - -func (m *NinOptNativeDefault) GetField14() string { - if m != nil && m.Field14 != nil { - return *m.Field14 - } - return Default_NinOptNativeDefault_Field14 -} - -func (m *NinOptNativeDefault) GetField15() []byte { - if m != nil { - return m.Field15 - } - return nil -} - -type CustomContainer struct { - CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" 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" json:"Field1"` - FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` - FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` - FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` - FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` - FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` - FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` - FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` - FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` - FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` - FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` - FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` - FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` - FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` - FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=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" json:"Field1,omitempty"` - FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` - FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` - FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` - FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` - FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` - FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` - FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` - FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` - FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` - FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=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" json:"Field1,omitempty"` - FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` - FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` - FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` - FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` - FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` - FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=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,json=id,customtype=Uuid" json:"Id,omitempty"` - FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` - FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` - FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=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,json=field1,embedded=Field1" json:"Field1,omitempty"` - FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` - FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=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,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=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" 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{ - {100, 199}, -} - -func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_NoExtensionsMap -} -func (m *NoExtensionsMap) GetExtensions() *[]byte { - if m.XXX_extensions == nil { - m.XXX_extensions = make([]byte, 0) - } - return &m.XXX_extensions -} - -type Unrecognized struct { - Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" 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" 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" 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" 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" 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" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children,json=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} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA,json=fieldA", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB,json=fieldB", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC,json=fieldC", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD,json=fieldD", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE,json=fieldE", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", -} - -func init() { - proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") - proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") - proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") - proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") - proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") - proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") - proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") - proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") - proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") - proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") - proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") - proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") - proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") - proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") - proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") - proto.RegisterType((*CustomDash)(nil), "test.CustomDash") - proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") - proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") - proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") - proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") - proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") - proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") - proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") - proto.RegisterType((*Tree)(nil), "test.Tree") - proto.RegisterType((*OrBranch)(nil), "test.OrBranch") - proto.RegisterType((*AndBranch)(nil), "test.AndBranch") - proto.RegisterType((*Leaf)(nil), "test.Leaf") - proto.RegisterType((*DeepTree)(nil), "test.DeepTree") - proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") - proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") - proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") - proto.RegisterType((*Nil)(nil), "test.Nil") - proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") - proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") - proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") - proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") - proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") - proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") - proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") - proto.RegisterType((*Timer)(nil), "test.Timer") - proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") - proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") - proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") - proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") - proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") - proto.RegisterType((*NestedScope)(nil), "test.NestedScope") - proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") - proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") - proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") - proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") - proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") - proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") - proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") - proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") - proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") - proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") - proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") - proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") - proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") - proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") - proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") - proto.RegisterType((*Node)(nil), "test.Node") - 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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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) - } - } - github_com_gogo_protobuf_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 *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6115 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xff, 0x0e, 0x87, 0x94, 0xa8, 0x43, 0x89, 0xa2, 0x66, 0xb5, 0x32, 0x2d, 0xaf, 0xf7, 0x41, - 0xcb, 0xb2, 0xac, 0xd8, 0x5a, 0x49, 0xab, 0x7d, 0xd1, 0x89, 0x03, 0xbe, 0x56, 0xd6, 0xfe, 0xf5, - 0xfa, 0x8f, 0xa4, 0xc4, 0x4e, 0x0b, 0x10, 0x5c, 0x72, 0x24, 0xd1, 0xa6, 0x86, 0x2c, 0x87, 0xb4, - 0x77, 0xf3, 0xa1, 0x48, 0x93, 0x36, 0x4d, 0x5a, 0xf4, 0x99, 0x16, 0xcd, 0xc3, 0x49, 0x9c, 0x14, - 0x69, 0x9c, 0xf4, 0x95, 0xb4, 0x69, 0x50, 0x04, 0x45, 0x63, 0xa0, 0x48, 0xbb, 0xfd, 0x52, 0xa4, - 0xf9, 0x54, 0x14, 0x85, 0x91, 0x17, 0xd0, 0xb4, 0x4d, 0xdb, 0x04, 0x30, 0x90, 0x00, 0xc9, 0x87, - 0xde, 0xf7, 0xcc, 0xbd, 0x1c, 0x72, 0x46, 0xde, 0x75, 0x92, 0x05, 0xb8, 0x22, 0xef, 0x39, 0xbf, - 0x33, 0x67, 0xce, 0xeb, 0x9e, 0xb9, 0xf7, 0x92, 0xf0, 0x77, 0x4b, 0x70, 0xee, 0xa0, 0xd9, 0x3c, - 0x68, 0x58, 0x17, 0x5a, 0xed, 0x66, 0xa7, 0x79, 0xb3, 0xbb, 0x7f, 0xa1, 0x66, 0x39, 0xd5, 0x76, - 0xbd, 0xd5, 0x69, 0xb6, 0x17, 0xc8, 0x98, 0x31, 0x4e, 0x39, 0x16, 0x38, 0x47, 0x66, 0x03, 0x26, - 0xae, 0xd7, 0x1b, 0x56, 0x51, 0x30, 0xee, 0x58, 0x1d, 0xe3, 0x2a, 0x44, 0xf7, 0xd1, 0x60, 0x5a, - 0x3b, 0xa7, 0xcf, 0x25, 0x96, 0x67, 0x16, 0x14, 0xd0, 0x82, 0x8c, 0xd8, 0xc6, 0xc3, 0x26, 0x41, - 0x64, 0xbe, 0x1d, 0x85, 0x93, 0x3e, 0x54, 0xc3, 0x80, 0xa8, 0x5d, 0x39, 0xc2, 0x12, 0xb5, 0xb9, - 0x11, 0x93, 0xbc, 0x37, 0xd2, 0x30, 0xdc, 0xaa, 0x54, 0x9f, 0xab, 0x1c, 0x58, 0xe9, 0x08, 0x19, - 0xe6, 0x1f, 0x8d, 0x33, 0x00, 0x35, 0xab, 0x65, 0xd9, 0x35, 0xcb, 0xae, 0xde, 0x4e, 0xeb, 0x48, - 0x8b, 0x11, 0xd3, 0x33, 0x62, 0xbc, 0x09, 0x26, 0x5a, 0xdd, 0x9b, 0x8d, 0x7a, 0xb5, 0xec, 0x61, - 0x03, 0xc4, 0x16, 0x33, 0x53, 0x94, 0x50, 0x74, 0x99, 0x1f, 0x81, 0xf1, 0x17, 0xac, 0xca, 0x73, - 0x5e, 0xd6, 0x04, 0x61, 0x4d, 0xe2, 0x61, 0x0f, 0x63, 0x01, 0x46, 0x8f, 0x2c, 0xc7, 0x41, 0x0a, - 0x94, 0x3b, 0xb7, 0x5b, 0x56, 0x3a, 0x4a, 0xee, 0xfe, 0x5c, 0xcf, 0xdd, 0xab, 0x77, 0x9e, 0x60, - 0xa8, 0x5d, 0x04, 0x32, 0x72, 0x30, 0x62, 0xd9, 0xdd, 0x23, 0x2a, 0x21, 0xd6, 0xc7, 0x7e, 0x25, - 0xc4, 0xa1, 0x4a, 0x89, 0x63, 0x18, 0x13, 0x31, 0xec, 0x58, 0xed, 0xe7, 0xeb, 0x55, 0x2b, 0x3d, - 0x44, 0x04, 0x3c, 0xd2, 0x23, 0x60, 0x87, 0xd2, 0x55, 0x19, 0x1c, 0x87, 0x6e, 0x65, 0xc4, 0xba, - 0xd5, 0xb1, 0x6c, 0xa7, 0xde, 0xb4, 0xd3, 0xc3, 0x44, 0xc8, 0xc3, 0x3e, 0x5e, 0xb4, 0x1a, 0x35, - 0x55, 0x84, 0x8b, 0x33, 0x2e, 0xc3, 0x70, 0xb3, 0xd5, 0x41, 0xef, 0x9c, 0x74, 0x1c, 0xf9, 0x27, - 0xb1, 0x7c, 0xda, 0x37, 0x10, 0xb6, 0x28, 0x8f, 0xc9, 0x99, 0x8d, 0x35, 0x48, 0x39, 0xcd, 0x6e, - 0xbb, 0x6a, 0x95, 0xab, 0xcd, 0x9a, 0x55, 0xae, 0xdb, 0xfb, 0xcd, 0xf4, 0x08, 0x11, 0x70, 0xb6, - 0xf7, 0x46, 0x08, 0x63, 0x01, 0xf1, 0xad, 0x21, 0x36, 0x33, 0xe9, 0x48, 0x9f, 0x8d, 0x29, 0x18, - 0x72, 0x6e, 0xdb, 0x9d, 0xca, 0xad, 0xf4, 0x28, 0x89, 0x10, 0xf6, 0x29, 0xf3, 0x83, 0x18, 0x8c, - 0x87, 0x09, 0xb1, 0x27, 0x20, 0xb6, 0x8f, 0xef, 0x12, 0x05, 0xd8, 0x31, 0x6c, 0x40, 0x31, 0xb2, - 0x11, 0x87, 0x5e, 0xa7, 0x11, 0x73, 0x90, 0xb0, 0x2d, 0xa7, 0x63, 0xd5, 0x68, 0x44, 0xe8, 0x21, - 0x63, 0x0a, 0x28, 0xa8, 0x37, 0xa4, 0xa2, 0xaf, 0x2b, 0xa4, 0x9e, 0x86, 0x71, 0xa1, 0x52, 0xb9, - 0x5d, 0xb1, 0x0f, 0x78, 0x6c, 0x5e, 0x08, 0xd2, 0x64, 0xa1, 0xc4, 0x71, 0x26, 0x86, 0x99, 0x49, - 0x4b, 0xfa, 0x6c, 0x14, 0x01, 0x9a, 0xb6, 0xd5, 0xdc, 0x47, 0xe9, 0x55, 0x6d, 0xa0, 0x38, 0xf1, - 0xb7, 0xd2, 0x16, 0x66, 0xe9, 0xb1, 0x52, 0x93, 0x8e, 0x56, 0x1b, 0xc6, 0x35, 0x37, 0xd4, 0x86, - 0xfb, 0x44, 0xca, 0x06, 0x4d, 0xb2, 0x9e, 0x68, 0xdb, 0x83, 0x64, 0xdb, 0xc2, 0x71, 0x8f, 0x4c, - 0x4c, 0xef, 0x6c, 0x84, 0x28, 0xb1, 0x10, 0x78, 0x67, 0x26, 0x83, 0xd1, 0x1b, 0x1b, 0x6b, 0x7b, - 0x3f, 0x1a, 0x0f, 0x81, 0x18, 0x28, 0x93, 0xb0, 0x02, 0x52, 0x85, 0x46, 0xf9, 0xe0, 0x26, 0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0x80, 0xd4, 0xd1, 0x78, 0x36, 0xb6, 0x5f, 0x69, 0x38, 0x96, 0x39, 0x4e, 0xc9, 0x3b, 0x9c, - 0x8a, 0x11, 0x64, 0xb2, 0x68, 0x7b, 0x10, 0x43, 0x12, 0x82, 0x92, 0x05, 0x22, 0xf3, 0xb5, 0x61, - 0x48, 0x78, 0xba, 0x33, 0xe3, 0x3c, 0x8c, 0x3e, 0x5b, 0x79, 0xbe, 0x52, 0xe6, 0x1d, 0x37, 0xb5, - 0x44, 0x02, 0x8f, 0x6d, 0xb3, 0xae, 0x7b, 0x11, 0x26, 0x09, 0x0b, 0xba, 0x47, 0x74, 0xa1, 0x6a, - 0xa3, 0xe2, 0x38, 0xc4, 0x68, 0x71, 0xc2, 0x6a, 0x60, 0xda, 0x16, 0x26, 0x15, 0x38, 0xc5, 0xb8, - 0x04, 0x27, 0x09, 0xe2, 0x08, 0x15, 0xde, 0x7a, 0xab, 0x61, 0x95, 0xf1, 0x33, 0x80, 0x43, 0xea, - 0xa9, 0xd0, 0x6c, 0x02, 0x73, 0x6c, 0x30, 0x06, 0xac, 0x91, 0x63, 0xac, 0xc2, 0x83, 0x04, 0x76, - 0x60, 0xd9, 0x56, 0xbb, 0xd2, 0xb1, 0xca, 0xd6, 0x2f, 0x74, 0x11, 0x6f, 0xb9, 0x62, 0xd7, 0xca, - 0x87, 0x15, 0xe7, 0x30, 0x3d, 0xe9, 0x15, 0x70, 0x3f, 0xe6, 0x5d, 0x65, 0xac, 0x25, 0xc2, 0x99, - 0xb3, 0x6b, 0x4f, 0x21, 0x3e, 0x23, 0x0b, 0x53, 0x44, 0x10, 0x32, 0x0a, 0xba, 0xe7, 0x72, 0xf5, - 0xd0, 0xaa, 0x3e, 0x57, 0xee, 0x76, 0xf6, 0xaf, 0xa6, 0x1f, 0xf0, 0x4a, 0x20, 0x4a, 0xee, 0x10, - 0x9e, 0x02, 0x66, 0xd9, 0x43, 0x1c, 0xc6, 0x0e, 0x8c, 0x62, 0x7f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, 0x5e, 0x39, 0x38, 0x68, 0x63, 0xe1, 0x5c, 0x10, 0x6d, 0x43, 0x93, - 0x62, 0x98, 0x30, 0x4e, 0xdf, 0x80, 0x38, 0xb7, 0x03, 0x9e, 0x58, 0xb0, 0x25, 0xd0, 0x9c, 0x4f, - 0xd6, 0x51, 0x22, 0xf8, 0xa1, 0xde, 0xe6, 0x44, 0x74, 0xd1, 0xba, 0x53, 0x76, 0x17, 0xf4, 0x22, - 0x88, 0x1e, 0x37, 0x13, 0x75, 0x47, 0xac, 0xe0, 0x64, 0x3e, 0x8d, 0xa6, 0x57, 0x79, 0x41, 0xd2, - 0x28, 0x42, 0xbc, 0xd1, 0x44, 0xf1, 0x81, 0x11, 0x74, 0x35, 0x7c, 0x2e, 0x60, 0x0d, 0x73, 0x61, - 0x9d, 0xf1, 0x9b, 0x02, 0x39, 0xfd, 0x4f, 0x1a, 0xc4, 0xf9, 0x30, 0x9a, 0x28, 0xa2, 0xad, 0x4a, - 0xe7, 0x90, 0x88, 0x8b, 0xe5, 0x23, 0x29, 0xcd, 0x24, 0x9f, 0xf1, 0x38, 0xea, 0x66, 0x6c, 0x12, - 0x02, 0x6c, 0x1c, 0x7f, 0xc6, 0x7e, 0x6d, 0x58, 0x95, 0x1a, 0x69, 0x70, 0x9b, 0x47, 0x47, 0xc8, - 0x93, 0x0e, 0xf7, 0x2b, 0x1b, 0x2f, 0xb0, 0x61, 0xbc, 0x2e, 0xde, 0x69, 0x57, 0xea, 0x0d, 0x89, - 0x37, 0x4a, 0x78, 0x53, 0x9c, 0x20, 0x98, 0xb3, 0x70, 0x3f, 0x97, 0x5b, 0xb3, 0x3a, 0x15, 0xd4, - 0x3c, 0xd7, 0x5c, 0xd0, 0x10, 0x59, 0xed, 0xba, 0x8f, 0x31, 0x14, 0x19, 0x9d, 0x63, 0xf3, 0x4f, - 0xa3, 0x46, 0xb6, 0x79, 0xa4, 0x5a, 0x22, 0x9f, 0x52, 0x9e, 0xbb, 0x9c, 0xa7, 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, 0xf6, 0x8c, 0x71, 0x9d, 0x23, 0x77, 0xa9, 0xf3, 0x74, 0x0e, 0x3d, 0xb5, 0xcb, 0xe3, - 0xc6, 0x02, 0x18, 0xde, 0x21, 0xa6, 0x04, 0xfd, 0x69, 0x12, 0xc3, 0xee, 0xa1, 0x64, 0x1e, 0x44, - 0x55, 0x58, 0xd8, 0x55, 0xfc, 0xa2, 0xc6, 0x66, 0x69, 0x07, 0xff, 0x18, 0x86, 0x96, 0xf9, 0xa2, - 0x06, 0x09, 0xd6, 0xb6, 0x56, 0x9b, 0x2d, 0xcb, 0xc8, 0x83, 0x96, 0x63, 0xf1, 0xf0, 0xfa, 0xf4, - 0xd6, 0x2a, 0x68, 0x76, 0xd2, 0xf2, 0xe1, 0x5d, 0xad, 0xdd, 0x34, 0x96, 0x41, 0x2b, 0x30, 0x07, - 0x87, 0xf3, 0x8c, 0x56, 0xcd, 0x7c, 0x5f, 0x87, 0x93, 0xde, 0x36, 0x9a, 0xd7, 0x93, 0xf3, 0xf2, - 0x73, 0x53, 0x76, 0x64, 0x69, 0xf9, 0xe2, 0xca, 0x02, 0xfe, 0x4f, 0x84, 0xe4, 0x79, 0xf9, 0x11, - 0xaa, 0x97, 0xa5, 0xe7, 0x98, 0x48, 0x36, 0xea, 0xa1, 0xf6, 0x1c, 0x13, 0x91, 0xa8, 0x3d, 0xc7, - 0x44, 0x24, 0x6a, 0xcf, 0x31, 0x11, 0x89, 0xda, 0xb3, 0x15, 0x20, 0x51, 0x7b, 0x8e, 0x89, 0x48, - 0xd4, 0x9e, 0x63, 0x22, 0x12, 0xb5, 0xf7, 0x98, 0x08, 0x23, 0xf7, 0x3d, 0x26, 0x22, 0xd3, 0x7b, - 0x8f, 0x89, 0xc8, 0xf4, 0xde, 0x63, 0x22, 0x59, 0xd4, 0x9f, 0x75, 0xad, 0xfe, 0x9b, 0x0e, 0x32, - 0x7e, 0xd0, 0x33, 0xa0, 0x5b, 0x80, 0xb7, 0x60, 0x9c, 0xae, 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 0x51, 0xc2, 0x0f, 0x7c, 0x42, 0x2f, 0xa3, 0x84, 0x1e, 0xf8, 0x84, 0x5d, 0x46, 0x09, 0x3b, - 0xf0, 0x09, 0xb9, 0x8c, 0x12, 0x72, 0xe0, 0x13, 0x6e, 0x19, 0x25, 0xdc, 0xc0, 0x27, 0xd4, 0x32, - 0x4a, 0xa8, 0x81, 0x4f, 0x98, 0x65, 0x94, 0x30, 0x03, 0x9f, 0x10, 0xcb, 0x28, 0x21, 0x06, 0x3e, - 0xe1, 0x95, 0x51, 0xc2, 0x0b, 0x7c, 0x42, 0x6b, 0x46, 0x0d, 0x2d, 0xf0, 0x0b, 0xab, 0x19, 0x35, - 0xac, 0xc0, 0x2f, 0xa4, 0x1e, 0x52, 0x43, 0x6a, 0x04, 0x71, 0xc5, 0xf0, 0x90, 0x27, 0x9a, 0x66, - 0xd4, 0x68, 0x02, 0xbf, 0x48, 0x9a, 0x51, 0x23, 0x09, 0xfc, 0xa2, 0x68, 0x46, 0x8d, 0x22, 0xf0, - 0x8b, 0xa0, 0x57, 0xd4, 0x08, 0x72, 0x8f, 0xf8, 0x64, 0x94, 0x1d, 0xc5, 0xa0, 0x08, 0xd2, 0x43, - 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x44, 0x04, 0xe9, - 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x98, 0x08, 0xd2, 0x43, 0x45, 0x90, 0xde, 0x2f, 0x82, - 0x66, 0xd4, 0x03, 0x0f, 0xe0, 0x57, 0x90, 0x66, 0xd4, 0x9d, 0xcf, 0xe0, 0x10, 0xd2, 0x43, 0x85, - 0x90, 0xde, 0x2f, 0x84, 0xbe, 0x8c, 0x1a, 0x29, 0x29, 0x84, 0xd8, 0xf6, 0xd0, 0xbd, 0xaa, 0x40, - 0x97, 0x43, 0x9c, 0xaf, 0xf0, 0x8b, 0xa9, 0xcb, 0x21, 0xf6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, 0x22, 0x7e, 0xf4, 0xfa, 0x3a, 0x7a, 0xff, - 0x1d, 0xf4, 0xf7, 0x7b, 0xe8, 0xef, 0x0f, 0xd1, 0xdf, 0x77, 0x7d, 0xeb, 0xcc, 0x89, 0x97, 0xd0, - 0xeb, 0xe5, 0x6f, 0x9d, 0xd1, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x71, 0x02, 0xea, 0x96, 0x09, - 0x5f, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if this.Field3 != that1.Field3 { - return false - } - if this.Field4 != that1.Field4 { - return false - } - if this.Field5 != that1.Field5 { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if this.Field8 != that1.Field8 { - return false - } - if this.Field9 != that1.Field9 { - return false - } - if this.Field10 != that1.Field10 { - return false - } - if this.Field11 != that1.Field11 { - return false - } - if this.Field12 != that1.Field12 { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepPackedNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field9) != len(that1.Field9) { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) - } - } - if len(this.Field10) != len(that1.Field10) { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) - } - } - if len(this.Field11) != len(that1.Field11) { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) - } - } - if len(this.Field12) != len(that1.Field12) { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepPackedNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - return false - } - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - return false - } - } - if len(this.Field9) != len(that1.Field9) { - return false - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - return false - } - } - if len(this.Field10) != len(that1.Field10) { - return false - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - return false - } - } - if len(this.Field11) != len(that1.Field11) { - return false - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - return false - } - } - if len(this.Field12) != len(that1.Field12) { - return false - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(&that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(&that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(&that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if this.Field2 != that1.Field2 { - return false - } - if !this.Field3.Equal(&that1.Field3) { - return false - } - if !this.Field4.Equal(&that1.Field4) { - return false - } - if this.Field6 != that1.Field6 { - return false - } - if this.Field7 != that1.Field7 { - return false - } - if !this.Field8.Equal(&that1.Field8) { - return false - } - if this.Field13 != that1.Field13 { - return false - } - if this.Field14 != that1.Field14 { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if !this.Field8.Equal(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if !this.Field8.Equal(that1.Field8) { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(&that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(&that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(&that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") - } - if len(this.Field1) != len(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) - } - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if len(this.Field4) != len(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) - } - } - if len(this.Field6) != len(that1.Field6) { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) - } - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if len(this.Field8) != len(that1.Field8) { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) - } - } - if len(this.Field13) != len(that1.Field13) { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) - } - } - if len(this.Field14) != len(that1.Field14) { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) - } - } - if len(this.Field15) != len(that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if !this.Field3[i].Equal(that1.Field3[i]) { - return false - } - } - if len(this.Field4) != len(that1.Field4) { - return false - } - for i := range this.Field4 { - if !this.Field4[i].Equal(that1.Field4[i]) { - return false - } - } - if len(this.Field6) != len(that1.Field6) { - return false - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - return false - } - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if len(this.Field8) != len(that1.Field8) { - return false - } - for i := range this.Field8 { - if !this.Field8[i].Equal(that1.Field8[i]) { - return false - } - } - if len(this.Field13) != len(that1.Field13) { - return false - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - return false - } - } - if len(this.Field14) != len(that1.Field14) { - return false - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - return false - } - } - if len(this.Field15) != len(that1.Field15) { - return false - } - for i := range this.Field15 { - if !bytes.Equal(this.Field15[i], that1.Field15[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(&that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(&that1.Field200) { - return false - } - if this.Field210 != that1.Field210 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(&that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(&that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(&that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if !this.Field2[i].Equal(that1.Field2[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.Value.Equal(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomDash) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomDash") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomDash but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomDash) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") - } - if that1.Id == nil { - if this.Id != nil { - return fmt.Errorf("this.Id != nil && that1.Id == nil") - } - } else if !this.Id.Equal(*that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if that1.Value == nil { - if this.Value != nil { - return fmt.Errorf("this.Value != nil && that1.Value == nil") - } - } else if !this.Value.Equal(*that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.Id == nil { - if this.Id != nil { - return false - } - } else if !this.Id.Equal(*that1.Id) { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if !this.Value.Equal(*that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepCustom) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepCustom") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") - } - if len(this.Id) != len(that1.Id) { - return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) - } - } - if len(this.Value) != len(that1.Value) { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinRepCustom) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Id) != len(that1.Id) { - return false - } - for i := range this.Id { - if !this.Id[i].Equal(that1.Id[i]) { - return false - } - } - if len(this.Value) != len(that1.Value) { - return false - } - for i := range this.Value { - if !this.Value[i].Equal(that1.Value[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !this.Field4.Equal(that1.Field4) { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !this.Field4.Equal(that1.Field4) { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.Field200.Equal(that1.Field200) { - return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) - } - } else if this.Field210 != nil { - return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") - } else if that1.Field210 != nil { - return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.Field200.Equal(that1.Field200) { - return false - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - return false - } - } else if this.Field210 != nil { - return false - } else if that1.Field210 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinNestedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") - } - if !this.Field1.Equal(that1.Field1) { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Field2.Equal(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !this.Field3.Equal(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinNestedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !this.Field2.Equal(that1.Field2) { - return false - } - if !this.Field3.Equal(that1.Field3) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Tree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Tree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Tree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Tree but is not nil && this == nil") - } - if !this.Or.Equal(that1.Or) { - return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Tree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Or.Equal(that1.Or) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OrBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OrBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OrBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OrBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Leaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Leaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Leaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Leaf but is not nil && this == nil") - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.StrValue != that1.StrValue { - return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Leaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if this.StrValue != that1.StrValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepTree) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepTree") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepTree but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") - } - if !this.Down.Equal(that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !this.And.Equal(that1.And) { - return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) - } - if !this.Leaf.Equal(that1.Leaf) { - return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepTree) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(that1.Down) { - return false - } - if !this.And.Equal(that1.And) { - return false - } - if !this.Leaf.Equal(that1.Leaf) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ADeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ADeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") - } - if !this.Down.Equal(&that1.Down) { - return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ADeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Down.Equal(&that1.Down) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AndDeepBranch) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AndDeepBranch") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") - } - if !this.Left.Equal(&that1.Left) { - return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) - } - if !this.Right.Equal(&that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *AndDeepBranch) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Left.Equal(&that1.Left) { - return false - } - if !this.Right.Equal(&that1.Right) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeepLeaf) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DeepLeaf") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") - } - if !this.Tree.Equal(&that1.Tree) { - return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *DeepLeaf) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Tree.Equal(&that1.Tree) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Nil) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Nil") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Nil but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Nil but is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Nil) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") - } - if this.Field1 != that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != that1.Field1 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - return false - } - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if 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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Time1 != that1.Time1 { - return false - } - if this.Time2 != that1.Time2 { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MyExtendable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyExtendable") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if !this.M.Equal(that1.M) { - return false - } - thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) - thatmap := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - return false - } - } else if this.EnumField != nil { - return false - } else if that1.EnumField != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !this.NM.Equal(that1.NM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) - } - } else if this.NestedField1 != nil { - return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") - } else if that1.NestedField1 != nil { - return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) - } - if !this.NNM.Equal(that1.NNM) { - return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - return false - } - } else if this.NestedField1 != nil { - return false - } else if that1.NestedField1 != nil { - return false - } - if !this.NNM.Equal(that1.NNM) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) - } - } else if this.NestedNestedField1 != nil { - return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") - } else if that1.NestedNestedField1 != nil { - return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - return false - } - } else if this.NestedNestedField1 != nil { - return false - } else if that1.NestedNestedField1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NestedScope) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NestedScope") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NestedScope but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") - } - if !this.A.Equal(that1.A) { - return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) - } - } else if this.B != nil { - return fmt.Errorf("this.B == nil && that.B != nil") - } else if that1.B != nil { - return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NestedScope) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.A.Equal(that1.A) { - return false - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - return false - } - } else if this.B != nil { - return false - } else if that1.B != nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNativeDefault") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) - } - } else if this.Field5 != nil { - return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") - } else if that1.Field5 != nil { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) - } - } else if this.Field7 != nil { - return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") - } else if that1.Field7 != nil { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) - } - } else if this.Field8 != nil { - return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") - } else if that1.Field8 != nil { - return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) - } - } else if this.Field9 != nil { - return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") - } else if that1.Field9 != nil { - return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) - } - } else if this.Field10 != nil { - return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") - } else if that1.Field10 != nil { - return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) - } - } else if this.Field11 != nil { - return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") - } else if that1.Field11 != nil { - return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) - } - } else if this.Field12 != nil { - return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") - } else if that1.Field12 != nil { - return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) - } - } else if this.Field13 != nil { - return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") - } else if that1.Field13 != nil { - return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) - } - } else if this.Field14 != nil { - return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") - } else if that1.Field14 != nil { - return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) - } - if !bytes.Equal(this.Field15, that1.Field15) { - return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NinOptNativeDefault) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - return false - } - } else if this.Field5 != nil { - return false - } else if that1.Field5 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - return false - } - } else if this.Field7 != nil { - return false - } else if that1.Field7 != nil { - return false - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - return false - } - } else if this.Field8 != nil { - return false - } else if that1.Field8 != nil { - return false - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - return false - } - } else if this.Field9 != nil { - return false - } else if that1.Field9 != nil { - return false - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - return false - } - } else if this.Field10 != nil { - return false - } else if that1.Field10 != nil { - return false - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - return false - } - } else if this.Field11 != nil { - return false - } else if that1.Field11 != nil { - return false - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - return false - } - } else if this.Field12 != nil { - return false - } else if that1.Field12 != nil { - return false - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - return false - } - } else if this.Field13 != nil { - return false - } else if that1.Field13 != nil { - return false - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - return false - } - } else if this.Field14 != nil { - return false - } else if that1.Field14 != nil { - return false - } - if !bytes.Equal(this.Field15, that1.Field15) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomContainer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomContainer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomContainer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.CustomStruct.Equal(&that1.CustomStruct) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNidOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") - } - if this.FieldA != that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FieldL != that1.FieldL { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) - } - if this.FieldM != that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNidOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != that1.FieldA { - return false - } - if this.FieldB != that1.FieldB { - return false - } - if this.FieldC != that1.FieldC { - return false - } - if this.FieldD != that1.FieldD { - return false - } - if this.FieldE != that1.FieldE { - return false - } - if this.FieldF != that1.FieldF { - return false - } - if this.FieldG != that1.FieldG { - return false - } - if this.FieldH != that1.FieldH { - return false - } - if this.FieldI != that1.FieldI { - return false - } - if this.FieldJ != that1.FieldJ { - return false - } - if this.FieldK != that1.FieldK { - return false - } - if this.FieldL != that1.FieldL { - return false - } - if this.FieldM != that1.FieldM { - return false - } - if this.FieldN != that1.FieldN { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinOptNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) - } - } else if this.FieldC != nil { - return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") - } else if that1.FieldC != nil { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) - } - } else if this.FieldD != nil { - return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") - } else if that1.FieldD != nil { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) - } - } else if this.FieldG != nil { - return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") - } else if that1.FieldG != nil { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) - } - } else if this.FieldJ != nil { - return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") - } else if that1.FieldJ != nil { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) - } - } else if this.FieldK != nil { - return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") - } else if that1.FieldK != nil { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) - } - } else if this.FielL != nil { - return fmt.Errorf("this.FielL == nil && that.FielL != nil") - } else if that1.FielL != nil { - return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) - } - } else if this.FieldM != nil { - return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") - } else if that1.FieldM != nil { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) - } - } else if this.FieldN != nil { - return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") - } else if that1.FieldN != nil { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinOptNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - return false - } - } else if this.FieldC != nil { - return false - } else if that1.FieldC != nil { - return false - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - return false - } - } else if this.FieldD != nil { - return false - } else if that1.FieldD != nil { - return false - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - return false - } - } else if this.FieldG != nil { - return false - } else if that1.FieldG != nil { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - return false - } - } else if this.FieldJ != nil { - return false - } else if that1.FieldJ != nil { - return false - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - return false - } - } else if this.FieldK != nil { - return false - } else if that1.FieldK != nil { - return false - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - return false - } - } else if this.FielL != nil { - return false - } else if that1.FielL != nil { - return false - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - return false - } - } else if this.FieldM != nil { - return false - } else if that1.FieldM != nil { - return false - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - return false - } - } else if this.FieldN != nil { - return false - } else if that1.FieldN != nil { - return false - } - if !bytes.Equal(this.FieldO, that1.FieldO) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinRepNative") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") - } - if len(this.FieldA) != len(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) - } - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if len(this.FieldE) != len(that1.FieldE) { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) - } - } - if len(this.FieldF) != len(that1.FieldF) { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) - } - } - if len(this.FieldG) != len(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) - } - } - if len(this.FieldH) != len(that1.FieldH) { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) - } - } - if len(this.FieldI) != len(that1.FieldI) { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) - } - } - if len(this.FieldK) != len(that1.FieldK) { - return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) - } - } - if len(this.FieldL) != len(that1.FieldL) { - return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) - } - } - if len(this.FieldM) != len(that1.FieldM) { - return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) - } - } - if len(this.FieldN) != len(that1.FieldN) { - return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) - } - } - if len(this.FieldO) != len(that1.FieldO) { - return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinRepNative) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.FieldA) != len(that1.FieldA) { - return false - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - return false - } - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - return false - } - } - if len(this.FieldE) != len(that1.FieldE) { - return false - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - return false - } - } - if len(this.FieldF) != len(that1.FieldF) { - return false - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - return false - } - } - if len(this.FieldG) != len(that1.FieldG) { - return false - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - return false - } - } - if len(this.FieldH) != len(that1.FieldH) { - return false - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - return false - } - } - if len(this.FieldI) != len(that1.FieldI) { - return false - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - return false - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - return false - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - return false - } - } - if len(this.FieldK) != len(that1.FieldK) { - return false - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - return false - } - } - if len(this.FieldL) != len(that1.FieldL) { - return false - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - return false - } - } - if len(this.FieldM) != len(that1.FieldM) { - return false - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - return false - } - } - if len(this.FieldN) != len(that1.FieldN) { - return false - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - return false - } - } - if len(this.FieldO) != len(that1.FieldO) { - return false - } - for i := range this.FieldO { - if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinStruct") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !this.FieldC.Equal(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) - } - } else if this.FieldE != nil { - return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") - } else if that1.FieldE != nil { - return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) - } - } else if this.FieldF != nil { - return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") - } else if that1.FieldF != nil { - return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) - } - if !this.FieldG.Equal(that1.FieldG) { - return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) - } - } else if this.FieldH != nil { - return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") - } else if that1.FieldH != nil { - return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) - } - } else if this.FieldI != nil { - return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") - } else if that1.FieldI != nil { - return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinStruct) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !this.FieldC.Equal(that1.FieldC) { - return false - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - return false - } - } else if this.FieldE != nil { - return false - } else if that1.FieldE != nil { - return false - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - return false - } - } else if this.FieldF != nil { - return false - } else if that1.FieldF != nil { - return false - } - if !this.FieldG.Equal(that1.FieldG) { - return false - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - return false - } - } else if this.FieldH != nil { - return false - } else if that1.FieldH != nil { - return false - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - return false - } - } else if this.FieldI != nil { - return false - } else if that1.FieldI != nil { - return false - } - if !bytes.Equal(this.FieldJ, that1.FieldJ) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") - } - if that1.FieldA == nil { - if this.FieldA != nil { - return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if that1.FieldB == nil { - if this.FieldB != nil { - return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if len(this.FieldC) != len(that1.FieldC) { - return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) - } - } - if len(this.FieldD) != len(that1.FieldD) { - return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameCustomType) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if that1.FieldA == nil { - if this.FieldA != nil { - return false - } - } else if !this.FieldA.Equal(*that1.FieldA) { - return false - } - if that1.FieldB == nil { - if this.FieldB != nil { - return false - } - } else if !this.FieldB.Equal(*that1.FieldB) { - return false - } - if len(this.FieldC) != len(that1.FieldC) { - return false - } - for i := range this.FieldC { - if !this.FieldC[i].Equal(that1.FieldC[i]) { - return false - } - } - if len(this.FieldD) != len(that1.FieldD) { - return false - } - for i := range this.FieldD { - if !this.FieldD[i].Equal(that1.FieldD[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) - } - if !this.FieldA.Equal(that1.FieldA) { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) - } - } else if this.FieldB != nil { - return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") - } else if that1.FieldB != nil { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.NidOptNative.Equal(that1.NidOptNative) { - return false - } - if !this.FieldA.Equal(that1.FieldA) { - return false - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - return false - } - } else if this.FieldB != nil { - return false - } else if that1.FieldB != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CustomNameEnum) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomNameEnum") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) - } - } else if this.FieldA != nil { - return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") - } else if that1.FieldA != nil { - return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) - } - if len(this.FieldB) != len(that1.FieldB) { - return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CustomNameEnum) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - return false - } - } else if this.FieldA != nil { - return false - } else if that1.FieldA != nil { - return false - } - if len(this.FieldB) != len(that1.FieldB) { - return false - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NoExtensionsMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NoExtensionsMap) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Unrecognized) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Unrecognized") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *Unrecognized) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") - } - if len(this.Embedded) != len(that1.Embedded) { - return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithInner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Embedded) != len(that1.Embedded) { - return false - } - for i := range this.Embedded { - if !this.Embedded[i].Equal(that1.Embedded[i]) { - return false - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - return nil -} -func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - return true -} -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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } 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 -} - -type NidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() int32 - GetField4() int64 - GetField5() uint32 - GetField6() uint64 - GetField7() int32 - GetField8() int64 - GetField9() uint32 - GetField10() int32 - GetField11() uint64 - GetField12() int64 - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptNativeFromFace(this) -} - -func (this *NidOptNative) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptNative) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptNative) GetField3() int32 { - return this.Field3 -} - -func (this *NidOptNative) GetField4() int64 { - return this.Field4 -} - -func (this *NidOptNative) GetField5() uint32 { - return this.Field5 -} - -func (this *NidOptNative) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptNative) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptNative) GetField8() int64 { - return this.Field8 -} - -func (this *NidOptNative) GetField9() uint32 { - return this.Field9 -} - -func (this *NidOptNative) GetField10() int32 { - return this.Field10 -} - -func (this *NidOptNative) GetField11() uint64 { - return this.Field11 -} - -func (this *NidOptNative) GetField12() int64 { - return this.Field12 -} - -func (this *NidOptNative) GetField13() bool { - return this.Field13 -} - -func (this *NidOptNative) GetField14() string { - return this.Field14 -} - -func (this *NidOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { - this := &NidOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField7() *int32 - GetField8() *int64 - GetField9() *uint32 - GetField10() *int32 - GetField11() *uint64 - GetField12() *int64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeFromFace(this) -} - -func (this *NinOptNative) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNative) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNative) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNative) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNative) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNative) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNative) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptNative) GetField8() *int64 { - return this.Field8 -} - -func (this *NinOptNative) GetField9() *uint32 { - return this.Field9 -} - -func (this *NinOptNative) GetField10() *int32 { - return this.Field10 -} - -func (this *NinOptNative) GetField11() *uint64 { - return this.Field11 -} - -func (this *NinOptNative) GetField12() *int64 { - return this.Field12 -} - -func (this *NinOptNative) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNative) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNative) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { - this := &NinOptNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepNativeFromFace(this) -} - -func (this *NidRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NidRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { - this := &NidRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepNativeFromFace(this) -} - -func (this *NinRepNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepNative) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepNative) GetField14() []string { - return this.Field14 -} - -func (this *NinRepNative) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { - this := &NinRepNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepPackedNativeFromFace(this) -} - -func (this *NidRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NidRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NidRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NidRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NidRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NidRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NidRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NidRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NidRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { - this := &NidRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NinRepPackedNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []int32 - GetField4() []int64 - GetField5() []uint32 - GetField6() []uint64 - GetField7() []int32 - GetField8() []int64 - GetField9() []uint32 - GetField10() []int32 - GetField11() []uint64 - GetField12() []int64 - GetField13() []bool -} - -func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepPackedNativeFromFace(this) -} - -func (this *NinRepPackedNative) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepPackedNative) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepPackedNative) GetField3() []int32 { - return this.Field3 -} - -func (this *NinRepPackedNative) GetField4() []int64 { - return this.Field4 -} - -func (this *NinRepPackedNative) GetField5() []uint32 { - return this.Field5 -} - -func (this *NinRepPackedNative) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepPackedNative) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepPackedNative) GetField8() []int64 { - return this.Field8 -} - -func (this *NinRepPackedNative) GetField9() []uint32 { - return this.Field9 -} - -func (this *NinRepPackedNative) GetField10() []int32 { - return this.Field10 -} - -func (this *NinRepPackedNative) GetField11() []uint64 { - return this.Field11 -} - -func (this *NinRepPackedNative) GetField12() []int64 { - return this.Field12 -} - -func (this *NinRepPackedNative) GetField13() []bool { - return this.Field13 -} - -func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { - this := &NinRepPackedNative{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field9 = that.GetField9() - this.Field10 = that.GetField10() - this.Field11 = that.GetField11() - this.Field12 = that.GetField12() - this.Field13 = that.GetField13() - return this -} - -type NidOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() float64 - GetField2() float32 - GetField3() NidOptNative - GetField4() NinOptNative - GetField6() uint64 - GetField7() int32 - GetField8() NidOptNative - GetField13() bool - GetField14() string - GetField15() []byte -} - -func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptStructFromFace(this) -} - -func (this *NidOptStruct) GetField1() float64 { - return this.Field1 -} - -func (this *NidOptStruct) GetField2() float32 { - return this.Field2 -} - -func (this *NidOptStruct) GetField3() NidOptNative { - return this.Field3 -} - -func (this *NidOptStruct) GetField4() NinOptNative { - return this.Field4 -} - -func (this *NidOptStruct) GetField6() uint64 { - return this.Field6 -} - -func (this *NidOptStruct) GetField7() int32 { - return this.Field7 -} - -func (this *NidOptStruct) GetField8() NidOptNative { - return this.Field8 -} - -func (this *NidOptStruct) GetField13() bool { - return this.Field13 -} - -func (this *NidOptStruct) GetField14() string { - return this.Field14 -} - -func (this *NidOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { - this := &NidOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField8() *NidOptNative - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructFromFace(this) -} - -func (this *NinOptStruct) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStruct) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStruct) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStruct) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStruct) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStruct) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStruct) GetField8() *NidOptNative { - return this.Field8 -} - -func (this *NinOptStruct) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStruct) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStruct) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { - this := &NinOptStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []NidOptNative - GetField4() []NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepStructFromFace(this) -} - -func (this *NidRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NidRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NidRepStruct) GetField3() []NidOptNative { - return this.Field3 -} - -func (this *NidRepStruct) GetField4() []NinOptNative { - return this.Field4 -} - -func (this *NidRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NidRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NidRepStruct) GetField8() []NidOptNative { - return this.Field8 -} - -func (this *NidRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NidRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NidRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { - this := &NidRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinRepStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() []float64 - GetField2() []float32 - GetField3() []*NidOptNative - GetField4() []*NinOptNative - GetField6() []uint64 - GetField7() []int32 - GetField8() []*NidOptNative - GetField13() []bool - GetField14() []string - GetField15() [][]byte -} - -func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepStructFromFace(this) -} - -func (this *NinRepStruct) GetField1() []float64 { - return this.Field1 -} - -func (this *NinRepStruct) GetField2() []float32 { - return this.Field2 -} - -func (this *NinRepStruct) GetField3() []*NidOptNative { - return this.Field3 -} - -func (this *NinRepStruct) GetField4() []*NinOptNative { - return this.Field4 -} - -func (this *NinRepStruct) GetField6() []uint64 { - return this.Field6 -} - -func (this *NinRepStruct) GetField7() []int32 { - return this.Field7 -} - -func (this *NinRepStruct) GetField8() []*NidOptNative { - return this.Field8 -} - -func (this *NinRepStruct) GetField13() []bool { - return this.Field13 -} - -func (this *NinRepStruct) GetField14() []string { - return this.Field14 -} - -func (this *NinRepStruct) GetField15() [][]byte { - return this.Field15 -} - -func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { - this := &NinRepStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field8 = that.GetField8() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NidEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidEmbeddedStructFromFace(this) -} - -func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NidEmbeddedStruct) GetField200() NidOptNative { - return this.Field200 -} - -func (this *NidEmbeddedStruct) GetField210() bool { - return this.Field210 -} - -func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { - this := &NidEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinEmbeddedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructFromFace(this) -} - -func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStruct) GetField200() *NidOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStruct) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { - this := &NinEmbeddedStruct{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NidNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidNestedStructFromFace(this) -} - -func (this *NidNestedStruct) GetField1() NidOptStruct { - return this.Field1 -} - -func (this *NidNestedStruct) GetField2() []NidRepStruct { - return this.Field2 -} - -func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { - this := &NidNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NinNestedStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructFromFace(this) -} - -func (this *NinNestedStruct) GetField1() *NinOptStruct { - return this.Field1 -} - -func (this *NinNestedStruct) GetField2() []*NinRepStruct { - return this.Field2 -} - -func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { - this := &NinNestedStruct{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - return this -} - -type NidOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptCustomFromFace(this) -} - -func (this *NidOptCustom) GetId() Uuid { - return this.Id -} - -func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { - this := &NidOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type CustomDashFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomDashFromFace(this) -} - -func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { - return this.Value -} - -func NewCustomDashFromFace(that CustomDashFace) *CustomDash { - this := &CustomDash{} - this.Value = that.GetValue() - return this -} - -type NinOptCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptCustomFromFace(this) -} - -func (this *NinOptCustom) GetId() *Uuid { - return this.Id -} - -func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { - this := &NinOptCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NidRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepCustomFromFace(this) -} - -func (this *NidRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { - this := &NidRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinRepCustomFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepCustomFromFace(this) -} - -func (this *NinRepCustom) GetId() []Uuid { - return this.Id -} - -func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.Value -} - -func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { - this := &NinRepCustom{} - this.Id = that.GetId() - this.Value = that.GetValue() - return this -} - -type NinOptNativeUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptNativeUnionFromFace(this) -} - -func (this *NinOptNativeUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptNativeUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptNativeUnion) GetField3() *int32 { - return this.Field3 -} - -func (this *NinOptNativeUnion) GetField4() *int64 { - return this.Field4 -} - -func (this *NinOptNativeUnion) GetField5() *uint32 { - return this.Field5 -} - -func (this *NinOptNativeUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptNativeUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptNativeUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptNativeUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { - this := &NinOptNativeUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field5 = that.GetField5() - this.Field6 = that.GetField6() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinOptStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptStructUnionFromFace(this) -} - -func (this *NinOptStructUnion) GetField1() *float64 { - return this.Field1 -} - -func (this *NinOptStructUnion) GetField2() *float32 { - return this.Field2 -} - -func (this *NinOptStructUnion) GetField3() *NidOptNative { - return this.Field3 -} - -func (this *NinOptStructUnion) GetField4() *NinOptNative { - return this.Field4 -} - -func (this *NinOptStructUnion) GetField6() *uint64 { - return this.Field6 -} - -func (this *NinOptStructUnion) GetField7() *int32 { - return this.Field7 -} - -func (this *NinOptStructUnion) GetField13() *bool { - return this.Field13 -} - -func (this *NinOptStructUnion) GetField14() *string { - return this.Field14 -} - -func (this *NinOptStructUnion) GetField15() []byte { - return this.Field15 -} - -func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { - this := &NinOptStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - this.Field4 = that.GetField4() - this.Field6 = that.GetField6() - this.Field7 = that.GetField7() - this.Field13 = that.GetField13() - this.Field14 = that.GetField14() - this.Field15 = that.GetField15() - return this -} - -type NinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinEmbeddedStructUnionFromFace(this) -} - -func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { - return this.Field200 -} - -func (this *NinEmbeddedStructUnion) GetField210() *bool { - return this.Field210 -} - -func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.Field200 = that.GetField200() - this.Field210 = that.GetField210() - return this -} - -type NinNestedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinNestedStructUnionFromFace(this) -} - -func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { - return this.Field1 -} - -func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { - return this.Field2 -} - -func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { - return this.Field3 -} - -func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTreeFromFace(this) -} - -func (this *Tree) GetOr() *OrBranch { - return this.Or -} - -func (this *Tree) GetAnd() *AndBranch { - return this.And -} - -func (this *Tree) GetLeaf() *Leaf { - return this.Leaf -} - -func NewTreeFromFace(that TreeFace) *Tree { - this := &Tree{} - this.Or = that.GetOr() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type OrBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewOrBranchFromFace(this) -} - -func (this *OrBranch) GetLeft() Tree { - return this.Left -} - -func (this *OrBranch) GetRight() Tree { - return this.Right -} - -func NewOrBranchFromFace(that OrBranchFace) *OrBranch { - this := &OrBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type AndBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndBranchFromFace(this) -} - -func (this *AndBranch) GetLeft() Tree { - return this.Left -} - -func (this *AndBranch) GetRight() Tree { - return this.Right -} - -func NewAndBranchFromFace(that AndBranchFace) *AndBranch { - this := &AndBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type LeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewLeafFromFace(this) -} - -func (this *Leaf) GetValue() int64 { - return this.Value -} - -func (this *Leaf) GetStrValue() string { - return this.StrValue -} - -func NewLeafFromFace(that LeafFace) *Leaf { - this := &Leaf{} - this.Value = that.GetValue() - this.StrValue = that.GetStrValue() - return this -} - -type DeepTreeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepTreeFromFace(this) -} - -func (this *DeepTree) GetDown() *ADeepBranch { - return this.Down -} - -func (this *DeepTree) GetAnd() *AndDeepBranch { - return this.And -} - -func (this *DeepTree) GetLeaf() *DeepLeaf { - return this.Leaf -} - -func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { - this := &DeepTree{} - this.Down = that.GetDown() - this.And = that.GetAnd() - this.Leaf = that.GetLeaf() - return this -} - -type ADeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewADeepBranchFromFace(this) -} - -func (this *ADeepBranch) GetDown() DeepTree { - return this.Down -} - -func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { - this := &ADeepBranch{} - this.Down = that.GetDown() - return this -} - -type AndDeepBranchFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAndDeepBranchFromFace(this) -} - -func (this *AndDeepBranch) GetLeft() DeepTree { - return this.Left -} - -func (this *AndDeepBranch) GetRight() DeepTree { - return this.Right -} - -func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { - this := &AndDeepBranch{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type DeepLeafFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { - return NewDeepLeafFromFace(this) -} - -func (this *DeepLeaf) GetTree() Tree { - return this.Tree -} - -func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { - this := &DeepLeaf{} - this.Tree = that.GetTree() - return this -} - -type NilFace interface { - Proto() github_com_gogo_protobuf_proto.Message -} - -func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidOptEnumFromFace(this) -} - -func (this *NidOptEnum) GetField1() TheTestEnum { - return this.Field1 -} - -func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = that.GetField1() - return this -} - -type NinOptEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (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() github_com_gogo_protobuf_proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewTimerFromFace(this) -} - -func (this *Timer) GetTime1() int64 { - return this.Time1 -} - -func (this *Timer) GetTime2() int64 { - return this.Time2 -} - -func (this *Timer) GetData() []byte { - return this.Data -} - -func NewTimerFromFace(that TimerFace) *Timer { - this := &Timer{} - this.Time1 = that.GetTime1() - this.Time2 = that.GetTime2() - this.Data = that.GetData() - return this -} - -type NestedDefinitionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinitionFromFace(this) -} - -func (this *NestedDefinition) GetField1() *int64 { - return this.Field1 -} - -func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { - return this.EnumField -} - -func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { - return this.NM -} - -func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { - this := &NestedDefinition{} - this.Field1 = that.GetField1() - this.EnumField = that.GetEnumField() - this.NNM = that.GetNNM() - this.NM = that.GetNM() - return this -} - -type NestedDefinition_NestedMessageFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessageFromFace(this) -} - -func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { - return this.NestedField1 -} - -func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.NNM -} - -func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { - this := &NestedDefinition_NestedMessage{} - this.NestedField1 = that.GetNestedField1() - this.NNM = that.GetNNM() - return this -} - -type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { - return this.NestedNestedField1 -} - -func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { - this := &NestedDefinition_NestedMessage_NestedNestedMsg{} - this.NestedNestedField1 = that.GetNestedNestedField1() - return this -} - -type NestedScopeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { - return NewNestedScopeFromFace(this) -} - -func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { - return this.A -} - -func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { - return this.B -} - -func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { - return this.C -} - -func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { - this := &NestedScope{} - this.A = that.GetA() - this.B = that.GetB() - this.C = that.GetC() - return this -} - -type CustomContainerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomContainerFromFace(this) -} - -func (this *CustomContainer) GetCustomStruct() NidOptCustom { - return this.CustomStruct -} - -func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { - this := &CustomContainer{} - this.CustomStruct = that.GetCustomStruct() - return this -} - -type CustomNameNidOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() float64 - GetFieldB() float32 - GetFieldC() int32 - GetFieldD() int64 - GetFieldE() uint32 - GetFieldF() uint64 - GetFieldG() int32 - GetFieldH() int64 - GetFieldI() uint32 - GetFieldJ() int32 - GetFieldK() uint64 - GetFieldL() int64 - GetFieldM() bool - GetFieldN() string - GetFieldO() []byte -} - -func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNidOptNativeFromFace(this) -} - -func (this *CustomNameNidOptNative) GetFieldA() float64 { - return this.FieldA -} - -func (this *CustomNameNidOptNative) GetFieldB() float32 { - return this.FieldB -} - -func (this *CustomNameNidOptNative) GetFieldC() int32 { - return this.FieldC -} - -func (this *CustomNameNidOptNative) GetFieldD() int64 { - return this.FieldD -} - -func (this *CustomNameNidOptNative) GetFieldE() uint32 { - return this.FieldE -} - -func (this *CustomNameNidOptNative) GetFieldF() uint64 { - return this.FieldF -} - -func (this *CustomNameNidOptNative) GetFieldG() int32 { - return this.FieldG -} - -func (this *CustomNameNidOptNative) GetFieldH() int64 { - return this.FieldH -} - -func (this *CustomNameNidOptNative) GetFieldI() uint32 { - return this.FieldI -} - -func (this *CustomNameNidOptNative) GetFieldJ() int32 { - return this.FieldJ -} - -func (this *CustomNameNidOptNative) GetFieldK() uint64 { - return this.FieldK -} - -func (this *CustomNameNidOptNative) GetFieldL() int64 { - return this.FieldL -} - -func (this *CustomNameNidOptNative) GetFieldM() bool { - return this.FieldM -} - -func (this *CustomNameNidOptNative) GetFieldN() string { - return this.FieldN -} - -func (this *CustomNameNidOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { - this := &CustomNameNidOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinOptNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *int32 - GetFieldD() *int64 - GetFieldE() *uint32 - GetFieldF() *uint64 - GetFieldG() *int32 - GetFieldH() *int64 - GetFieldI() *uint32 - GetFieldJ() *int32 - GetFieldK() *uint64 - GetFielL() *int64 - GetFieldM() *bool - GetFieldN() *string - GetFieldO() []byte -} - -func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinOptNativeFromFace(this) -} - -func (this *CustomNameNinOptNative) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinOptNative) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinOptNative) GetFieldC() *int32 { - return this.FieldC -} - -func (this *CustomNameNinOptNative) GetFieldD() *int64 { - return this.FieldD -} - -func (this *CustomNameNinOptNative) GetFieldE() *uint32 { - return this.FieldE -} - -func (this *CustomNameNinOptNative) GetFieldF() *uint64 { - return this.FieldF -} - -func (this *CustomNameNinOptNative) GetFieldG() *int32 { - return this.FieldG -} - -func (this *CustomNameNinOptNative) GetFieldH() *int64 { - return this.FieldH -} - -func (this *CustomNameNinOptNative) GetFieldI() *uint32 { - return this.FieldI -} - -func (this *CustomNameNinOptNative) GetFieldJ() *int32 { - return this.FieldJ -} - -func (this *CustomNameNinOptNative) GetFieldK() *uint64 { - return this.FieldK -} - -func (this *CustomNameNinOptNative) GetFielL() *int64 { - return this.FielL -} - -func (this *CustomNameNinOptNative) GetFieldM() *bool { - return this.FieldM -} - -func (this *CustomNameNinOptNative) GetFieldN() *string { - return this.FieldN -} - -func (this *CustomNameNinOptNative) GetFieldO() []byte { - return this.FieldO -} - -func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { - this := &CustomNameNinOptNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FielL = that.GetFielL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinRepNativeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() []float64 - GetFieldB() []float32 - GetFieldC() []int32 - GetFieldD() []int64 - GetFieldE() []uint32 - GetFieldF() []uint64 - GetFieldG() []int32 - GetFieldH() []int64 - GetFieldI() []uint32 - GetFieldJ() []int32 - GetFieldK() []uint64 - GetFieldL() []int64 - GetFieldM() []bool - GetFieldN() []string - GetFieldO() [][]byte -} - -func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinRepNativeFromFace(this) -} - -func (this *CustomNameNinRepNative) GetFieldA() []float64 { - return this.FieldA -} - -func (this *CustomNameNinRepNative) GetFieldB() []float32 { - return this.FieldB -} - -func (this *CustomNameNinRepNative) GetFieldC() []int32 { - return this.FieldC -} - -func (this *CustomNameNinRepNative) GetFieldD() []int64 { - return this.FieldD -} - -func (this *CustomNameNinRepNative) GetFieldE() []uint32 { - return this.FieldE -} - -func (this *CustomNameNinRepNative) GetFieldF() []uint64 { - return this.FieldF -} - -func (this *CustomNameNinRepNative) GetFieldG() []int32 { - return this.FieldG -} - -func (this *CustomNameNinRepNative) GetFieldH() []int64 { - return this.FieldH -} - -func (this *CustomNameNinRepNative) GetFieldI() []uint32 { - return this.FieldI -} - -func (this *CustomNameNinRepNative) GetFieldJ() []int32 { - return this.FieldJ -} - -func (this *CustomNameNinRepNative) GetFieldK() []uint64 { - return this.FieldK -} - -func (this *CustomNameNinRepNative) GetFieldL() []int64 { - return this.FieldL -} - -func (this *CustomNameNinRepNative) GetFieldM() []bool { - return this.FieldM -} - -func (this *CustomNameNinRepNative) GetFieldN() []string { - return this.FieldN -} - -func (this *CustomNameNinRepNative) GetFieldO() [][]byte { - return this.FieldO -} - -func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { - this := &CustomNameNinRepNative{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - this.FieldK = that.GetFieldK() - this.FieldL = that.GetFieldL() - this.FieldM = that.GetFieldM() - this.FieldN = that.GetFieldN() - this.FieldO = that.GetFieldO() - return this -} - -type CustomNameNinStructFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *float64 - GetFieldB() *float32 - GetFieldC() *NidOptNative - GetFieldD() []*NinOptNative - GetFieldE() *uint64 - GetFieldF() *int32 - GetFieldG() *NidOptNative - GetFieldH() *bool - GetFieldI() *string - GetFieldJ() []byte -} - -func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinStructFromFace(this) -} - -func (this *CustomNameNinStruct) GetFieldA() *float64 { - return this.FieldA -} - -func (this *CustomNameNinStruct) GetFieldB() *float32 { - return this.FieldB -} - -func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { - return this.FieldC -} - -func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { - return this.FieldD -} - -func (this *CustomNameNinStruct) GetFieldE() *uint64 { - return this.FieldE -} - -func (this *CustomNameNinStruct) GetFieldF() *int32 { - return this.FieldF -} - -func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { - return this.FieldG -} - -func (this *CustomNameNinStruct) GetFieldH() *bool { - return this.FieldH -} - -func (this *CustomNameNinStruct) GetFieldI() *string { - return this.FieldI -} - -func (this *CustomNameNinStruct) GetFieldJ() []byte { - return this.FieldJ -} - -func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { - this := &CustomNameNinStruct{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - this.FieldE = that.GetFieldE() - this.FieldF = that.GetFieldF() - this.FieldG = that.GetFieldG() - this.FieldH = that.GetFieldH() - this.FieldI = that.GetFieldI() - this.FieldJ = that.GetFieldJ() - return this -} - -type CustomNameCustomTypeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *Uuid - GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 - GetFieldC() []Uuid - GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameCustomTypeFromFace(this) -} - -func (this *CustomNameCustomType) GetFieldA() *Uuid { - return this.FieldA -} - -func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldB -} - -func (this *CustomNameCustomType) GetFieldC() []Uuid { - return this.FieldC -} - -func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { - return this.FieldD -} - -func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { - this := &CustomNameCustomType{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - this.FieldC = that.GetFieldC() - this.FieldD = that.GetFieldD() - return this -} - -type CustomNameNinEmbeddedStructUnionFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameNinEmbeddedStructUnionFromFace(this) -} - -func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { - return this.NidOptNative -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { - return this.FieldA -} - -func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { - return this.FieldB -} - -func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { - this := &CustomNameNinEmbeddedStructUnion{} - this.NidOptNative = that.GetNidOptNative() - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type CustomNameEnumFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { - return NewCustomNameEnumFromFace(this) -} - -func (this *CustomNameEnum) GetFieldA() *TheTestEnum { - return this.FieldA -} - -func (this *CustomNameEnum) GetFieldB() []TheTestEnum { - return this.FieldB -} - -func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { - this := &CustomNameEnum{} - this.FieldA = that.GetFieldA() - this.FieldB = that.GetFieldB() - return this -} - -type UnrecognizedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedFromFace(this) -} - -func (this *Unrecognized) GetField1() *string { - return this.Field1 -} - -func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { - this := &Unrecognized{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithInnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInnerFromFace(this) -} - -func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { - return this.Embedded -} - -func (this *UnrecognizedWithInner) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - this.Embedded = that.GetEmbedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithInner_InnerFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithInner_InnerFromFace(this) -} - -func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { - this := &UnrecognizedWithInner_Inner{} - this.Field1 = that.GetField1() - return this -} - -type UnrecognizedWithEmbedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbedFromFace(this) -} - -func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { - return this.UnrecognizedWithEmbed_Embedded -} - -func (this *UnrecognizedWithEmbed) GetField2() *string { - return this.Field2 -} - -func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() - this.Field2 = that.GetField2() - return this -} - -type UnrecognizedWithEmbed_EmbeddedFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { - return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) -} - -func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { - return this.Field1 -} - -func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { - this := &UnrecognizedWithEmbed_Embedded{} - this.Field1 = that.GetField1() - return this -} - -type NodeFace interface { - Proto() github_com_gogo_protobuf_proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { - return this -} - -func (this *Node) TestProto() github_com_gogo_protobuf_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 -} - -func (this *NidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidOptNative{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NidRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinRepNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NidRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinRepPackedNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&test.NinRepPackedNative{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidOptStruct{") - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinOptStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NidRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+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 *NinRepStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.NinRepStruct{") - if this.Field1 != nil { - s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NidEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinEmbeddedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinEmbeddedStruct{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.Field200 != nil { - s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") - } - if this.Field210 != nil { - s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidNestedStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NidNestedStruct{") - s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+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 *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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.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, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.NM != nil { - s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.NestedDefinition_NestedMessage{") - if this.NestedField1 != nil { - s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") - } - if this.NNM != nil { - s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") - if this.NestedNestedField1 != nil { - s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NestedScope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NestedScope{") - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.B != nil { - s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") - } - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NinOptNativeDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.NinOptNativeDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") - } - if this.Field8 != nil { - s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") - } - if this.Field9 != nil { - s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") - } - if this.Field10 != nil { - s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") - } - if this.Field11 != nil { - s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") - } - if this.Field12 != nil { - s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") - } - if this.Field13 != nil { - s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") - } - if this.Field14 != nil { - s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") - } - if this.Field15 != nil { - s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomContainer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.CustomContainer{") - s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNidOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNidOptNative{") - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinOptNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinOptNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") - } - if this.FielL != nil { - s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinRepNative) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 19) - s = append(s, "&test.CustomNameNinRepNative{") - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") - } - if this.FieldK != nil { - s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") - } - if this.FieldL != nil { - s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") - } - if this.FieldM != nil { - s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") - } - if this.FieldN != nil { - s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") - } - if this.FieldO != nil { - s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinStruct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&test.CustomNameNinStruct{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.FieldE != nil { - s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") - } - if this.FieldF != nil { - s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") - } - if this.FieldG != nil { - s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") - } - if this.FieldH != nil { - s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") - } - if this.FieldI != nil { - s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") - } - if this.FieldJ != nil { - s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&test.CustomNameCustomType{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") - } - if this.FieldC != nil { - s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") - } - if this.FieldD != nil { - s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameNinEmbeddedStructUnion) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") - if this.NidOptNative != nil { - s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") - } - if this.FieldA != nil { - s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CustomNameEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.CustomNameEnum{") - if this.FieldA != nil { - s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") - } - if this.FieldB != nil { - s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NoExtensionsMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NoExtensionsMap{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") - } - if this.XXX_extensions != nil { - s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Unrecognized) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.Unrecognized{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithInner{") - if this.Embedded != nil { - s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithInner_Inner) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithInner_Inner{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.UnrecognizedWithEmbed{") - s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnrecognizedWithEmbed_Embedded) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (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 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 github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 = randStringThetest(r) - v1 := r.Intn(100) - this.Field15 = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { - this := &NinOptNative{} - if r.Intn(10) != 0 { - v2 := float64(r.Float64()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Field1 = &v2 - } - if r.Intn(10) != 0 { - v3 := float32(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.Field2 = &v3 - } - if r.Intn(10) != 0 { - v4 := int32(r.Int31()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.Field3 = &v4 - } - if r.Intn(10) != 0 { - v5 := int64(r.Int63()) - if r.Intn(2) == 0 { - v5 *= -1 - } - this.Field4 = &v5 - } - if r.Intn(10) != 0 { - v6 := uint32(r.Uint32()) - this.Field5 = &v6 - } - if r.Intn(10) != 0 { - v7 := uint64(uint64(r.Uint32())) - this.Field6 = &v7 - } - if r.Intn(10) != 0 { - v8 := int32(r.Int31()) - if r.Intn(2) == 0 { - v8 *= -1 - } - this.Field7 = &v8 - } - if r.Intn(10) != 0 { - v9 := int64(r.Int63()) - if r.Intn(2) == 0 { - v9 *= -1 - } - this.Field8 = &v9 - } - if r.Intn(10) != 0 { - v10 := uint32(r.Uint32()) - this.Field9 = &v10 - } - if r.Intn(10) != 0 { - v11 := int32(r.Int31()) - if r.Intn(2) == 0 { - v11 *= -1 - } - this.Field10 = &v11 - } - if r.Intn(10) != 0 { - v12 := uint64(uint64(r.Uint32())) - this.Field11 = &v12 - } - if r.Intn(10) != 0 { - v13 := int64(r.Int63()) - if r.Intn(2) == 0 { - v13 *= -1 - } - this.Field12 = &v13 - } - if r.Intn(10) != 0 { - v14 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v14 - } - if r.Intn(10) != 0 { - v15 := randStringThetest(r) - this.Field14 = &v15 - } - if r.Intn(10) != 0 { - v16 := r.Intn(100) - this.Field15 = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { - this := &NidRepNative{} - if r.Intn(10) != 0 { - v17 := r.Intn(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] = 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] = 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 = randStringThetest(r) - v78 := r.Intn(100) - this.Field15 = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { - this := &NinOptStruct{} - if r.Intn(10) != 0 { - v79 := float64(r.Float64()) - if r.Intn(2) == 0 { - v79 *= -1 - } - this.Field1 = &v79 - } - if r.Intn(10) != 0 { - v80 := float32(r.Float32()) - if r.Intn(2) == 0 { - v80 *= -1 - } - this.Field2 = &v80 - } - if r.Intn(10) != 0 { - this.Field3 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - this.Field4 = NewPopulatedNinOptNative(r, easy) - } - if r.Intn(10) != 0 { - v81 := uint64(uint64(r.Uint32())) - this.Field6 = &v81 - } - if r.Intn(10) != 0 { - v82 := int32(r.Int31()) - if r.Intn(2) == 0 { - v82 *= -1 - } - this.Field7 = &v82 - } - if r.Intn(10) != 0 { - this.Field8 = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v83 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v83 - } - if r.Intn(10) != 0 { - v84 := randStringThetest(r) - this.Field14 = &v84 - } - if r.Intn(10) != 0 { - v85 := r.Intn(100) - this.Field15 = make([]byte, v85) - for i := 0; i < v85; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 16) - } - return this -} - -func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { - this := &NidRepStruct{} - if r.Intn(10) != 0 { - v86 := r.Intn(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] = 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] = 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 := randStringThetest(r) - this.Field14 = &v134 - case 8: - v135 := r.Intn(100) - this.Field15 = make([]byte, v135) - for i := 0; i < v135; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { - this := &NinOptStructUnion{} - fieldNum := r.Intn(9) - switch fieldNum { - case 0: - v136 := float64(r.Float64()) - if r.Intn(2) == 0 { - v136 *= -1 - } - this.Field1 = &v136 - case 1: - v137 := float32(r.Float32()) - if r.Intn(2) == 0 { - v137 *= -1 - } - this.Field2 = &v137 - case 2: - this.Field3 = NewPopulatedNidOptNative(r, easy) - case 3: - this.Field4 = NewPopulatedNinOptNative(r, easy) - case 4: - v138 := uint64(uint64(r.Uint32())) - this.Field6 = &v138 - case 5: - v139 := int32(r.Int31()) - if r.Intn(2) == 0 { - v139 *= -1 - } - this.Field7 = &v139 - case 6: - v140 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v140 - case 7: - v141 := randStringThetest(r) - this.Field14 = &v141 - case 8: - v142 := r.Intn(100) - this.Field15 = make([]byte, v142) - for i := 0; i < v142; i++ { - this.Field15[i] = byte(r.Intn(256)) - } - } - return this -} - -func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { - this := &NinEmbeddedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.NidOptNative = NewPopulatedNidOptNative(r, easy) - case 1: - this.Field200 = NewPopulatedNinOptNative(r, easy) - case 2: - v143 := bool(bool(r.Intn(2) == 0)) - this.Field210 = &v143 - } - return this -} - -func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { - this := &NinNestedStructUnion{} - fieldNum := r.Intn(3) - switch fieldNum { - case 0: - this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) - case 1: - this.Field2 = NewPopulatedNinOptStructUnion(r, easy) - case 2: - this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) - } - return this -} - -func NewPopulatedTree(r randyThetest, easy bool) *Tree { - this := &Tree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Or = NewPopulatedOrBranch(r, easy) - case 1: - this.And = NewPopulatedAndBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedLeaf(r, easy) - } - return this -} - -func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { - this := &OrBranch{} - v144 := NewPopulatedTree(r, easy) - this.Left = *v144 - v145 := NewPopulatedTree(r, easy) - this.Right = *v145 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { - this := &AndBranch{} - v146 := NewPopulatedTree(r, easy) - this.Left = *v146 - v147 := NewPopulatedTree(r, easy) - this.Right = *v147 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { - this := &Leaf{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.StrValue = randStringThetest(r) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { - this := &DeepTree{} - fieldNum := r.Intn(102) - switch fieldNum { - case 0: - this.Down = NewPopulatedADeepBranch(r, easy) - case 1: - this.And = NewPopulatedAndDeepBranch(r, easy) - case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: - this.Leaf = NewPopulatedDeepLeaf(r, easy) - } - return this -} - -func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { - this := &ADeepBranch{} - v148 := NewPopulatedDeepTree(r, easy) - this.Down = *v148 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { - this := &AndDeepBranch{} - v149 := NewPopulatedDeepTree(r, easy) - this.Left = *v149 - v150 := NewPopulatedDeepTree(r, easy) - this.Right = *v150 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { - this := &DeepLeaf{} - v151 := NewPopulatedTree(r, easy) - this.Tree = *v151 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNil(r randyThetest, easy bool) *Nil { - this := &Nil{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 1) - } - return this -} - -func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { - this := &NidOptEnum{} - this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { - this := &NinOptEnum{} - if r.Intn(10) != 0 { - v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v152 - } - if 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { - this := &OtherExtenable{} - if r.Intn(10) != 0 { - 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 18) - } - return this -} - -func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { - this := &NestedDefinition{} - if r.Intn(10) != 0 { - 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 := 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 := 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 = 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 := 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] = 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 := 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) - github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 201) - } - return this -} - -func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { - this := &Unrecognized{} - if r.Intn(10) != 0 { - v243 := 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 := 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 := 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 := 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 -} - -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 { - v252 := r.Intn(100) - tmps := make([]rune, v252) - for i := 0; i < v252; 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)) - v253 := r.Int63() - if r.Intn(2) == 0 { - v253 *= -1 - } - data = encodeVarintPopulateThetest(data, uint64(v253)) - 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 += github_com_gogo_protobuf_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 += github_com_gogo_protobuf_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 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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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:` + github_com_gogo_protobuf_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 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("thetest.proto", fileDescriptorThetest) } - -var fileDescriptorThetest = []byte{ - // 2996 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c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a, 0x5d, 0x9a, 0xa7, 0x8e, 0x92, 0x96, - 0xe6, 0x49, 0xa3, 0x74, 0xa5, 0x79, 0xba, 0x28, 0x51, 0xaa, 0x40, 0x94, 0x4b, 0x91, 0x2a, 0x50, - 0xe4, 0x92, 0xa3, 0x0a, 0xe4, 0xb8, 0xb4, 0xa8, 0x02, 0x2d, 0x2e, 0x21, 0xaa, 0x40, 0x88, 0x4b, - 0x85, 0x2a, 0x50, 0xe1, 0x92, 0x80, 0x6b, 0xac, 0xa9, 0x1f, 0xf9, 0xd4, 0x18, 0x18, 0x58, 0x63, - 0x60, 0x60, 0x8d, 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, 0x58, 0x63, 0x60, 0x60, 0x8d, - 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, 0x5c, 0x63, 0x20, 0xa4, 0xc6, 0x40, 0x48, 0x8d, - 0x81, 0x90, 0x1a, 0x03, 0x21, 0x35, 0x06, 0x42, 0x6a, 0x0c, 0x04, 0xd6, 0x98, 0x4b, 0x6f, 0x9a, - 0xa7, 0xd7, 0xb7, 0xc6, 0x40, 0x40, 0x8d, 0x81, 0x80, 0x1a, 0x03, 0x01, 0x35, 0x06, 0x02, 0x6a, - 0x0c, 0x04, 0xd4, 0x18, 0x08, 0xa8, 0x31, 0x10, 0x50, 0x63, 0x20, 0xa8, 0xc6, 0x40, 0x60, 0x8d, - 0x81, 0xc0, 0x1a, 0x03, 0x81, 0x35, 0x06, 0x02, 0x6b, 0x0c, 0x04, 0xd6, 0x18, 0x60, 0x6b, 0xec, - 0x4f, 0x00, 0x2a, 0x4e, 0x8d, 0xdd, 0x6e, 0xed, 0xfc, 0x40, 0x6f, 0x63, 0x2a, 0x66, 0x84, 0x4a, - 0x1b, 0xb5, 0xa8, 0x4b, 0xb9, 0x94, 0xcc, 0x08, 0xb5, 0xc6, 0xe3, 0x45, 0x8a, 0x93, 0x6a, 0xe3, - 0xf1, 0x65, 0x8a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x96, 0x9b, 0xee, 0x3b, 0xf4, 0x8f, 0x04, 0xf9, - 0x31, 0x9b, 0xa0, 0x34, 0x41, 0x7e, 0xd0, 0x47, 0x7a, 0x9a, 0x20, 0x3d, 0xe8, 0x23, 0x3b, 0x4d, - 0x90, 0x1d, 0xf4, 0x91, 0x9c, 0x26, 0x48, 0x0e, 0xfa, 0xc8, 0x4d, 0x13, 0xe4, 0x06, 0x7d, 0xa4, - 0xa6, 0x09, 0x52, 0x83, 0x3e, 0x32, 0xd3, 0x04, 0x99, 0x41, 0x1f, 0x89, 0x69, 0x82, 0xc4, 0xa0, - 0x8f, 0xbc, 0x34, 0x41, 0x5e, 0xd0, 0x47, 0x5a, 0x59, 0x51, 0x5a, 0xd0, 0x4f, 0x56, 0x59, 0x51, - 0x56, 0xd0, 0x4f, 0x52, 0xff, 0x2f, 0x4a, 0x6a, 0x0c, 0x59, 0xc5, 0xad, 0x43, 0x8c, 0x9a, 0xb2, - 0xa2, 0x9a, 0xa0, 0x9f, 0x92, 0xb2, 0xa2, 0x92, 0xa0, 0x9f, 0x8a, 0xb2, 0xa2, 0x8a, 0xa0, 0x9f, - 0x82, 0x9e, 0x88, 0x0a, 0x72, 0xb7, 0xf8, 0x68, 0xc2, 0x8a, 0x62, 0x98, 0x82, 0x40, 0x04, 0x05, - 0x81, 0x08, 0x0a, 0x02, 0x11, 0x14, 0x04, 0x22, 0x28, 0x08, 0x44, 0x50, 0x10, 0x88, 0xa0, 0x20, - 0x10, 0x41, 0x41, 0x20, 0x8a, 0x82, 0x40, 0x24, 0x05, 0x81, 0x20, 0x05, 0x65, 0xc5, 0x0d, 0x0f, - 0xd0, 0x6f, 0x42, 0xca, 0x8a, 0x2b, 0x9f, 0xe1, 0x12, 0x02, 0x91, 0x24, 0x04, 0x82, 0x24, 0xf4, - 0x11, 0x6a, 0xa4, 0x38, 0x09, 0xe1, 0xe5, 0xa1, 0xb3, 0x9a, 0x81, 0x56, 0x23, 0xec, 0xaf, 0xf0, - 0x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0x3e, 0x43, 0x9f, 0xcf, 0xd1, 0xe7, 0x0b, 0xf4, 0x79, 0xef, 0xf9, 0x8c, 0xf4, 0x18, - 0x7d, 0x3e, 0x44, 0x9f, 0x3f, 0xa0, 0xcf, 0x13, 0xf4, 0x39, 0x79, 0x8e, 0xec, 0xd1, 0xe7, 0x63, - 0xf4, 0xfb, 0x33, 0xf4, 0xfd, 0x39, 0xfa, 0xfe, 0x02, 0x7d, 0xbf, 0xf7, 0xe9, 0xcc, 0xc8, 0x23, - 0xf4, 0x79, 0xfc, 0xe9, 0x8c, 0xf4, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0x4f, 0xfa, 0x9f, - 0x9c, 0x34, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/thetest.proto b/vendor/github.com/gogo/protobuf/test/thetest.proto deleted file mode 100644 index bf7c0cfa..00000000 --- a/vendor/github.com/gogo/protobuf/test/thetest.proto +++ /dev/null @@ -1,626 +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) = 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; -} - 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 27011c6b..00000000 --- a/vendor/github.com/gogo/protobuf/test/thetestpb_test.go +++ /dev/null @@ -1,14637 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: thetest.proto -// DO NOT EDIT! - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - thetest.proto - -It has these top-level messages: - NidOptNative - NinOptNative - NidRepNative - NinRepNative - NidRepPackedNative - NinRepPackedNative - NidOptStruct - NinOptStruct - NidRepStruct - NinRepStruct - NidEmbeddedStruct - NinEmbeddedStruct - NidNestedStruct - NinNestedStruct - NidOptCustom - CustomDash - NinOptCustom - NidRepCustom - NinRepCustom - NinOptNativeUnion - NinOptStructUnion - NinEmbeddedStructUnion - NinNestedStructUnion - Tree - OrBranch - AndBranch - Leaf - DeepTree - ADeepBranch - AndDeepBranch - DeepLeaf - Nil - NidOptEnum - NinOptEnum - NidRepEnum - NinRepEnum - NinOptEnumDefault - AnotherNinOptEnum - AnotherNinOptEnumDefault - Timer - MyExtendable - OtherExtenable - NestedDefinition - NestedScope - NinOptNativeDefault - CustomContainer - CustomNameNidOptNative - CustomNameNinOptNative - CustomNameNinRepNative - CustomNameNinStruct - CustomNameCustomType - CustomNameNinEmbeddedStructUnion - CustomNameEnum - NoExtensionsMap - Unrecognized - UnrecognizedWithInner - UnrecognizedWithEmbed - Node -*/ -package test - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepPackedNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomDash{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepCustom{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinNestedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Tree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OrBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Leaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepTree{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &ADeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AndDeepBranch{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &DeepLeaf{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNilProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Nil{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NidRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinRepEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &AnotherNinOptEnumDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkTimerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Timer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &MyExtendable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &OtherExtenable{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NestedScope{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NinOptNativeDefault{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomContainer{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNidOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinOptNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinRepNative{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinStruct{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameNinEmbeddedStructUnion{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &CustomNameEnum{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &NoExtensionsMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Unrecognized{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithInner_Inner{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &UnrecognizedWithEmbed_Embedded{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNodeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_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 := github_com_gogo_protobuf_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 := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_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 := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepPackedNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomDashJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepCustomJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinNestedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOrBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepTreeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestADeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAndDeepBranchJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeepLeafJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNilJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyExtendableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOtherExtenableJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinitionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNestedScopeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNativeDefaultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomContainerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNidOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinOptNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinRepNativeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinStructJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomNameEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNoExtensionsMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepPackedNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomDashProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepCustomProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinNestedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOrBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepTreeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestADeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAndDeepBranchProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeepLeafProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNilProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyExtendableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOtherExtenableProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinitionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNestedScopeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomContainerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinStructProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomNameEnumProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNoExtensionsMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Node{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if 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 := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(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 TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepPackedNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomDashVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepCustomVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinNestedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOrBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepTreeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestADeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAndDeepBranchVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDeepLeafVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNilVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestTimerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyExtendableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOtherExtenableVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinitionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNestedScopeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomContainerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinStructVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomNameEnumVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNoExtensionsMapVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepPackedNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomDashFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepCustomFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNativeUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestOrBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepTreeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestADeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAndDeepBranchFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestDeepLeafFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNilFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAnotherNinOptEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTimerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinitionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessageFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNestedScopeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomContainerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNidOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinOptNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinRepNativeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinStructFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameCustomTypeFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCustomNameEnumFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithInner_InnerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNodeFace(t *testing.T) { - popr := math_rand.New(math_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 TestNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNilGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := math_rand.New(math_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 := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepPackedNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepPackedNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepPackedNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepPackedNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomDashSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomDashSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomDash, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomDash(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepCustomSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepCustomSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepCustom, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepCustom(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinNestedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinNestedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinNestedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinNestedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Tree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOrBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOrBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OrBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOrBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Leaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepTreeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepTreeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepTree, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepTree(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestADeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkADeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*ADeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedADeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAndDeepBranchSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAndDeepBranchSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AndDeepBranch, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAndDeepBranch(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDeepLeafSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDeepLeafSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*DeepLeaf, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDeepLeaf(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNilSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNilSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Nil, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNil(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NidRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinRepEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestAnotherNinOptEnumDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*AnotherNinOptEnumDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestTimerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkTimerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Timer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyExtendableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyExtendableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*MyExtendable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyExtendable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOtherExtenableSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOtherExtenableSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*OtherExtenable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOtherExtenable(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinitionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinitionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNestedScopeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNestedScopeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NestedScope, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNestedScope(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNativeDefaultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNativeDefaultSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNativeDefault, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNativeDefault(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomContainerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomContainerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomContainer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomContainer(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNidOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinOptNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinRepNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinRepNative, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinStructSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinStructSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinStruct, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinStruct(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameCustomTypeSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomNameEnumSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomNameEnumSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CustomNameEnum, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomNameEnum(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNoExtensionsMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNoExtensionsMapSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*NoExtensionsMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNoExtensionsMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Unrecognized, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognized(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithInner_InnerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithInner_Inner, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_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 := math_rand.New(math_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 TestNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepPackedNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomDashStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepCustomStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinNestedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOrBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepTreeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestADeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAndDeepBranchStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDeepLeafStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNilStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestTimerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMyExtendableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOtherExtenableStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinitionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNestedScopeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNativeDefaultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomContainerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNidOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinOptNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinRepNativeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinStructStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameCustomTypeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCustomNameEnumStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNoExtensionsMapStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNodeStringer(t *testing.T) { - popr := math_rand.New(math_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 TestNinOptNativeUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, true) - v := p.GetValue() - msg := &NinOptNativeUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinOptStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, true) - v := p.GetValue() - msg := &NinOptStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &NinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestNinNestedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, true) - v := p.GetValue() - msg := &NinNestedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, true) - v := p.GetValue() - msg := &Tree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestDeepTreeOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, true) - v := p.GetValue() - msg := &DeepTree{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} -func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - v := p.GetValue() - msg := &CustomNameNinEmbeddedStructUnion{} - if !msg.SetValue(v) { - t.Fatalf("OnlyOne: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile deleted file mode 100644 index e9fa8934..00000000 --- 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 24ab56c3..00000000 --- a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go +++ /dev/null @@ -1,1690 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unmarshalmerge.proto -// DO NOT EDIT! - -/* - Package unmarshalmerge is a generated protocol buffer package. - - It is generated from these files: - unmarshalmerge.proto - - It has these top-level messages: - Big - BigUnsafe - Sub - IntMerge -*/ -package unmarshalmerge - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Sub,omitempty"` - Number *int64 `protobuf:"varint,2,opt,name=Number,json=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" json:"Sub,omitempty"` - Number *int64 `protobuf:"varint,2,opt,name=Number,json=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" 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" json:"Int64"` - Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32" json:"Int32"` - Sint32 int32 `protobuf:"zigzag32,3,req,name=Sint32,json=sint32" json:"Sint32"` - Sint64 int64 `protobuf:"zigzag64,4,opt,name=Sint64,json=sint64" json:"Sint64"` - Uint64 uint64 `protobuf:"varint,5,opt,name=Uint64,json=uint64" json:"Uint64"` - Uint32 uint32 `protobuf:"varint,6,req,name=Uint32,json=uint32" json:"Uint32"` - Fixed64 uint64 `protobuf:"fixed64,7,opt,name=Fixed64,json=fixed64" json:"Fixed64"` - Fixed32 uint32 `protobuf:"fixed32,8,opt,name=Fixed32,json=fixed32" json:"Fixed32"` - Sfixed32 int32 `protobuf:"fixed32,9,req,name=Sfixed32,json=sfixed32" json:"Sfixed32"` - Sfixed64 int64 `protobuf:"fixed64,10,opt,name=Sfixed64,json=sfixed64" json:"Sfixed64"` - Bool bool `protobuf:"varint,11,opt,name=Bool,json=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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Big) - if !ok { - that2, ok := that.(Big) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Sub.Equal(that1.Sub) { - return false - } - if this.Number != nil && that1.Number != nil { - if *this.Number != *that1.Number { - return false - } - } else if this.Number != nil { - return false - } else if that1.Number != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BigUnsafe) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*BigUnsafe) - if !ok { - that2, ok := that.(BigUnsafe) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *BigUnsafe") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *BigUnsafe but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *BigUnsafe but is not nil && this == nil") - } - if !this.Sub.Equal(that1.Sub) { - return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) - } - if this.Number != nil && that1.Number != nil { - if *this.Number != *that1.Number { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) - } - } else if this.Number != nil { - return fmt.Errorf("this.Number == nil && that.Number != nil") - } else if that1.Number != nil { - return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *BigUnsafe) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*BigUnsafe) - if !ok { - that2, ok := that.(BigUnsafe) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Sub.Equal(that1.Sub) { - return false - } - if this.Number != nil && that1.Number != nil { - if *this.Number != *that1.Number { - return false - } - } else if this.Number != nil { - return false - } else if that1.Number != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Sub) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Sub) - if !ok { - that2, ok := that.(Sub) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Sub") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Sub but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Sub but is not nil && this == nil") - } - if this.SubNumber != nil && that1.SubNumber != nil { - if *this.SubNumber != *that1.SubNumber { - return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", *this.SubNumber, *that1.SubNumber) - } - } else if this.SubNumber != nil { - return fmt.Errorf("this.SubNumber == nil && that.SubNumber != nil") - } else if that1.SubNumber != nil { - return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", this.SubNumber, that1.SubNumber) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *Sub) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Sub) - if !ok { - that2, ok := that.(Sub) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.SubNumber != nil && that1.SubNumber != nil { - if *this.SubNumber != *that1.SubNumber { - return false - } - } else if this.SubNumber != nil { - return false - } else if that1.SubNumber != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *IntMerge) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*IntMerge) - if !ok { - that2, ok := that.(IntMerge) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *IntMerge") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *IntMerge but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *IntMerge but is not nil && this == nil") - } - if this.Int64 != that1.Int64 { - return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) - } - if this.Int32 != that1.Int32 { - return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) - } - if this.Sint32 != that1.Sint32 { - return fmt.Errorf("Sint32 this(%v) Not Equal that(%v)", this.Sint32, that1.Sint32) - } - if this.Sint64 != that1.Sint64 { - return fmt.Errorf("Sint64 this(%v) Not Equal that(%v)", this.Sint64, that1.Sint64) - } - if this.Uint64 != that1.Uint64 { - return fmt.Errorf("Uint64 this(%v) Not Equal that(%v)", this.Uint64, that1.Uint64) - } - if this.Uint32 != that1.Uint32 { - return fmt.Errorf("Uint32 this(%v) Not Equal that(%v)", this.Uint32, that1.Uint32) - } - if this.Fixed64 != that1.Fixed64 { - return fmt.Errorf("Fixed64 this(%v) Not Equal that(%v)", this.Fixed64, that1.Fixed64) - } - if this.Fixed32 != that1.Fixed32 { - return fmt.Errorf("Fixed32 this(%v) Not Equal that(%v)", this.Fixed32, that1.Fixed32) - } - if this.Sfixed32 != that1.Sfixed32 { - return fmt.Errorf("Sfixed32 this(%v) Not Equal that(%v)", this.Sfixed32, that1.Sfixed32) - } - if this.Sfixed64 != that1.Sfixed64 { - return fmt.Errorf("Sfixed64 this(%v) Not Equal that(%v)", this.Sfixed64, that1.Sfixed64) - } - if this.Bool != that1.Bool { - return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *IntMerge) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*IntMerge) - if !ok { - that2, ok := that.(IntMerge) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Int64 != that1.Int64 { - return false - } - if this.Int32 != that1.Int32 { - return false - } - if this.Sint32 != that1.Sint32 { - return false - } - if this.Sint64 != that1.Sint64 { - return false - } - if this.Uint64 != that1.Uint64 { - return false - } - if this.Uint32 != that1.Uint32 { - return false - } - if this.Fixed64 != that1.Fixed64 { - return false - } - if this.Fixed32 != that1.Fixed32 { - return false - } - if this.Sfixed32 != that1.Sfixed32 { - return false - } - if this.Sfixed64 != that1.Sfixed64 { - return false - } - if this.Bool != that1.Bool { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Big) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unmarshalmerge.Big{") - if this.Sub != nil { - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - } - if this.Number != nil { - s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BigUnsafe) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unmarshalmerge.BigUnsafe{") - if this.Sub != nil { - s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") - } - if this.Number != nil { - s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Sub) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&unmarshalmerge.Sub{") - if this.SubNumber != nil { - s = append(s, "SubNumber: "+valueToGoStringUnmarshalmerge(this.SubNumber, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *IntMerge) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 15) - s = append(s, "&unmarshalmerge.IntMerge{") - s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") - s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") - s = append(s, "Sint32: "+fmt.Sprintf("%#v", this.Sint32)+",\n") - s = append(s, "Sint64: "+fmt.Sprintf("%#v", this.Sint64)+",\n") - s = append(s, "Uint64: "+fmt.Sprintf("%#v", this.Uint64)+",\n") - s = append(s, "Uint32: "+fmt.Sprintf("%#v", this.Uint32)+",\n") - s = append(s, "Fixed64: "+fmt.Sprintf("%#v", this.Fixed64)+",\n") - s = append(s, "Fixed32: "+fmt.Sprintf("%#v", this.Fixed32)+",\n") - s = append(s, "Sfixed32: "+fmt.Sprintf("%#v", this.Sfixed32)+",\n") - s = append(s, "Sfixed64: "+fmt.Sprintf("%#v", this.Sfixed64)+",\n") - s = append(s, "Bool: "+fmt.Sprintf("%#v", this.Bool)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringUnmarshalmerge(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringUnmarshalmerge(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 NewPopulatedBig(r randyUnmarshalmerge, easy bool) *Big { - this := &Big{} - if r.Intn(10) != 0 { - this.Sub = NewPopulatedSub(r, easy) - } - if r.Intn(10) != 0 { - v1 := int64(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Number = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) - } - return this -} - -func NewPopulatedBigUnsafe(r randyUnmarshalmerge, easy bool) *BigUnsafe { - this := &BigUnsafe{} - if r.Intn(10) != 0 { - this.Sub = NewPopulatedSub(r, easy) - } - if r.Intn(10) != 0 { - v2 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.Number = &v2 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) - } - return this -} - -func NewPopulatedSub(r randyUnmarshalmerge, easy bool) *Sub { - this := &Sub{} - if r.Intn(10) != 0 { - v3 := int64(r.Int63()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.SubNumber = &v3 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 2) - } - return this -} - -func NewPopulatedIntMerge(r randyUnmarshalmerge, easy bool) *IntMerge { - this := &IntMerge{} - this.Int64 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64 *= -1 - } - this.Int32 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32 *= -1 - } - this.Sint32 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32 *= -1 - } - this.Sint64 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64 *= -1 - } - this.Uint64 = uint64(uint64(r.Uint32())) - this.Uint32 = uint32(r.Uint32()) - this.Fixed64 = uint64(uint64(r.Uint32())) - this.Fixed32 = uint32(r.Uint32()) - this.Sfixed32 = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32 *= -1 - } - this.Sfixed64 = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64 *= -1 - } - this.Bool = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 12) - } - return this -} - -type randyUnmarshalmerge interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneUnmarshalmerge(r randyUnmarshalmerge) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringUnmarshalmerge(r randyUnmarshalmerge) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneUnmarshalmerge(r) - } - return string(tmps) -} -func randUnrecognizedUnmarshalmerge(r randyUnmarshalmerge, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldUnmarshalmerge(data, r, fieldNumber, wire) - } - return data -} -func randFieldUnmarshalmerge(data []byte, r randyUnmarshalmerge, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - data = encodeVarintPopulateUnmarshalmerge(data, uint64(v5)) - case 1: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateUnmarshalmerge(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return data -} -func encodeVarintPopulateUnmarshalmerge(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - data = append(data, uint8(v)) - return data -} -func (this *Big) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Big{`, - `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, - `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *BigUnsafe) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BigUnsafe{`, - `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, - `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Sub) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Sub{`, - `SubNumber:` + valueToStringUnmarshalmerge(this.SubNumber) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *IntMerge) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IntMerge{`, - `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, - `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, - `Sint32:` + fmt.Sprintf("%v", this.Sint32) + `,`, - `Sint64:` + fmt.Sprintf("%v", this.Sint64) + `,`, - `Uint64:` + fmt.Sprintf("%v", this.Uint64) + `,`, - `Uint32:` + fmt.Sprintf("%v", this.Uint32) + `,`, - `Fixed64:` + fmt.Sprintf("%v", this.Fixed64) + `,`, - `Fixed32:` + fmt.Sprintf("%v", this.Fixed32) + `,`, - `Sfixed32:` + fmt.Sprintf("%v", this.Sfixed32) + `,`, - `Sfixed64:` + fmt.Sprintf("%v", this.Sfixed64) + `,`, - `Bool:` + fmt.Sprintf("%v", this.Bool) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringUnmarshalmerge(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Big) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Big: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Big: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnmarshalmerge - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Sub == nil { - m.Sub = &Sub{} - } - if err := m.Sub.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Number = &v - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmerge(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Sub) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Sub: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SubNumber", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.SubNumber = &v - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmerge(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntMerge) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntMerge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntMerge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - m.Int64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int64 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - m.Int32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int32 |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Sint32 = v - hasFields[0] |= uint64(0x00000002) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sint64", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.Sint64 = int64(v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint64", wireType) - } - m.Uint64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Uint64 |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint32", wireType) - } - m.Uint32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Uint32 |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000004) - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed64", wireType) - } - m.Fixed64 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Fixed64 = uint64(data[iNdEx-8]) - m.Fixed64 |= uint64(data[iNdEx-7]) << 8 - m.Fixed64 |= uint64(data[iNdEx-6]) << 16 - m.Fixed64 |= uint64(data[iNdEx-5]) << 24 - m.Fixed64 |= uint64(data[iNdEx-4]) << 32 - m.Fixed64 |= uint64(data[iNdEx-3]) << 40 - m.Fixed64 |= uint64(data[iNdEx-2]) << 48 - m.Fixed64 |= uint64(data[iNdEx-1]) << 56 - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed32", wireType) - } - m.Fixed32 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Fixed32 = uint32(data[iNdEx-4]) - m.Fixed32 |= uint32(data[iNdEx-3]) << 8 - m.Fixed32 |= uint32(data[iNdEx-2]) << 16 - m.Fixed32 |= uint32(data[iNdEx-1]) << 24 - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32", wireType) - } - m.Sfixed32 = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - m.Sfixed32 = int32(data[iNdEx-4]) - m.Sfixed32 |= int32(data[iNdEx-3]) << 8 - m.Sfixed32 |= int32(data[iNdEx-2]) << 16 - m.Sfixed32 |= int32(data[iNdEx-1]) << 24 - hasFields[0] |= uint64(0x00000008) - case 10: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64", wireType) - } - m.Sfixed64 = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - m.Sfixed64 = int64(data[iNdEx-8]) - m.Sfixed64 |= int64(data[iNdEx-7]) << 8 - m.Sfixed64 |= int64(data[iNdEx-6]) << 16 - m.Sfixed64 |= int64(data[iNdEx-5]) << 24 - m.Sfixed64 |= int64(data[iNdEx-4]) << 32 - m.Sfixed64 |= int64(data[iNdEx-3]) << 40 - m.Sfixed64 |= int64(data[iNdEx-2]) << 48 - m.Sfixed64 |= int64(data[iNdEx-1]) << 56 - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Bool = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmerge(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sint32") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Uint32") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sfixed32") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnmarshalmerge(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnmarshalmerge - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmerge - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnmarshalmerge(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnmarshalmerge = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnmarshalmerge = fmt.Errorf("proto: integer overflow") -) - -func (m *BigUnsafe) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BigUnsafe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BigUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnmarshalmergeUnsafe - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Sub == nil { - m.Sub = &Sub{} - } - if err := m.Sub.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Number = &v - default: - iNdEx = preIndex - skippy, err := skipUnmarshalmergeUnsafe(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmergeUnsafe - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnmarshalmergeUnsafe(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnmarshalmergeUnsafe - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnmarshalmergeUnsafe - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnmarshalmergeUnsafe(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnmarshalmergeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnmarshalmergeUnsafe = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("unmarshalmerge.proto", fileDescriptorUnmarshalmerge) } - -var fileDescriptorUnmarshalmerge = []byte{ - // 371 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x90, 0xbd, 0x4a, 0xf3, 0x50, - 0x18, 0xc7, 0x9b, 0xe6, 0xfb, 0x94, 0xf7, 0x55, 0xa3, 0x48, 0x28, 0x92, 0x96, 0x82, 0x50, 0x07, - 0x5b, 0x68, 0xc5, 0xc1, 0x31, 0x83, 0xa0, 0xa0, 0x48, 0x4b, 0x2f, 0xa0, 0xd1, 0x34, 0x0d, 0x34, - 0x39, 0x92, 0xd3, 0x03, 0x8e, 0x5e, 0x82, 0xb7, 0xe0, 0xe6, 0x25, 0x38, 0x76, 0xf4, 0x12, 0x9c, - 0x8a, 0xf5, 0x0a, 0x1c, 0x1d, 0xfd, 0xf7, 0xe4, 0x54, 0x1a, 0x1d, 0x1d, 0x1e, 0xf2, 0x9c, 0xe7, - 0xf7, 0xff, 0x80, 0x90, 0x1d, 0x9e, 0x26, 0xc3, 0x8c, 0x8d, 0x87, 0x93, 0x24, 0xcc, 0x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0xb2, 0x47, 0xcc, 0xd3, 0xf8, 0x2e, 0xbc, 0x81, 0xd9, 0x84, 0xd9, 0x90, - 0xd8, 0x1c, 0xe5, 0xc7, 0x6f, 0x0e, 0xbb, 0x05, 0x6e, 0x16, 0x38, 0xfc, 0x75, 0x62, 0xf5, 0xe5, - 0xee, 0xda, 0xc8, 0xdf, 0x90, 0x02, 0x8b, 0xfd, 0x52, 0xa0, 0x82, 0x20, 0x62, 0xb3, 0xa8, 0x40, - 0x87, 0x4b, 0x34, 0x9f, 0xd2, 0x89, 0x5b, 0x01, 0xb5, 0x24, 0xd5, 0x02, 0x5c, 0xf2, 0x1f, 0xec, - 0xd7, 0x5f, 0x17, 0x5e, 0xe9, 0x6d, 0xe1, 0x29, 0x1f, 0x98, 0x4f, 0xcc, 0xfd, 0xbb, 0xa7, 0x3c, - 0x61, 0x9e, 0x31, 0x33, 0xcc, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0xe4, 0xac, 0xa7, 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 1fdbceaf..00000000 --- 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 b842ef9b..00000000 --- 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 1f353a97..00000000 --- a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go +++ /dev/null @@ -1,700 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unmarshalmerge.proto -// DO NOT EDIT! - -/* -Package unmarshalmerge is a generated protocol buffer package. - -It is generated from these files: - unmarshalmerge.proto - -It has these top-level messages: - Big - BigUnsafe - Sub - IntMerge -*/ -package unmarshalmerge - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestBigProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Big{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkBigProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Big, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedBig(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkBigProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBig(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Big{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestBigUnsafeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkBigUnsafeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*BigUnsafe, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedBigUnsafe(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBigUnsafe(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &BigUnsafe{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestSubProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkSubProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Sub, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedSub(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkSubProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSub(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &Sub{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestIntMergeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkIntMergeProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*IntMerge, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedIntMerge(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(data) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkIntMergeProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedIntMerge(popr, false)) - if err != nil { - panic(err) - } - datas[i] = data - } - msg := &IntMerge{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestBigJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Big{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBigUnsafeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BigUnsafe{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Sub{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIntMergeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IntMerge{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBigProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Big{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Big{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigUnsafeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigUnsafeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIntMergeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIntMergeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBigVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Big{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBigUnsafeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &BigUnsafe{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestSubVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSub(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Sub{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestIntMergeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &IntMerge{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBigGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBigUnsafeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestSubGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSub(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestIntMergeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBigStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBigUnsafeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSubStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSub(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestIntMergeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile deleted file mode 100644 index f09551ae..00000000 --- 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 16751014..00000000 --- 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 160ab4d8..00000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go +++ /dev/null @@ -1,4065 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognized.proto -// DO NOT EDIT! - -/* - Package unrecognized is a generated protocol buffer package. - - It is generated from these files: - unrecognized.proto - - It has these top-level messages: - A - B - D - C - U - UnoM - OldA - OldB - OldC - OldU - OldUnoM -*/ -package unrecognized - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1,omitempty"` - B []*B `protobuf:"bytes,1,rep,name=B,json=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" json:"C,omitempty"` - D *D `protobuf:"bytes,2,opt,name=D,json=d" json:"D,omitempty"` - F *OldC `protobuf:"bytes,5,opt,name=F,json=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" 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" json:"Field2,omitempty"` - Field3 *string `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field4 *float64 `protobuf:"fixed64,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` - Field5 [][]byte `protobuf:"bytes,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` - Field6 *int64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7,json=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" json:"Field2,omitempty"` - Field3 *uint32 `protobuf:"varint,3,opt,name=Field3,json=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" json:"Field2,omitempty"` - Field3 *uint32 `protobuf:"varint,3,opt,name=Field3,json=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" json:"Field1,omitempty"` - B []*OldB `protobuf:"bytes,1,rep,name=B,json=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" json:"C,omitempty"` - F *OldC `protobuf:"bytes,5,opt,name=F,json=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" json:"Field1,omitempty"` - Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 *string `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` - Field6 *int64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` - Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7,json=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" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=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" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *D) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *C) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *U) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *UnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldA) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldB) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldC) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldU) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func (this *OldUnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedDescription() -} -func UnrecognizedDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3542 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, - 0xf5, 0x67, 0x62, 0x3b, 0xb1, 0x8f, 0x1d, 0xc7, 0x99, 0x84, 0x5d, 0x6f, 0x60, 0x6f, 0xe6, 0xb6, - 0x2c, 0x7f, 0xb2, 0xb0, 0xec, 0xd5, 0xfc, 0xff, 0xf0, 0x77, 0x1c, 0x6f, 0xc8, 0x2a, 0x89, 0xd3, - 0x49, 0x0c, 0x0b, 0x7d, 0x18, 0x4d, 0xc6, 0x13, 0xc7, 0xbb, 0xe3, 0x19, 0xd7, 0x33, 0x5e, 0x36, - 0x3c, 0x54, 0x54, 0xf4, 0x86, 0xaa, 0xb6, 0xb4, 0x54, 0x2a, 0xf7, 0x02, 0x52, 0x0b, 0xa5, 0x37, - 0xe8, 0x4d, 0x55, 0x9f, 0x2a, 0x55, 0xb4, 0x3c, 0x55, 0xb4, 0x4f, 0x7d, 0xe8, 0x03, 0x54, 0x48, - 0xbd, 0xd1, 0x96, 0x4a, 0x2b, 0xb5, 0xd2, 0xbe, 0xf4, 0x7c, 0xb7, 0xf1, 0x8c, 0xed, 0x64, 0x1c, - 0x24, 0x4a, 0x57, 0x1a, 0xad, 0xe7, 0x7c, 0xe7, 0xf7, 0x9b, 0x6f, 0xce, 0x39, 0xdf, 0x39, 0xe7, - 0xfb, 0x26, 0xf0, 0xf3, 0xdb, 0xe1, 0x40, 0xcd, 0xb6, 0x6b, 0xa6, 0x71, 0xa4, 0xd9, 0xb2, 0x5d, - 0x7b, 0xad, 0xbd, 0x7e, 0xa4, 0x6a, 0x38, 0x7a, 0xab, 0xde, 0x74, 0xed, 0xd6, 0x34, 0x95, 0xc9, - 0x63, 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0x9b, 0x7a, 0x08, 0x56, 0xd8, 0x78, 0x37, 0x87, - 0xc0, 0xe1, 0xab, 0x24, 0x8c, 0x4b, 0xae, 0x61, 0x39, 0x75, 0xdb, 0xca, 0x8e, 0x50, 0x92, 0x1b, - 0xfa, 0x78, 0xd1, 0x30, 0xab, 0xdd, 0x14, 0x1d, 0x9c, 0x7c, 0x02, 0x46, 0xec, 0xa6, 0x8b, 0xbf, - 0x9c, 0x6c, 0x1c, 0xfd, 0x93, 0x3c, 0x7a, 0x6d, 0xdf, 0x40, 0x28, 0x33, 0x1d, 0x45, 0x28, 0xcb, - 0xf3, 0x90, 0x71, 0xec, 0x76, 0x4b, 0x37, 0x54, 0xdd, 0xae, 0x1a, 0x6a, 0xdd, 0x5a, 0xb7, 0xb3, - 0x09, 0x4a, 0xb0, 0xbf, 0xf7, 0x45, 0xa8, 0x62, 0x11, 0xf5, 0xe6, 0x51, 0x4d, 0x49, 0x3b, 0x81, - 0x7b, 0x79, 0x17, 0x0c, 0x3b, 0x9b, 0x96, 0xab, 0x5d, 0xca, 0xa6, 0x68, 0x84, 0xf0, 0xbb, 0xdc, - 0x3f, 0x63, 0x30, 0x36, 0x48, 0x88, 0xdd, 0x09, 0xb1, 0x75, 0xf2, 0x96, 0x18, 0x60, 0x3b, 0xb0, - 0x01, 0xc3, 0x04, 0x8d, 0x38, 0xfc, 0x3e, 0x8d, 0x58, 0x80, 0xa4, 0x65, 0x38, 0xae, 0x51, 0x65, - 0x11, 0x11, 0x19, 0x30, 0xa6, 0x80, 0x81, 0x7a, 0x43, 0x2a, 0xfa, 0xbe, 0x42, 0xea, 0x1c, 0x8c, - 0x79, 0x53, 0x52, 0x5b, 0x9a, 0x55, 0x13, 0xb1, 0x79, 0x24, 0x6c, 0x26, 0xd3, 0x25, 0x81, 0x53, - 0x08, 0x4c, 0x49, 0x1b, 0x81, 0x7b, 0x79, 0x16, 0xc0, 0xb6, 0x0c, 0x7b, 0x1d, 0x97, 0x97, 0x6e, - 0x62, 0x9c, 0xf4, 0xb7, 0x52, 0x99, 0xa8, 0xf4, 0x58, 0xc9, 0x66, 0x52, 0xdd, 0x94, 0x4f, 0x77, - 0x42, 0x6d, 0x64, 0x8b, 0x48, 0x59, 0x64, 0x8b, 0xac, 0x27, 0xda, 0x2a, 0x90, 0x6e, 0x19, 0x24, - 0xee, 0xd1, 0xc4, 0xec, 0xcd, 0x12, 0x74, 0x12, 0xd3, 0xa1, 0x6f, 0xa6, 0x70, 0x18, 0x7b, 0xb1, - 0xd1, 0x96, 0xff, 0x56, 0xbe, 0x0e, 0x3c, 0x81, 0x4a, 0xc3, 0x0a, 0x68, 0x16, 0x4a, 0x09, 0xe1, - 0x12, 0xca, 0xa6, 0x4e, 0x41, 0x3a, 0x68, 0x1e, 0x79, 0x12, 0x62, 0x8e, 0xab, 0xb5, 0x5c, 0x1a, - 0x85, 0x31, 0x85, 0xdd, 0xc8, 0x19, 0x88, 0x60, 0x92, 0xa1, 0x59, 0x2e, 0xa6, 0x90, 0x9f, 0x53, - 0x27, 0x61, 0x34, 0xf0, 0xf8, 0x41, 0x81, 0xb9, 0x27, 0x86, 0x61, 0xb2, 0x5f, 0xcc, 0xf5, 0x0d, - 0x7f, 0x5c, 0x3e, 0x18, 0x01, 0x6b, 0x46, 0x0b, 0xe3, 0x8e, 0x30, 0xf0, 0x3b, 0x8c, 0xa8, 0x98, - 0xa9, 0xad, 0x19, 0x26, 0x46, 0x93, 0x74, 0x28, 0x7d, 0xf4, 0x96, 0x81, 0xa2, 0x7a, 0x7a, 0x81, - 0x40, 0x14, 0x86, 0x94, 0xef, 0x82, 0x28, 0x4f, 0x71, 0x84, 0xe1, 0xf0, 0x60, 0x0c, 0x24, 0x16, - 0x15, 0x8a, 0x93, 0xaf, 0x81, 0x04, 0xf9, 0x9f, 0xd9, 0x76, 0x98, 0xce, 0x39, 0x4e, 0x04, 0xc4, - 0xae, 0xf2, 0x14, 0xc4, 0x69, 0x98, 0x55, 0x0d, 0x51, 0x1a, 0xbc, 0x7b, 0xe2, 0x98, 0xaa, 0xb1, - 0xae, 0xb5, 0x4d, 0x57, 0xbd, 0xa8, 0x99, 0x6d, 0x83, 0x06, 0x0c, 0x3a, 0x86, 0x0b, 0xef, 0x25, - 0x32, 0x79, 0x3f, 0x24, 0x59, 0x54, 0xd6, 0x11, 0x73, 0x89, 0x66, 0x9f, 0x98, 0xc2, 0x02, 0x75, - 0x9e, 0x48, 0xc8, 0xe3, 0xcf, 0x3b, 0xb8, 0x16, 0xb8, 0x6b, 0xe9, 0x23, 0x88, 0x80, 0x3e, 0xfe, - 0x64, 0x77, 0xe2, 0xdb, 0xdb, 0xff, 0xf5, 0xba, 0x63, 0x31, 0xf7, 0xe3, 0x21, 0x88, 0xd2, 0xf5, - 0x36, 0x06, 0xc9, 0xd5, 0xfb, 0x97, 0x4b, 0xea, 0x6c, 0xb9, 0x32, 0xb3, 0x50, 0xca, 0x48, 0x72, - 0x1a, 0x80, 0x0a, 0xce, 0x2c, 0x94, 0x0b, 0xab, 0x99, 0x21, 0xef, 0x7e, 0x7e, 0x69, 0xf5, 0xc4, - 0xb1, 0x4c, 0xc4, 0x03, 0x54, 0x98, 0x20, 0xea, 0x57, 0xb8, 0xe3, 0x68, 0x26, 0x86, 0x91, 0x90, - 0x62, 0x04, 0xf3, 0xe7, 0x4a, 0xb3, 0xa8, 0x31, 0x1c, 0x94, 0xa0, 0xce, 0x88, 0x3c, 0x0a, 0x09, - 0x2a, 0x99, 0x29, 0x97, 0x17, 0x32, 0x71, 0x8f, 0x73, 0x65, 0x55, 0x99, 0x5f, 0x9a, 0xcb, 0x24, - 0x3c, 0xce, 0x39, 0xa5, 0x5c, 0x59, 0xce, 0x80, 0xc7, 0xb0, 0x58, 0x5a, 0x59, 0x29, 0xcc, 0x95, - 0x32, 0x49, 0x4f, 0x63, 0xe6, 0xfe, 0xd5, 0xd2, 0x4a, 0x26, 0x15, 0x98, 0x16, 0x3e, 0x62, 0xd4, - 0x7b, 0x44, 0x69, 0x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7a, 0xda, 0x96, 0x51, 0xd3, 0xba, 0xb4, 0x49, 0x1a, - 0x8a, 0x28, 0x19, 0x31, 0xe2, 0x69, 0x63, 0xa3, 0x59, 0xb5, 0xdb, 0xa4, 0x21, 0x60, 0x7a, 0x24, - 0xeb, 0x49, 0x4a, 0x92, 0xc9, 0x3c, 0x15, 0xde, 0xb1, 0x75, 0x76, 0xf0, 0x29, 0x25, 0xc9, 0x64, - 0x4c, 0xe5, 0x26, 0x18, 0xd3, 0x6a, 0xb5, 0x16, 0x21, 0x17, 0x44, 0xac, 0x0d, 0x4d, 0x7b, 0x62, - 0xaa, 0x38, 0x75, 0x16, 0xe2, 0xc2, 0x0e, 0xa4, 0xb0, 0x10, 0x4b, 0x60, 0xcd, 0xa7, 0xe7, 0x28, - 0x43, 0x64, 0x53, 0x6f, 0x89, 0x41, 0x7c, 0x68, 0xdd, 0x51, 0x3b, 0x07, 0x7a, 0x43, 0x38, 0x1e, - 0x57, 0x92, 0x75, 0xc7, 0x3b, 0xc1, 0xc9, 0xbd, 0x84, 0xe5, 0x35, 0x78, 0x20, 0x29, 0xcf, 0x42, - 0xdc, 0xb4, 0x31, 0x3e, 0x08, 0x82, 0x9d, 0x86, 0x1f, 0x0a, 0x39, 0xc3, 0x9c, 0x5e, 0xe0, 0xfa, - 0x8a, 0x87, 0x9c, 0xfa, 0x95, 0x04, 0x71, 0x21, 0xc6, 0x42, 0x11, 0x6d, 0x6a, 0xee, 0x06, 0xa5, - 0x8b, 0xcd, 0x0c, 0x65, 0x24, 0x85, 0xde, 0x13, 0x39, 0x76, 0x33, 0x16, 0x0d, 0x01, 0x2e, 0x27, - 0xf7, 0xc4, 0xaf, 0xa6, 0xa1, 0x55, 0x69, 0x83, 0x6b, 0x37, 0x1a, 0xe8, 0x49, 0x47, 0xf8, 0x95, - 0xcb, 0x8b, 0x5c, 0x4c, 0xce, 0xc5, 0xdd, 0x96, 0x56, 0x37, 0x03, 0xba, 0x51, 0xaa, 0x9b, 0x11, - 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, 0xf0, 0xe5, 0xc7, 0x29, 0x57, 0x71, 0x2b, 0x77, 0xbe, - 0x6f, 0x47, 0x0e, 0xea, 0x98, 0x13, 0xf4, 0xf9, 0x95, 0xae, 0xe7, 0x27, 0xfa, 0x3e, 0xdf, 0x67, - 0xf5, 0xdc, 0x1c, 0x8c, 0x10, 0x9c, 0xdf, 0x31, 0x03, 0x42, 0xf3, 0x29, 0xbf, 0x63, 0x66, 0x8e, - 0xbd, 0xf1, 0xf6, 0xbe, 0xab, 0xde, 0xc4, 0xeb, 0xb7, 0x78, 0xbd, 0xf5, 0xf6, 0x3e, 0xe9, 0x3d, - 0xbc, 0xfe, 0x85, 0xd7, 0xc3, 0xbf, 0xdf, 0x27, 0xbd, 0x8c, 0xd7, 0xab, 0x78, 0xfd, 0x04, 0xaf, - 0x37, 0xf0, 0x7a, 0x13, 0xaf, 0xb7, 0xf0, 0xfa, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x4d, - 0xea, 0x3b, 0x68, 0x2e, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.B) != len(that1.B) { - return false - } - for i := range this.B { - if !this.B[i].Equal(that1.B[i]) { - return false - } - } - return true -} -func (this *B) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *B") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *B but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *B but is not nil && this == nil") - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !this.D.Equal(that1.D) { - return fmt.Errorf("D this(%v) Not Equal that(%v)", this.D, that1.D) - } - if !this.F.Equal(that1.F) { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !this.D.Equal(that1.D) { - return false - } - if !this.F.Equal(that1.F) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *D) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*D) - if !ok { - that2, ok := that.(D) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *D") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *D but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *D but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *D) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*D) - if !ok { - that2, ok := that.(D) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *C) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *C") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *C but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *C but is not nil && this == nil") - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) - } - } else if this.Field4 != nil { - return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") - } else if that1.Field4 != nil { - return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) - } - if len(this.Field5) != len(that1.Field5) { - return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) - } - for i := range this.Field5 { - if !bytes.Equal(this.Field5[i], that1.Field5[i]) { - return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) - } - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *C) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - return false - } - } else if this.Field4 != nil { - return false - } else if that1.Field4 != nil { - return false - } - if len(this.Field5) != len(that1.Field5) { - return false - } - for i := range this.Field5 { - if !bytes.Equal(this.Field5[i], that1.Field5[i]) { - return false - } - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *U) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *U") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *U but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *U but is not nil && this == nil") - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *U) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - return true -} -func (this *UnoM) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UnoM) - if !ok { - that2, ok := that.(UnoM) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UnoM") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UnoM but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UnoM but is not nil && this == nil") - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - return nil -} -func (this *UnoM) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*UnoM) - if !ok { - that2, ok := that.(UnoM) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - return true -} -func (this *OldA) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldA) - if !ok { - that2, ok := that.(OldA) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldA") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldA but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldA but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.B) != len(that1.B) { - return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) - } - for i := range this.B { - if !this.B[i].Equal(that1.B[i]) { - return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) - } - } - return nil -} -func (this *OldA) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldA) - if !ok { - that2, ok := that.(OldA) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.B) != len(that1.B) { - return false - } - for i := range this.B { - if !this.B[i].Equal(that1.B[i]) { - return false - } - } - return true -} -func (this *OldB) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldB) - if !ok { - that2, ok := that.(OldB) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldB") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldB but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldB but is not nil && this == nil") - } - if !this.C.Equal(that1.C) { - return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) - } - if !this.F.Equal(that1.F) { - return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldB) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldB) - if !ok { - that2, ok := that.(OldB) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.C.Equal(that1.C) { - return false - } - if !this.F.Equal(that1.F) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldC) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldC) - if !ok { - that2, ok := that.(OldC) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldC") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldC but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldC but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) - } - } else if this.Field3 != nil { - return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") - } else if that1.Field3 != nil { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) - } - } else if this.Field6 != nil { - return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") - } else if that1.Field6 != nil { - return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) - } - if len(this.Field7) != len(that1.Field7) { - return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldC) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldC) - if !ok { - that2, ok := that.(OldC) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - return false - } - } else if this.Field3 != nil { - return false - } else if that1.Field3 != nil { - return false - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - return false - } - } else if this.Field6 != nil { - return false - } else if that1.Field6 != nil { - return false - } - if len(this.Field7) != len(that1.Field7) { - return false - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldU) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldU) - if !ok { - that2, ok := that.(OldU) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldU") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldU but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldU but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldU) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldU) - if !ok { - that2, ok := that.(OldU) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldUnoM) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldUnoM) - if !ok { - that2, ok := that.(OldUnoM) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldUnoM") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldUnoM but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldUnoM but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldUnoM) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldUnoM) - if !ok { - that2, ok := that.(OldUnoM) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.A{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.B != nil { - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *B) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&unrecognized.B{") - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.D != nil { - s = append(s, "D: "+fmt.Sprintf("%#v", this.D)+",\n") - } - if this.F != nil { - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *D) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&unrecognized.D{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *C) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&unrecognized.C{") - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") - } - if this.Field4 != nil { - s = append(s, "Field4: "+valueToGoStringUnrecognized(this.Field4, "float64")+",\n") - } - if this.Field5 != nil { - s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *U) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.U{") - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnoM) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.UnoM{") - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldA) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldA{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.B != nil { - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldB) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldB{") - if this.C != nil { - s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") - } - if this.F != nil { - s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldC) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 9) - s = append(s, "&unrecognized.OldC{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") - } - if this.Field6 != nil { - s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") - } - if this.Field7 != nil { - s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldU) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldU{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldUnoM) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognized.OldUnoM{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringUnrecognized(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringUnrecognized(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - for _, msg := range m.B { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field1 != nil { - data[i] = 0x10 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.C != nil { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.C.Size())) - n1, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.D != nil { - data[i] = 0x12 - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.D.Size())) - n2, err := m.D.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.F != nil { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.F.Size())) - n3, err := m.F.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *D) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *D) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *C) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *C) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field2 != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(float64(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field3))) - i += copy(data[i:], *m.Field3) - } - if m.Field4 != nil { - data[i] = 0x21 - i++ - i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(float64(*m.Field4)))) - } - if len(m.Field5) > 0 { - for _, b := range m.Field5 { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(b))) - i += copy(data[i:], b) - } - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field6)) - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x3d - i++ - f4 := math.Float32bits(float32(num)) - data[i] = uint8(f4) - i++ - data[i] = uint8(f4 >> 8) - i++ - data[i] = uint8(f4 >> 16) - i++ - data[i] = uint8(f4 >> 24) - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *U) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *U) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x11 - i++ - f5 := math.Float64bits(float64(num)) - data[i] = uint8(f5) - i++ - data[i] = uint8(f5 >> 8) - i++ - data[i] = uint8(f5 >> 16) - i++ - data[i] = uint8(f5 >> 24) - i++ - data[i] = uint8(f5 >> 32) - i++ - data[i] = uint8(f5 >> 40) - i++ - data[i] = uint8(f5 >> 48) - i++ - data[i] = uint8(f5 >> 56) - i++ - } - } - if m.Field3 != nil { - data[i] = 0x18 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field3)) - } - return i, nil -} - -func (m *OldA) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldA) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - for _, msg := range m.B { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Field1 != nil { - data[i] = 0x10 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - return i, nil -} - -func (m *OldB) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldB) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.C != nil { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.C.Size())) - n6, err := m.C.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.F != nil { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognized(data, i, uint64(m.F.Size())) - n7, err := m.F.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OldC) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldC) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0x8 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) - } - if m.Field2 != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(float64(*m.Field2)))) - } - if m.Field3 != nil { - data[i] = 0x1a - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field3))) - i += copy(data[i:], *m.Field3) - } - if m.Field6 != nil { - data[i] = 0x30 - i++ - i = encodeVarintUnrecognized(data, i, uint64(*m.Field6)) - } - if len(m.Field7) > 0 { - for _, num := range m.Field7 { - data[i] = 0x3d - i++ - f8 := math.Float32bits(float32(num)) - data[i] = uint8(f8) - i++ - data[i] = uint8(f8 >> 8) - i++ - data[i] = uint8(f8 >> 16) - i++ - data[i] = uint8(f8 >> 24) - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OldU) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OldU) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field1 != nil { - data[i] = 0xa - i++ - i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field1))) - i += copy(data[i:], *m.Field1) - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - data[i] = 0x11 - i++ - f9 := math.Float64bits(float64(num)) - data[i] = uint8(f9) - i++ - data[i] = uint8(f9 >> 8) - i++ - data[i] = uint8(f9 >> 16) - i++ - data[i] = uint8(f9 >> 24) - i++ - data[i] = uint8(f9 >> 32) - i++ - data[i] = uint8(f9 >> 40) - i++ - data[i] = uint8(f9 >> 48) - i++ - data[i] = uint8(f9 >> 56) - i++ - } - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Unrecognized(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Unrecognized(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintUnrecognized(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedA(r randyUnrecognized, easy bool) *A { - this := &A{} - if r.Intn(10) != 0 { - v1 := r.Intn(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 := 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 := 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 := 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 := 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 - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field3 = &s - iNdEx = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field4 = &v2 - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field5 = append(m.Field5, make([]byte, postIndex-iNdEx)) - copy(m.Field5[len(m.Field5)-1], data[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *U) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: U: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldA) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldA: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldA: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = append(m.B, &OldB{}) - if err := m.B[len(m.B)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldB) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.C == nil { - m.C = &OldC{} - } - if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.F == nil { - m.F = &OldC{} - } - if err := m.F.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldC) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldC: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldC: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field1 = &v - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = &v2 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field3 = &s - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field6 = &v - case 7: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(data[iNdEx-4]) - v |= uint32(data[iNdEx-3]) << 8 - v |= uint32(data[iNdEx-2]) << 16 - v |= uint32(data[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OldU) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldU: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldU: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Field1 = &s - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - default: - iNdEx = preIndex - skippy, err := skipUnrecognized(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnrecognized(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnrecognized - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnrecognized(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnrecognized = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnrecognized = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("unrecognized.proto", fileDescriptorUnrecognized) } - -var fileDescriptorUnrecognized = []byte{ - // 398 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0xcd, 0x2b, 0x4a, - 0x4d, 0xce, 0x4f, 0xcf, 0xcb, 0xac, 0x4a, 0x4d, 0xd1, 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, 0x81, 0x8b, 0xd1, 0x51, 0x48, 0x96, 0x8b, 0xd1, 0x49, 0x82, 0x51, 0x81, 0x59, 0x83, - 0xdb, 0x88, 0x5f, 0x0f, 0xc5, 0x06, 0xa7, 0x20, 0xc6, 0x24, 0x21, 0x31, 0x2e, 0x36, 0xb7, 0xcc, - 0xd4, 0x9c, 0x14, 0x43, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0xb6, 0x34, 0x30, 0xcf, 0x8a, - 0xe5, 0xc2, 0x42, 0x79, 0x06, 0xa5, 0x64, 0xa0, 0x66, 0x90, 0x09, 0xce, 0x40, 0x13, 0x18, 0x31, - 0x4d, 0x70, 0x0e, 0x62, 0x4c, 0x06, 0x49, 0xbb, 0x80, 0x35, 0x63, 0x48, 0xbb, 0x04, 0x31, 0xa6, - 0x08, 0x29, 0x70, 0x31, 0xba, 0x49, 0xb0, 0x82, 0xa5, 0x85, 0x50, 0xa5, 0xfd, 0x73, 0x52, 0x80, - 0x06, 0xa4, 0x29, 0x49, 0x03, 0x0d, 0x40, 0x72, 0x07, 0x23, 0xb2, 0x3b, 0x94, 0x26, 0x33, 0x02, - 0x6d, 0x87, 0xcb, 0x1a, 0x81, 0x2d, 0x62, 0x84, 0xca, 0x1a, 0xc1, 0xc5, 0x8d, 0x25, 0x98, 0x81, - 0xe2, 0x9c, 0x50, 0x71, 0x63, 0xb8, 0xb8, 0x89, 0x04, 0x0b, 0x92, 0x7a, 0x13, 0xb8, 0xb8, 0x29, - 0xd0, 0x45, 0xcc, 0x1a, 0x3c, 0x50, 0x71, 0x53, 0xb8, 0xb8, 0x99, 0x04, 0x1b, 0x92, 0xed, 0x66, - 0x70, 0x71, 0x73, 0x09, 0x76, 0xa0, 0x7a, 0x26, 0xa8, 0xb8, 0xb9, 0x92, 0x25, 0x17, 0x63, 0x28, - 0x8a, 0xa3, 0x98, 0x71, 0x3a, 0x8a, 0x17, 0xe6, 0x28, 0x68, 0x90, 0x7a, 0x70, 0xb1, 0x84, 0xe6, - 0xe5, 0xfb, 0x92, 0xac, 0x5b, 0xa0, 0x03, 0xa8, 0x7b, 0x02, 0x10, 0x2f, 0x00, 0x62, 0xb0, 0x49, - 0x6e, 0x5c, 0x2c, 0xc0, 0x20, 0x74, 0x04, 0x85, 0x30, 0x2c, 0x86, 0x31, 0x43, 0x98, 0x88, 0x48, - 0xf6, 0x02, 0x9b, 0xe3, 0x04, 0x32, 0x07, 0x16, 0xcf, 0x58, 0x63, 0x2a, 0x99, 0x88, 0xb8, 0xac, - 0x03, 0x9b, 0xe5, 0x8c, 0x2b, 0x3a, 0xc9, 0x8e, 0x48, 0x62, 0x23, 0xc6, 0x0c, 0x6c, 0x7f, 0x28, - 0x9a, 0xfd, 0x9c, 0x58, 0xed, 0x47, 0x0a, 0x75, 0x25, 0x77, 0x2e, 0x76, 0x90, 0x3e, 0xe4, 0x88, - 0x21, 0x52, 0xab, 0x15, 0x0f, 0x72, 0xc4, 0x38, 0x99, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0x01, 0x88, - 0x6f, 0x00, 0xf1, 0x83, 0x87, 0x72, 0x8c, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, - 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x9f, 0x00, 0xe2, 0x0b, 0x40, 0xfc, 0x00, 0x88, - 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xea, 0xec, 0xd3, 0x83, 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 483227a3..00000000 --- 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 1a4f253a..00000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go +++ /dev/null @@ -1,1882 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognized.proto -// DO NOT EDIT! - -/* -Package unrecognized is a generated protocol buffer package. - -It is generated from these files: - unrecognized.proto - -It has these top-level messages: - A - B - D - C - U - UnoM - OldA - OldB - OldC - OldU - OldUnoM -*/ -package unrecognized - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnoMProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldBProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldCProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUnoMProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUnoMJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnoM{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldCJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldUJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldUnoMJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldUnoM{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &B{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &D{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &D{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &C{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &U{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnoMProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnoMProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldBProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldBProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldCProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldCProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUnoMProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldUnoMProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedDescription(t *testing.T) { - UnrecognizedDescription() -} -func TestAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedD(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &D{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &C{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &U{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUnoMVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldA{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldBVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldB(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldB{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldCVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldC(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldC{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldUVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldU(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldUnoMVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldUnoM(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldUnoM{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestBGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestDGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedD(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestCGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestUnoMGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnoM(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldBGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldB(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldCGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldC(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldUGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldU(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldUnoMGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldUnoM(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestUSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldBSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldCSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestOldUSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedD(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestCStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUnoMStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnoM(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldBStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldB(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldCStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldC(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldUStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldU(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldUnoMStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldUnoM(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile deleted file mode 100644 index 5ea242c4..00000000 --- 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 893cb5de..00000000 --- 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 2fd90e7f..00000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go +++ /dev/null @@ -1,1728 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognizedgroup.proto -// DO NOT EDIT! - -/* - Package unrecognizedgroup is a generated protocol buffer package. - - It is generated from these files: - unrecognizedgroup.proto - - It has these top-level messages: - NewNoGroup - A - OldWithGroup -*/ -package unrecognizedgroup - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import compress_gzip "compress/gzip" -import bytes "bytes" -import io_ioutil "io/ioutil" - -import strings "strings" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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" json:"Field1,omitempty"` - Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` - A *A `protobuf:"bytes,5,opt,name=A,json=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" 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" 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" 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" json:"Field1,omitempty"` - Field2 *int32 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` - Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3,json=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" json:"Field1,omitempty"` - Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=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 *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *A) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *OldWithGroup) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *OldWithGroup_Group1) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func (this *OldWithGroup_Group2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return UnrecognizedgroupDescription() -} -func UnrecognizedgroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3445 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6d, 0x6c, 0x23, 0xe5, - 0xb5, 0xc6, 0xf1, 0x47, 0xec, 0x63, 0xc7, 0x71, 0x26, 0x61, 0xd7, 0x1b, 0x60, 0x97, 0x35, 0x5f, - 0xcb, 0x72, 0xc9, 0xb2, 0xe1, 0x02, 0x8b, 0xb9, 0x17, 0xe4, 0x24, 0xde, 0x90, 0x55, 0x12, 0xfb, - 0x4e, 0x12, 0x58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 0xef, 0x1e, 0x65, 0x0a, 0xe2, 0xb6, 0xa3, 0x77, 0x1c, 0x16, - 0x85, 0x71, 0x95, 0x3f, 0x28, 0x39, 0x88, 0x62, 0x92, 0x61, 0x59, 0x2e, 0xae, 0xd2, 0xaf, 0xd3, - 0x77, 0xc1, 0x98, 0xef, 0xf5, 0xc3, 0x02, 0x0b, 0x4f, 0x26, 0x60, 0x6a, 0x50, 0xcc, 0x0d, 0x0c, - 0x7f, 0xdc, 0x3e, 0x18, 0x01, 0x9b, 0xa4, 0x83, 0x71, 0x47, 0x19, 0xc4, 0x13, 0x46, 0x54, 0xdc, - 0xd0, 0x37, 0x89, 0x81, 0xd1, 0x14, 0x39, 0x96, 0x9d, 0xbd, 0x65, 0xa8, 0xa8, 0x9e, 0x59, 0xa6, - 0x10, 0x95, 0x23, 0x95, 0x7b, 0x21, 0x26, 0x52, 0x1c, 0x65, 0x38, 0x3e, 0x1c, 0x03, 0x8d, 0x45, - 0x95, 0xe1, 0x94, 0xab, 0x20, 0x45, 0xff, 0xe5, 0xbe, 0x4d, 0x30, 0x9b, 0x93, 0x54, 0x40, 0xfd, - 0xaa, 0x4c, 0x43, 0x92, 0x85, 0x59, 0x9d, 0xc8, 0xd2, 0xe0, 0x3e, 0xd3, 0x85, 0xa9, 0x93, 0x2d, - 0xbd, 0x6b, 0x38, 0xda, 0x05, 0xdd, 0xe8, 0x12, 0x16, 0x30, 0xb8, 0x30, 0x42, 0xf8, 0x00, 0x95, - 0x29, 0x47, 0x20, 0xcd, 0xa3, 0xb2, 0x89, 0x98, 0x4b, 0x2c, 0xfb, 0xc4, 0x55, 0x1e, 0xa8, 0x4b, - 0x54, 0x42, 0x5f, 0x7f, 0xce, 0xc6, 0xbd, 0x20, 0x96, 0x96, 0xbd, 0x82, 0x0a, 0xd8, 0xeb, 0xef, - 0x0a, 0x26, 0xbe, 0x6b, 0x06, 0x4f, 0x2f, 0x18, 0x8b, 0x85, 0xef, 0x8e, 0x40, 0x8c, 0xed,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b, 0x05, 0x29, 0x77, 0xd7, 0x63, 0x08, 0xce, 0x67, - 0x04, 0xa7, 0x22, 0xb0, 0x72, 0x59, 0x28, 0xe3, 0x19, 0x98, 0xc0, 0x93, 0xfa, 0xa6, 0x65, 0x8b, - 0x73, 0xef, 0x10, 0x74, 0xcf, 0x0a, 0xba, 0x71, 0x01, 0x64, 0xa7, 0x60, 0xca, 0x75, 0x37, 0x24, - 0xb7, 0xf0, 0x00, 0x34, 0x04, 0xc5, 0x73, 0x82, 0x62, 0x94, 0xea, 0x53, 0x68, 0x09, 0x32, 0x0d, - 0x4b, 0xa4, 0xe1, 0x70, 0xf8, 0xf3, 0x02, 0x9e, 0x96, 0x18, 0x41, 0xd1, 0xb6, 0xda, 0x5d, 0x83, - 0xe6, 0xe8, 0x70, 0x8a, 0x2f, 0x48, 0x0a, 0x89, 0x11, 0x14, 0xfb, 0x70, 0xeb, 0x0b, 0x92, 0xc2, - 0xf6, 0xf8, 0xf3, 0x3e, 0x7a, 0xd7, 0x6b, 0xec, 0x58, 0xe6, 0x30, 0x46, 0xbc, 0x28, 0x18, 0x40, - 0x40, 0x28, 0xc1, 0x3d, 0x90, 0x1a, 0x76, 0x21, 0xbe, 0x28, 0xe0, 0x49, 0x22, 0x57, 0x00, 0xf7, - 0x99, 0x4c, 0x32, 0xf4, 0xb7, 0x95, 0x70, 0x8a, 0x2f, 0x09, 0x8a, 0xac, 0x07, 0x26, 0xa6, 0xe1, - 0x10, 0xdb, 0xc1, 0xa3, 0xfa, 0x10, 0x24, 0x2f, 0xcb, 0x69, 0x08, 0x88, 0x70, 0xe5, 0x26, 0x31, - 0x6b, 0xdb, 0xc3, 0x31, 0xbc, 0x22, 0x5d, 0x29, 0x31, 0x94, 0x02, 0x33, 0x4f, 0x4b, 0xef, 0xe0, - 0xe1, 0xda, 0x18, 0x6a, 0x39, 0xbe, 0x2c, 0x38, 0x32, 0x2e, 0x48, 0x78, 0xa4, 0x6b, 0xee, 0x87, - 0xe6, 0x55, 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ec, 0xc7, 0x06, 0x98, 0xbd, 0x71, - 0x80, 0x29, 0x5e, 0xa2, 0x19, 0xf6, 0xff, 0x93, 0xaa, 0x40, 0xed, 0x3a, 0x3b, 0xc9, 0x3b, 0xcb, - 0x6e, 0xf5, 0x86, 0xe5, 0x9d, 0x15, 0xbc, 0xb3, 0xd3, 0x55, 0x48, 0x2c, 0xfa, 0xdf, 0xb0, 0x9b, - 0x5f, 0x67, 0xe5, 0x9f, 0x90, 0x30, 0xf9, 0xec, 0x6e, 0x16, 0x4d, 0x9f, 0x12, 0x8c, 0xb3, 0x43, - 0x31, 0xf6, 0x90, 0xb3, 0x73, 0xc7, 0x7e, 0xf2, 0xe6, 0xe1, 0x2b, 0x7e, 0x8e, 0x9f, 0x5f, 0xe1, - 0xe7, 0x37, 0x6f, 0x1e, 0x8e, 0xbc, 0x8b, 0x9f, 0xbf, 0xe3, 0xe7, 0xd1, 0xdf, 0x1e, 0x8e, 0xbc, - 0x82, 0x9f, 0xd7, 0xf0, 0xf3, 0x3d, 0xfc, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, 0x15, 0x3b, 0x3f, - 0xed, 0xda, 0x2c, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_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 { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*NewNoGroup) - if !ok { - that2, ok := that.(NewNoGroup) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if !this.A.Equal(that1.A) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *A) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *A") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *A but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *A but is not nil && this == nil") - } - if this.AField != nil && that1.AField != nil { - if *this.AField != *that1.AField { - return fmt.Errorf("AField this(%v) Not Equal that(%v)", *this.AField, *that1.AField) - } - } else if this.AField != nil { - return fmt.Errorf("this.AField == nil && that.AField != nil") - } else if that1.AField != nil { - return fmt.Errorf("AField this(%v) Not Equal that(%v)", this.AField, that1.AField) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.AField != nil && that1.AField != nil { - if *this.AField != *that1.AField { - return false - } - } else if this.AField != nil { - return false - } else if that1.AField != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldWithGroup) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldWithGroup) - if !ok { - that2, ok := that.(OldWithGroup) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldWithGroup") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldWithGroup but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldWithGroup but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if !this.Group1.Equal(that1.Group1) { - return fmt.Errorf("Group1 this(%v) Not Equal that(%v)", this.Group1, that1.Group1) - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if !this.Group2.Equal(that1.Group2) { - return fmt.Errorf("Group2 this(%v) Not Equal that(%v)", this.Group2, that1.Group2) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldWithGroup) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldWithGroup) - if !ok { - that2, ok := that.(OldWithGroup) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if !this.Group1.Equal(that1.Group1) { - return false - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if !this.Group2.Equal(that1.Group2) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldWithGroup_Group1) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldWithGroup_Group1) - if !ok { - that2, ok := that.(OldWithGroup_Group1) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldWithGroup_Group1") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldWithGroup_Group1 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldWithGroup_Group1 but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) - } - } else if this.Field2 != nil { - return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") - } else if that1.Field2 != nil { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) - } - if len(this.Field3) != len(that1.Field3) { - return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldWithGroup_Group1) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldWithGroup_Group1) - if !ok { - that2, ok := that.(OldWithGroup_Group1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - return false - } - } else if this.Field2 != nil { - return false - } else if that1.Field2 != nil { - return false - } - if len(this.Field3) != len(that1.Field3) { - return false - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OldWithGroup_Group2) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OldWithGroup_Group2) - if !ok { - that2, ok := that.(OldWithGroup_Group2) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OldWithGroup_Group2") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OldWithGroup_Group2 but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OldWithGroup_Group2 but is not nil && this == nil") - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) - } - } else if this.Field1 != nil { - return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") - } else if that1.Field1 != nil { - return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) - } - if len(this.Field2) != len(that1.Field2) { - return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *OldWithGroup_Group2) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*OldWithGroup_Group2) - if !ok { - that2, ok := that.(OldWithGroup_Group2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - return false - } - } else if this.Field1 != nil { - return false - } else if that1.Field1 != nil { - return false - } - if len(this.Field2) != len(that1.Field2) { - return false - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NewNoGroup) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&unrecognizedgroup.NewNoGroup{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.A != nil { - s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&unrecognizedgroup.A{") - if this.AField != nil { - s = append(s, "AField: "+valueToGoStringUnrecognizedgroup(this.AField, "int64")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldWithGroup) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&unrecognizedgroup.OldWithGroup{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Group1 != nil { - s = append(s, "Group1: "+fmt.Sprintf("%#v", this.Group1)+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.Group2 != nil { - s = append(s, "Group2: "+fmt.Sprintf("%#v", this.Group2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldWithGroup_Group1) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&unrecognizedgroup.OldWithGroup_Group1{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringUnrecognizedgroup(this.Field2, "int32")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OldWithGroup_Group2) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&unrecognizedgroup.OldWithGroup_Group2{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringUnrecognizedgroup(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringUnrecognizedgroup(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *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)) - data[i] = uint8(f1) - i++ - data[i] = uint8(f1 >> 8) - i++ - data[i] = uint8(f1 >> 16) - i++ - data[i] = uint8(f1 >> 24) - i++ - data[i] = uint8(f1 >> 32) - i++ - data[i] = uint8(f1 >> 40) - i++ - data[i] = uint8(f1 >> 48) - i++ - data[i] = uint8(f1 >> 56) - i++ - } - } - if m.A != nil { - data[i] = 0x2a - i++ - i = encodeVarintUnrecognizedgroup(data, i, uint64(m.A.Size())) - n2, err := m.A.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.AField != nil { - data[i] = 0x8 - i++ - i = encodeVarintUnrecognizedgroup(data, i, uint64(*m.AField)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Unrecognizedgroup(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Unrecognizedgroup(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintUnrecognizedgroup(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedNewNoGroup(r randyUnrecognizedgroup, easy bool) *NewNoGroup { - this := &NewNoGroup{} - if r.Intn(10) != 0 { - v1 := int64(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.Field1 = &v1 - } - if r.Intn(10) != 0 { - v2 := r.Intn(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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(data[iNdEx-8]) - v |= uint64(data[iNdEx-7]) << 8 - v |= uint64(data[iNdEx-6]) << 16 - v |= uint64(data[iNdEx-5]) << 24 - v |= uint64(data[iNdEx-4]) << 32 - v |= uint64(data[iNdEx-3]) << 40 - v |= uint64(data[iNdEx-2]) << 48 - v |= uint64(data[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.Field3 = append(m.Field3, v2) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.A == nil { - m.A = &A{} - } - if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipUnrecognizedgroup(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *A) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AField", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AField = &v - default: - iNdEx = preIndex - skippy, err := skipUnrecognizedgroup(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUnrecognizedgroup(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthUnrecognizedgroup - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipUnrecognizedgroup(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthUnrecognizedgroup = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUnrecognizedgroup = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("unrecognizedgroup.proto", fileDescriptorUnrecognizedgroup) } - -var fileDescriptorUnrecognizedgroup = []byte{ - // 290 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x90, 0x90, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, - 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, - 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x82, 0x52, 0x1e, 0x17, 0x97, 0x5f, 0x6a, 0xb9, 0x5f, 0xbe, 0x3b, - 0x48, 0xb3, 0x90, 0x18, 0x17, 0x9b, 0x5b, 0x66, 0x6a, 0x4e, 0x8a, 0xa1, 0x04, 0xa3, 0x02, 0xa3, - 0x06, 0x73, 0x10, 0x5b, 0x1a, 0x98, 0x07, 0x17, 0x37, 0x96, 0x60, 0x56, 0x60, 0xd6, 0x60, 0x84, - 0x8a, 0x1b, 0x0b, 0x29, 0x71, 0x31, 0x3a, 0x4a, 0xb0, 0x02, 0x95, 0x72, 0x1b, 0x89, 0xe8, 0x61, - 0x3a, 0xd2, 0x31, 0x88, 0x31, 0xd1, 0x8a, 0xa7, 0x63, 0xa1, 0x3c, 0xe3, 0x04, 0x20, 0x5e, 0x00, - 0xc4, 0x4a, 0x9a, 0x40, 0x1d, 0x20, 0xe3, 0x1c, 0xc1, 0xe6, 0xc1, 0xac, 0x49, 0x04, 0xf3, 0xd0, - 0x94, 0x9e, 0x62, 0xe2, 0xe2, 0xf1, 0xcf, 0x49, 0x09, 0x07, 0xfa, 0x07, 0xbf, 0xeb, 0xec, 0xb8, - 0xd8, 0xc0, 0xf6, 0x19, 0x4a, 0x30, 0x01, 0xc5, 0xb9, 0x8c, 0xd4, 0xb0, 0x38, 0x05, 0xd9, 0x20, - 0x3d, 0x30, 0x69, 0x18, 0x04, 0xd5, 0x85, 0xd3, 0x77, 0x30, 0x73, 0x8d, 0x24, 0x58, 0x48, 0x30, - 0xd7, 0x08, 0x6a, 0xae, 0x91, 0x54, 0x00, 0x17, 0x9b, 0x3b, 0xaa, 0x0d, 0xb8, 0xc2, 0xd5, 0x08, - 0xec, 0x72, 0x56, 0xa8, 0xb8, 0x11, 0x2e, 0x17, 0x49, 0x59, 0x40, 0x4d, 0x34, 0x22, 0xca, 0x44, - 0x84, 0x4e, 0x23, 0x27, 0x8d, 0x13, 0x0f, 0xe5, 0x18, 0x2e, 0x00, 0xf1, 0x0d, 0x20, 0x7e, 0xf0, - 0x50, 0x8e, 0xf1, 0x03, 0x10, 0xff, 0x00, 0xe2, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x80, 0x78, 0x03, - 0x10, 0xef, 0x00, 0x62, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0x14, 0xdb, 0x7e, 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 2e581365..00000000 --- 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 6e341553..00000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go +++ /dev/null @@ -1,768 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: unrecognizedgroup.proto -// DO NOT EDIT! - -/* -Package unrecognizedgroup is a generated protocol buffer package. - -It is generated from these files: - unrecognizedgroup.proto - -It has these top-level messages: - NewNoGroup - A - OldWithGroup -*/ -package unrecognizedgroup - -import testing "testing" -import math_rand "math/rand" -import time "time" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import go_parser "go/parser" -import proto "github.com/gogo/protobuf/proto" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNewNoGroupProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNewNoGroupMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - size := p.Size() - data := make([]byte, size) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(data) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroupProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldWithGroup_Group1Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldWithGroup_Group2Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(data)) - copy(littlefuzz, data) - for i := range data { - data[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNewNoGroupJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldWithGroupJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldWithGroup_Group1JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group1{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOldWithGroup_Group2JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group2{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNewNoGroupProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNewNoGroupProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &A{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroupProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroupProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group1ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group1ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group2ProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOldWithGroup_Group2ProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUnrecognizedgroupDescription(t *testing.T) { - UnrecognizedgroupDescription() -} -func TestNewNoGroupVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewNoGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NewNoGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldWithGroupVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldWithGroup_Group1VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group1(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup_Group1{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOldWithGroup_Group2VerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group2(popr, false) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup_Group2{} - if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNewNoGroupGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewNoGroup(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestAGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldWithGroupGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldWithGroup_Group1GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group1(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestOldWithGroup_Group2GoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group2(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestNewNoGroupSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - data, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(data) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNewNoGroupStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewNoGroup(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldWithGroupStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldWithGroup_Group1Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group1(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestOldWithGroup_Group2Stringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group2(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/uuid.go b/vendor/github.com/gogo/protobuf/test/uuid.go deleted file mode 100644 index ae349da4..00000000 --- a/vendor/github.com/gogo/protobuf/test/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/uuid_test.go b/vendor/github.com/gogo/protobuf/test/uuid_test.go deleted file mode 100644 index 5f3b7280..00000000 --- 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/vanity/command/command.go b/vendor/github.com/gogo/protobuf/vanity/command/command.go deleted file mode 100644 index fb91e59b..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/command/command.go +++ /dev/null @@ -1,152 +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 command - -import ( - "io/ioutil" - "os" - - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" - - _ "github.com/gogo/protobuf/protoc-gen-gogo/grpc" - - _ "github.com/gogo/protobuf/plugin/compare" - _ "github.com/gogo/protobuf/plugin/defaultcheck" - _ "github.com/gogo/protobuf/plugin/description" - _ "github.com/gogo/protobuf/plugin/embedcheck" - _ "github.com/gogo/protobuf/plugin/enumstringer" - _ "github.com/gogo/protobuf/plugin/equal" - _ "github.com/gogo/protobuf/plugin/face" - _ "github.com/gogo/protobuf/plugin/gostring" - _ "github.com/gogo/protobuf/plugin/marshalto" - _ "github.com/gogo/protobuf/plugin/oneofcheck" - _ "github.com/gogo/protobuf/plugin/populate" - _ "github.com/gogo/protobuf/plugin/size" - _ "github.com/gogo/protobuf/plugin/stringer" - _ "github.com/gogo/protobuf/plugin/union" - _ "github.com/gogo/protobuf/plugin/unmarshal" - - "github.com/gogo/protobuf/plugin/testgen" - - "go/format" - "strings" -) - -func Read() *plugin.CodeGeneratorRequest { - g := generator.New() - data, err := ioutil.ReadAll(os.Stdin) - if err != nil { - g.Error(err, "reading input") - } - - if err := proto.Unmarshal(data, g.Request); err != nil { - g.Error(err, "parsing input proto") - } - - if len(g.Request.FileToGenerate) == 0 { - g.Fail("no files to generate") - } - return g.Request -} - -func Generate(req *plugin.CodeGeneratorRequest) *plugin.CodeGeneratorResponse { - // Begin by allocating a generator. The request and response structures are stored there - // so we can do error handling easily - the response structure contains the field to - // report failure. - g := generator.New() - g.Request = req - - g.CommandLineParameters(g.Request.GetParameter()) - - // Create a wrapped version of the Descriptors and EnumDescriptors that - // point to the file that defines them. - g.WrapTypes() - - g.SetPackageNames() - g.BuildTypeNameMap() - - g.GenerateAllFiles() - - gtest := generator.New() - - data, err := proto.Marshal(req) - if err != nil { - g.Error(err, "failed to marshal modified proto") - } - if err := proto.Unmarshal(data, gtest.Request); err != nil { - g.Error(err, "parsing modified proto") - } - - if len(gtest.Request.FileToGenerate) == 0 { - gtest.Fail("no files to generate") - } - - gtest.CommandLineParameters(gtest.Request.GetParameter()) - - // Create a wrapped version of the Descriptors and EnumDescriptors that - // point to the file that defines them. - gtest.WrapTypes() - - gtest.SetPackageNames() - gtest.BuildTypeNameMap() - - gtest.GeneratePlugin(testgen.NewPlugin()) - - for i := 0; i < len(gtest.Response.File); i++ { - if strings.Contains(*gtest.Response.File[i].Content, `//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) { - gtest.Response.File[i].Name = proto.String(strings.Replace(*gtest.Response.File[i].Name, ".pb.go", "pb_test.go", -1)) - g.Response.File = append(g.Response.File, gtest.Response.File[i]) - } - } - - for i := 0; i < len(g.Response.File); i++ { - formatted, err := format.Source([]byte(g.Response.File[i].GetContent())) - if err != nil { - g.Error(err, "go format error") - } - fmts := string(formatted) - g.Response.File[i].Content = &fmts - } - return g.Response -} - -func Write(resp *plugin.CodeGeneratorResponse) { - g := generator.New() - // Send back the results. - data, err := proto.Marshal(resp) - if err != nil { - g.Error(err, "failed to marshal output proto") - } - _, err = os.Stdout.Write(data) - if err != nil { - g.Error(err, "failed to write output proto") - } -} diff --git a/vendor/github.com/gogo/protobuf/vanity/enum.go b/vendor/github.com/gogo/protobuf/vanity/enum.go deleted file mode 100644 index 466d07b5..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/enum.go +++ /dev/null @@ -1,78 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, The GoGo Authors. rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func EnumHasBoolExtension(enum *descriptor.EnumDescriptorProto, extension *proto.ExtensionDesc) bool { - if enum.Options == nil { - return false - } - value, err := proto.GetExtension(enum.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolEnumOption(extension *proto.ExtensionDesc, value bool) func(enum *descriptor.EnumDescriptorProto) { - return func(enum *descriptor.EnumDescriptorProto) { - if EnumHasBoolExtension(enum, extension) { - return - } - if enum.Options == nil { - enum.Options = &descriptor.EnumOptions{} - } - if err := proto.SetExtension(enum.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffGoEnumPrefix(enum *descriptor.EnumDescriptorProto) { - SetBoolEnumOption(gogoproto.E_GoprotoEnumPrefix, false)(enum) -} - -func TurnOffGoEnumStringer(enum *descriptor.EnumDescriptorProto) { - SetBoolEnumOption(gogoproto.E_GoprotoEnumStringer, false)(enum) -} - -func TurnOnEnumStringer(enum *descriptor.EnumDescriptorProto) { - SetBoolEnumOption(gogoproto.E_EnumStringer, true)(enum) -} diff --git a/vendor/github.com/gogo/protobuf/vanity/field.go b/vendor/github.com/gogo/protobuf/vanity/field.go deleted file mode 100644 index 9c5e2263..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/field.go +++ /dev/null @@ -1,83 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, The GoGo Authors. rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func FieldHasBoolExtension(field *descriptor.FieldDescriptorProto, extension *proto.ExtensionDesc) bool { - if field.Options == nil { - return false - } - value, err := proto.GetExtension(field.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolFieldOption(extension *proto.ExtensionDesc, value bool) func(field *descriptor.FieldDescriptorProto) { - return func(field *descriptor.FieldDescriptorProto) { - if FieldHasBoolExtension(field, extension) { - return - } - if field.Options == nil { - field.Options = &descriptor.FieldOptions{} - } - if err := proto.SetExtension(field.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffNullable(field *descriptor.FieldDescriptorProto) { - if field.IsRepeated() && !field.IsMessage() { - return - } - SetBoolFieldOption(gogoproto.E_Nullable, false)(field) -} - -func TurnOffNullableForNativeTypesWithoutDefaultsOnly(field *descriptor.FieldDescriptorProto) { - if field.IsRepeated() || field.IsMessage() { - return - } - if field.DefaultValue != nil { - return - } - SetBoolFieldOption(gogoproto.E_Nullable, false)(field) -} diff --git a/vendor/github.com/gogo/protobuf/vanity/file.go b/vendor/github.com/gogo/protobuf/vanity/file.go deleted file mode 100644 index cf58b151..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/file.go +++ /dev/null @@ -1,175 +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 vanity - -import ( - "strings" - - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func NotInPackageGoogleProtobuf(file *descriptor.FileDescriptorProto) bool { - return !strings.HasPrefix(file.GetPackage(), "google.protobuf") -} - -func FilterFiles(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto) bool) []*descriptor.FileDescriptorProto { - filtered := make([]*descriptor.FileDescriptorProto, 0, len(files)) - for i := range files { - if !f(files[i]) { - continue - } - filtered = append(filtered, files[i]) - } - return filtered -} - -func FileHasBoolExtension(file *descriptor.FileDescriptorProto, extension *proto.ExtensionDesc) bool { - if file.Options == nil { - return false - } - value, err := proto.GetExtension(file.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolFileOption(extension *proto.ExtensionDesc, value bool) func(file *descriptor.FileDescriptorProto) { - return func(file *descriptor.FileDescriptorProto) { - if FileHasBoolExtension(file, extension) { - return - } - if file.Options == nil { - file.Options = &descriptor.FileOptions{} - } - if err := proto.SetExtension(file.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffGoGettersAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoGettersAll, false)(file) -} - -func TurnOffGoEnumPrefixAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoEnumPrefixAll, false)(file) -} - -func TurnOffGoStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoStringerAll, false)(file) -} - -func TurnOnVerboseEqualAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_VerboseEqualAll, true)(file) -} - -func TurnOnFaceAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_FaceAll, true)(file) -} - -func TurnOnGoStringAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GostringAll, true)(file) -} - -func TurnOnPopulateAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_PopulateAll, true)(file) -} - -func TurnOnStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_StringerAll, true)(file) -} - -func TurnOnEqualAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_EqualAll, true)(file) -} - -func TurnOnDescriptionAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_DescriptionAll, true)(file) -} - -func TurnOnTestGenAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_TestgenAll, true)(file) -} - -func TurnOnBenchGenAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_BenchgenAll, true)(file) -} - -func TurnOnMarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_MarshalerAll, true)(file) -} - -func TurnOnUnmarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_UnmarshalerAll, true)(file) -} - -func TurnOnStable_MarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_StableMarshalerAll, true)(file) -} - -func TurnOnSizerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_SizerAll, true)(file) -} - -func TurnOffGoEnumStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoEnumStringerAll, false)(file) -} - -func TurnOnEnumStringerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_EnumStringerAll, true)(file) -} - -func TurnOnUnsafeUnmarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_UnsafeUnmarshalerAll, true)(file) -} - -func TurnOnUnsafeMarshalerAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_UnsafeMarshalerAll, true)(file) -} - -func TurnOffGoExtensionsMapAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoExtensionsMapAll, false)(file) -} - -func TurnOffGoUnrecognizedAll(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GoprotoUnrecognizedAll, false)(file) -} - -func TurnOffGogoImport(file *descriptor.FileDescriptorProto) { - SetBoolFileOption(gogoproto.E_GogoprotoImport, false)(file) -} diff --git a/vendor/github.com/gogo/protobuf/vanity/foreach.go b/vendor/github.com/gogo/protobuf/vanity/foreach.go deleted file mode 100644 index 888b6d04..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/foreach.go +++ /dev/null @@ -1,125 +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 vanity - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -func ForEachFile(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto)) { - for _, file := range files { - f(file) - } -} - -func OnlyProto2(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { - outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) - for i, file := range files { - if file.GetSyntax() == "proto3" { - continue - } - outs = append(outs, files[i]) - } - return outs -} - -func OnlyProto3(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { - outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) - for i, file := range files { - if file.GetSyntax() != "proto3" { - continue - } - outs = append(outs, files[i]) - } - return outs -} - -func ForEachMessageInFiles(files []*descriptor.FileDescriptorProto, f func(msg *descriptor.DescriptorProto)) { - for _, file := range files { - ForEachMessage(file.MessageType, f) - } -} - -func ForEachMessage(msgs []*descriptor.DescriptorProto, f func(msg *descriptor.DescriptorProto)) { - for _, msg := range msgs { - f(msg) - ForEachMessage(msg.NestedType, f) - } -} - -func ForEachFieldInFilesExcludingExtensions(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, file := range files { - ForEachFieldExcludingExtensions(file.MessageType, f) - } -} - -func ForEachFieldInFiles(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, file := range files { - for _, ext := range file.Extension { - f(ext) - } - ForEachField(file.MessageType, f) - } -} - -func ForEachFieldExcludingExtensions(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, msg := range msgs { - for _, field := range msg.Field { - f(field) - } - ForEachField(msg.NestedType, f) - } -} - -func ForEachField(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { - for _, msg := range msgs { - for _, field := range msg.Field { - f(field) - } - for _, ext := range msg.Extension { - f(ext) - } - ForEachField(msg.NestedType, f) - } -} - -func ForEachEnumInFiles(files []*descriptor.FileDescriptorProto, f func(enum *descriptor.EnumDescriptorProto)) { - for _, file := range files { - for _, enum := range file.EnumType { - f(enum) - } - } -} - -func ForEachEnum(msgs []*descriptor.DescriptorProto, f func(field *descriptor.EnumDescriptorProto)) { - for _, msg := range msgs { - for _, field := range msg.EnumType { - f(field) - } - ForEachEnum(msg.NestedType, f) - } -} diff --git a/vendor/github.com/gogo/protobuf/vanity/msg.go b/vendor/github.com/gogo/protobuf/vanity/msg.go deleted file mode 100644 index 7f2c7ecc..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/msg.go +++ /dev/null @@ -1,138 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, The GoGo Authors. rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package vanity - -import ( - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func MessageHasBoolExtension(msg *descriptor.DescriptorProto, extension *proto.ExtensionDesc) bool { - if msg.Options == nil { - return false - } - value, err := proto.GetExtension(msg.Options, extension) - if err != nil { - return false - } - if value == nil { - return false - } - if value.(*bool) == nil { - return false - } - return true -} - -func SetBoolMessageOption(extension *proto.ExtensionDesc, value bool) func(msg *descriptor.DescriptorProto) { - return func(msg *descriptor.DescriptorProto) { - if MessageHasBoolExtension(msg, extension) { - return - } - if msg.Options == nil { - msg.Options = &descriptor.MessageOptions{} - } - if err := proto.SetExtension(msg.Options, extension, &value); err != nil { - panic(err) - } - } -} - -func TurnOffGoGetters(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoGetters, false)(msg) -} - -func TurnOffGoStringer(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoStringer, false)(msg) -} - -func TurnOnVerboseEqual(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_VerboseEqual, true)(msg) -} - -func TurnOnFace(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Face, true)(msg) -} - -func TurnOnGoString(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Face, true)(msg) -} - -func TurnOnPopulate(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Populate, true)(msg) -} - -func TurnOnStringer(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Stringer, true)(msg) -} - -func TurnOnEqual(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Equal, true)(msg) -} - -func TurnOnDescription(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Description, true)(msg) -} - -func TurnOnTestGen(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Testgen, true)(msg) -} - -func TurnOnBenchGen(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Benchgen, true)(msg) -} - -func TurnOnMarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Marshaler, true)(msg) -} - -func TurnOnUnmarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Unmarshaler, true)(msg) -} - -func TurnOnSizer(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_Sizer, true)(msg) -} - -func TurnOnUnsafeUnmarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_UnsafeUnmarshaler, true)(msg) -} - -func TurnOnUnsafeMarshaler(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_UnsafeMarshaler, true)(msg) -} - -func TurnOffGoExtensionsMap(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoExtensionsMap, false)(msg) -} - -func TurnOffGoUnrecognized(msg *descriptor.DescriptorProto) { - SetBoolMessageOption(gogoproto.E_GoprotoUnrecognized, false)(msg) -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/Makefile b/vendor/github.com/gogo/protobuf/vanity/test/Makefile deleted file mode 100644 index 0958c4a9..00000000 --- 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 56e54040..00000000 --- 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/fast/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go deleted file mode 100644 index e496baf7..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go +++ /dev/null @@ -1,408 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: gogovanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - gogovanity.proto - - It has these top-level messages: - B -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 B struct { - String_ *string `protobuf:"bytes,1,opt,name=String,json=string" json:"String,omitempty"` - Int64 *int64 `protobuf:"varint,2,opt,name=Int64,json=int64" json:"Int64,omitempty"` - Int32 *int32 `protobuf:"varint,3,opt,name=Int32,json=int32,def=1234" json:"Int32,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *B) Reset() { *m = B{} } -func (m *B) String() string { return proto.CompactTextString(m) } -func (*B) ProtoMessage() {} -func (*B) Descriptor() ([]byte, []int) { return fileDescriptorGogovanity, []int{0} } - -const Default_B_Int32 int32 = 1234 - -func (m *B) GetString_() string { - if m != nil && m.String_ != nil { - return *m.String_ - } - return "" -} - -func (m *B) GetInt64() int64 { - if m != nil && m.Int64 != nil { - return *m.Int64 - } - return 0 -} - -func (m *B) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return Default_B_Int32 -} - -func init() { - proto.RegisterType((*B)(nil), "vanity.B") -} -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.String_ != nil { - data[i] = 0xa - i++ - i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - if m.Int64 != nil { - data[i] = 0x10 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int64)) - } - if m.Int32 != nil { - data[i] = 0x18 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Gogovanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Gogovanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGogovanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *B) Size() (n int) { - var l int - _ = l - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovGogovanity(uint64(l)) - } - if m.Int64 != nil { - n += 1 + sovGogovanity(uint64(*m.Int64)) - } - if m.Int32 != nil { - n += 1 + sovGogovanity(uint64(*m.Int32)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovGogovanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGogovanity(x uint64) (n int) { - return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogovanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int64 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipGogovanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGogovanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGogovanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGogovanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("gogovanity.proto", fileDescriptorGogovanity) } - -var fileDescriptorGogovanity = []byte{ - // 157 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, - 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, - 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, - 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x05, 0x73, 0x31, - 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, - 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0xc4, 0x56, 0x0c, 0x16, 0x13, 0x12, 0xe1, 0x62, - 0xf5, 0xcc, 0x2b, 0x31, 0x33, 0x91, 0x60, 0x02, 0x4a, 0x32, 0x07, 0xb1, 0x66, 0x82, 0x38, 0x42, - 0x52, 0x60, 0x51, 0x63, 0x23, 0x09, 0x66, 0xa0, 0x28, 0xab, 0x15, 0x8b, 0xa1, 0x91, 0xb1, 0x09, - 0x58, 0xce, 0xd8, 0xc8, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x40, 0xfc, 0x00, 0x88, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x7b, 0xe6, 0xd9, 0xac, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go deleted file mode 100644 index 95a46d2d..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go +++ /dev/null @@ -1,312 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3.proto -// DO NOT EDIT! - -/* -Package vanity is a generated protocol buffer package. - -It is generated from these files: - proto3.proto - -It has these top-level messages: - Aproto3 -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 Aproto3 struct { - B string `protobuf:"bytes,1,opt,name=B,json=b,proto3" json:"B,omitempty"` -} - -func (m *Aproto3) Reset() { *m = Aproto3{} } -func (m *Aproto3) String() string { return proto.CompactTextString(m) } -func (*Aproto3) ProtoMessage() {} -func (*Aproto3) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } - -func init() { - proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") -} -func (m *Aproto3) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Aproto3) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - data[i] = 0xa - i++ - i = encodeVarintProto3(data, i, uint64(len(m.B))) - i += copy(data[i:], m.B) - } - return i, nil -} - -func encodeFixed64Proto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Proto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintProto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Aproto3) Size() (n int) { - var l int - _ = l - l = len(m.B) - if l > 0 { - n += 1 + l + sovProto3(uint64(l)) - } - return n -} - -func sovProto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProto3(x uint64) (n int) { - return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Aproto3) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aproto3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("proto3.proto", fileDescriptorProto3) } - -var fileDescriptorProto3 = []byte{ - // 79 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, - 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, - 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, - 0xc6, 0x24, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x00, 0xf1, 0x03, 0x20, 0x4e, 0x62, 0x83, - 0xa8, 0x01, 0x04, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x14, 0x77, 0x86, 0x45, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go deleted file mode 100644 index 0798c374..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go +++ /dev/null @@ -1,375 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: vanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - vanity.proto - - It has these top-level messages: - A -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 { - Strings *string `protobuf:"bytes,1,opt,name=Strings,json=strings" json:"Strings,omitempty"` - Int *int64 `protobuf:"varint,2,req,name=Int,json=int" json:"Int,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *A) Reset() { *m = A{} } -func (m *A) String() string { return proto.CompactTextString(m) } -func (*A) ProtoMessage() {} -func (*A) Descriptor() ([]byte, []int) { return fileDescriptorVanity, []int{0} } - -func (m *A) GetStrings() string { - if m != nil && m.Strings != nil { - return *m.Strings - } - return "" -} - -func (m *A) GetInt() int64 { - if m != nil && m.Int != nil { - return *m.Int - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "vanity.A") -} -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Strings != nil { - data[i] = 0xa - i++ - i = encodeVarintVanity(data, i, uint64(len(*m.Strings))) - i += copy(data[i:], *m.Strings) - } - if m.Int == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } else { - data[i] = 0x10 - i++ - i = encodeVarintVanity(data, i, uint64(*m.Int)) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Vanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Vanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintVanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *A) Size() (n int) { - var l int - _ = l - if m.Strings != nil { - l = len(*m.Strings) - n += 1 + l + sovVanity(uint64(l)) - } - if m.Int != nil { - n += 1 + sovVanity(uint64(*m.Int)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovVanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozVanity(x uint64) (n int) { - return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *A) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.Strings = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int = &v - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipVanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthVanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("vanity.proto", fileDescriptorVanity) } - -var fileDescriptorVanity = []byte{ - // 98 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, - 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xf4, 0xb9, 0x18, - 0x1d, 0x85, 0x24, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, - 0x35, 0x38, 0x83, 0xd8, 0x8b, 0x21, 0x5c, 0x21, 0x01, 0x2e, 0x66, 0xcf, 0xbc, 0x12, 0x09, 0x26, - 0x05, 0x26, 0x0d, 0xe6, 0x20, 0xe6, 0xcc, 0xbc, 0x12, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, - 0x00, 0xf1, 0x03, 0x20, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x16, 0x19, 0x2a, 0x55, 0x00, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go deleted file mode 100644 index 6c5f5f93..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go +++ /dev/null @@ -1,396 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: gogovanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - gogovanity.proto - - It has these top-level messages: - B -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 B struct { - String_ *string `protobuf:"bytes,1,opt,name=String,json=string" json:"String,omitempty"` - Int64 int64 `protobuf:"varint,2,opt,name=Int64,json=int64" json:"Int64"` - Int32 *int32 `protobuf:"varint,3,opt,name=Int32,json=int32,def=1234" json:"Int32,omitempty"` -} - -func (m *B) Reset() { *m = B{} } -func (m *B) String() string { return proto.CompactTextString(m) } -func (*B) ProtoMessage() {} -func (*B) Descriptor() ([]byte, []int) { return fileDescriptorGogovanity, []int{0} } - -const Default_B_Int32 int32 = 1234 - -func (m *B) GetString_() string { - if m != nil && m.String_ != nil { - return *m.String_ - } - return "" -} - -func (m *B) GetInt64() int64 { - if m != nil { - return m.Int64 - } - return 0 -} - -func (m *B) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return Default_B_Int32 -} - -func init() { - proto.RegisterType((*B)(nil), "vanity.B") -} -func (m *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.String_ != nil { - data[i] = 0xa - i++ - i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - data[i] = 0x10 - i++ - i = encodeVarintGogovanity(data, i, uint64(m.Int64)) - if m.Int32 != nil { - data[i] = 0x18 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) - } - return i, nil -} - -func encodeFixed64Gogovanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Gogovanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGogovanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *B) Size() (n int) { - var l int - _ = l - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovGogovanity(uint64(l)) - } - n += 1 + sovGogovanity(uint64(m.Int64)) - if m.Int32 != nil { - n += 1 + sovGogovanity(uint64(*m.Int32)) - } - return n -} - -func sovGogovanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGogovanity(x uint64) (n int) { - return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogovanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - m.Int64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int64 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipGogovanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGogovanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGogovanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGogovanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("gogovanity.proto", fileDescriptorGogovanity) } - -var fileDescriptorGogovanity = []byte{ - // 162 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, - 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, - 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, - 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, - 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, - 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0xc4, 0x56, 0x0c, 0x16, 0x13, 0x92, 0xe2, 0x62, - 0xf5, 0xcc, 0x2b, 0x31, 0x33, 0x91, 0x60, 0x02, 0x4a, 0x32, 0x83, 0x25, 0x19, 0x82, 0x58, 0x33, - 0x41, 0x42, 0x50, 0x39, 0x63, 0x23, 0x09, 0x66, 0xa0, 0x1c, 0xab, 0x15, 0x8b, 0xa1, 0x91, 0xb1, - 0x09, 0x58, 0xce, 0xd8, 0xc8, 0x49, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x40, 0xfc, 0x00, 0x88, - 0x27, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xdf, 0x35, 0x69, 0xb6, 0x00, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go deleted file mode 100644 index 0d4ad53e..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3.proto -// DO NOT EDIT! - -/* -Package vanity is a generated protocol buffer package. - -It is generated from these files: - proto3.proto - -It has these top-level messages: - Aproto3 -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 Aproto3 struct { - B string `protobuf:"bytes,1,opt,name=B,json=b,proto3" json:"B,omitempty"` -} - -func (m *Aproto3) Reset() { *m = Aproto3{} } -func (m *Aproto3) String() string { return proto.CompactTextString(m) } -func (*Aproto3) ProtoMessage() {} -func (*Aproto3) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } - -func init() { - proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") -} -func (m *Aproto3) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Aproto3) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - data[i] = 0xa - i++ - i = encodeVarintProto3(data, i, uint64(len(m.B))) - i += copy(data[i:], m.B) - } - return i, nil -} - -func encodeFixed64Proto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Proto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintProto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Aproto3) Size() (n int) { - var l int - _ = l - l = len(m.B) - if l > 0 { - n += 1 + l + sovProto3(uint64(l)) - } - return n -} - -func sovProto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProto3(x uint64) (n int) { - return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Aproto3) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aproto3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("proto3.proto", fileDescriptorProto3) } - -var fileDescriptorProto3 = []byte{ - // 83 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, - 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, - 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, - 0xc6, 0x24, 0x27, 0x81, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x00, 0xf1, 0x03, 0x20, 0x9e, 0xf0, 0x58, - 0x8e, 0x21, 0x89, 0x0d, 0xa2, 0x0e, 0x10, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x77, 0x4a, 0x7c, 0x49, - 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go deleted file mode 100644 index 9474ee73..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go +++ /dev/null @@ -1,354 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: vanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - vanity.proto - - It has these top-level messages: - A -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 { - Strings string `protobuf:"bytes,1,opt,name=Strings,json=strings" json:"Strings"` - Int int64 `protobuf:"varint,2,req,name=Int,json=int" json:"Int"` -} - -func (m *A) Reset() { *m = A{} } -func (m *A) String() string { return proto.CompactTextString(m) } -func (*A) ProtoMessage() {} -func (*A) Descriptor() ([]byte, []int) { return fileDescriptorVanity, []int{0} } - -func (m *A) GetStrings() string { - if m != nil { - return m.Strings - } - return "" -} - -func (m *A) GetInt() int64 { - if m != nil { - return m.Int - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "vanity.A") -} -func (m *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintVanity(data, i, uint64(len(m.Strings))) - i += copy(data[i:], m.Strings) - data[i] = 0x10 - i++ - i = encodeVarintVanity(data, i, uint64(m.Int)) - return i, nil -} - -func encodeFixed64Vanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Vanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintVanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *A) Size() (n int) { - var l int - _ = l - l = len(m.Strings) - n += 1 + l + sovVanity(uint64(l)) - n += 1 + sovVanity(uint64(m.Int)) - return n -} - -func sovVanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozVanity(x uint64) (n int) { - return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *A) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Strings = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) - } - m.Int = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipVanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthVanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("vanity.proto", fileDescriptorVanity) } - -var fileDescriptorVanity = []byte{ - // 110 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, - 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, - 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, - 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x62, 0x2f, 0x86, 0x08, 0x0a, 0x89, 0x71, - 0x31, 0x7b, 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x98, 0x33, 0xf3, 0x4a, - 0x9c, 0x04, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0x00, 0xc4, 0x0f, 0x80, 0x78, 0xc2, 0x63, 0x39, 0x06, - 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x96, 0x94, 0xc6, 0x65, 0x00, 0x00, 0x00, -} 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 9b0b440d..00000000 --- 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 b0f9279a..00000000 --- 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 aa2f4ac5..00000000 --- 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/slick/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go deleted file mode 100644 index e4b5a6b2..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go +++ /dev/null @@ -1,512 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: gogovanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - gogovanity.proto - - It has these top-level messages: - B -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 B struct { - String_ *string `protobuf:"bytes,1,opt,name=String,json=string" json:"String,omitempty"` - Int64 int64 `protobuf:"varint,2,opt,name=Int64,json=int64" json:"Int64"` - Int32 *int32 `protobuf:"varint,3,opt,name=Int32,json=int32,def=1234" json:"Int32,omitempty"` -} - -func (m *B) Reset() { *m = B{} } -func (*B) ProtoMessage() {} -func (*B) Descriptor() ([]byte, []int) { return fileDescriptorGogovanity, []int{0} } - -const Default_B_Int32 int32 = 1234 - -func (m *B) GetString_() string { - if m != nil && m.String_ != nil { - return *m.String_ - } - return "" -} - -func (m *B) GetInt64() int64 { - if m != nil { - return m.Int64 - } - return 0 -} - -func (m *B) GetInt32() int32 { - if m != nil && m.Int32 != nil { - return *m.Int32 - } - return Default_B_Int32 -} - -func init() { - proto.RegisterType((*B)(nil), "vanity.B") -} -func (this *B) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return false - } - } else if this.String_ != nil { - return false - } else if that1.String_ != nil { - return false - } - if this.Int64 != that1.Int64 { - return false - } - if this.Int32 != nil && that1.Int32 != nil { - if *this.Int32 != *that1.Int32 { - return false - } - } else if this.Int32 != nil { - return false - } else if that1.Int32 != nil { - return false - } - return true -} -func (this *B) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&vanity.B{") - if this.String_ != nil { - s = append(s, "String_: "+valueToGoStringGogovanity(this.String_, "string")+",\n") - } - s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") - if this.Int32 != nil { - s = append(s, "Int32: "+valueToGoStringGogovanity(this.Int32, "int32")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringGogovanity(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringGogovanity(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *B) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *B) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.String_ != nil { - data[i] = 0xa - i++ - i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) - i += copy(data[i:], *m.String_) - } - data[i] = 0x10 - i++ - i = encodeVarintGogovanity(data, i, uint64(m.Int64)) - if m.Int32 != nil { - data[i] = 0x18 - i++ - i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) - } - return i, nil -} - -func encodeFixed64Gogovanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Gogovanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGogovanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *B) Size() (n int) { - var l int - _ = l - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovGogovanity(uint64(l)) - } - n += 1 + sovGogovanity(uint64(m.Int64)) - if m.Int32 != nil { - n += 1 + sovGogovanity(uint64(*m.Int32)) - } - return n -} - -func sovGogovanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGogovanity(x uint64) (n int) { - return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *B) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&B{`, - `String_:` + valueToStringGogovanity(this.String_) + `,`, - `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, - `Int32:` + valueToStringGogovanity(this.Int32) + `,`, - `}`, - }, "") - return s -} -func valueToStringGogovanity(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *B) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogovanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) - } - m.Int64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int64 |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogovanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Int32 = &v - default: - iNdEx = preIndex - skippy, err := skipGogovanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGogovanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGogovanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogovanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGogovanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("gogovanity.proto", fileDescriptorGogovanity) } - -var fileDescriptorGogovanity = []byte{ - // 184 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, - 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, - 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, - 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, - 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, - 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0xc4, 0x56, 0x0c, 0x16, 0x13, 0x92, 0xe2, 0x62, - 0xf5, 0xcc, 0x2b, 0x31, 0x33, 0x91, 0x60, 0x02, 0x4a, 0x32, 0x83, 0x25, 0x19, 0x82, 0x58, 0x33, - 0x41, 0x42, 0x50, 0x39, 0x63, 0x23, 0x09, 0x66, 0xa0, 0x1c, 0xab, 0x15, 0x8b, 0xa1, 0x91, 0xb1, - 0x09, 0x58, 0xce, 0xd8, 0xc8, 0x49, 0xe7, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x40, 0xfc, 0xe1, 0xa1, - 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x40, 0x7c, 0x02, 0x88, 0x2f, 0x00, 0xf1, 0x03, 0x20, - 0x7e, 0xf1, 0x08, 0x28, 0x07, 0xa4, 0x27, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, - 0x07, 0xdc, 0x7b, 0x6e, 0xd2, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go deleted file mode 100644 index fd3a033f..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go +++ /dev/null @@ -1,403 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: proto3.proto -// DO NOT EDIT! - -/* -Package vanity is a generated protocol buffer package. - -It is generated from these files: - proto3.proto - -It has these top-level messages: - Aproto3 -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 Aproto3 struct { - B string `protobuf:"bytes,1,opt,name=B,json=b,proto3" json:"B,omitempty"` -} - -func (m *Aproto3) Reset() { *m = Aproto3{} } -func (*Aproto3) ProtoMessage() {} -func (*Aproto3) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } - -func init() { - proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") -} -func (this *Aproto3) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Aproto3) - if !ok { - that2, ok := that.(Aproto3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.B != that1.B { - return false - } - return true -} -func (this *Aproto3) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&vanity.Aproto3{") - s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringProto3(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringProto3(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *Aproto3) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Aproto3) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.B) > 0 { - data[i] = 0xa - i++ - i = encodeVarintProto3(data, i, uint64(len(m.B))) - i += copy(data[i:], m.B) - } - return i, nil -} - -func encodeFixed64Proto3(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Proto3(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintProto3(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Aproto3) Size() (n int) { - var l int - _ = l - l = len(m.B) - if l > 0 { - n += 1 + l + sovProto3(uint64(l)) - } - return n -} - -func sovProto3(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProto3(x uint64) (n int) { - return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Aproto3) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Aproto3{`, - `B:` + fmt.Sprintf("%v", this.B) + `,`, - `}`, - }, "") - return s -} -func valueToStringProto3(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Aproto3) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aproto3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto3 - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.B = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto3(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProto3(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthProto3 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProto3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProto3(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("proto3.proto", fileDescriptorProto3) } - -var fileDescriptorProto3 = []byte{ - // 105 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, - 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, - 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, - 0xc6, 0x24, 0x27, 0x9d, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x00, 0xf1, 0x87, 0x87, 0x72, 0x8c, 0x0d, - 0x8f, 0xe4, 0x18, 0x57, 0x00, 0xf1, 0x09, 0x20, 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0xf8, 0xc5, 0x23, - 0xa0, 0x1c, 0x90, 0x9e, 0xf0, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0x62, 0x06, 0x20, 0x00, 0x00, 0xff, - 0xff, 0x37, 0xd7, 0x45, 0xf0, 0x65, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go deleted file mode 100644 index c880f6e7..00000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go +++ /dev/null @@ -1,449 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: vanity.proto -// DO NOT EDIT! - -/* - Package vanity is a generated protocol buffer package. - - It is generated from these files: - vanity.proto - - It has these top-level messages: - A -*/ -package vanity - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import sort "sort" -import strconv "strconv" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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 { - Strings string `protobuf:"bytes,1,opt,name=Strings,json=strings" json:"Strings"` - Int int64 `protobuf:"varint,2,req,name=Int,json=int" json:"Int"` -} - -func (m *A) Reset() { *m = A{} } -func (*A) ProtoMessage() {} -func (*A) Descriptor() ([]byte, []int) { return fileDescriptorVanity, []int{0} } - -func (m *A) GetStrings() string { - if m != nil { - return m.Strings - } - return "" -} - -func (m *A) GetInt() int64 { - if m != nil { - return m.Int - } - return 0 -} - -func init() { - proto.RegisterType((*A)(nil), "vanity.A") -} -func (this *A) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Strings != that1.Strings { - return false - } - if this.Int != that1.Int { - return false - } - return true -} -func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&vanity.A{") - s = append(s, "Strings: "+fmt.Sprintf("%#v", this.Strings)+",\n") - s = append(s, "Int: "+fmt.Sprintf("%#v", this.Int)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringVanity(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringVanity(m github_com_gogo_protobuf_proto.Message) string { - e := github_com_gogo_protobuf_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 *A) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *A) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintVanity(data, i, uint64(len(m.Strings))) - i += copy(data[i:], m.Strings) - data[i] = 0x10 - i++ - i = encodeVarintVanity(data, i, uint64(m.Int)) - return i, nil -} - -func encodeFixed64Vanity(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Vanity(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintVanity(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *A) Size() (n int) { - var l int - _ = l - l = len(m.Strings) - n += 1 + l + sovVanity(uint64(l)) - n += 1 + sovVanity(uint64(m.Int)) - return n -} - -func sovVanity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozVanity(x uint64) (n int) { - return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, - `Int:` + fmt.Sprintf("%v", this.Int) + `,`, - `}`, - }, "") - return s -} -func valueToStringVanity(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *A) Unmarshal(data []byte) error { - var hasFields [1]uint64 - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVanity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Strings = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) - } - m.Int = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVanity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Int |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipVanity(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVanity(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthVanity - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVanity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVanity(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("vanity.proto", fileDescriptorVanity) } - -var fileDescriptorVanity = []byte{ - // 132 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, - 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, - 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, - 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x62, 0x2f, 0x86, 0x08, 0x0a, 0x89, 0x71, - 0x31, 0x7b, 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x98, 0x33, 0xf3, 0x4a, - 0x9c, 0x74, 0x2e, 0x3c, 0x94, 0x63, 0xb8, 0x01, 0xc4, 0x1f, 0x1e, 0xca, 0x31, 0x36, 0x3c, 0x92, - 0x63, 0x5c, 0x01, 0xc4, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0xe2, 0x17, 0x8f, 0x80, 0x72, - 0x40, 0x7a, 0xc2, 0x63, 0x39, 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0xf3, 0x18, 0x78, - 0x81, 0x00, 0x00, 0x00, -} 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 c21750bc..00000000 --- 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 a0e5b824..00000000 --- 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/gogo/protobuf/version/version.go b/vendor/github.com/gogo/protobuf/version/version.go deleted file mode 100644 index 461e9903..00000000 --- a/vendor/github.com/gogo/protobuf/version/version.go +++ /dev/null @@ -1,78 +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 version - -import ( - "fmt" - "os/exec" - "strconv" - "strings" -) - -func Get() string { - versionBytes, _ := exec.Command("protoc", "--version").CombinedOutput() - version := strings.TrimSpace(string(versionBytes)) - versions := strings.Split(version, " ") - if len(versions) != 2 { - panic("version string returned from protoc is seperated with a space: " + version) - } - return versions[1] -} - -func parseVersion(version string) (int, error) { - versions := strings.Split(version, ".") - if len(versions) != 3 { - return 0, fmt.Errorf("version does not have 3 numbers seperated by dots: %s", version) - } - n := 0 - for _, v := range versions { - i, err := strconv.Atoi(v) - if err != nil { - return 0, err - } - n = n*10 + i - } - return n, nil -} - -func less(this, that string) bool { - thisNum, err := parseVersion(this) - if err != nil { - panic(err) - } - thatNum, err := parseVersion(that) - if err != nil { - panic(err) - } - return thisNum <= thatNum -} - -func AtLeast(v string) bool { - return less(v, Get()) -} diff --git a/vendor/github.com/golang/protobuf/.gitignore b/vendor/github.com/golang/protobuf/.gitignore deleted file mode 100644 index 8f5b596b..00000000 --- a/vendor/github.com/golang/protobuf/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.DS_Store -*.[568ao] -*.ao -*.so -*.pyc -._* -.nfs.* -[568a].out -*~ -*.orig -core -_obj -_test -_testmain.go -protoc-gen-go/testdata/multi/*.pb.go -_conformance/_conformance diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE index 1b1b1921..0f646931 100644 --- a/vendor/github.com/golang/protobuf/LICENSE +++ b/vendor/github.com/golang/protobuf/LICENSE @@ -1,7 +1,4 @@ -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 diff --git a/vendor/github.com/golang/protobuf/Make.protobuf b/vendor/github.com/golang/protobuf/Make.protobuf deleted file mode 100644 index 15071de1..00000000 --- a/vendor/github.com/golang/protobuf/Make.protobuf +++ /dev/null @@ -1,40 +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. - -# Includable Makefile to add a rule for generating .pb.go files from .proto files -# (Google protocol buffer descriptions). -# Typical use if myproto.proto is a file in package mypackage in this directory: -# -# include $(GOROOT)/src/pkg/github.com/golang/protobuf/Make.protobuf - -%.pb.go: %.proto - protoc --go_out=. $< - diff --git a/vendor/github.com/golang/protobuf/Makefile b/vendor/github.com/golang/protobuf/Makefile deleted file mode 100644 index a1421d8b..00000000 --- a/vendor/github.com/golang/protobuf/Makefile +++ /dev/null @@ -1,55 +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: install - -install: - go install ./proto ./jsonpb ./ptypes - go install ./protoc-gen-go - -test: - go test ./proto ./jsonpb ./ptypes - make -C protoc-gen-go/testdata test - -clean: - go clean ./... - -nuke: - go clean -i ./... - -regenerate: - make -C protoc-gen-go/descriptor regenerate - make -C protoc-gen-go/plugin regenerate - make -C protoc-gen-go/testdata regenerate - make -C proto/testdata regenerate - make -C jsonpb/jsonpb_test_proto regenerate - make -C _conformance regenerate diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md deleted file mode 100644 index 037fc7c8..00000000 --- a/vendor/github.com/golang/protobuf/README.md +++ /dev/null @@ -1,241 +0,0 @@ -# Go support for Protocol Buffers - -Google's data interchange format. -Copyright 2010 The Go Authors. -https://github.com/golang/protobuf - -This package and the code it generates requires at least Go 1.4. - -This software implements Go bindings for protocol buffers. For -information about protocol buffers themselves, see - https://developers.google.com/protocol-buffers/ - -## Installation ## - -To use this software, you must: -- Install the standard C++ implementation of protocol buffers from - https://developers.google.com/protocol-buffers/ -- Of course, install the Go compiler and tools from - https://golang.org/ - See - https://golang.org/doc/install - for details or, if you are using gccgo, follow the instructions at - https://golang.org/doc/install/gccgo -- Grab the code from the repository and install the proto package. - The simplest way is to run `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`. - The compiler plugin, protoc-gen-go, will be installed in $GOBIN, - defaulting to $GOPATH/bin. It must be in your $PATH for the protocol - compiler, protoc, to find it. - -This software has two parts: a 'protocol compiler plugin' that -generates Go source files that, once compiled, can access and manage -protocol buffers; and a library that implements run-time support for -encoding (marshaling), decoding (unmarshaling), and accessing protocol -buffers. - -There is support for gRPC in Go using protocol buffers. -See the note at the bottom of this file for details. - -There are no insertion points in the plugin. - - -## 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 --go_out -parameter set to the directory you want to output the Go code to. - - protoc --go_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. - -========== - -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. - - Getters are only generated for message and oneof fields. - - Enum types do not get an Enum method. - -Consider file test.proto, containing - -```proto - 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/golang/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 --go_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 --go_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. - -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/golang/protobuf/_conformance/Makefile b/vendor/github.com/golang/protobuf/_conformance/Makefile deleted file mode 100644 index 89800e2d..00000000 --- a/vendor/github.com/golang/protobuf/_conformance/Makefile +++ /dev/null @@ -1,33 +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 --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers,Mgoogle/protobuf/field_mask.proto=google.golang.org/genproto/protobuf:. conformance_proto/conformance.proto diff --git a/vendor/github.com/golang/protobuf/_conformance/conformance.go b/vendor/github.com/golang/protobuf/_conformance/conformance.go deleted file mode 100644 index c54212c8..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/_conformance/conformance_proto" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/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/golang/protobuf/_conformance/conformance_proto/conformance.pb.go b/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go deleted file mode 100644 index 2caf992c..00000000 --- a/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go +++ /dev/null @@ -1,1472 +0,0 @@ -// Code generated by protoc-gen-go. -// source: conformance_proto/conformance.proto -// DO NOT EDIT! - -/* -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/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/any" -import google_protobuf1 "github.com/golang/protobuf/ptypes/duration" -import google_protobuf2 "google.golang.org/genproto/protobuf" -import google_protobuf3 "github.com/golang/protobuf/ptypes/struct" -import google_protobuf4 "github.com/golang/protobuf/ptypes/timestamp" -import google_protobuf5 "github.com/golang/protobuf/ptypes/wrappers" - -// 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 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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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,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 fileDescriptor0, []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,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 "" -} - -// 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 fileDescriptor0, []int{1} } - -type isConformanceResponse_Result interface { - isConformanceResponse_Result() -} - -type ConformanceResponse_ParseError struct { - ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,oneof"` -} -type ConformanceResponse_SerializeError struct { - SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,oneof"` -} -type ConformanceResponse_RuntimeError struct { - RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,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,oneof"` -} -type ConformanceResponse_Skipped struct { - Skipped string `protobuf:"bytes,5,opt,name=skipped,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" json:"optional_int32,omitempty"` - OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64" json:"optional_int64,omitempty"` - OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32" json:"optional_uint32,omitempty"` - OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64" json:"optional_uint64,omitempty"` - OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32" json:"optional_sint32,omitempty"` - OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64" json:"optional_sint64,omitempty"` - OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32" json:"optional_fixed32,omitempty"` - OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64" json:"optional_fixed64,omitempty"` - OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32" json:"optional_sfixed32,omitempty"` - OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64" json:"optional_sfixed64,omitempty"` - OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat" json:"optional_float,omitempty"` - OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble" json:"optional_double,omitempty"` - OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool" json:"optional_bool,omitempty"` - OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString" 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,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"` - OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"` - OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece" json:"optional_string_piece,omitempty"` - OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord" 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,proto3" 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" protobuf_val:"varint,2,opt,name=value"` - 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" protobuf_val:"varint,2,opt,name=value"` - 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" protobuf_val:"varint,2,opt,name=value"` - 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" protobuf_val:"varint,2,opt,name=value"` - 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" protobuf_val:"zigzag32,2,opt,name=value"` - 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" protobuf_val:"zigzag64,2,opt,name=value"` - 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" protobuf_val:"fixed32,2,opt,name=value"` - 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" protobuf_val:"fixed64,2,opt,name=value"` - 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" protobuf_val:"fixed32,2,opt,name=value"` - 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" protobuf_val:"fixed64,2,opt,name=value"` - 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" protobuf_val:"fixed32,2,opt,name=value"` - 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" protobuf_val:"fixed64,2,opt,name=value"` - 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" protobuf_val:"varint,2,opt,name=value"` - 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" protobuf_val:"bytes,2,opt,name=value"` - 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" 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" 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" 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" protobuf_val:"varint,2,opt,name=value,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" protobuf_val:"varint,2,opt,name=value,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" json:"fieldname1,omitempty"` - FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"` - XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=fieldName3" json:"_field_name3,omitempty"` - Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"` - Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"` - Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"` - FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"` - FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,json=fieldName8" json:"FieldName8,omitempty"` - Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"` - Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=fieldName10" json:"Field_Name10,omitempty"` - FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=fIELDNAME11" json:"FIELD_NAME11,omitempty"` - FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=fIELDName12" json:"FIELD_name12,omitempty"` - XFieldName13 int32 `protobuf:"varint,413,opt,name=__field_name13,json=fieldName13" json:"__field_name13,omitempty"` - X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=fieldName14" json:"__Field_name14,omitempty"` - Field_Name15 int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"` - Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"` - FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"` - FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=fieldName18" 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 fileDescriptor0, []int{2} } - -type isTestAllTypes_OneofField interface { - isTestAllTypes_OneofField() -} - -type TestAllTypes_OneofUint32 struct { - OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,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,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,oneof"` -} -type TestAllTypes_OneofUint64 struct { - OneofUint64 uint64 `protobuf:"varint,116,opt,name=oneof_uint64,json=oneofUint64,oneof"` -} -type TestAllTypes_OneofFloat struct { - OneofFloat float32 `protobuf:"fixed32,117,opt,name=oneof_float,json=oneofFloat,oneof"` -} -type TestAllTypes_OneofDouble struct { - OneofDouble float64 `protobuf:"fixed64,118,opt,name=oneof_double,json=oneofDouble,oneof"` -} -type TestAllTypes_OneofEnum struct { - OneofEnum TestAllTypes_NestedEnum `protobuf:"varint,119,opt,name=oneof_enum,json=oneofEnum,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) 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) GetRecursiveMessage() *TestAllTypes { - if m != nil { - return m.RecursiveMessage - } - 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) 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 -} - -// 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" 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 fileDescriptor0, []int{2, 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" 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 fileDescriptor0, []int{3} } - -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", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 2731 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x5a, 0xd9, 0x72, 0xdb, 0xc8, - 0xd5, 0x16, 0x08, 0x59, 0x4b, 0x93, 0x92, 0xa8, 0xd6, 0x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0x13, - 0x7d, 0x45, 0x8e, 0x83, 0xda, 0x08, 0x66, 0xbb, 0xf2, 0xee, 0xc3, 0xda, 0xce, 0xe6, 0x93, 0xca, - 0xea, 0x2a, 0xfa, 0x2a, 0xc7, 0x60, 0x23, 0xb5, 0xc5, 0x18, 0x92, 0xeb, 0x35, 0xf4, 0x35, 0x05, - 0x43, 0x6c, 0xf0, 0x12, 0x98, 0xac, 0x49, 0xf9, 0x5d, 0x5d, 0x47, 0x5f, 0x4f, 0x78, 0x5b, 0xa7, - 0xa8, 0x6a, 0x8c, 0xb2, 0xd1, 0x37, 0x12, 0x28, 0x3b, 0x4e, 0x20, 0x05, 0xdd, 0x42, 0xdf, 0x4c, - 0x80, 0xa4, 0x2c, 0xd3, 0xdd, 0x39, 0xe8, 0x5b, 0x09, 0x90, 0x83, 0xfd, 0x49, 0x31, 0xdd, 0xae, - 0xd5, 0xd0, 0xb7, 0x13, 0xa8, 0xdb, 0x18, 0x25, 0xc5, 0xb4, 0x51, 0xab, 0xa1, 0xef, 0x24, 0x50, - 0x1b, 0x8b, 0x2f, 0xc0, 0x84, 0xfa, 0xa0, 0x53, 0x00, 0x86, 0xc7, 0xde, 0x88, 0x1a, 0x1e, 0x7c, - 0x1b, 0xe4, 0xeb, 0x81, 0x78, 0xa9, 0x81, 0x72, 0xa7, 0xbd, 0x00, 0x91, 0xd1, 0x8b, 0xf7, 0x01, - 0x4c, 0x0e, 0x29, 0x61, 0x11, 0x98, 0x2f, 0xfd, 0x13, 0xe6, 0x02, 0xff, 0x0a, 0x67, 0xc1, 0x19, - 0x7a, 0xfb, 0xe4, 0x88, 0x8d, 0x7e, 0xb9, 0x9b, 0xdb, 0x30, 0x62, 0x06, 0x79, 0x20, 0x29, 0x33, - 0x98, 0x29, 0x0c, 0xa6, 0xcc, 0x50, 0x06, 0xb3, 0x69, 0xa3, 0x47, 0x99, 0x63, 0x22, 0x85, 0x63, - 0x22, 0x9d, 0x43, 0x19, 0x31, 0xca, 0x1c, 0x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xea, 0x8a, - 0x5d, 0x2c, 0xdd, 0x01, 0x40, 0x9a, 0xec, 0x8d, 0x02, 0xb3, 0xba, 0xbb, 0x5b, 0x1c, 0xc2, 0xbf, - 0x94, 0x37, 0xdd, 0xa2, 0x41, 0x7f, 0x79, 0x51, 0xcc, 0x61, 0x77, 0x3b, 0x95, 0x47, 0xc5, 0xff, - 0xf2, 0xff, 0x8c, 0xf2, 0x84, 0x18, 0x45, 0xe1, 0x53, 0x65, 0xe9, 0x0d, 0x30, 0xa9, 0x0d, 0x24, - 0x0b, 0xc0, 0xa8, 0xf3, 0x03, 0xa5, 0x7e, 0xed, 0x16, 0x00, 0xf1, 0xbf, 0x61, 0x82, 0x53, 0x20, - 0xbf, 0xbf, 0xb3, 0xf7, 0xb4, 0xf2, 0x60, 0xbb, 0xba, 0x5d, 0x79, 0x58, 0x1c, 0x82, 0x05, 0x30, - 0xf6, 0xd4, 0xdd, 0x7d, 0xb6, 0x5b, 0xde, 0xaf, 0x16, 0x0d, 0x38, 0x06, 0x86, 0x1f, 0xef, 0xed, - 0xee, 0x14, 0x73, 0xd7, 0xee, 0x83, 0xbc, 0x3c, 0x0f, 0x9c, 0x02, 0xf9, 0xea, 0xae, 0x5b, 0xd9, - 0x7e, 0xb4, 0x53, 0xa3, 0x91, 0x4a, 0x06, 0x1a, 0xb1, 0x62, 0x78, 0x51, 0xcc, 0x95, 0x2f, 0x82, - 0x0b, 0xf5, 0xa0, 0x95, 0xf8, 0xc3, 0x4c, 0x4a, 0xce, 0xc1, 0x08, 0xb1, 0xae, 0xff, 0x2f, 0x00, - 0x00, 0xff, 0xff, 0x46, 0x1f, 0xdb, 0xdc, 0xeb, 0x26, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto b/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto deleted file mode 100644 index 95a8fd13..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go deleted file mode 100644 index 1fc8ae8d..00000000 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go +++ /dev/null @@ -1,829 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON. -It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json. - -This package produces a different output than the standard "encoding/json" package, -which does not operate correctly on protocol buffers. -*/ -package jsonpb - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "reflect" - "sort" - "strconv" - "strings" - "time" - - "github.com/golang/protobuf/proto" -) - -// Marshaler is a configurable object for converting between -// protocol buffer objects and a JSON representation for them. -type Marshaler struct { - // Whether to render enum values as integers, as opposed to string values. - EnumsAsInts bool - - // Whether to render fields with zero values. - EmitDefaults bool - - // A string to indent each level by. The presence of this field will - // also cause a space to appear between the field separator and - // value, and for newlines to be appear between fields and array - // elements. - Indent string - - // Whether to use the original (.proto) name for fields. - OrigName bool -} - -// Marshal marshals a protocol buffer into JSON. -func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { - writer := &errWriter{writer: out} - return m.marshalObject(writer, pb, "", "") -} - -// MarshalToString converts a protocol buffer object to JSON string. -func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { - var buf bytes.Buffer - if err := m.Marshal(&buf, pb); err != nil { - return "", err - } - return buf.String(), nil -} - -type int32Slice []int32 - -// For sorting extensions ids to ensure stable output. -func (s int32Slice) Len() int { return len(s) } -func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } -func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -type wkt interface { - XXX_WellKnownType() string -} - -// marshalObject writes a struct to the Writer. -func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error { - s := reflect.ValueOf(v).Elem() - - // Handle well-known types. - if wkt, ok := v.(wkt); ok { - switch wkt.XXX_WellKnownType() { - case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", - "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": - // "Wrappers use the same representation in JSON - // as the wrapped primitive type, ..." - sprop := proto.GetProperties(s.Type()) - return m.marshalValue(out, sprop.Prop[0], s.Field(0), indent) - case "Any": - // Any is a bit more involved. - return m.marshalAny(out, v, indent) - case "Duration": - // "Generated output always contains 3, 6, or 9 fractional digits, - // depending on required precision." - s, ns := s.Field(0).Int(), s.Field(1).Int() - d := time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond - x := fmt.Sprintf("%.9f", d.Seconds()) - x = strings.TrimSuffix(x, "000") - x = strings.TrimSuffix(x, "000") - out.write(`"`) - out.write(x) - out.write(`s"`) - return out.err - case "Struct": - // Let marshalValue handle the `fields` map. - // TODO: pass the correct Properties if needed. - return m.marshalValue(out, &proto.Properties{}, s.Field(0), indent) - case "Timestamp": - // "RFC 3339, where generated output will always be Z-normalized - // and uses 3, 6 or 9 fractional digits." - s, ns := s.Field(0).Int(), s.Field(1).Int() - t := time.Unix(s, ns).UTC() - // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits). - x := t.Format("2006-01-02T15:04:05.000000000") - x = strings.TrimSuffix(x, "000") - x = strings.TrimSuffix(x, "000") - out.write(`"`) - out.write(x) - out.write(`Z"`) - return out.err - case "Value": - // Value has a single oneof. - kind := s.Field(0) - if kind.IsNil() { - // "absence of any variant indicates an error" - return errors.New("nil Value") - } - // oneof -> *T -> T -> T.F - x := kind.Elem().Elem().Field(0) - // TODO: pass the correct Properties if needed. - return m.marshalValue(out, &proto.Properties{}, x, indent) - } - } - - out.write("{") - if m.Indent != "" { - out.write("\n") - } - - firstField := true - - if typeURL != "" { - if err := m.marshalTypeURL(out, indent, typeURL); err != nil { - return err - } - firstField = false - } - - for i := 0; i < s.NumField(); i++ { - value := s.Field(i) - valueField := s.Type().Field(i) - if strings.HasPrefix(valueField.Name, "XXX_") { - continue - } - - // IsNil will panic on most value kinds. - switch value.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - if value.IsNil() { - continue - } - } - - if !m.EmitDefaults { - switch value.Kind() { - case reflect.Bool: - if !value.Bool() { - continue - } - case reflect.Int32, reflect.Int64: - if value.Int() == 0 { - continue - } - case reflect.Uint32, reflect.Uint64: - if value.Uint() == 0 { - continue - } - case reflect.Float32, reflect.Float64: - if value.Float() == 0 { - continue - } - case reflect.String: - if value.Len() == 0 { - continue - } - } - } - - // Oneof fields need special handling. - if valueField.Tag.Get("protobuf_oneof") != "" { - // value is an interface containing &T{real_value}. - sv := value.Elem().Elem() // interface -> *T -> T - value = sv.Field(0) - valueField = sv.Type().Field(0) - } - prop := jsonProperties(valueField, m.OrigName) - if !firstField { - m.writeSep(out) - } - if err := m.marshalField(out, prop, value, indent); err != nil { - return err - } - firstField = false - } - - // Handle proto2 extensions. - if ep, ok := v.(proto.Message); ok { - extensions := proto.RegisteredExtensions(v) - // Sort extensions for stable output. - ids := make([]int32, 0, len(extensions)) - for id, desc := range extensions { - if !proto.HasExtension(ep, desc) { - continue - } - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) - for _, id := range ids { - desc := extensions[id] - if desc == nil { - // unknown extension - continue - } - ext, extErr := proto.GetExtension(ep, desc) - if extErr != nil { - return extErr - } - value := reflect.ValueOf(ext) - var prop proto.Properties - prop.Parse(desc.Tag) - prop.JSONName = fmt.Sprintf("[%s]", desc.Name) - if !firstField { - m.writeSep(out) - } - if err := m.marshalField(out, &prop, value, indent); err != nil { - return err - } - firstField = false - } - - } - - if m.Indent != "" { - out.write("\n") - out.write(indent) - } - out.write("}") - return out.err -} - -func (m *Marshaler) writeSep(out *errWriter) { - if m.Indent != "" { - out.write(",\n") - } else { - out.write(",") - } -} - -func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) error { - // "If the Any contains a value that has a special JSON mapping, - // it will be converted as follows: {"@type": xxx, "value": yyy}. - // Otherwise, the value will be converted into a JSON object, - // and the "@type" field will be inserted to indicate the actual data type." - v := reflect.ValueOf(any).Elem() - turl := v.Field(0).String() - val := v.Field(1).Bytes() - - // Only the part of type_url after the last slash is relevant. - mname := turl - if slash := strings.LastIndex(mname, "/"); slash >= 0 { - mname = mname[slash+1:] - } - mt := proto.MessageType(mname) - if mt == nil { - return fmt.Errorf("unknown message type %q", mname) - } - msg := reflect.New(mt.Elem()).Interface().(proto.Message) - if err := proto.Unmarshal(val, msg); err != nil { - return err - } - - if _, ok := msg.(wkt); ok { - out.write("{") - if m.Indent != "" { - out.write("\n") - } - if err := m.marshalTypeURL(out, indent, turl); err != nil { - return err - } - m.writeSep(out) - if m.Indent != "" { - out.write(indent) - out.write(m.Indent) - out.write(`"value": `) - } else { - out.write(`"value":`) - } - if err := m.marshalObject(out, msg, indent+m.Indent, ""); err != nil { - return err - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - } - out.write("}") - return out.err - } - - return m.marshalObject(out, msg, indent, turl) -} - -func (m *Marshaler) marshalTypeURL(out *errWriter, indent, typeURL string) error { - if m.Indent != "" { - out.write(indent) - out.write(m.Indent) - } - out.write(`"@type":`) - if m.Indent != "" { - out.write(" ") - } - b, err := json.Marshal(typeURL) - if err != nil { - return err - } - out.write(string(b)) - return out.err -} - -// marshalField writes field description and value to the Writer. -func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { - if m.Indent != "" { - out.write(indent) - out.write(m.Indent) - } - out.write(`"`) - out.write(prop.JSONName) - out.write(`":`) - if m.Indent != "" { - out.write(" ") - } - if err := m.marshalValue(out, prop, v, indent); err != nil { - return err - } - return nil -} - -// marshalValue writes the value to the Writer. -func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { - - var err error - v = reflect.Indirect(v) - - // Handle repeated elements. - if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { - out.write("[") - comma := "" - for i := 0; i < v.Len(); i++ { - sliceVal := v.Index(i) - out.write(comma) - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - out.write(m.Indent) - } - if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil { - return err - } - comma = "," - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - } - out.write("]") - return out.err - } - - // Handle well-known types. - // Most are handled up in marshalObject (because 99% are messages). - type wkt interface { - XXX_WellKnownType() string - } - if wkt, ok := v.Interface().(wkt); ok { - switch wkt.XXX_WellKnownType() { - case "NullValue": - out.write("null") - return out.err - } - } - - // Handle enumerations. - if !m.EnumsAsInts && prop.Enum != "" { - // Unknown enum values will are stringified by the proto library as their - // value. Such values should _not_ be quoted or they will be interpreted - // as an enum string instead of their value. - enumStr := v.Interface().(fmt.Stringer).String() - var valStr string - if v.Kind() == reflect.Ptr { - valStr = strconv.Itoa(int(v.Elem().Int())) - } else { - valStr = strconv.Itoa(int(v.Int())) - } - isKnownEnum := enumStr != valStr - if isKnownEnum { - out.write(`"`) - } - out.write(enumStr) - if isKnownEnum { - out.write(`"`) - } - return out.err - } - - // Handle nested messages. - if v.Kind() == reflect.Struct { - return m.marshalObject(out, v.Addr().Interface().(proto.Message), indent+m.Indent, "") - } - - // Handle maps. - // Since Go randomizes map iteration, we sort keys for stable output. - if v.Kind() == reflect.Map { - out.write(`{`) - keys := v.MapKeys() - sort.Sort(mapKeys(keys)) - for i, k := range keys { - if i > 0 { - out.write(`,`) - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - out.write(m.Indent) - } - - b, err := json.Marshal(k.Interface()) - if err != nil { - return err - } - s := string(b) - - // If the JSON is not a string value, encode it again to make it one. - if !strings.HasPrefix(s, `"`) { - b, err := json.Marshal(s) - if err != nil { - return err - } - s = string(b) - } - - out.write(s) - out.write(`:`) - if m.Indent != "" { - out.write(` `) - } - - if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil { - return err - } - } - if m.Indent != "" { - out.write("\n") - out.write(indent) - out.write(m.Indent) - } - out.write(`}`) - return out.err - } - - // Default handling defers to the encoding/json library. - b, err := json.Marshal(v.Interface()) - if err != nil { - return err - } - needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) - if needToQuote { - out.write(`"`) - } - out.write(string(b)) - if needToQuote { - out.write(`"`) - } - return out.err -} - -// Unmarshaler is a configurable object for converting from a JSON -// representation to a protocol buffer object. -type Unmarshaler struct { - // Whether to allow messages to contain unknown fields, as opposed to - // failing to unmarshal. - AllowUnknownFields bool -} - -// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. -// This function is lenient and will decode any options permutations of the -// related Marshaler. -func (u *Unmarshaler) UnmarshalNext(dec *json.Decoder, pb proto.Message) error { - inputValue := json.RawMessage{} - if err := dec.Decode(&inputValue); err != nil { - return err - } - return u.unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil) -} - -// Unmarshal unmarshals a JSON object stream into a protocol -// buffer. This function is lenient and will decode any options -// permutations of the related Marshaler. -func (u *Unmarshaler) Unmarshal(r io.Reader, pb proto.Message) error { - dec := json.NewDecoder(r) - return u.UnmarshalNext(dec, pb) -} - -// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. -// This function is lenient and will decode any options permutations of the -// related Marshaler. -func UnmarshalNext(dec *json.Decoder, pb proto.Message) error { - return new(Unmarshaler).UnmarshalNext(dec, pb) -} - -// Unmarshal unmarshals a JSON object stream into a protocol -// buffer. This function is lenient and will decode any options -// permutations of the related Marshaler. -func Unmarshal(r io.Reader, pb proto.Message) error { - return new(Unmarshaler).Unmarshal(r, pb) -} - -// UnmarshalString will populate the fields of a protocol buffer based -// on a JSON string. This function is lenient and will decode any options -// permutations of the related Marshaler. -func UnmarshalString(str string, pb proto.Message) error { - return new(Unmarshaler).Unmarshal(strings.NewReader(str), pb) -} - -// unmarshalValue converts/copies a value into the target. -// prop may be nil. -func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error { - targetType := target.Type() - - // Allocate memory for pointer fields. - if targetType.Kind() == reflect.Ptr { - target.Set(reflect.New(targetType.Elem())) - return u.unmarshalValue(target.Elem(), inputValue, prop) - } - - // Handle well-known types. - type wkt interface { - XXX_WellKnownType() string - } - if wkt, ok := target.Addr().Interface().(wkt); ok { - switch wkt.XXX_WellKnownType() { - case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", - "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": - // "Wrappers use the same representation in JSON - // as the wrapped primitive type, except that null is allowed." - // encoding/json will turn JSON `null` into Go `nil`, - // so we don't have to do any extra work. - return u.unmarshalValue(target.Field(0), inputValue, prop) - case "Any": - return fmt.Errorf("unmarshaling Any not supported yet") - case "Duration": - unq, err := strconv.Unquote(string(inputValue)) - if err != nil { - return err - } - d, err := time.ParseDuration(unq) - if err != nil { - return fmt.Errorf("bad Duration: %v", err) - } - ns := d.Nanoseconds() - s := ns / 1e9 - ns %= 1e9 - target.Field(0).SetInt(s) - target.Field(1).SetInt(ns) - return nil - case "Timestamp": - unq, err := strconv.Unquote(string(inputValue)) - if err != nil { - return err - } - t, err := time.Parse(time.RFC3339Nano, unq) - if err != nil { - return fmt.Errorf("bad Timestamp: %v", err) - } - target.Field(0).SetInt(int64(t.Unix())) - target.Field(1).SetInt(int64(t.Nanosecond())) - return nil - } - } - - // Handle enums, which have an underlying type of int32, - // and may appear as strings. - // The case of an enum appearing as a number is handled - // at the bottom of this function. - if inputValue[0] == '"' && prop != nil && prop.Enum != "" { - vmap := proto.EnumValueMap(prop.Enum) - // Don't need to do unquoting; valid enum names - // are from a limited character set. - s := inputValue[1 : len(inputValue)-1] - n, ok := vmap[string(s)] - if !ok { - return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum) - } - if target.Kind() == reflect.Ptr { // proto2 - target.Set(reflect.New(targetType.Elem())) - target = target.Elem() - } - target.SetInt(int64(n)) - return nil - } - - // Handle nested messages. - if targetType.Kind() == reflect.Struct { - var jsonFields map[string]json.RawMessage - if err := json.Unmarshal(inputValue, &jsonFields); err != nil { - return err - } - - consumeField := func(prop *proto.Properties) (json.RawMessage, bool) { - // Be liberal in what names we accept; both orig_name and camelName are okay. - fieldNames := acceptedJSONFieldNames(prop) - - vOrig, okOrig := jsonFields[fieldNames.orig] - vCamel, okCamel := jsonFields[fieldNames.camel] - if !okOrig && !okCamel { - return nil, false - } - // If, for some reason, both are present in the data, favour the camelName. - var raw json.RawMessage - if okOrig { - raw = vOrig - delete(jsonFields, fieldNames.orig) - } - if okCamel { - raw = vCamel - delete(jsonFields, fieldNames.camel) - } - return raw, true - } - - sprops := proto.GetProperties(targetType) - for i := 0; i < target.NumField(); i++ { - ft := target.Type().Field(i) - if strings.HasPrefix(ft.Name, "XXX_") { - continue - } - - valueForField, ok := consumeField(sprops.Prop[i]) - if !ok { - continue - } - - if err := u.unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil { - return err - } - } - // Check for any oneof fields. - if len(jsonFields) > 0 { - for _, oop := range sprops.OneofTypes { - raw, ok := consumeField(oop.Prop) - if !ok { - continue - } - nv := reflect.New(oop.Type.Elem()) - target.Field(oop.Field).Set(nv) - if err := u.unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil { - return err - } - } - } - if !u.AllowUnknownFields && len(jsonFields) > 0 { - // Pick any field to be the scapegoat. - var f string - for fname := range jsonFields { - f = fname - break - } - return fmt.Errorf("unknown field %q in %v", f, targetType) - } - return nil - } - - // Handle arrays (which aren't encoded bytes) - if targetType.Kind() == reflect.Slice && targetType.Elem().Kind() != reflect.Uint8 { - var slc []json.RawMessage - if err := json.Unmarshal(inputValue, &slc); err != nil { - return err - } - len := len(slc) - target.Set(reflect.MakeSlice(targetType, len, len)) - for i := 0; i < len; i++ { - if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil { - return err - } - } - return nil - } - - // Handle maps (whose keys are always strings) - if targetType.Kind() == reflect.Map { - var mp map[string]json.RawMessage - if err := json.Unmarshal(inputValue, &mp); err != nil { - return err - } - target.Set(reflect.MakeMap(targetType)) - var keyprop, valprop *proto.Properties - if prop != nil { - // These could still be nil if the protobuf metadata is broken somehow. - // TODO: This won't work because the fields are unexported. - // We should probably just reparse them. - //keyprop, valprop = prop.mkeyprop, prop.mvalprop - } - for ks, raw := range mp { - // Unmarshal map key. The core json library already decoded the key into a - // string, so we handle that specially. Other types were quoted post-serialization. - var k reflect.Value - if targetType.Key().Kind() == reflect.String { - k = reflect.ValueOf(ks) - } else { - k = reflect.New(targetType.Key()).Elem() - if err := u.unmarshalValue(k, json.RawMessage(ks), keyprop); err != nil { - return err - } - } - - // Unmarshal map value. - v := reflect.New(targetType.Elem()).Elem() - if err := u.unmarshalValue(v, raw, valprop); err != nil { - return err - } - target.SetMapIndex(k, v) - } - return nil - } - - // 64-bit integers can be encoded as strings. In this case we drop - // the quotes and proceed as normal. - isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 - if isNum && strings.HasPrefix(string(inputValue), `"`) { - inputValue = inputValue[1 : len(inputValue)-1] - } - - // Use the encoding/json for parsing other value types. - return json.Unmarshal(inputValue, target.Addr().Interface()) -} - -// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute. -func jsonProperties(f reflect.StructField, origName bool) *proto.Properties { - var prop proto.Properties - prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) - if origName || prop.JSONName == "" { - prop.JSONName = prop.OrigName - } - return &prop -} - -type fieldNames struct { - orig, camel string -} - -func acceptedJSONFieldNames(prop *proto.Properties) fieldNames { - opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName} - if prop.JSONName != "" { - opts.camel = prop.JSONName - } - return opts -} - -// Writer wrapper inspired by https://blog.golang.org/errors-are-values -type errWriter struct { - writer io.Writer - err error -} - -func (w *errWriter) write(str string) { - if w.err != nil { - return - } - _, w.err = w.writer.Write([]byte(str)) -} - -// Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. -// -// Numeric keys are sorted in numeric order per -// https://developers.google.com/protocol-buffers/docs/proto#maps. -type mapKeys []reflect.Value - -func (s mapKeys) Len() int { return len(s) } -func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s mapKeys) Less(i, j int) bool { - if k := s[i].Kind(); k == s[j].Kind() { - switch k { - case reflect.Int32, reflect.Int64: - return s[i].Int() < s[j].Int() - case reflect.Uint32, reflect.Uint64: - return s[i].Uint() < s[j].Uint() - } - } - return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) -} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go deleted file mode 100644 index 78f67c4d..00000000 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go +++ /dev/null @@ -1,561 +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" - "reflect" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - - pb "github.com/golang/protobuf/jsonpb/jsonpb_test_proto" - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - anypb "github.com/golang/protobuf/ptypes/any" - durpb "github.com/golang/protobuf/ptypes/duration" - stpb "github.com/golang/protobuf/ptypes/struct" - tspb "github.com/golang/protobuf/ptypes/timestamp" - wpb "github.com/golang/protobuf/ptypes/wrappers" -) - -var ( - marshaler = Marshaler{} - - marshalerAllOptions = Marshaler{ - Indent: " ", - } - - simpleObject = &pb.Simple{ - OInt32: proto.Int32(-32), - OInt64: proto.Int64(-6400000000), - OUint32: proto.Uint32(32), - OUint64: proto.Uint64(6400000000), - OSint32: proto.Int32(-13), - OSint64: proto.Int64(-2600000000), - OFloat: proto.Float32(3.14), - ODouble: proto.Float64(6.02214179e23), - OBool: proto.Bool(true), - OString: proto.String("hello \"there\""), - OBytes: []byte("beep boop"), - } - - simpleObjectJSON = `{` + - `"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"` + - `}` - - 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" -}` - - 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: &anypb.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: &anypb.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" - } -}` -) - -func init() { - if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil { - panic(err) - } - if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil { - panic(err) - } -} - -var marshalingTests = []struct { - desc string - marshaler Marshaler - pb proto.Message - json string -}{ - {"simple flat object", marshaler, simpleObject, simpleObjectJSON}, - {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectPrettyJSON}, - {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON}, - {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON}, - {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON}, - {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON}, - {"enum-string flat object", Marshaler{}, - &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`}, - {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "}, - &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON}, - {"unknown enum value object", marshalerAllOptions, - &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON}, - {"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}`}, - {"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: &pb.Simple3{Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, - {"map", marshalerAllOptions, - &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: &pb.Simple3{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: &pb.Simple{OInt32: proto.Int32(1)}}}, - `{"mBoolSimple":{"true":{"oInt32":1}}}`}, - {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, - {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_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: &durpb.Duration{Seconds: 3}}, `{"dur":"3.000s"}`}, - {"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{ - Fields: map[string]*stpb.Value{ - "one": &stpb.Value{Kind: &stpb.Value_StringValue{"loneliest number"}}, - "two": &stpb.Value{Kind: &stpb.Value_NullValue{stpb.NullValue_NULL_VALUE}}, - }, - }}, `{"st":{"one":"loneliest number","two":null}}`}, - {"Timestamp", marshaler, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"2014-05-13T16:53:20.021Z"}`}, - - {"DoubleValue", marshaler, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}, `{"dbl":1.2}`}, - {"FloatValue", marshaler, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}, `{"flt":1.2}`}, - {"Int64Value", marshaler, &pb.KnownTypes{I64: &wpb.Int64Value{Value: -3}}, `{"i64":"-3"}`}, - {"UInt64Value", marshaler, &pb.KnownTypes{U64: &wpb.UInt64Value{Value: 3}}, `{"u64":"3"}`}, - {"Int32Value", marshaler, &pb.KnownTypes{I32: &wpb.Int32Value{Value: -4}}, `{"i32":-4}`}, - {"UInt32Value", marshaler, &pb.KnownTypes{U32: &wpb.UInt32Value{Value: 4}}, `{"u32":4}`}, - {"BoolValue", marshaler, &pb.KnownTypes{Bool: &wpb.BoolValue{Value: true}}, `{"bool":true}`}, - {"StringValue", marshaler, &pb.KnownTypes{Str: &wpb.StringValue{Value: "plush"}}, `{"str":"plush"}`}, - {"BytesValue", marshaler, &pb.KnownTypes{Bytes: &wpb.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) - } - } -} - -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)}}, - {"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: &pb.Simple3{Dub: 1}}}}, - // 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{31000}}}, - {"oneof spec name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}}, - {"oneof orig_name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}}, - {"oneof spec name2", Unmarshaler{}, `{"homeAddress":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{"Australia"}}}, - {"oneof orig_name2", Unmarshaler{}, `{"home_address":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_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: &durpb.Duration{Seconds: 3}}}, - {"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}}, - {"PreEpochTimestamp", Unmarshaler{}, `{"ts":"1969-12-31T23:59:58.999999995Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -2, Nanos: 999999995}}}, - {"ZeroTimeTimestamp", Unmarshaler{}, `{"ts":"0001-01-01T00:00:00Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -62135596800, Nanos: 0}}}, - - {"DoubleValue", Unmarshaler{}, `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}}, - {"FloatValue", Unmarshaler{}, `{"flt":1.2}`, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}}, - {"Int64Value", Unmarshaler{}, `{"i64":"-3"}`, &pb.KnownTypes{I64: &wpb.Int64Value{Value: -3}}}, - {"UInt64Value", Unmarshaler{}, `{"u64":"3"}`, &pb.KnownTypes{U64: &wpb.UInt64Value{Value: 3}}}, - {"Int32Value", Unmarshaler{}, `{"i32":-4}`, &pb.KnownTypes{I32: &wpb.Int32Value{Value: -4}}}, - {"UInt32Value", Unmarshaler{}, `{"u32":4}`, &pb.KnownTypes{U32: &wpb.UInt32Value{Value: 4}}}, - {"BoolValue", Unmarshaler{}, `{"bool":true}`, &pb.KnownTypes{Bool: &wpb.BoolValue{Value: true}}}, - {"StringValue", Unmarshaler{}, `{"str":"plush"}`, &pb.KnownTypes{Str: &wpb.StringValue{Value: "plush"}}}, - {"BytesValue", Unmarshaler{}, `{"bytes":"d293"}`, &pb.KnownTypes{Bytes: &wpb.BytesValue{Value: []byte("wow")}}}, - // `null` is also a permissible value. Let's just test one. - {"null DoubleValue", Unmarshaler{}, `{"dbl":null}`, &pb.KnownTypes{Dbl: &wpb.DoubleValue{}}}, -} - -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 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) - } - } -} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile deleted file mode 100644 index eeda8ae5..00000000 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2015 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers:. *.proto diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go deleted file mode 100644 index cd6ff1cd..00000000 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by protoc-gen-go. -// source: more_test_objects.proto -// DO NOT EDIT! - -/* -Package jsonpb is a generated protocol buffer package. - -It is generated from these files: - more_test_objects.proto - test_objects.proto - -It has these top-level messages: - Simple3 - Mappy - Simple - Repeats - Widget - Maps - MsgWithOneof - Real - Complex - KnownTypes -*/ -package jsonpb - -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 - -type Numeral int32 - -const ( - Numeral_UNKNOWN Numeral = 0 - Numeral_ARABIC Numeral = 1 - Numeral_ROMAN Numeral = 2 -) - -var Numeral_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ARABIC", - 2: "ROMAN", -} -var Numeral_value = map[string]int32{ - "UNKNOWN": 0, - "ARABIC": 1, - "ROMAN": 2, -} - -func (x Numeral) String() string { - return proto.EnumName(Numeral_name, int32(x)) -} -func (Numeral) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -type Simple3 struct { - Dub float64 `protobuf:"fixed64,1,opt,name=dub" json:"dub,omitempty"` -} - -func (m *Simple3) Reset() { *m = Simple3{} } -func (m *Simple3) String() string { return proto.CompactTextString(m) } -func (*Simple3) ProtoMessage() {} -func (*Simple3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -type Mappy struct { - Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - Enumy map[string]Numeral `protobuf:"bytes,6,rep,name=enumy" json:"enumy,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=jsonpb.Numeral"` - S32Booly map[int32]bool `protobuf:"bytes,7,rep,name=s32booly" json:"s32booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - S64Booly map[int64]bool `protobuf:"bytes,8,rep,name=s64booly" json:"s64booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - U32Booly map[uint32]bool `protobuf:"bytes,9,rep,name=u32booly" json:"u32booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - U64Booly map[uint64]bool `protobuf:"bytes,10,rep,name=u64booly" json:"u64booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` -} - -func (m *Mappy) Reset() { *m = Mappy{} } -func (m *Mappy) String() string { return proto.CompactTextString(m) } -func (*Mappy) ProtoMessage() {} -func (*Mappy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *Mappy) GetNummy() map[int64]int32 { - if m != nil { - return m.Nummy - } - return nil -} - -func (m *Mappy) GetStrry() map[string]string { - if m != nil { - return m.Strry - } - return nil -} - -func (m *Mappy) GetObjjy() map[int32]*Simple3 { - if m != nil { - return m.Objjy - } - return nil -} - -func (m *Mappy) GetBuggy() map[int64]string { - if m != nil { - return m.Buggy - } - return nil -} - -func (m *Mappy) GetBooly() map[bool]bool { - if m != nil { - return m.Booly - } - return nil -} - -func (m *Mappy) GetEnumy() map[string]Numeral { - if m != nil { - return m.Enumy - } - return nil -} - -func (m *Mappy) GetS32Booly() map[int32]bool { - if m != nil { - return m.S32Booly - } - return nil -} - -func (m *Mappy) GetS64Booly() map[int64]bool { - if m != nil { - return m.S64Booly - } - return nil -} - -func (m *Mappy) GetU32Booly() map[uint32]bool { - if m != nil { - return m.U32Booly - } - return nil -} - -func (m *Mappy) GetU64Booly() map[uint64]bool { - if m != nil { - return m.U64Booly - } - return nil -} - -func init() { - proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") - proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy") - proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value) -} - -func init() { proto.RegisterFile("more_test_objects.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 444 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x94, 0xc1, 0x6b, 0xdb, 0x30, - 0x14, 0x87, 0xe7, 0xa4, 0x4e, 0xec, 0x17, 0xba, 0x19, 0x31, 0x98, 0x58, 0x2f, 0xa1, 0x30, 0x08, - 0x83, 0xf9, 0x90, 0x8c, 0xad, 0x6c, 0xa7, 0x74, 0xf4, 0x50, 0x46, 0x1d, 0x70, 0x09, 0x3b, 0x96, - 0x78, 0x13, 0x65, 0x9e, 0x6d, 0x19, 0xdb, 0x1a, 0xe8, 0x8f, 0x1f, 0x8c, 0x27, 0xcb, 0xb5, 0x6c, - 0x14, 0xd2, 0x9b, 0xcc, 0xef, 0xfb, 0xf2, 0x9e, 0xf4, 0x1e, 0x81, 0x37, 0x39, 0xaf, 0xd8, 0x43, - 0xc3, 0xea, 0xe6, 0x81, 0x27, 0x29, 0xfb, 0xd9, 0xd4, 0x61, 0x59, 0xf1, 0x86, 0x93, 0x59, 0x5a, - 0xf3, 0xa2, 0x4c, 0x2e, 0x2f, 0x60, 0x7e, 0xff, 0x3b, 0x2f, 0x33, 0xb6, 0x21, 0x01, 0x4c, 0x7f, - 0x89, 0x84, 0x3a, 0x4b, 0x67, 0xe5, 0xc4, 0x78, 0xbc, 0xfc, 0xe7, 0x81, 0x7b, 0x77, 0x28, 0x4b, - 0x49, 0x42, 0x70, 0x0b, 0x91, 0xe7, 0x92, 0x3a, 0xcb, 0xe9, 0x6a, 0xb1, 0xa6, 0x61, 0xab, 0x87,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e8, 0x9d, 0x1e, 0x35, 0xd1, 0xef, 0xc5, 0xa9, 0xf6, 0xfd, 0xb1, 0xf9, - 0xf4, 0x20, 0xa6, 0xe9, 0x59, 0x4c, 0x6f, 0xd4, 0x7e, 0xbf, 0x2b, 0x96, 0x8b, 0x0f, 0xda, 0x7f, - 0xd9, 0xb7, 0x1f, 0x89, 0x9c, 0x55, 0x87, 0xcc, 0xfc, 0xa9, 0xaf, 0x70, 0x3e, 0xd8, 0x21, 0xcb, - 0x63, 0x1c, 0xef, 0x03, 0x65, 0x73, 0xaa, 0xa7, 0xae, 0x3f, 0x96, 0xf7, 0xc7, 0x2a, 0x9f, 0x3f, - 0x47, 0x3e, 0x56, 0xf9, 0xec, 0x84, 0xfc, 0xfe, 0x03, 0xcc, 0xf5, 0x4b, 0x90, 0x05, 0xcc, 0xf7, - 0xd1, 0xf7, 0x68, 0xf7, 0x23, 0x0a, 0x5e, 0x10, 0x80, 0xd9, 0x36, 0xde, 0x5e, 0xdf, 0x7e, 0x0b, - 0x1c, 0xe2, 0x83, 0x1b, 0xef, 0xee, 0xb6, 0x51, 0x30, 0x49, 0x66, 0xea, 0xaf, 0x6d, 0xf3, 0x3f, - 0x00, 0x00, 0xff, 0xff, 0xa2, 0x4b, 0xe1, 0x77, 0xf5, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto deleted file mode 100644 index 43b440e2..00000000 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto +++ /dev/null @@ -1,57 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package jsonpb; - -message Simple3 { - double dub = 1; -} - -enum Numeral { - UNKNOWN = 0; - ARABIC = 1; - ROMAN = 2; -} - -message Mappy { - map nummy = 1; - map strry = 2; - map objjy = 3; - map buggy = 4; - map booly = 5; - map enumy = 6; - map s32booly = 7; - map s64booly = 8; - map u32booly = 9; - map u64booly = 10; -} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go deleted file mode 100644 index 104a308d..00000000 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go +++ /dev/null @@ -1,769 +0,0 @@ -// Code generated by protoc-gen-go. -// source: test_objects.proto -// DO NOT EDIT! - -package jsonpb - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/any" -import google_protobuf1 "github.com/golang/protobuf/ptypes/duration" -import google_protobuf2 "github.com/golang/protobuf/ptypes/struct" -import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp" -import google_protobuf4 "github.com/golang/protobuf/ptypes/wrappers" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Widget_Color int32 - -const ( - Widget_RED Widget_Color = 0 - Widget_GREEN Widget_Color = 1 - Widget_BLUE Widget_Color = 2 -) - -var Widget_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Widget_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Widget_Color) Enum() *Widget_Color { - p := new(Widget_Color) - *p = x - return p -} -func (x Widget_Color) String() string { - return proto.EnumName(Widget_Color_name, int32(x)) -} -func (x *Widget_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") - if err != nil { - return err - } - *x = Widget_Color(value) - return nil -} -func (Widget_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{2, 0} } - -// Test message for holding primitive types. -type Simple struct { - OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"` - OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"` - OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"` - OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"` - OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"` - OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"` - OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"` - OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float,json=oFloat" json:"o_float,omitempty"` - ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double,json=oDouble" json:"o_double,omitempty"` - OString *string `protobuf:"bytes,10,opt,name=o_string,json=oString" json:"o_string,omitempty"` - OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Simple) Reset() { *m = Simple{} } -func (m *Simple) String() string { return proto.CompactTextString(m) } -func (*Simple) ProtoMessage() {} -func (*Simple) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } - -func (m *Simple) GetOBool() bool { - if m != nil && m.OBool != nil { - return *m.OBool - } - return false -} - -func (m *Simple) GetOInt32() int32 { - if m != nil && m.OInt32 != nil { - return *m.OInt32 - } - return 0 -} - -func (m *Simple) GetOInt64() int64 { - if m != nil && m.OInt64 != nil { - return *m.OInt64 - } - return 0 -} - -func (m *Simple) GetOUint32() uint32 { - if m != nil && m.OUint32 != nil { - return *m.OUint32 - } - return 0 -} - -func (m *Simple) GetOUint64() uint64 { - if m != nil && m.OUint64 != nil { - return *m.OUint64 - } - return 0 -} - -func (m *Simple) GetOSint32() int32 { - if m != nil && m.OSint32 != nil { - return *m.OSint32 - } - return 0 -} - -func (m *Simple) GetOSint64() int64 { - if m != nil && m.OSint64 != nil { - return *m.OSint64 - } - return 0 -} - -func (m *Simple) GetOFloat() float32 { - if m != nil && m.OFloat != nil { - return *m.OFloat - } - return 0 -} - -func (m *Simple) GetODouble() float64 { - if m != nil && m.ODouble != nil { - return *m.ODouble - } - return 0 -} - -func (m *Simple) GetOString() string { - if m != nil && m.OString != nil { - return *m.OString - } - return "" -} - -func (m *Simple) GetOBytes() []byte { - if m != nil { - return m.OBytes - } - return nil -} - -// Test message for holding repeated primitives. -type Repeats struct { - RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"` - RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"` - RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"` - RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"` - RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"` - RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"` - RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"` - RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"` - RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"` - RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"` - RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Repeats) Reset() { *m = Repeats{} } -func (m *Repeats) String() string { return proto.CompactTextString(m) } -func (*Repeats) ProtoMessage() {} -func (*Repeats) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } - -func (m *Repeats) GetRBool() []bool { - if m != nil { - return m.RBool - } - return nil -} - -func (m *Repeats) GetRInt32() []int32 { - if m != nil { - return m.RInt32 - } - return nil -} - -func (m *Repeats) GetRInt64() []int64 { - if m != nil { - return m.RInt64 - } - return nil -} - -func (m *Repeats) GetRUint32() []uint32 { - if m != nil { - return m.RUint32 - } - return nil -} - -func (m *Repeats) GetRUint64() []uint64 { - if m != nil { - return m.RUint64 - } - return nil -} - -func (m *Repeats) GetRSint32() []int32 { - if m != nil { - return m.RSint32 - } - return nil -} - -func (m *Repeats) GetRSint64() []int64 { - if m != nil { - return m.RSint64 - } - return nil -} - -func (m *Repeats) GetRFloat() []float32 { - if m != nil { - return m.RFloat - } - return nil -} - -func (m *Repeats) GetRDouble() []float64 { - if m != nil { - return m.RDouble - } - return nil -} - -func (m *Repeats) GetRString() []string { - if m != nil { - return m.RString - } - return nil -} - -func (m *Repeats) GetRBytes() [][]byte { - if m != nil { - return m.RBytes - } - return nil -} - -// Test message for holding enums and nested messages. -type Widget struct { - Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"` - RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"` - Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"` - RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"` - Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"` - RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Widget) Reset() { *m = Widget{} } -func (m *Widget) String() string { return proto.CompactTextString(m) } -func (*Widget) ProtoMessage() {} -func (*Widget) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } - -func (m *Widget) GetColor() Widget_Color { - if m != nil && m.Color != nil { - return *m.Color - } - return Widget_RED -} - -func (m *Widget) GetRColor() []Widget_Color { - if m != nil { - return m.RColor - } - return nil -} - -func (m *Widget) GetSimple() *Simple { - if m != nil { - return m.Simple - } - return nil -} - -func (m *Widget) GetRSimple() []*Simple { - if m != nil { - return m.RSimple - } - return nil -} - -func (m *Widget) GetRepeats() *Repeats { - if m != nil { - return m.Repeats - } - return nil -} - -func (m *Widget) GetRRepeats() []*Repeats { - if m != nil { - return m.RRepeats - } - return nil -} - -type Maps struct { - MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Maps) Reset() { *m = Maps{} } -func (m *Maps) String() string { return proto.CompactTextString(m) } -func (*Maps) ProtoMessage() {} -func (*Maps) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } - -func (m *Maps) GetMInt64Str() map[int64]string { - if m != nil { - return m.MInt64Str - } - return nil -} - -func (m *Maps) GetMBoolSimple() map[bool]*Simple { - if m != nil { - return m.MBoolSimple - } - return nil -} - -type MsgWithOneof struct { - // Types that are valid to be assigned to Union: - // *MsgWithOneof_Title - // *MsgWithOneof_Salary - // *MsgWithOneof_Country - // *MsgWithOneof_HomeAddress - Union isMsgWithOneof_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} } -func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } -func (*MsgWithOneof) ProtoMessage() {} -func (*MsgWithOneof) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } - -type isMsgWithOneof_Union interface { - isMsgWithOneof_Union() -} - -type MsgWithOneof_Title struct { - Title string `protobuf:"bytes,1,opt,name=title,oneof"` -} -type MsgWithOneof_Salary struct { - Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` -} -type MsgWithOneof_Country struct { - Country string `protobuf:"bytes,3,opt,name=Country,json=country,oneof"` -} -type MsgWithOneof_HomeAddress struct { - HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"` -} - -func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} -func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} -func (*MsgWithOneof_Country) isMsgWithOneof_Union() {} -func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {} - -func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *MsgWithOneof) GetTitle() string { - if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok { - return x.Title - } - return "" -} - -func (m *MsgWithOneof) GetSalary() int64 { - if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok { - return x.Salary - } - return 0 -} - -func (m *MsgWithOneof) GetCountry() string { - if x, ok := m.GetUnion().(*MsgWithOneof_Country); ok { - return x.Country - } - return "" -} - -func (m *MsgWithOneof) GetHomeAddress() string { - if x, ok := m.GetUnion().(*MsgWithOneof_HomeAddress); ok { - return x.HomeAddress - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{ - (*MsgWithOneof_Title)(nil), - (*MsgWithOneof_Salary)(nil), - (*MsgWithOneof_Country)(nil), - (*MsgWithOneof_HomeAddress)(nil), - } -} - -func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*MsgWithOneof) - // union - switch x := m.Union.(type) { - case *MsgWithOneof_Title: - b.EncodeVarint(1<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Title) - case *MsgWithOneof_Salary: - b.EncodeVarint(2<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Salary)) - case *MsgWithOneof_Country: - b.EncodeVarint(3<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Country) - case *MsgWithOneof_HomeAddress: - b.EncodeVarint(4<<3 | proto.WireBytes) - b.EncodeStringBytes(x.HomeAddress) - case nil: - default: - return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) - } - return nil -} - -func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*MsgWithOneof) - switch tag { - case 1: // union.title - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &MsgWithOneof_Title{x} - return true, err - case 2: // union.salary - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &MsgWithOneof_Salary{int64(x)} - return true, err - case 3: // union.Country - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &MsgWithOneof_Country{x} - return true, err - case 4: // union.home_address - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &MsgWithOneof_HomeAddress{x} - return true, err - default: - return false, nil - } -} - -func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*MsgWithOneof) - // union - switch x := m.Union.(type) { - case *MsgWithOneof_Title: - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Title))) - n += len(x.Title) - case *MsgWithOneof_Salary: - n += proto.SizeVarint(2<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Salary)) - case *MsgWithOneof_Country: - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Country))) - n += len(x.Country) - case *MsgWithOneof_HomeAddress: - n += proto.SizeVarint(4<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.HomeAddress))) - n += len(x.HomeAddress) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Real struct { - Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Real) Reset() { *m = Real{} } -func (m *Real) String() string { return proto.CompactTextString(m) } -func (*Real) ProtoMessage() {} -func (*Real) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } - -var extRange_Real = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*Real) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Real -} - -func (m *Real) GetValue() float64 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type Complex struct { - Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Complex) Reset() { *m = Complex{} } -func (m *Complex) String() string { return proto.CompactTextString(m) } -func (*Complex) ProtoMessage() {} -func (*Complex) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } - -var extRange_Complex = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Complex -} - -func (m *Complex) GetImaginary() float64 { - if m != nil && m.Imaginary != nil { - return *m.Imaginary - } - return 0 -} - -var E_Complex_RealExtension = &proto.ExtensionDesc{ - ExtendedType: (*Real)(nil), - ExtensionType: (*Complex)(nil), - Field: 123, - Name: "jsonpb.Complex.real_extension", - Tag: "bytes,123,opt,name=real_extension,json=realExtension", -} - -type KnownTypes struct { - An *google_protobuf.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"` - Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` - St *google_protobuf2.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"` - Ts *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` - Dbl *google_protobuf4.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` - Flt *google_protobuf4.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` - I64 *google_protobuf4.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` - U64 *google_protobuf4.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` - I32 *google_protobuf4.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` - U32 *google_protobuf4.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` - Bool *google_protobuf4.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` - Str *google_protobuf4.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` - Bytes *google_protobuf4.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *KnownTypes) Reset() { *m = KnownTypes{} } -func (m *KnownTypes) String() string { return proto.CompactTextString(m) } -func (*KnownTypes) ProtoMessage() {} -func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } - -func (m *KnownTypes) GetAn() *google_protobuf.Any { - if m != nil { - return m.An - } - return nil -} - -func (m *KnownTypes) GetDur() *google_protobuf1.Duration { - if m != nil { - return m.Dur - } - return nil -} - -func (m *KnownTypes) GetSt() *google_protobuf2.Struct { - if m != nil { - return m.St - } - return nil -} - -func (m *KnownTypes) GetTs() *google_protobuf3.Timestamp { - if m != nil { - return m.Ts - } - return nil -} - -func (m *KnownTypes) GetDbl() *google_protobuf4.DoubleValue { - if m != nil { - return m.Dbl - } - return nil -} - -func (m *KnownTypes) GetFlt() *google_protobuf4.FloatValue { - if m != nil { - return m.Flt - } - return nil -} - -func (m *KnownTypes) GetI64() *google_protobuf4.Int64Value { - if m != nil { - return m.I64 - } - return nil -} - -func (m *KnownTypes) GetU64() *google_protobuf4.UInt64Value { - if m != nil { - return m.U64 - } - return nil -} - -func (m *KnownTypes) GetI32() *google_protobuf4.Int32Value { - if m != nil { - return m.I32 - } - return nil -} - -func (m *KnownTypes) GetU32() *google_protobuf4.UInt32Value { - if m != nil { - return m.U32 - } - return nil -} - -func (m *KnownTypes) GetBool() *google_protobuf4.BoolValue { - if m != nil { - return m.Bool - } - return nil -} - -func (m *KnownTypes) GetStr() *google_protobuf4.StringValue { - if m != nil { - return m.Str - } - return nil -} - -func (m *KnownTypes) GetBytes() *google_protobuf4.BytesValue { - if m != nil { - return m.Bytes - } - return nil -} - -var E_Name = &proto.ExtensionDesc{ - ExtendedType: (*Real)(nil), - ExtensionType: (*string)(nil), - Field: 124, - Name: "jsonpb.name", - Tag: "bytes,124,opt,name=name", -} - -func init() { - proto.RegisterType((*Simple)(nil), "jsonpb.Simple") - proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") - proto.RegisterType((*Widget)(nil), "jsonpb.Widget") - proto.RegisterType((*Maps)(nil), "jsonpb.Maps") - proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") - proto.RegisterType((*Real)(nil), "jsonpb.Real") - proto.RegisterType((*Complex)(nil), "jsonpb.Complex") - proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes") - proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) - proto.RegisterExtension(E_Complex_RealExtension) - proto.RegisterExtension(E_Name) -} - -func init() { proto.RegisterFile("test_objects.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 1055 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x95, 0x51, 0x73, 0xdb, 0x44, - 0x10, 0xc7, 0x23, 0xc9, 0x96, 0xec, 0x73, 0x12, 0xcc, 0x4d, 0x4a, 0x15, 0x13, 0x40, 0x63, 0x4a, - 0x11, 0x85, 0xba, 0x83, 0xe2, 0xf1, 0x30, 0x85, 0x97, 0xa4, 0x31, 0x94, 0x81, 0x94, 0x99, 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0xa9, 0x05, 0x56, 0xb8, 0xc3, 0x3c, 0x71, 0x8e, 0x61, 0x95, 0x1a, 0xf4, - 0xfd, 0x7a, 0x60, 0x85, 0xb5, 0x22, 0x55, 0x56, 0x29, 0x53, 0xe5, 0x06, 0x56, 0xf8, 0x3e, 0xf3, - 0xc4, 0xd9, 0x8d, 0x2a, 0x65, 0xaa, 0xbc, 0xc0, 0x0a, 0x69, 0x91, 0x1a, 0xf4, 0xcd, 0x26, 0x2e, - 0x53, 0x11, 0x6b, 0xbf, 0x11, 0x58, 0xa1, 0xcd, 0x5c, 0xf1, 0x3d, 0x44, 0xa6, 0x66, 0x22, 0xf2, - 0x71, 0xca, 0xfd, 0x66, 0x60, 0x85, 0x16, 0xf3, 0xc4, 0x09, 0x86, 0x85, 0x9d, 0x96, 0x49, 0x36, - 0xf5, 0x49, 0x60, 0x85, 0x4d, 0xb0, 0xc3, 0xd0, 0xd8, 0x8d, 0x17, 0x9a, 0x2b, 0xbf, 0x15, 0x58, - 0xe1, 0x36, 0x73, 0xc5, 0x31, 0x44, 0xdd, 0x7f, 0x6d, 0xe2, 0x31, 0x3e, 0xe7, 0xb1, 0x56, 0x00, - 0x4a, 0x96, 0xa0, 0x1c, 0x00, 0x25, 0x4b, 0x50, 0x72, 0x09, 0xca, 0x01, 0x50, 0x72, 0x09, 0x4a, - 0x2e, 0x41, 0x39, 0x00, 0x4a, 0x2e, 0x41, 0xc9, 0x0a, 0x94, 0x03, 0xa0, 0x64, 0x05, 0x4a, 0x56, - 0xa0, 0x1c, 0x00, 0x25, 0x2b, 0x50, 0xb2, 0x02, 0xe5, 0x00, 0x28, 0x79, 0x76, 0xa3, 0x6a, 0x09, - 0xca, 0x01, 0x50, 0xb2, 0x02, 0x25, 0x97, 0xa0, 0x1c, 0x00, 0x25, 0x97, 0xa0, 0x64, 0x05, 0xca, - 0x01, 0x50, 0xb2, 0x02, 0x25, 0x2b, 0x50, 0x0e, 0x80, 0x92, 0x15, 0x28, 0xb9, 0x04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 0xbb, 0x76, - 0x73, 0x7e, 0x53, 0x9f, 0x0f, 0xfa, 0x68, 0x7f, 0x18, 0xe1, 0x64, 0xda, 0x60, 0x7f, 0x18, 0x95, - 0xf6, 0x87, 0x11, 0xda, 0x1f, 0x46, 0x38, 0xae, 0x36, 0xd9, 0x2f, 0xf5, 0x39, 0xea, 0x6b, 0x38, - 0x6c, 0x9a, 0x1b, 0x50, 0xc2, 0x6d, 0x33, 0x72, 0xd4, 0x81, 0x3f, 0xbc, 0x1b, 0x64, 0x83, 0xbf, - 0x79, 0xc0, 0x0b, 0x7f, 0xa5, 0x25, 0xfd, 0x9a, 0xd4, 0xab, 0x89, 0x77, 0xd7, 0x07, 0xe0, 0xc3, - 0x6e, 0x0a, 0x8c, 0xf2, 0x69, 0x40, 0x6a, 0x59, 0x3c, 0xe3, 0x2b, 0x2d, 0xfa, 0x27, 0xbe, 0x05, - 0x98, 0x79, 0x17, 0x00, 0x00, 0xff, 0xff, 0xda, 0x8b, 0x4a, 0x7a, 0x0e, 0x09, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto deleted file mode 100644 index d1934a07..00000000 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto +++ /dev/null @@ -1,135 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -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"; - -package jsonpb; - -// Test message for holding primitive types. -message Simple { - optional bool o_bool = 1; - optional int32 o_int32 = 2; - optional int64 o_int64 = 3; - optional uint32 o_uint32 = 4; - optional uint64 o_uint64 = 5; - optional sint32 o_sint32 = 6; - optional sint64 o_sint64 = 7; - optional float o_float = 8; - optional double o_double = 9; - optional string o_string = 10; - optional bytes o_bytes = 11; -} - -// Test message for holding repeated primitives. -message Repeats { - repeated bool r_bool = 1; - repeated int32 r_int32 = 2; - repeated int64 r_int64 = 3; - repeated uint32 r_uint32 = 4; - repeated uint64 r_uint64 = 5; - repeated sint32 r_sint32 = 6; - repeated sint64 r_sint64 = 7; - repeated float r_float = 8; - repeated double r_double = 9; - repeated string r_string = 10; - repeated bytes r_bytes = 11; -} - -// Test message for holding enums and nested messages. -message Widget { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - }; - optional Color color = 1; - repeated Color r_color = 2; - - optional Simple simple = 10; - repeated Simple r_simple = 11; - - optional Repeats repeats = 20; - repeated Repeats r_repeats = 21; -} - -message Maps { - map m_int64_str = 1; - map m_bool_simple = 2; -} - -message MsgWithOneof { - oneof union { - string title = 1; - int64 salary = 2; - string Country = 3; - string home_address = 4; - } -} - -message Real { - optional double value = 1; - extensions 100 to max; -} - -extend Real { - optional string name = 124; -} - -message Complex { - extend Real { - optional Complex real_extension = 123; - } - optional double imaginary = 1; - extensions 100 to max; -} - -message KnownTypes { - optional google.protobuf.Any an = 14; - optional google.protobuf.Duration dur = 1; - optional google.protobuf.Struct st = 12; - optional google.protobuf.Timestamp ts = 2; - - optional google.protobuf.DoubleValue dbl = 3; - optional google.protobuf.FloatValue flt = 4; - optional google.protobuf.Int64Value i64 = 5; - optional google.protobuf.UInt64Value u64 = 6; - optional google.protobuf.Int32Value i32 = 7; - optional google.protobuf.UInt32Value u32 = 8; - optional google.protobuf.BoolValue bool = 9; - optional google.protobuf.StringValue str = 10; - optional google.protobuf.BytesValue bytes = 11; -} diff --git a/vendor/github.com/golang/protobuf/proto/Makefile b/vendor/github.com/golang/protobuf/proto/Makefile deleted file mode 100644 index e2e0651a..00000000 --- a/vendor/github.com/golang/protobuf/proto/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -install: - go install - -test: install generate-test-pbs - go test - - -generate-test-pbs: - make install - make -C testdata - protoc --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/all_test.go b/vendor/github.com/golang/protobuf/proto/all_test.go deleted file mode 100644 index 41451a40..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/proto" - . "github.com/golang/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{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() - bytes, err := Marshal(pb) - if _, ok := err.(*RequiredNotSetError); !ok { - fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("expected = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-1 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 1", bytes) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = Unmarshal(bytes, pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { - t.Errorf("unmarshal wrong err msg: %v", err) - } - bytes, err = Marshal(pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-2 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 2", bytes) - t.Fatalf("string = %s", expected) - } -} - -func fuzzUnmarshal(t *testing.T, data []byte) { - defer func() { - if e := recover(); e != nil { - t.Errorf("These bytes caused a panic: %+v", data) - t.Logf("Stack:\n%s", debug.Stack()) - t.FailNow() - } - }() - - pb := new(MyMessage) - Unmarshal(data, pb) -} - -func TestMapFieldMarshal(t *testing.T) { - m := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Rob", - 4: "Ian", - 8: "Dave", - }, - } - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - - // b should be the concatenation of these three byte sequences in some order. - parts := []string{ - "\n\a\b\x01\x12\x03Rob", - "\n\a\b\x04\x12\x03Ian", - "\n\b\b\x08\x12\x04Dave", - } - ok := false - for i := range parts { - for j := range parts { - if j == i { - continue - } - for k := range parts { - if k == i || k == j { - continue - } - try := parts[i] + parts[j] + parts[k] - if bytes.Equal(b, []byte(try)) { - ok = true - break - } - } - } - } - if !ok { - t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) - } - t.Logf("FYI b: %q", b) - - (new(Buffer)).DebugPrint("Dump of b", b) -} - -func TestMapFieldRoundTrips(t *testing.T) { - m := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Rob", - 4: "Ian", - 8: "Dave", - }, - MsgMapping: map[int64]*FloatingPoint{ - 0x7001: &FloatingPoint{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: []byte{}, - 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{"Barry"}, - } - - // Round-trip. - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof: %v", err) - } - if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) - t.Errorf("Incorrect marshal of message with oneof: %v", b) - } - m.Reset() - if err := Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof: %v", err) - } - if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { - t.Errorf("After round trip, Union = %+v", m.Union) - } - if name := m.GetName(); name != "Barry" { - t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") - } - - // Let's try with a message in the oneof. - m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}} - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof set to message: %v", err) - } - if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) - t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) - } - m.Reset() - if err := Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof set to message: %v", err) - } - ss, ok := m.Union.(*Communique_Msg) - if !ok || ss.Msg.GetStringField() != "deep deep string" { - t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) - } -} - -func TestInefficientPackedBool(t *testing.T) { - // https://github.com/golang/protobuf/issues/76 - inp := []byte{ - 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes - // Usually a bool should take a single byte, - // but it is permitted to be any varint. - 0xb9, 0x30, - } - if err := Unmarshal(inp, new(MoreRepeated)); err != nil { - t.Error(err) - } -} - -// Benchmarks - -func testMsg() *GoTest { - pb := initGoTest(true) - const N = 1000 // Internally the library starts much smaller. - pb.F_Int32Repeated = make([]int32, N) - pb.F_DoubleRepeated = make([]float64, N) - for i := 0; i < N; i++ { - pb.F_Int32Repeated[i] = int32(i) - pb.F_DoubleRepeated[i] = float64(i) - } - return pb -} - -func bytesMsg() *GoTest { - pb := initGoTest(true) - buf := make([]byte, 4000) - for i := range buf { - buf[i] = byte(i) - } - pb.F_BytesDefaulted = buf - return pb -} - -func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { - d, _ := marshal(pb) - b.SetBytes(int64(len(d))) - b.ResetTimer() - for i := 0; i < b.N; i++ { - marshal(pb) - } -} - -func benchmarkBufferMarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - p.Reset() - err := p.Marshal(pb0) - return p.Bytes(), err - }) -} - -func benchmarkSize(b *testing.B, pb Message) { - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - Size(pb) - return nil, nil - }) -} - -func newOf(pb Message) Message { - in := reflect.ValueOf(pb) - if in.IsNil() { - return pb - } - return reflect.New(in.Type().Elem()).Interface().(Message) -} - -func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { - d, _ := Marshal(pb) - b.SetBytes(int64(len(d))) - pbd := newOf(pb) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - unmarshal(d, pbd) - } -} - -func benchmarkBufferUnmarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { - p.SetBuf(d) - return p.Unmarshal(pb0) - }) -} - -// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} - -func BenchmarkMarshal(b *testing.B) { - benchmarkMarshal(b, testMsg(), Marshal) -} - -func BenchmarkBufferMarshal(b *testing.B) { - benchmarkBufferMarshal(b, testMsg()) -} - -func BenchmarkSize(b *testing.B) { - benchmarkSize(b, testMsg()) -} - -func BenchmarkUnmarshal(b *testing.B) { - benchmarkUnmarshal(b, testMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshal(b *testing.B) { - benchmarkBufferUnmarshal(b, testMsg()) -} - -func BenchmarkMarshalBytes(b *testing.B) { - benchmarkMarshal(b, bytesMsg(), Marshal) -} - -func BenchmarkBufferMarshalBytes(b *testing.B) { - benchmarkBufferMarshal(b, bytesMsg()) -} - -func BenchmarkSizeBytes(b *testing.B) { - benchmarkSize(b, bytesMsg()) -} - -func BenchmarkUnmarshalBytes(b *testing.B) { - benchmarkUnmarshal(b, bytesMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshalBytes(b *testing.B) { - benchmarkBufferUnmarshal(b, bytesMsg()) -} - -func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { - b.StopTimer() - pb := initGoTestField() - skip := &GoSkipTest{ - SkipInt32: Int32(32), - SkipFixed32: Uint32(3232), - SkipFixed64: Uint64(6464), - SkipString: String("skipper"), - Skipgroup: &GoSkipTest_SkipGroup{ - GroupInt32: Int32(75), - GroupString: String("wxyz"), - }, - } - - pbd := new(GoTestField) - p := NewBuffer(nil) - p.Marshal(pb) - p.Marshal(skip) - p2 := NewBuffer(nil) - - b.StartTimer() - for i := 0; i < b.N; i++ { - p2.SetBuf(p.Bytes()) - p2.Unmarshal(pbd) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/any_test.go b/vendor/github.com/golang/protobuf/proto/any_test.go deleted file mode 100644 index 1a3c22ed..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/proto" - - pb "github.com/golang/protobuf/proto/proto3_proto" - testpb "github.com/golang/protobuf/proto/testdata" - anypb "github.com/golang/protobuf/ptypes/any" -) - -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: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m2 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m3 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, - } - m4 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, - } - m5 := &anypb.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: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, - ManyThings: []*anypb.Any{ - &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, - &anypb.Any{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: &anypb.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 := &anypb.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 := &anypb.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 := &anypb.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/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go index e392575b..3cd3249f 100644 --- a/vendor/github.com/golang/protobuf/proto/clone.go +++ b/vendor/github.com/golang/protobuf/proto/clone.go @@ -35,22 +35,39 @@ package proto import ( + "fmt" "log" "reflect" "strings" ) // Clone returns a deep copy of a protocol buffer. -func Clone(pb Message) Message { - in := reflect.ValueOf(pb) +func Clone(src Message) Message { + in := reflect.ValueOf(src) if in.IsNil() { - return pb + return src } - out := reflect.New(in.Type().Elem()) - // out is empty so a merge is a deep copy. - mergeStruct(out.Elem(), in.Elem()) - return out.Interface().(Message) + dst := out.Interface().(Message) + Merge(dst, src) + return dst +} + +// Merger is the interface representing objects that can merge messages of the same type. +type Merger interface { + // Merge merges src into this message. + // Required and optional fields that are set in src will be set to that value in dst. + // Elements of repeated fields will be appended. + // + // Merge may panic if called with a different argument type than the receiver. + Merge(src Message) +} + +// generatedMerger is the custom merge method that generated protos will have. +// We must add this method since a generate Merge method will conflict with +// many existing protos that have a Merge data field already defined. +type generatedMerger interface { + XXX_Merge(src Message) } // Merge merges src into dst. @@ -58,17 +75,24 @@ func Clone(pb Message) Message { // Elements of repeated fields will be appended. // Merge panics if src and dst are not the same type, or if dst is nil. func Merge(dst, src Message) { + if m, ok := dst.(Merger); ok { + m.Merge(src) + return + } + in := reflect.ValueOf(src) out := reflect.ValueOf(dst) if out.IsNil() { panic("proto: nil destination") } if in.Type() != out.Type() { - // Explicit test prior to mergeStruct so that mistyped nils will fail - panic("proto: type mismatch") + panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src)) } if in.IsNil() { - // Merging nil into non-nil is a quiet no-op + return // Merge from nil src is a noop + } + if m, ok := dst.(generatedMerger); ok { + m.XXX_Merge(src) return } mergeStruct(out.Elem(), in.Elem()) @@ -84,7 +108,7 @@ func mergeStruct(out, in reflect.Value) { mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) } - if emIn, ok := extendable(in.Addr().Interface()); ok { + if emIn, err := extendable(in.Addr().Interface()); err == nil { emOut, _ := extendable(out.Addr().Interface()) mIn, muIn := emIn.extensionsRead() if mIn != nil { diff --git a/vendor/github.com/golang/protobuf/proto/clone_test.go b/vendor/github.com/golang/protobuf/proto/clone_test.go deleted file mode 100644 index f607ff49..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/proto" - - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/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: &pb.FloatingPoint{F: proto.Float64(2.0)}, - 0x4002: &pb.FloatingPoint{ - 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: &pb.FloatingPoint{ - 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: &pb.FloatingPoint{F: proto.Float64(2.0)}, - 0x4002: &pb.FloatingPoint{ - 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{41}, - }, - dst: &pb.Communique{ - Union: &pb.Communique_Name{"Bobby Tables"}, - }, - want: &pb.Communique{ - Union: &pb.Communique_Number{41}, - }, - }, - // Oneof nil is the same as not set. - { - src: &pb.Communique{}, - dst: &pb.Communique{ - Union: &pb.Communique_Name{"Bobby Tables"}, - }, - want: &pb.Communique{ - Union: &pb.Communique_Name{"Bobby Tables"}, - }, - }, - { - src: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Cute: true}, // replace - "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, // insert - }, - }, - dst: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Bunny: "lost"}, // replaced - "kay_c": &proto3pb.Nested{Bunny: "bunny"}, // keep - }, - }, - want: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Cute: true}, - "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, - "kay_c": &proto3pb.Nested{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/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go index aa207298..d9aa3c42 100644 --- a/vendor/github.com/golang/protobuf/proto/decode.go +++ b/vendor/github.com/golang/protobuf/proto/decode.go @@ -39,8 +39,6 @@ import ( "errors" "fmt" "io" - "os" - "reflect" ) // errOverflow is returned when an integer is too large to be represented. @@ -50,10 +48,6 @@ var errOverflow = errors.New("proto: integer overflow") // wire type is encountered. It does not get returned to user code. var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") -// The fundamental decoders that interpret bytes on the wire. -// Those that take integer types all return uint64 and are -// therefore of type valueDecoder. - // DecodeVarint reads a varint-encoded integer from the slice. // It returns the integer and the number of bytes consumed, or // zero if there is not enough. @@ -267,9 +261,6 @@ func (p *Buffer) DecodeZigzag32() (x uint64, err error) { return } -// These are not ValueDecoders: they produce an array of bytes or a string. -// bytes, embedded messages - // DecodeRawBytes reads a count-delimited byte buffer from the Buffer. // This is the format used for the bytes protocol buffer // type and for embedded messages. @@ -311,81 +302,29 @@ func (p *Buffer) DecodeStringBytes() (s string, err error) { return string(buf), nil } -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -// If the protocol buffer has extensions, and the field matches, add it as an extension. -// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. -func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { - oi := o.index - - err := o.skip(t, tag, wire) - if err != nil { - return err - } - - if !unrecField.IsValid() { - return nil - } - - ptr := structPointer_Bytes(base, unrecField) - - // Add the skipped field to struct field - obuf := o.buf - - o.buf = *ptr - o.EncodeVarint(uint64(tag<<3 | wire)) - *ptr = append(o.buf, obuf[oi:o.index]...) - - o.buf = obuf - - return nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -func (o *Buffer) skip(t reflect.Type, tag, wire int) error { - - var u uint64 - var err error - - switch wire { - case WireVarint: - _, err = o.DecodeVarint() - case WireFixed64: - _, err = o.DecodeFixed64() - case WireBytes: - _, err = o.DecodeRawBytes(false) - case WireFixed32: - _, err = o.DecodeFixed32() - case WireStartGroup: - for { - u, err = o.DecodeVarint() - if err != nil { - break - } - fwire := int(u & 0x7) - if fwire == WireEndGroup { - break - } - ftag := int(u >> 3) - err = o.skip(t, ftag, fwire) - if err != nil { - break - } - } - default: - err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) - } - return err -} - // Unmarshaler is the interface representing objects that can -// unmarshal themselves. The method should reset the receiver before -// decoding starts. The argument points to data that may be +// unmarshal themselves. The argument points to data that may be // overwritten, so implementations should not keep references to the // buffer. +// Unmarshal implementations should not clear the receiver. +// Any unmarshaled data should be merged into the receiver. +// Callers of Unmarshal that do not want to retain existing data +// should Reset the receiver before calling Unmarshal. type Unmarshaler interface { Unmarshal([]byte) error } +// newUnmarshaler is the interface representing objects that can +// unmarshal themselves. The semantics are identical to Unmarshaler. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newUnmarshaler interface { + XXX_Unmarshal([]byte) error +} + // Unmarshal parses the protocol buffer representation in buf and places the // decoded result in pb. If the struct underlying pb does not match // the data in buf, the results can be unpredictable. @@ -395,7 +334,13 @@ type Unmarshaler interface { // to preserve and append to existing data. func Unmarshal(buf []byte, pb Message) error { pb.Reset() - return UnmarshalMerge(buf, pb) + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) } // UnmarshalMerge parses the protocol buffer representation in buf and @@ -405,8 +350,16 @@ func Unmarshal(buf []byte, pb Message) error { // UnmarshalMerge merges into existing data in pb. // Most code should use Unmarshal instead. func UnmarshalMerge(buf []byte, pb Message) error { - // If the object can unmarshal itself, let it. + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 return u.Unmarshal(buf) } return NewBuffer(buf).Unmarshal(pb) @@ -422,12 +375,17 @@ func (p *Buffer) DecodeMessage(pb Message) error { } // DecodeGroup reads a tag-delimited group from the Buffer. +// StartGroup tag is already consumed. This function consumes +// EndGroup tag. func (p *Buffer) DecodeGroup(pb Message) error { - typ, base, err := getbase(pb) - if err != nil { - return err + b := p.buf[p.index:] + x, y := findEndGroup(b) + if x < 0 { + return io.ErrUnexpectedEOF } - return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) + err := Unmarshal(b[:x], pb) + p.index += y + return err } // Unmarshal parses the protocol buffer representation in the @@ -438,533 +396,33 @@ func (p *Buffer) DecodeGroup(pb Message) error { // Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. func (p *Buffer) Unmarshal(pb Message) error { // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - err := u.Unmarshal(p.buf[p.index:]) + if u, ok := pb.(newUnmarshaler); ok { + err := u.XXX_Unmarshal(p.buf[p.index:]) p.index = len(p.buf) return err } - - typ, base, err := getbase(pb) - if err != nil { - return err - } - - err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) - - if collectStats { - stats.Decode++ - } - - return err -} - -// unmarshalType does the work of unmarshaling a structure. -func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { - var state errorState - required, reqFields := prop.reqCount, uint64(0) - - var err error - for err == nil && o.index < len(o.buf) { - oi := o.index - var u uint64 - u, err = o.DecodeVarint() - if err != nil { - break - } - wire := int(u & 0x7) - if wire == WireEndGroup { - if is_group { - if required > 0 { - // Not enough information to determine the exact field. - // (See below.) - return &RequiredNotSetError{"{Unknown}"} - } - return nil // input is satisfied - } - return fmt.Errorf("proto: %s: wiretype end group for non-group", st) - } - tag := int(u >> 3) - if tag <= 0 { - return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) - } - fieldnum, ok := prop.decoderTags.get(tag) - if !ok { - // Maybe it's an extension? - if prop.extendable { - if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) { - if err = o.skip(st, tag, wire); err == nil { - extmap := e.extensionsWrite() - ext := extmap[int32(tag)] // may be missing - ext.enc = append(ext.enc, o.buf[oi:o.index]...) - extmap[int32(tag)] = ext - } - continue - } - } - // Maybe it's a oneof? - if prop.oneofUnmarshaler != nil { - m := structPointer_Interface(base, st).(Message) - // First return value indicates whether tag is a oneof field. - ok, err = prop.oneofUnmarshaler(m, tag, wire, o) - if err == ErrInternalBadWireType { - // Map the error to something more descriptive. - // Do the formatting here to save generated code space. - err = fmt.Errorf("bad wiretype for oneof field in %T", m) - } - if ok { - continue - } - } - err = o.skipAndSave(st, tag, wire, base, prop.unrecField) - continue - } - p := prop.Prop[fieldnum] - - if p.dec == nil { - fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) - continue - } - dec := p.dec - if wire != WireStartGroup && wire != p.WireType { - if wire == WireBytes && p.packedDec != nil { - // a packable field - dec = p.packedDec - } else { - err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) - continue - } - } - decErr := dec(o, p, base) - if decErr != nil && !state.shouldContinue(decErr, p) { - err = decErr - } - if err == nil && p.Required { - // Successfully decoded a required field. - if tag <= 64 { - // use bitmap for fields 1-64 to catch field reuse. - var mask uint64 = 1 << uint64(tag-1) - if reqFields&mask == 0 { - // new required field - reqFields |= mask - required-- - } - } else { - // This is imprecise. It can be fooled by a required field - // with a tag > 64 that is encoded twice; that's very rare. - // A fully correct implementation would require allocating - // a data structure, which we would like to avoid. - required-- - } - } - } - if err == nil { - if is_group { - return io.ErrUnexpectedEOF - } - if state.err != nil { - return state.err - } - if required > 0 { - // Not enough information to determine the exact field. If we use extra - // CPU, we could determine the field only if the missing required field - // has a tag <= 64 and we check reqFields. - return &RequiredNotSetError{"{Unknown}"} - } - } - return err -} - -// Individual type decoders -// For each, -// u is the decoded value, -// v is a pointer to the field (pointer) in the struct - -// Sizes of the pools to allocate inside the Buffer. -// The goal is modest amortization and allocation -// on at least 16-byte boundaries. -const ( - boolPoolSize = 16 - uint32PoolSize = 8 - uint64PoolSize = 4 -) - -// Decode a bool. -func (o *Buffer) dec_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - if len(o.bools) == 0 { - o.bools = make([]bool, boolPoolSize) - } - o.bools[0] = u != 0 - *structPointer_Bool(base, p.field) = &o.bools[0] - o.bools = o.bools[1:] - return nil -} - -func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - *structPointer_BoolVal(base, p.field) = u != 0 - return nil -} - -// Decode an int32. -func (o *Buffer) dec_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) - return nil -} - -func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) - return nil -} - -// Decode an int64. -func (o *Buffer) dec_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64_Set(structPointer_Word64(base, p.field), o, u) - return nil -} - -func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64Val_Set(structPointer_Word64Val(base, p.field), o, u) - return nil -} - -// Decode a string. -func (o *Buffer) dec_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_String(base, p.field) = &s - return nil -} - -func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_StringVal(base, p.field) = s - return nil -} - -// Decode a slice of bytes ([]byte). -func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - *structPointer_Bytes(base, p.field) = b - return nil -} - -// Decode a slice of bools ([]bool). -func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - v := structPointer_BoolSlice(base, p.field) - *v = append(*v, u != 0) - return nil -} - -// Decode a slice of bools ([]bool) in packed format. -func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { - v := structPointer_BoolSlice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded bools - fin := o.index + nb - if fin < o.index { - return errOverflow - } - - y := *v - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - y = append(y, u != 0) - } - - *v = y - return nil -} - -// Decode a slice of int32s ([]int32). -func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - structPointer_Word32Slice(base, p.field).Append(uint32(u)) - return nil -} - -// Decode a slice of int32s ([]int32) in packed format. -func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int32s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(uint32(u)) - } - return nil -} - -// Decode a slice of int64s ([]int64). -func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - - structPointer_Word64Slice(base, p.field).Append(u) - return nil -} - -// Decode a slice of int64s ([]int64) in packed format. -func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int64s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(u) - } - return nil -} - -// Decode a slice of strings ([]string). -func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - v := structPointer_StringSlice(base, p.field) - *v = append(*v, s) - return nil -} - -// Decode a slice of slice of bytes ([][]byte). -func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - v := structPointer_BytesSlice(base, p.field) - *v = append(*v, b) - return nil -} - -// Decode a map field. -func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - oi := o.index // index at the end of this map entry - o.index -= len(raw) // move buffer back to start of map entry - - mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V - if mptr.Elem().IsNil() { - mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) - } - v := mptr.Elem() // map[K]V - - // Prepare addressable doubly-indirect placeholders for the key and value types. - // See enc_new_map for why. - keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K - keybase := toStructPointer(keyptr.Addr()) // **K - - var valbase structPointer - var valptr reflect.Value - switch p.mtype.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valptr = reflect.ValueOf(&dummy) // *[]byte - valbase = toStructPointer(valptr) // *[]byte - case reflect.Ptr: - // message; valptr is **Msg; need to allocate the intermediate pointer - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valptr.Set(reflect.New(valptr.Type().Elem())) - valbase = toStructPointer(valptr) - default: - // everything else - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valbase = toStructPointer(valptr.Addr()) // **V - } - - // Decode. - // This parses a restricted wire format, namely the encoding of a message - // with two fields. See enc_new_map for the format. - for o.index < oi { - // tagcode for key and value properties are always a single byte - // because they have tags 1 and 2. - tagcode := o.buf[o.index] - o.index++ - switch tagcode { - case p.mkeyprop.tagcode[0]: - if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { - return err - } - case p.mvalprop.tagcode[0]: - if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { - return err - } - default: - // TODO: Should we silently skip this instead? - return fmt.Errorf("proto: bad map data tag %d", raw[0]) - } - } - keyelem, valelem := keyptr.Elem(), valptr.Elem() - if !keyelem.IsValid() { - keyelem = reflect.Zero(p.mtype.Key()) - } - if !valelem.IsValid() { - valelem = reflect.Zero(p.mtype.Elem()) - } - - v.SetMapIndex(keyelem, valelem) - return nil -} - -// Decode a group. -func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - return o.unmarshalType(p.stype, p.sprop, true, bas) -} - -// Decode an embedded message. -func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { - raw, e := o.DecodeRawBytes(false) - if e != nil { - return e - } - - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := structPointer_Interface(bas, p.stype) - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, false, bas) - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of embedded messages. -func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, false, base) -} - -// Decode a slice of embedded groups. -func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, true, base) -} - -// Decode a slice of structs ([]*struct). -func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { - v := reflect.New(p.stype) - bas := toStructPointer(v) - structPointer_StructPointerSlice(base, p.field).Append(bas) - - if is_group { - err := o.unmarshalType(p.stype, p.sprop, is_group, bas) - return err - } - - raw, err := o.DecodeRawBytes(false) - if err != nil { + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) return err } - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := v.Interface() - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, is_group, bas) - - o.buf = obuf - o.index = oi - + // Slow workaround for messages that aren't Unmarshalers. + // This includes some hand-coded .pb.go files and + // bootstrap protos. + // TODO: fix all of those and then add Unmarshal to + // the Message interface. Then: + // The cast above and code below can be deleted. + // The old unmarshaler can be deleted. + // Clients can call Unmarshal directly (can already do that, actually). + var info InternalMessageInfo + err := info.Unmarshal(pb, p.buf[p.index:]) + p.index = len(p.buf) return err } diff --git a/vendor/github.com/golang/protobuf/proto/decode_test.go b/vendor/github.com/golang/protobuf/proto/decode_test.go deleted file mode 100644 index b1f13044..00000000 --- a/vendor/github.com/golang/protobuf/proto/decode_test.go +++ /dev/null @@ -1,256 +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 ( - "fmt" - "testing" - - "github.com/golang/protobuf/proto" - tpb "github.com/golang/protobuf/proto/proto3_proto" -) - -var ( - bytesBlackhole []byte - msgBlackhole = new(tpb.Message) -) - -// 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<>= 7 - if x == 0 { - break - } - } - return n + switch { + case x < 1<<7: + return 1 + case x < 1<<14: + return 2 + case x < 1<<21: + return 3 + case x < 1<<28: + return 4 + case x < 1<<35: + return 5 + case x < 1<<42: + return 6 + case x < 1<<49: + return 7 + case x < 1<<56: + return 8 + case x < 1<<63: + return 9 + } + return 10 } // EncodeFixed64 writes a 64-bit integer to the Buffer. @@ -149,10 +135,6 @@ func (p *Buffer) EncodeFixed64(x uint64) error { return nil } -func sizeFixed64(x uint64) int { - return 8 -} - // EncodeFixed32 writes a 32-bit integer to the Buffer. // This is the format for the // fixed32, sfixed32, and float protocol buffer types. @@ -165,10 +147,6 @@ func (p *Buffer) EncodeFixed32(x uint64) error { return nil } -func sizeFixed32(x uint64) int { - return 4 -} - // EncodeZigzag64 writes a zigzag-encoded 64-bit integer // to the Buffer. // This is the format used for the sint64 protocol buffer type. @@ -177,10 +155,6 @@ func (p *Buffer) EncodeZigzag64(x uint64) error { return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func sizeZigzag64(x uint64) int { - return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - // EncodeZigzag32 writes a zigzag-encoded 32-bit integer // to the Buffer. // This is the format used for the sint32 protocol buffer type. @@ -189,10 +163,6 @@ func (p *Buffer) EncodeZigzag32(x uint64) error { return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) } -func sizeZigzag32(x uint64) int { - return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - // EncodeRawBytes writes a count-delimited byte buffer to the Buffer. // This is the format used for the bytes protocol buffer // type and for embedded messages. @@ -202,11 +172,6 @@ func (p *Buffer) EncodeRawBytes(b []byte) error { return nil } -func sizeRawBytes(b []byte) int { - return sizeVarint(uint64(len(b))) + - len(b) -} - // EncodeStringBytes writes an encoded string to the Buffer. // This is the format used for the proto2 string type. func (p *Buffer) EncodeStringBytes(s string) error { @@ -215,319 +180,17 @@ func (p *Buffer) EncodeStringBytes(s string) error { return nil } -func sizeStringBytes(s string) int { - return sizeVarint(uint64(len(s))) + - len(s) -} - // Marshaler is the interface representing objects that can marshal themselves. type Marshaler interface { Marshal() ([]byte, error) } -// Marshal takes the protocol buffer -// and encodes it into the wire format, returning the data. -func Marshal(pb Message) ([]byte, error) { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - return m.Marshal() - } - p := NewBuffer(nil) - err := p.Marshal(pb) - if p.buf == nil && err == nil { - // Return a non-nil slice on success. - return []byte{}, nil - } - return p.buf, err -} - // EncodeMessage writes the protocol buffer to the Buffer, // prefixed by a varint-encoded length. func (p *Buffer) EncodeMessage(pb Message) error { - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - var state errorState - err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) - } - return err -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, writing the result to the -// Buffer. -func (p *Buffer) Marshal(pb Message) error { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - data, err := m.Marshal() - p.buf = append(p.buf, data...) - return err - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - err = p.enc_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Encode++ // Parens are to work around a goimports bug. - } - - if len(p.buf) > maxMarshalSize { - return ErrTooLarge - } - return err -} - -// Size returns the encoded size of a protocol buffer. -func Size(pb Message) (n int) { - // Can the object marshal itself? If so, Size is slow. - // TODO: add Size to Marshaler, or add a Sizer interface. - if m, ok := pb.(Marshaler); ok { - b, _ := m.Marshal() - return len(b) - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return 0 - } - if err == nil { - n = size_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Size++ // Parens are to work around a goimports bug. - } - - return -} - -// Individual type encoders. - -// Encode a bool. -func (o *Buffer) enc_bool(p *Properties, base structPointer) error { - v := *structPointer_Bool(base, p.field) - if v == nil { - return ErrNil - } - x := 0 - if *v { - x = 1 - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { - v := *structPointer_BoolVal(base, p.field) - if !v { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, 1) - return nil -} - -func size_bool(p *Properties, base structPointer) int { - v := *structPointer_Bool(base, p.field) - if v == nil { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -func size_proto3_bool(p *Properties, base structPointer) int { - v := *structPointer_BoolVal(base, p.field) - if !v && !p.oneof { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -// Encode an int32. -func (o *Buffer) enc_int32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode a uint32. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := word32_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := word32_Get(v) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode an int64. -func (o *Buffer) enc_int64(p *Properties, base structPointer) error { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return ErrNil - } - x := word64_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func size_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return 0 - } - x := word64_Get(v) - n += len(p.tagcode) - n += p.valSize(x) - return -} - -func size_proto3_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(x) - return -} - -// Encode a string. -func (o *Buffer) enc_string(p *Properties, base structPointer) error { - v := *structPointer_String(base, p.field) - if v == nil { - return ErrNil - } - x := *v - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(x) - return nil -} - -func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { - v := *structPointer_StringVal(base, p.field) - if v == "" { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(v) - return nil -} - -func size_string(p *Properties, base structPointer) (n int) { - v := *structPointer_String(base, p.field) - if v == nil { - return 0 - } - x := *v - n += len(p.tagcode) - n += sizeStringBytes(x) - return -} - -func size_proto3_string(p *Properties, base structPointer) (n int) { - v := *structPointer_StringVal(base, p.field) - if v == "" && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeStringBytes(v) - return + siz := Size(pb) + p.EncodeVarint(uint64(siz)) + return p.Marshal(pb) } // All protocol buffer fields are nillable, but be careful. @@ -538,818 +201,3 @@ func isNil(v reflect.Value) bool { } return false } - -// Encode a message struct. -func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { - var state errorState - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return state.err - } - - o.buf = append(o.buf, p.tagcode...) - return o.enc_len_struct(p.sprop, structp, &state) -} - -func size_struct_message(p *Properties, base structPointer) int { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n0 := len(p.tagcode) - n1 := sizeRawBytes(data) - return n0 + n1 - } - - n0 := len(p.tagcode) - n1 := size_struct(p.sprop, structp) - n2 := sizeVarint(uint64(n1)) // size of encoded length - return n0 + n1 + n2 -} - -// Encode a group struct. -func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { - var state errorState - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return ErrNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - err := o.enc_struct(p.sprop, b) - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return state.err -} - -func size_struct_group(p *Properties, base structPointer) (n int) { - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return 0 - } - - n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) - n += size_struct(p.sprop, b) - n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return -} - -// Encode a slice of bools ([]bool). -func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - for _, x := range s { - o.buf = append(o.buf, p.tagcode...) - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_bool(p *Properties, base structPointer) int { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - return l * (len(p.tagcode) + 1) // each bool takes exactly one byte -} - -// Encode a slice of bools ([]bool) in packed format. -func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(l)) // each bool takes exactly one byte - for _, x := range s { - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_packed_bool(p *Properties, base structPointer) (n int) { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - n += len(p.tagcode) - n += sizeVarint(uint64(l)) - n += l // each bool takes exactly one byte - return -} - -// Encode a slice of bytes ([]byte). -func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func size_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if s == nil && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -// Encode a slice of int32s ([]int32). -func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of int32s ([]int32) in packed format. -func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(buf, uint64(x)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - bufSize += p.valSize(uint64(x)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of uint32s ([]uint32). -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := s.Index(i) - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := s.Index(i) - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of uint32s ([]uint32) in packed format. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, uint64(s.Index(i))) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(uint64(s.Index(i))) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of int64s ([]int64). -func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, s.Index(i)) - } - return nil -} - -func size_slice_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - n += p.valSize(s.Index(i)) - } - return -} - -// Encode a slice of int64s ([]int64) in packed format. -func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, s.Index(i)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(s.Index(i)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of slice of bytes ([][]byte). -func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(ss[i]) - } - return nil -} - -func size_slice_slice_byte(p *Properties, base structPointer) (n int) { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return 0 - } - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeRawBytes(ss[i]) - } - return -} - -// Encode a slice of strings ([]string). -func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(ss[i]) - } - return nil -} - -func size_slice_string(p *Properties, base structPointer) (n int) { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeStringBytes(ss[i]) - } - return -} - -// Encode a slice of message structs ([]*struct). -func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return errRepeatedHasNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - continue - } - - o.buf = append(o.buf, p.tagcode...) - err := o.enc_len_struct(p.sprop, structp, &state) - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - } - return state.err -} - -func size_slice_struct_message(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return // return the size up to this point - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n += sizeRawBytes(data) - continue - } - - n0 := size_struct(p.sprop, structp) - n1 := sizeVarint(uint64(n0)) // size of encoded length - n += n0 + n1 - } - return -} - -// Encode a slice of group structs ([]*struct). -func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return errRepeatedHasNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - - err := o.enc_struct(p.sprop, b) - - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - } - return state.err -} - -func size_slice_struct_group(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) - n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return // return size up to this point - } - - n += size_struct(p.sprop, b) - } - return -} - -// Encode an extension map. -func (o *Buffer) enc_map(p *Properties, base structPointer) error { - exts := structPointer_ExtMap(base, p.field) - if err := encodeExtensionsMap(*exts); err != nil { - return err - } - - return o.enc_map_body(*exts) -} - -func (o *Buffer) enc_exts(p *Properties, base structPointer) error { - exts := structPointer_Extensions(base, p.field) - if err := encodeExtensions(exts); err != nil { - return err - } - v, _ := exts.extensionsRead() - - return o.enc_map_body(v) -} - -func (o *Buffer) enc_map_body(v map[int32]Extension) error { - // Fast-path for common cases: zero or one extensions. - if len(v) <= 1 { - for _, e := range v { - o.buf = append(o.buf, e.enc...) - } - return nil - } - - // Sort keys to provide a deterministic encoding. - keys := make([]int, 0, len(v)) - for k := range v { - keys = append(keys, int(k)) - } - sort.Ints(keys) - - for _, k := range keys { - o.buf = append(o.buf, v[int32(k)].enc...) - } - return nil -} - -func size_map(p *Properties, base structPointer) int { - v := structPointer_ExtMap(base, p.field) - return extensionsMapSize(*v) -} - -func size_exts(p *Properties, base structPointer) int { - v := structPointer_Extensions(base, p.field) - return extensionsSize(v) -} - -// Encode a map field. -func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { - var state errorState // XXX: or do we need to plumb this through? - - /* - A map defined as - map map_field = N; - is encoded in the same way as - message MapFieldEntry { - key_type key = 1; - value_type value = 2; - } - repeated MapFieldEntry map_field = N; - */ - - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - if v.Len() == 0 { - return nil - } - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - enc := func() error { - if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { - return err - } - if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil { - return err - } - return nil - } - - // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - - keycopy.Set(key) - valcopy.Set(val) - - o.buf = append(o.buf, p.tagcode...) - if err := o.enc_len_thing(enc, &state); err != nil { - return err - } - } - return nil -} - -func size_new_map(p *Properties, base structPointer) int { - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - n := 0 - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - keycopy.Set(key) - valcopy.Set(val) - - // Tag codes for key and val are the responsibility of the sub-sizer. - keysize := p.mkeyprop.size(p.mkeyprop, keybase) - valsize := p.mvalprop.size(p.mvalprop, valbase) - entry := keysize + valsize - // Add on tag code and length of map entry itself. - n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry - } - return n -} - -// mapEncodeScratch returns a new reflect.Value matching the map's value type, -// and a structPointer suitable for passing to an encoder or sizer. -func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { - // Prepare addressable doubly-indirect placeholders for the key and value types. - // This is needed because the element-type encoders expect **T, but the map iteration produces T. - - keycopy = reflect.New(mapType.Key()).Elem() // addressable K - keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K - keyptr.Set(keycopy.Addr()) // - keybase = toStructPointer(keyptr.Addr()) // **K - - // Value types are more varied and require special handling. - switch mapType.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte - valbase = toStructPointer(valcopy.Addr()) - case reflect.Ptr: - // message; the generated field type is map[K]*Msg (so V is *Msg), - // so we only need one level of indirection. - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valbase = toStructPointer(valcopy.Addr()) - default: - // everything else - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V - valptr.Set(valcopy.Addr()) // - valbase = toStructPointer(valptr.Addr()) // **V - } - return -} - -// Encode a struct. -func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { - var state errorState - // Encode fields in tag order so that decoders may use optimizations - // that depend on the ordering. - // https://developers.google.com/protocol-buffers/docs/encoding#order - for _, i := range prop.order { - p := prop.Prop[i] - if p.enc != nil { - err := p.enc(o, p, base) - if err != nil { - if err == ErrNil { - if p.Required && state.err == nil { - state.err = &RequiredNotSetError{p.Name} - } - } else if err == errRepeatedHasNil { - // Give more context to nil values in repeated fields. - return errors.New("repeated field " + p.OrigName + " has nil element") - } else if !state.shouldContinue(err, p) { - return err - } - } - if len(o.buf) > maxMarshalSize { - return ErrTooLarge - } - } - } - - // Do oneof fields. - if prop.oneofMarshaler != nil { - m := structPointer_Interface(base, prop.stype).(Message) - if err := prop.oneofMarshaler(m, o); err == ErrNil { - return errOneofHasNil - } else if err != nil { - return err - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - if len(o.buf)+len(v) > maxMarshalSize { - return ErrTooLarge - } - if len(v) > 0 { - o.buf = append(o.buf, v...) - } - } - - return state.err -} - -func size_struct(prop *StructProperties, base structPointer) (n int) { - for _, i := range prop.order { - p := prop.Prop[i] - if p.size != nil { - n += p.size(p, base) - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - n += len(v) - } - - // Factor in any oneof fields. - if prop.oneofSizer != nil { - m := structPointer_Interface(base, prop.stype).(Message) - n += prop.oneofSizer(m) - } - - return -} - -var zeroes [20]byte // longer than any conceivable sizeVarint - -// Encode a struct, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { - return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) -} - -// Encode something, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { - iLen := len(o.buf) - o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length - iMsg := len(o.buf) - err := enc() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - lMsg := len(o.buf) - iMsg - lLen := sizeVarint(uint64(lMsg)) - switch x := lLen - (iMsg - iLen); { - case x > 0: // actual length is x bytes larger than the space we reserved - // Move msg x bytes right. - o.buf = append(o.buf, zeroes[:x]...) - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - case x < 0: // actual length is x bytes smaller than the space we reserved - // Move msg x bytes left. - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - o.buf = o.buf[:len(o.buf)+x] // x is negative - } - // Encode the length in the reserved space. - o.buf = o.buf[:iLen] - o.EncodeVarint(uint64(lMsg)) - o.buf = o.buf[:len(o.buf)+lMsg] - return state.err -} - -// errorState maintains the first error that occurs and updates that error -// with additional context. -type errorState struct { - err error -} - -// shouldContinue reports whether encoding should continue upon encountering the -// given error. If the error is RequiredNotSetError, shouldContinue returns true -// and, if this is the first appearance of that error, remembers it for future -// reporting. -// -// If prop is not nil, it may update any error with additional context about the -// field with the error. -func (s *errorState) shouldContinue(err error, prop *Properties) bool { - // Ignore unset required fields. - reqNotSet, ok := err.(*RequiredNotSetError) - if !ok { - return false - } - if s.err == nil { - if prop != nil { - err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} - } - s.err = err - } - return true -} diff --git a/vendor/github.com/golang/protobuf/proto/encode_test.go b/vendor/github.com/golang/protobuf/proto/encode_test.go deleted file mode 100644 index 0b36a0e9..00000000 --- a/vendor/github.com/golang/protobuf/proto/encode_test.go +++ /dev/null @@ -1,83 +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 ( - "strconv" - "testing" - - "github.com/golang/protobuf/proto" - tpb "github.com/golang/protobuf/proto/proto3_proto" - "github.com/golang/protobuf/ptypes" -) - -var ( - blackhole []byte -) - -// BenchmarkAny creates increasingly large arbitrary Any messages. The type is always the -// same. -func BenchmarkAny(b *testing.B) { - data := make([]byte, 1<<20) - quantum := 1 << 10 - for i := uint(0); i <= 10; i++ { - b.Run(strconv.Itoa(quantum<= len(o.buf) { + if len(b) == 0 { break } } @@ -472,9 +429,9 @@ func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { // GetExtensions returns a slice of the extensions present in pb that are also listed in es. // The returned slice has the same length as es; missing extensions will appear as nil elements. func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { - epb, ok := extendable(pb) - if !ok { - return nil, errors.New("proto: not an extendable proto") + epb, err := extendable(pb) + if err != nil { + return nil, err } extensions = make([]interface{}, len(es)) for i, e := range es { @@ -493,9 +450,9 @@ func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, e // For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing // just the Field field, which defines the extension's field number. func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { - epb, ok := extendable(pb) - if !ok { - return nil, fmt.Errorf("proto: %T is not an extendable proto.Message", pb) + epb, err := extendable(pb) + if err != nil { + return nil, err } registeredExtensions := RegisteredExtensions(pb) @@ -522,9 +479,9 @@ func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { // SetExtension sets the specified extension of pb to the specified value. func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { - epb, ok := extendable(pb) - if !ok { - return errors.New("proto: not an extendable proto") + epb, err := extendable(pb) + if err != nil { + return err } if err := checkExtensionTypes(epb, extension); err != nil { return err @@ -549,8 +506,8 @@ func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error // ClearAllExtensions clears all extensions from pb. func ClearAllExtensions(pb Message) { - epb, ok := extendable(pb) - if !ok { + epb, err := extendable(pb) + if err != nil { return } m := epb.extensionsWrite() diff --git a/vendor/github.com/golang/protobuf/proto/extensions_test.go b/vendor/github.com/golang/protobuf/proto/extensions_test.go deleted file mode 100644 index 403d7c65..00000000 --- a/vendor/github.com/golang/protobuf/proto/extensions_test.go +++ /dev/null @@ -1,508 +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 ( - "bytes" - "fmt" - "reflect" - "sort" - "testing" - - "github.com/golang/protobuf/proto" - pb "github.com/golang/protobuf/proto/testdata" -) - -func TestGetExtensionsWithMissingExtensions(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Fatalf("Could not set ext1: %s", err) - } - exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ - pb.E_Ext_More, - pb.E_Ext_Text, - }) - if err != nil { - t.Fatalf("GetExtensions() failed: %s", err) - } - if exts[0] != ext1 { - t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) - } - if exts[1] != nil { - t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) - } -} - -func TestExtensionDescsWithMissingExtensions(t *testing.T) { - msg := &pb.MyMessage{Count: proto.Int32(0)} - extdesc1 := pb.E_Ext_More - if descs, err := proto.ExtensionDescs(msg); len(descs) != 0 || err != nil { - t.Errorf("proto.ExtensionDescs: got %d descs, error %v; want 0, nil", len(descs), err) - } - - ext1 := &pb.Ext{} - if err := proto.SetExtension(msg, extdesc1, ext1); err != nil { - t.Fatalf("Could not set ext1: %s", err) - } - extdesc2 := &proto.ExtensionDesc{ - ExtendedType: (*pb.MyMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 123456789, - Name: "a.b", - Tag: "varint,123456789,opt", - } - ext2 := proto.Bool(false) - if err := proto.SetExtension(msg, extdesc2, ext2); err != nil { - t.Fatalf("Could not set ext2: %s", err) - } - - b, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Could not marshal msg: %v", err) - } - if err := proto.Unmarshal(b, msg); err != nil { - t.Fatalf("Could not unmarshal into msg: %v", err) - } - - descs, err := proto.ExtensionDescs(msg) - if err != nil { - t.Fatalf("proto.ExtensionDescs: got error %v", err) - } - sortExtDescs(descs) - wantDescs := []*proto.ExtensionDesc{extdesc1, &proto.ExtensionDesc{Field: extdesc2.Field}} - if !reflect.DeepEqual(descs, wantDescs) { - t.Errorf("proto.ExtensionDescs(msg) sorted extension ids: got %+v, want %+v", descs, wantDescs) - } -} - -type ExtensionDescSlice []*proto.ExtensionDesc - -func (s ExtensionDescSlice) Len() int { return len(s) } -func (s ExtensionDescSlice) Less(i, j int) bool { return s[i].Field < s[j].Field } -func (s ExtensionDescSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -func sortExtDescs(s []*proto.ExtensionDesc) { - sort.Sort(ExtensionDescSlice(s)) -} - -func TestGetExtensionStability(t *testing.T) { - check := func(m *pb.MyMessage) bool { - ext1, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - ext2, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - return ext1 == ext2 - } - msg := &pb.MyMessage{Count: proto.Int32(4)} - ext0 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { - t.Fatalf("Could not set ext1: %s", ext0) - } - if !check(msg) { - t.Errorf("GetExtension() not stable before marshaling") - } - bb, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Marshal() failed: %s", err) - } - msg1 := &pb.MyMessage{} - err = proto.Unmarshal(bb, msg1) - if err != nil { - t.Fatalf("Unmarshal() failed: %s", err) - } - if !check(msg1) { - t.Errorf("GetExtension() not stable after unmarshaling") - } -} - -func TestGetExtensionDefaults(t *testing.T) { - var setFloat64 float64 = 1 - var setFloat32 float32 = 2 - var setInt32 int32 = 3 - var setInt64 int64 = 4 - var setUint32 uint32 = 5 - var setUint64 uint64 = 6 - var setBool = true - var setBool2 = false - var setString = "Goodnight string" - var setBytes = []byte("Goodnight bytes") - var setEnum = pb.DefaultsMessage_TWO - - type testcase struct { - ext *proto.ExtensionDesc // Extension we are testing. - want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). - def interface{} // Expected value of extension after ClearExtension(). - } - tests := []testcase{ - {pb.E_NoDefaultDouble, setFloat64, nil}, - {pb.E_NoDefaultFloat, setFloat32, nil}, - {pb.E_NoDefaultInt32, setInt32, nil}, - {pb.E_NoDefaultInt64, setInt64, nil}, - {pb.E_NoDefaultUint32, setUint32, nil}, - {pb.E_NoDefaultUint64, setUint64, nil}, - {pb.E_NoDefaultSint32, setInt32, nil}, - {pb.E_NoDefaultSint64, setInt64, nil}, - {pb.E_NoDefaultFixed32, setUint32, nil}, - {pb.E_NoDefaultFixed64, setUint64, nil}, - {pb.E_NoDefaultSfixed32, setInt32, nil}, - {pb.E_NoDefaultSfixed64, setInt64, nil}, - {pb.E_NoDefaultBool, setBool, nil}, - {pb.E_NoDefaultBool, setBool2, nil}, - {pb.E_NoDefaultString, setString, nil}, - {pb.E_NoDefaultBytes, setBytes, nil}, - {pb.E_NoDefaultEnum, setEnum, nil}, - {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, - {pb.E_DefaultFloat, setFloat32, float32(3.14)}, - {pb.E_DefaultInt32, setInt32, int32(42)}, - {pb.E_DefaultInt64, setInt64, int64(43)}, - {pb.E_DefaultUint32, setUint32, uint32(44)}, - {pb.E_DefaultUint64, setUint64, uint64(45)}, - {pb.E_DefaultSint32, setInt32, int32(46)}, - {pb.E_DefaultSint64, setInt64, int64(47)}, - {pb.E_DefaultFixed32, setUint32, uint32(48)}, - {pb.E_DefaultFixed64, setUint64, uint64(49)}, - {pb.E_DefaultSfixed32, setInt32, int32(50)}, - {pb.E_DefaultSfixed64, setInt64, int64(51)}, - {pb.E_DefaultBool, setBool, true}, - {pb.E_DefaultBool, setBool2, true}, - {pb.E_DefaultString, setString, "Hello, string"}, - {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, - {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, - } - - checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { - val, err := proto.GetExtension(msg, test.ext) - if err != nil { - if valWant != nil { - return fmt.Errorf("GetExtension(): %s", err) - } - if want := proto.ErrMissingExtension; err != want { - return fmt.Errorf("Unexpected error: got %v, want %v", err, want) - } - return nil - } - - // All proto2 extension values are either a pointer to a value or a slice of values. - ty := reflect.TypeOf(val) - tyWant := reflect.TypeOf(test.ext.ExtensionType) - if got, want := ty, tyWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) - } - tye := ty.Elem() - tyeWant := tyWant.Elem() - if got, want := tye, tyeWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) - } - - // Check the name of the type of the value. - // If it is an enum it will be type int32 with the name of the enum. - if got, want := tye.Name(), tye.Name(); got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) - } - - // Check that value is what we expect. - // If we have a pointer in val, get the value it points to. - valExp := val - if ty.Kind() == reflect.Ptr { - valExp = reflect.ValueOf(val).Elem().Interface() - } - if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { - return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) - } - - return nil - } - - setTo := func(test testcase) interface{} { - setTo := reflect.ValueOf(test.want) - if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { - setTo = reflect.New(typ).Elem() - setTo.Set(reflect.New(setTo.Type().Elem())) - setTo.Elem().Set(reflect.ValueOf(test.want)) - } - return setTo.Interface() - } - - for _, test := range tests { - msg := &pb.DefaultsMessage{} - name := test.ext.Name - - // Check the initial value. - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - - // Set the per-type value and check value. - name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) - if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { - t.Errorf("%s: SetExtension(): %v", name, err) - continue - } - if err := checkVal(test, msg, test.want); err != nil { - t.Errorf("%s: %v", name, err) - continue - } - - // Set and check the value. - name += " (cleared)" - proto.ClearExtension(msg, test.ext) - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - } -} - -func TestExtensionsRoundTrip(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{ - Data: proto.String("hi"), - } - ext2 := &pb.Ext{ - Data: proto.String("there"), - } - exists := proto.HasExtension(msg, pb.E_Ext_More) - if exists { - t.Error("Extension More present unexpectedly") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Error(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { - t.Error(err) - } - e, err := proto.GetExtension(msg, pb.E_Ext_More) - if err != nil { - t.Error(err) - } - x, ok := e.(*pb.Ext) - if !ok { - t.Errorf("e has type %T, expected testdata.Ext", e) - } else if *x.Data != "there" { - t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) - } - proto.ClearExtension(msg, pb.E_Ext_More) - if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { - t.Errorf("got %v, expected ErrMissingExtension", e) - } - if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { - t.Error("expected bad extension error, got nil") - } - if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { - t.Error("expected extension err") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { - t.Error("expected some sort of type mismatch error, got nil") - } -} - -func TestNilExtension(t *testing.T) { - msg := &pb.MyMessage{ - Count: proto.Int32(1), - } - if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { - t.Fatal(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { - t.Error("expected SetExtension to fail due to a nil extension") - } else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want { - t.Errorf("expected error %v, got %v", want, err) - } - // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update - // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal. -} - -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: %s want: %s\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)) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go index ac4ddbc0..75565cc6 100644 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ b/vendor/github.com/golang/protobuf/proto/lib.go @@ -73,7 +73,6 @@ for a protocol buffer variable v: When the .proto file specifies `syntax="proto3"`, there are some differences: - Non-repeated fields of non-message type are values instead of pointers. - - Getters are only generated for message and oneof fields. - Enum types do not get an Enum method. The simplest way to describe this is to see an example. @@ -274,6 +273,67 @@ import ( "sync" ) +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false +} + +type nonFatal struct{ E error } + +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} + // Message is implemented by generated protocol buffer messages. type Message interface { Reset() @@ -310,16 +370,7 @@ type Buffer struct { buf []byte // encode/decode byte stream index int // read point - // pools of basic types to amortize allocation. - bools []bool - uint32s []uint32 - uint64s []uint64 - - // extra pools, only used with pointer_reflect.go - int32s []int32 - int64s []int64 - float32s []float32 - float64s []float64 + deterministic bool } // NewBuffer allocates a new Buffer and initializes its internal data to @@ -344,6 +395,30 @@ func (p *Buffer) SetBuf(s []byte) { // Bytes returns the contents of the Buffer. func (p *Buffer) Bytes() []byte { return p.buf } +// SetDeterministic sets whether to use deterministic serialization. +// +// Deterministic serialization guarantees that for a given binary, equal +// messages will always be serialized to the same bytes. This implies: +// +// - Repeated serialization of a message will return the same bytes. +// - Different processes of the same binary (which may be executing on +// different machines) will serialize equal messages to the same bytes. +// +// Note that the deterministic serialization is NOT canonical across +// languages. It is not guaranteed to remain stable over time. It is unstable +// across different builds with schema changes due to unknown fields. +// Users who need canonical serialization (e.g., persistent storage in a +// canonical form, fingerprinting, etc.) should define their own +// canonicalization specification and implement their own serializer rather +// than relying on this API. +// +// If deterministic serialization is requested, map entries will be sorted +// by keys in lexographical order. This is an implementation detail and +// subject to change. +func (p *Buffer) SetDeterministic(deterministic bool) { + p.deterministic = deterministic +} + /* * Helper routines for simplifying the creation of optional fields of basic type. */ @@ -832,22 +907,12 @@ func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMes return sf, false, nil } +// mapKeys returns a sort.Interface to be used for sorting the map keys. // Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. - func mapKeys(vs []reflect.Value) sort.Interface { - s := mapKeySorter{ - vs: vs, - // default Less function: textual comparison - less: func(a, b reflect.Value) bool { - return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) - }, - } + s := mapKeySorter{vs: vs} - // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; - // numeric keys are sorted numerically. + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps. if len(vs) == 0 { return s } @@ -856,6 +921,12 @@ func mapKeys(vs []reflect.Value) sort.Interface { s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } case reflect.Uint32, reflect.Uint64: s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + case reflect.Bool: + s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true + case reflect.String: + s.less = func(a, b reflect.Value) bool { return a.String() < b.String() } + default: + panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind())) } return s @@ -896,3 +967,13 @@ const ProtoPackageIsVersion2 = true // ProtoPackageIsVersion1 is referenced from generated protocol buffer files // to assert that that code is compatible with this version of the proto package. const ProtoPackageIsVersion1 = true + +// InternalMessageInfo is a type used internally by generated .pb.go files. +// This type is not intended to be used by non-generated code. +// This type is not subject to any compatibility guarantee. +type InternalMessageInfo struct { + marshal *marshalInfo + unmarshal *unmarshalInfo + merge *mergeInfo + discard *discardInfo +} diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go index fd982dec..3b6ca41d 100644 --- a/vendor/github.com/golang/protobuf/proto/message_set.go +++ b/vendor/github.com/golang/protobuf/proto/message_set.go @@ -42,6 +42,7 @@ import ( "fmt" "reflect" "sort" + "sync" ) // errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. @@ -94,10 +95,7 @@ func (ms *messageSet) find(pb Message) *_MessageSet_Item { } func (ms *messageSet) Has(pb Message) bool { - if ms.find(pb) != nil { - return true - } - return false + return ms.find(pb) != nil } func (ms *messageSet) Unmarshal(pb Message) error { @@ -150,46 +148,42 @@ func skipVarint(buf []byte) []byte { // MarshalMessageSet encodes the extension map represented by m in the message set wire format. // It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. func MarshalMessageSet(exts interface{}) ([]byte, error) { - var m map[int32]Extension + return marshalMessageSet(exts, false) +} + +// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal. +func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) { switch exts := exts.(type) { case *XXX_InternalExtensions: - if err := encodeExtensions(exts); err != nil { - return nil, err - } - m, _ = exts.extensionsRead() + var u marshalInfo + siz := u.sizeMessageSet(exts) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, exts, deterministic) + case map[int32]Extension: - if err := encodeExtensionsMap(exts); err != nil { - return nil, err + // This is an old-style extension map. + // Wrap it in a new-style XXX_InternalExtensions. + ie := XXX_InternalExtensions{ + p: &struct { + mu sync.Mutex + extensionMap map[int32]Extension + }{ + extensionMap: exts, + }, } - m = exts + + var u marshalInfo + siz := u.sizeMessageSet(&ie) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, &ie, deterministic) + default: return nil, errors.New("proto: not an extension map") } - - // Sort extension IDs to provide a deterministic encoding. - // See also enc_map in encode.go. - ids := make([]int, 0, len(m)) - for id := range m { - ids = append(ids, int(id)) - } - sort.Ints(ids) - - ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} - for _, id := range ids { - e := m[int32(id)] - // Remove the wire type and field number varint, as well as the length varint. - msg := skipVarint(skipVarint(e.enc)) - - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: Int32(int32(id)), - Message: msg, - }) - } - return Marshal(ms) } // UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. -// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. func UnmarshalMessageSet(buf []byte, exts interface{}) error { var m map[int32]Extension switch exts := exts.(type) { @@ -235,7 +229,15 @@ func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { var m map[int32]Extension switch exts := exts.(type) { case *XXX_InternalExtensions: - m, _ = exts.extensionsRead() + var mu sync.Locker + m, mu = exts.extensionsRead() + if m != nil { + // Keep the extensions map locked until we're done marshaling to prevent + // races between marshaling and unmarshaling the lazily-{en,de}coded + // values. + mu.Lock() + defer mu.Unlock() + } case map[int32]Extension: m = exts default: @@ -253,15 +255,16 @@ func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { for i, id := range ids { ext := m[id] - if i > 0 { - b.WriteByte(',') - } - msd, ok := messageSetMap[id] if !ok { // Unknown type; we can't render it, so skip it. continue } + + if i > 0 && b.Len() > 1 { + b.WriteByte(',') + } + fmt.Fprintf(&b, `"[%s]":`, msd.name) x := ext.value diff --git a/vendor/github.com/golang/protobuf/proto/message_set_test.go b/vendor/github.com/golang/protobuf/proto/message_set_test.go deleted file mode 100644 index 353a3ea7..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go index fb512e2e..b6cad908 100644 --- a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go +++ b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go @@ -29,7 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build appengine js +// +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. // It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can @@ -38,32 +38,13 @@ package proto import ( - "math" "reflect" + "sync" ) -// A structPointer is a pointer to a struct. -type structPointer struct { - v reflect.Value -} - -// toStructPointer returns a structPointer equivalent to the given reflect value. -// The reflect value must itself be a pointer to a struct. -func toStructPointer(v reflect.Value) structPointer { - return structPointer{v} -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p.v.IsNil() -} +const unsafeAllowed = false -// Interface returns the struct pointer as an interface value. -func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { - return p.v.Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. +// A field identifies a field in a struct, accessible from a pointer. // In this implementation, a field is identified by the sequence of field indices // passed to reflect's FieldByIndex. type field []int @@ -76,409 +57,301 @@ func toField(f *reflect.StructField) field { // invalidField is an invalid field identifier. var invalidField = field(nil) +// zeroField is a noop when calling pointer.offset. +var zeroField = field([]int{}) + // IsValid reports whether the field identifier is valid. func (f field) IsValid() bool { return f != nil } -// field returns the given field in the struct as a reflect value. -func structPointer_field(p structPointer, f field) reflect.Value { - // Special case: an extension map entry with a value of type T - // passes a *T to the struct-handling code with a zero field, - // expecting that it will be treated as equivalent to *struct{ X T }, - // which has the same memory layout. We have to handle that case - // specially, because reflect will panic if we call FieldByIndex on a - // non-struct. - if f == nil { - return p.v.Elem() - } - - return p.v.Elem().FieldByIndex(f) +// The pointer type is for the table-driven decoder. +// The implementation here uses a reflect.Value of pointer type to +// create a generic pointer. In pointer_unsafe.go we use unsafe +// instead of reflect to implement the same (but faster) interface. +type pointer struct { + v reflect.Value } -// ifield returns the given field in the struct as an interface value. -func structPointer_ifield(p structPointer, f field) interface{} { - return structPointer_field(p, f).Addr().Interface() +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + return pointer{v: reflect.ValueOf(*i)} } -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return structPointer_ifield(p, f).(*[]byte) +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + v := reflect.ValueOf(*i) + u := reflect.New(v.Type()) + u.Elem().Set(v) + return pointer{v: u} } -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return structPointer_ifield(p, f).(*[][]byte) +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{v: v} } -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return structPointer_ifield(p, f).(**bool) +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + return pointer{v: p.v.Elem().FieldByIndex(f).Addr()} } -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return structPointer_ifield(p, f).(*bool) +func (p pointer) isNil() bool { + return p.v.IsNil() } -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return structPointer_ifield(p, f).(*[]bool) +// grow updates the slice s in place to make it one element longer. +// s must be addressable. +// Returns the (addressable) new element. +func grow(s reflect.Value) reflect.Value { + n, m := s.Len(), s.Cap() + if n < m { + s.SetLen(n + 1) + } else { + s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem()))) + } + return s.Index(n) } -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return structPointer_ifield(p, f).(**string) +func (p pointer) toInt64() *int64 { + return p.v.Interface().(*int64) } - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return structPointer_ifield(p, f).(*string) +func (p pointer) toInt64Ptr() **int64 { + return p.v.Interface().(**int64) } - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return structPointer_ifield(p, f).(*[]string) +func (p pointer) toInt64Slice() *[]int64 { + return p.v.Interface().(*[]int64) } -// Extensions returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return structPointer_ifield(p, f).(*XXX_InternalExtensions) -} +var int32ptr = reflect.TypeOf((*int32)(nil)) -// ExtMap returns the address of an extension map field in the struct. -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return structPointer_ifield(p, f).(*map[int32]Extension) +func (p pointer) toInt32() *int32 { + return p.v.Convert(int32ptr).Interface().(*int32) } -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return structPointer_field(p, f).Addr() +// The toInt32Ptr/Slice methods don't work because of enums. +// Instead, we must use set/get methods for the int32ptr/slice case. +/* + func (p pointer) toInt32Ptr() **int32 { + return p.v.Interface().(**int32) } - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - structPointer_field(p, f).Set(q.v) + func (p pointer) toInt32Slice() *[]int32 { + return p.v.Interface().(*[]int32) } - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return structPointer{structPointer_field(p, f)} +*/ +func (p pointer) getInt32Ptr() *int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().(*int32) + } + // an enum + return p.v.Elem().Convert(int32PtrType).Interface().(*int32) +} +func (p pointer) setInt32Ptr(v int32) { + // Allocate value in a *int32. Possibly convert that to a *enum. + // Then assign it to a **int32 or **enum. + // Note: we can convert *int32 to *enum, but we can't convert + // **int32 to **enum! + p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem())) +} + +// getInt32Slice copies []int32 from p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getInt32Slice() []int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().([]int32) + } + // an enum + // Allocate a []int32, then assign []enum's values into it. + // Note: we can't convert []enum to []int32. + slice := p.v.Elem() + s := make([]int32, slice.Len()) + for i := 0; i < slice.Len(); i++ { + s[i] = int32(slice.Index(i).Int()) + } + return s } -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { - return structPointerSlice{structPointer_field(p, f)} +// setInt32Slice copies []int32 into p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setInt32Slice(v []int32) { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + p.v.Elem().Set(reflect.ValueOf(v)) + return + } + // an enum + // Allocate a []enum, then assign []int32's values into it. + // Note: we can't convert []enum to []int32. + slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v)) + for i, x := range v { + slice.Index(i).SetInt(int64(x)) + } + p.v.Elem().Set(slice) } - -// A structPointerSlice represents the address of a slice of pointers to structs -// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. -type structPointerSlice struct { - v reflect.Value +func (p pointer) appendInt32Slice(v int32) { + grow(p.v.Elem()).SetInt(int64(v)) } -func (p structPointerSlice) Len() int { return p.v.Len() } -func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } -func (p structPointerSlice) Append(q structPointer) { - p.v.Set(reflect.Append(p.v, q.v)) +func (p pointer) toUint64() *uint64 { + return p.v.Interface().(*uint64) } - -var ( - int32Type = reflect.TypeOf(int32(0)) - uint32Type = reflect.TypeOf(uint32(0)) - float32Type = reflect.TypeOf(float32(0)) - int64Type = reflect.TypeOf(int64(0)) - uint64Type = reflect.TypeOf(uint64(0)) - float64Type = reflect.TypeOf(float64(0)) -) - -// A word32 represents a field of type *int32, *uint32, *float32, or *enum. -// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. -type word32 struct { - v reflect.Value +func (p pointer) toUint64Ptr() **uint64 { + return p.v.Interface().(**uint64) } - -// IsNil reports whether p is nil. -func word32_IsNil(p word32) bool { - return p.v.IsNil() +func (p pointer) toUint64Slice() *[]uint64 { + return p.v.Interface().(*[]uint64) } - -// Set sets p to point at a newly allocated word with bits set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - t := p.v.Type().Elem() - switch t { - case int32Type: - if len(o.int32s) == 0 { - o.int32s = make([]int32, uint32PoolSize) - } - o.int32s[0] = int32(x) - p.v.Set(reflect.ValueOf(&o.int32s[0])) - o.int32s = o.int32s[1:] - return - case uint32Type: - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - p.v.Set(reflect.ValueOf(&o.uint32s[0])) - o.uint32s = o.uint32s[1:] - return - case float32Type: - if len(o.float32s) == 0 { - o.float32s = make([]float32, uint32PoolSize) - } - o.float32s[0] = math.Float32frombits(x) - p.v.Set(reflect.ValueOf(&o.float32s[0])) - o.float32s = o.float32s[1:] - return - } - - // must be enum - p.v.Set(reflect.New(t)) - p.v.Elem().SetInt(int64(int32(x))) +func (p pointer) toUint32() *uint32 { + return p.v.Interface().(*uint32) } - -// Get gets the bits pointed at by p, as a uint32. -func word32_Get(p word32) uint32 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") +func (p pointer) toUint32Ptr() **uint32 { + return p.v.Interface().(**uint32) } - -// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32{structPointer_field(p, f)} +func (p pointer) toUint32Slice() *[]uint32 { + return p.v.Interface().(*[]uint32) } - -// A word32Val represents a field of type int32, uint32, float32, or enum. -// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. -type word32Val struct { - v reflect.Value +func (p pointer) toBool() *bool { + return p.v.Interface().(*bool) } - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - switch p.v.Type() { - case int32Type: - p.v.SetInt(int64(x)) - return - case uint32Type: - p.v.SetUint(uint64(x)) - return - case float32Type: - p.v.SetFloat(float64(math.Float32frombits(x))) - return - } - - // must be enum - p.v.SetInt(int64(int32(x))) +func (p pointer) toBoolPtr() **bool { + return p.v.Interface().(**bool) } - -// Get gets the bits pointed at by p, as a uint32. -func word32Val_Get(p word32Val) uint32 { - elem := p.v - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") +func (p pointer) toBoolSlice() *[]bool { + return p.v.Interface().(*[]bool) } - -// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val{structPointer_field(p, f)} +func (p pointer) toFloat64() *float64 { + return p.v.Interface().(*float64) } - -// A word32Slice is a slice of 32-bit values. -// That is, v.Type() is []int32, []uint32, []float32, or []enum. -type word32Slice struct { - v reflect.Value +func (p pointer) toFloat64Ptr() **float64 { + return p.v.Interface().(**float64) } - -func (p word32Slice) Append(x uint32) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int32: - elem.SetInt(int64(int32(x))) - case reflect.Uint32: - elem.SetUint(uint64(x)) - case reflect.Float32: - elem.SetFloat(float64(math.Float32frombits(x))) - } +func (p pointer) toFloat64Slice() *[]float64 { + return p.v.Interface().(*[]float64) } - -func (p word32Slice) Len() int { - return p.v.Len() +func (p pointer) toFloat32() *float32 { + return p.v.Interface().(*float32) } - -func (p word32Slice) Index(i int) uint32 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") +func (p pointer) toFloat32Ptr() **float32 { + return p.v.Interface().(**float32) } - -// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) word32Slice { - return word32Slice{structPointer_field(p, f)} +func (p pointer) toFloat32Slice() *[]float32 { + return p.v.Interface().(*[]float32) } - -// word64 is like word32 but for 64-bit values. -type word64 struct { - v reflect.Value +func (p pointer) toString() *string { + return p.v.Interface().(*string) } - -func word64_Set(p word64, o *Buffer, x uint64) { - t := p.v.Type().Elem() - switch t { - case int64Type: - if len(o.int64s) == 0 { - o.int64s = make([]int64, uint64PoolSize) - } - o.int64s[0] = int64(x) - p.v.Set(reflect.ValueOf(&o.int64s[0])) - o.int64s = o.int64s[1:] - return - case uint64Type: - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - p.v.Set(reflect.ValueOf(&o.uint64s[0])) - o.uint64s = o.uint64s[1:] - return - case float64Type: - if len(o.float64s) == 0 { - o.float64s = make([]float64, uint64PoolSize) - } - o.float64s[0] = math.Float64frombits(x) - p.v.Set(reflect.ValueOf(&o.float64s[0])) - o.float64s = o.float64s[1:] - return - } - panic("unreachable") +func (p pointer) toStringPtr() **string { + return p.v.Interface().(**string) } - -func word64_IsNil(p word64) bool { - return p.v.IsNil() +func (p pointer) toStringSlice() *[]string { + return p.v.Interface().(*[]string) } - -func word64_Get(p word64) uint64 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") +func (p pointer) toBytes() *[]byte { + return p.v.Interface().(*[]byte) } - -func structPointer_Word64(p structPointer, f field) word64 { - return word64{structPointer_field(p, f)} +func (p pointer) toBytesSlice() *[][]byte { + return p.v.Interface().(*[][]byte) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return p.v.Interface().(*XXX_InternalExtensions) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return p.v.Interface().(*map[int32]Extension) +} +func (p pointer) getPointer() pointer { + return pointer{v: p.v.Elem()} +} +func (p pointer) setPointer(q pointer) { + p.v.Elem().Set(q.v) +} +func (p pointer) appendPointer(q pointer) { + grow(p.v.Elem()).Set(q.v) } -// word64Val is like word32Val but for 64-bit values. -type word64Val struct { - v reflect.Value +// getPointerSlice copies []*T from p as a new []pointer. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getPointerSlice() []pointer { + if p.v.IsNil() { + return nil + } + n := p.v.Elem().Len() + s := make([]pointer, n) + for i := 0; i < n; i++ { + s[i] = pointer{v: p.v.Elem().Index(i)} + } + return s } -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - switch p.v.Type() { - case int64Type: - p.v.SetInt(int64(x)) - return - case uint64Type: - p.v.SetUint(x) - return - case float64Type: - p.v.SetFloat(math.Float64frombits(x)) +// setPointerSlice copies []pointer into p as a new []*T. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setPointerSlice(v []pointer) { + if v == nil { + p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem()) return } - panic("unreachable") + s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v)) + for _, p := range v { + s = reflect.Append(s, p.v) + } + p.v.Elem().Set(s) } -func word64Val_Get(p word64Val) uint64 { - elem := p.v - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + if p.v.Elem().IsNil() { + return pointer{v: p.v.Elem()} } - panic("unreachable") + return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct } -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val{structPointer_field(p, f)} +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + // TODO: check that p.v.Type().Elem() == t? + return p.v } -type word64Slice struct { - v reflect.Value +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p } - -func (p word64Slice) Append(x uint64) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int64: - elem.SetInt(int64(int64(x))) - case reflect.Uint64: - elem.SetUint(uint64(x)) - case reflect.Float64: - elem.SetFloat(float64(math.Float64frombits(x))) - } +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v } - -func (p word64Slice) Len() int { - return p.v.Len() +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p } - -func (p word64Slice) Index(i int) uint64 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return uint64(elem.Uint()) - case reflect.Float64: - return math.Float64bits(float64(elem.Float())) - } - panic("unreachable") +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v } - -func structPointer_Word64Slice(p structPointer, f field) word64Slice { - return word64Slice{structPointer_field(p, f)} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v } +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} + +var atomicLock sync.Mutex diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go index 6b5567d4..d55a335d 100644 --- a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go +++ b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go @@ -29,7 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build !appengine,!js +// +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. @@ -37,38 +37,13 @@ package proto import ( "reflect" + "sync/atomic" "unsafe" ) -// NOTE: These type_Foo functions would more idiomatically be methods, -// but Go does not allow methods on pointer types, and we must preserve -// some pointer type for the garbage collector. We use these -// funcs with clunky names as our poor approximation to methods. -// -// An alternative would be -// type structPointer struct { p unsafe.Pointer } -// but that does not registerize as well. - -// A structPointer is a pointer to a struct. -type structPointer unsafe.Pointer - -// toStructPointer returns a structPointer equivalent to the given reflect value. -func toStructPointer(v reflect.Value) structPointer { - return structPointer(unsafe.Pointer(v.Pointer())) -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p == nil -} - -// Interface returns the struct pointer, assumed to have element type t, -// as an interface value. -func structPointer_Interface(p structPointer, t reflect.Type) interface{} { - return reflect.NewAt(t, unsafe.Pointer(p)).Interface() -} +const unsafeAllowed = true -// A field identifies a field in a struct, accessible from a structPointer. +// A field identifies a field in a struct, accessible from a pointer. // In this implementation, a field is identified by its byte offset from the start of the struct. type field uintptr @@ -80,191 +55,254 @@ func toField(f *reflect.StructField) field { // invalidField is an invalid field identifier. const invalidField = ^field(0) +// zeroField is a noop when calling pointer.offset. +const zeroField = field(0) + // IsValid reports whether the field identifier is valid. func (f field) IsValid() bool { - return f != ^field(0) + return f != invalidField } -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// The pointer type below is for the new table-driven encoder/decoder. +// The implementation here uses unsafe.Pointer to create a generic pointer. +// In pointer_reflect.go we use reflect instead of unsafe to implement +// the same (but slower) interface. +type pointer struct { + p unsafe.Pointer } -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} +// size of pointer +var ptrSize = unsafe.Sizeof(uintptr(0)) -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + // Super-tricky - read pointer out of data word of interface value. + // Saves ~25ns over the equivalent: + // return valToPointer(reflect.ValueOf(*i)) + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} } -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + // Super-tricky - read or get the address of data word of interface value. + if isptr { + // The interface is of pointer type, thus it is a direct interface. + // The data word is the pointer data itself. We take its address. + return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)} + } + // The interface is not of pointer type. The data word is the pointer + // to the data. + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} } -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{p: unsafe.Pointer(v.Pointer())} } -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + // For safety, we should panic if !f.IsValid, however calling panic causes + // this to no longer be inlineable, which is a serious performance cost. + /* + if !f.IsValid() { + panic("invalid field") + } + */ + return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))} } -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) isNil() bool { + return p.p == nil } -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toInt64() *int64 { + return (*int64)(p.p) } - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toInt64Ptr() **int64 { + return (**int64)(p.p) } - -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toInt64Slice() *[]int64 { + return (*[]int64)(p.p) } - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) +func (p pointer) toInt32() *int32 { + return (*int32)(p.p) } -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q +// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist. +/* + func (p pointer) toInt32Ptr() **int32 { + return (**int32)(p.p) + } + func (p pointer) toInt32Slice() *[]int32 { + return (*[]int32)(p.p) + } +*/ +func (p pointer) getInt32Ptr() *int32 { + return *(**int32)(p.p) } - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) setInt32Ptr(v int32) { + *(**int32)(p.p) = &v } -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { - return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// getInt32Slice loads a []int32 from p. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getInt32Slice() []int32 { + return *(*[]int32)(p.p) } -// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). -type structPointerSlice []structPointer - -func (v *structPointerSlice) Len() int { return len(*v) } -func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } -func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } - -// A word32 is the address of a "pointer to 32-bit value" field. -type word32 **uint32 - -// IsNil reports whether *v is nil. -func word32_IsNil(p word32) bool { - return *p == nil +// setInt32Slice stores a []int32 to p. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setInt32Slice(v []int32) { + *(*[]int32)(p.p) = v } -// Set sets *v to point at a newly allocated word set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - *p = &o.uint32s[0] - o.uint32s = o.uint32s[1:] +// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead? +func (p pointer) appendInt32Slice(v int32) { + s := (*[]int32)(p.p) + *s = append(*s, v) } -// Get gets the value pointed at by *v. -func word32_Get(p word32) uint32 { - return **p +func (p pointer) toUint64() *uint64 { + return (*uint64)(p.p) } - -// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +func (p pointer) toUint64Ptr() **uint64 { + return (**uint64)(p.p) } - -// A word32Val is the address of a 32-bit value field. -type word32Val *uint32 - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - *p = x +func (p pointer) toUint64Slice() *[]uint64 { + return (*[]uint64)(p.p) } - -// Get gets the value pointed at by p. -func word32Val_Get(p word32Val) uint32 { - return *p +func (p pointer) toUint32() *uint32 { + return (*uint32)(p.p) } - -// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +func (p pointer) toUint32Ptr() **uint32 { + return (**uint32)(p.p) } - -// A word32Slice is a slice of 32-bit values. -type word32Slice []uint32 - -func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } -func (v *word32Slice) Len() int { return len(*v) } -func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } - -// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) *word32Slice { - return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toUint32Slice() *[]uint32 { + return (*[]uint32)(p.p) } - -// word64 is like word32 but for 64-bit values. -type word64 **uint64 - -func word64_Set(p word64, o *Buffer, x uint64) { - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - *p = &o.uint64s[0] - o.uint64s = o.uint64s[1:] +func (p pointer) toBool() *bool { + return (*bool)(p.p) } - -func word64_IsNil(p word64) bool { - return *p == nil +func (p pointer) toBoolPtr() **bool { + return (**bool)(p.p) } - -func word64_Get(p word64) uint64 { - return **p +func (p pointer) toBoolSlice() *[]bool { + return (*[]bool)(p.p) +} +func (p pointer) toFloat64() *float64 { + return (*float64)(p.p) +} +func (p pointer) toFloat64Ptr() **float64 { + return (**float64)(p.p) +} +func (p pointer) toFloat64Slice() *[]float64 { + return (*[]float64)(p.p) +} +func (p pointer) toFloat32() *float32 { + return (*float32)(p.p) +} +func (p pointer) toFloat32Ptr() **float32 { + return (**float32)(p.p) +} +func (p pointer) toFloat32Slice() *[]float32 { + return (*[]float32)(p.p) +} +func (p pointer) toString() *string { + return (*string)(p.p) +} +func (p pointer) toStringPtr() **string { + return (**string)(p.p) +} +func (p pointer) toStringSlice() *[]string { + return (*[]string)(p.p) +} +func (p pointer) toBytes() *[]byte { + return (*[]byte)(p.p) +} +func (p pointer) toBytesSlice() *[][]byte { + return (*[][]byte)(p.p) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return (*XXX_InternalExtensions)(p.p) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return (*map[int32]Extension)(p.p) } -func structPointer_Word64(p structPointer, f field) word64 { - return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +// getPointerSlice loads []*T from p as a []pointer. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getPointerSlice() []pointer { + // Super-tricky - p should point to a []*T where T is a + // message type. We load it as []pointer. + return *(*[]pointer)(p.p) } -// word64Val is like word32Val but for 64-bit values. -type word64Val *uint64 +// setPointerSlice stores []pointer into p as a []*T. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setPointerSlice(v []pointer) { + // Super-tricky - p should point to a []*T where T is a + // message type. We store it as []pointer. + *(*[]pointer)(p.p) = v +} -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - *p = x +// getPointer loads the pointer at p and returns it. +func (p pointer) getPointer() pointer { + return pointer{p: *(*unsafe.Pointer)(p.p)} } -func word64Val_Get(p word64Val) uint64 { - return *p +// setPointer stores the pointer q at p. +func (p pointer) setPointer(q pointer) { + *(*unsafe.Pointer)(p.p) = q.p } -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +// append q to the slice pointed to by p. +func (p pointer) appendPointer(q pointer) { + s := (*[]unsafe.Pointer)(p.p) + *s = append(*s, q.p) } -// word64Slice is like word32Slice but for 64-bit values. -type word64Slice []uint64 +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + // Super-tricky - read pointer out of data word of interface value. + return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]} +} -func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } -func (v *word64Slice) Len() int { return len(*v) } -func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } +// asPointerTo returns a reflect.Value that is a pointer to an +// object of type t stored at p. +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + return reflect.NewAt(t, p.p) +} -func structPointer_Word64Slice(p structPointer, f field) *word64Slice { - return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) } diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go index ec2289c0..50b99b83 100644 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ b/vendor/github.com/golang/protobuf/proto/properties.go @@ -58,42 +58,6 @@ const ( WireFixed32 = 5 ) -const startSize = 10 // initial slice/string sizes - -// Encoders are defined in encode.go -// An encoder outputs the full representation of a field, including its -// tag and encoder type. -type encoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueEncoder encodes a single integer in a particular encoding. -type valueEncoder func(o *Buffer, x uint64) error - -// Sizers are defined in encode.go -// A sizer returns the encoded size of a field, including its tag and encoder -// type. -type sizer func(prop *Properties, base structPointer) int - -// A valueSizer returns the encoded size of a single integer in a particular -// encoding. -type valueSizer func(x uint64) int - -// Decoders are defined in decode.go -// A decoder creates a value from its wire representation. -// Unrecognized subelements are saved in unrec. -type decoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueDecoder decodes a single integer in a particular encoding. -type valueDecoder func(o *Buffer) (x uint64, err error) - -// A oneofMarshaler does the marshaling for all oneof fields in a message. -type oneofMarshaler func(Message, *Buffer) error - -// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. -type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) - -// A oneofSizer does the sizing for all oneof fields in a message. -type oneofSizer func(Message) int - // tagMap is an optimization over map[int]int for typical protocol buffer // use-cases. Encoded protocol buffers are often in tag order with small tag // numbers. @@ -140,13 +104,6 @@ type StructProperties struct { decoderTags tagMap // map from proto tag to struct field number decoderOrigNames map[string]int // map from original name to struct field number order []int // list of struct field numbers in tag order - unrecField field // field id of the XXX_unrecognized []byte field - extendable bool // is this an extendable proto - - oneofMarshaler oneofMarshaler - oneofUnmarshaler oneofUnmarshaler - oneofSizer oneofSizer - stype reflect.Type // OneofTypes contains information about the oneof fields in this message. // It is keyed by the original name of a field. @@ -182,41 +139,24 @@ type Properties struct { Repeated bool Packed bool // relevant for repeated primitives only Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only + proto3 bool // whether this is known to be a proto3 field oneof bool // whether this is a oneof field Default string // default value HasDefault bool // whether an explicit default was provided - def_uint64 uint64 - - enc encoder - valEnc valueEncoder // set for bool and numeric types only - field field - tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) - tagbuf [8]byte - stype reflect.Type // set for struct types only - sprop *StructProperties // set for struct types only - isMarshaler bool - isUnmarshaler bool - - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only - - size sizer - valSize valueSizer // set for bool and numeric types only - - dec decoder - valDec valueDecoder // set for bool and numeric types only - - // If this is a packable field, this will be the decoder for the packed version of the field. - packedDec decoder + + stype reflect.Type // set for struct types only + sprop *StructProperties // set for struct types only + + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only } // String formats the properties in the protobuf struct field tag style. func (p *Properties) String() string { s := p.Wire - s = "," + s += "," s += strconv.Itoa(p.Tag) if p.Required { s += ",req" @@ -262,29 +202,14 @@ func (p *Properties) Parse(s string) { switch p.Wire { case "varint": p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeVarint - p.valDec = (*Buffer).DecodeVarint - p.valSize = sizeVarint case "fixed32": p.WireType = WireFixed32 - p.valEnc = (*Buffer).EncodeFixed32 - p.valDec = (*Buffer).DecodeFixed32 - p.valSize = sizeFixed32 case "fixed64": p.WireType = WireFixed64 - p.valEnc = (*Buffer).EncodeFixed64 - p.valDec = (*Buffer).DecodeFixed64 - p.valSize = sizeFixed64 case "zigzag32": p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag32 - p.valDec = (*Buffer).DecodeZigzag32 - p.valSize = sizeZigzag32 case "zigzag64": p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag64 - p.valDec = (*Buffer).DecodeZigzag64 - p.valSize = sizeZigzag64 case "bytes", "group": p.WireType = WireBytes // no numeric converter for non-numeric types @@ -299,6 +224,7 @@ func (p *Properties) Parse(s string) { return } +outer: for i := 2; i < len(fields); i++ { f := fields[i] switch { @@ -326,256 +252,41 @@ func (p *Properties) Parse(s string) { if i+1 < len(fields) { // Commas aren't escaped, and def is always last. p.Default += "," + strings.Join(fields[i+1:], ",") - break + break outer } } } } -func logNoSliceEnc(t1, t2 reflect.Type) { - fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) -} - var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() -// Initialize the fields for encoding and decoding. -func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { - p.enc = nil - p.dec = nil - p.size = nil - +// setFieldProps initializes the field properties for submessages and maps. +func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { switch t1 := typ; t1.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) - - // proto3 scalar types - - case reflect.Bool: - p.enc = (*Buffer).enc_proto3_bool - p.dec = (*Buffer).dec_proto3_bool - p.size = size_proto3_bool - case reflect.Int32: - p.enc = (*Buffer).enc_proto3_int32 - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_proto3_uint32 - p.dec = (*Buffer).dec_proto3_int32 // can reuse - p.size = size_proto3_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_proto3_int64 - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - case reflect.String: - p.enc = (*Buffer).enc_proto3_string - p.dec = (*Buffer).dec_proto3_string - p.size = size_proto3_string - case reflect.Ptr: - switch t2 := t1.Elem(); t2.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) - break - case reflect.Bool: - p.enc = (*Buffer).enc_bool - p.dec = (*Buffer).dec_bool - p.size = size_bool - case reflect.Int32: - p.enc = (*Buffer).enc_int32 - p.dec = (*Buffer).dec_int32 - p.size = size_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_uint32 - p.dec = (*Buffer).dec_int32 // can reuse - p.size = size_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_int64 - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_int32 - p.size = size_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_int64 // can just treat them as bits - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.String: - p.enc = (*Buffer).enc_string - p.dec = (*Buffer).dec_string - p.size = size_string - case reflect.Struct: + if t1.Elem().Kind() == reflect.Struct { p.stype = t1.Elem() - p.isMarshaler = isMarshaler(t1) - p.isUnmarshaler = isUnmarshaler(t1) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_struct_message - p.dec = (*Buffer).dec_struct_message - p.size = size_struct_message - } else { - p.enc = (*Buffer).enc_struct_group - p.dec = (*Buffer).dec_struct_group - p.size = size_struct_group - } } case reflect.Slice: - switch t2 := t1.Elem(); t2.Kind() { - default: - logNoSliceEnc(t1, t2) - break - case reflect.Bool: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_bool - p.size = size_slice_packed_bool - } else { - p.enc = (*Buffer).enc_slice_bool - p.size = size_slice_bool - } - p.dec = (*Buffer).dec_slice_bool - p.packedDec = (*Buffer).dec_slice_packed_bool - case reflect.Int32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int32 - p.size = size_slice_packed_int32 - } else { - p.enc = (*Buffer).enc_slice_int32 - p.size = size_slice_int32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Uint32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Int64, reflect.Uint64: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - case reflect.Uint8: - p.dec = (*Buffer).dec_slice_byte - if p.proto3 { - p.enc = (*Buffer).enc_proto3_slice_byte - p.size = size_proto3_slice_byte - } else { - p.enc = (*Buffer).enc_slice_byte - p.size = size_slice_byte - } - case reflect.Float32, reflect.Float64: - switch t2.Bits() { - case 32: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case 64: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - default: - logNoSliceEnc(t1, t2) - break - } - case reflect.String: - p.enc = (*Buffer).enc_slice_string - p.dec = (*Buffer).dec_slice_string - p.size = size_slice_string - case reflect.Ptr: - switch t3 := t2.Elem(); t3.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) - break - case reflect.Struct: - p.stype = t2.Elem() - p.isMarshaler = isMarshaler(t2) - p.isUnmarshaler = isUnmarshaler(t2) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_slice_struct_message - p.dec = (*Buffer).dec_slice_struct_message - p.size = size_slice_struct_message - } else { - p.enc = (*Buffer).enc_slice_struct_group - p.dec = (*Buffer).dec_slice_struct_group - p.size = size_slice_struct_group - } - } - case reflect.Slice: - switch t2.Elem().Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) - break - case reflect.Uint8: - p.enc = (*Buffer).enc_slice_slice_byte - p.dec = (*Buffer).dec_slice_slice_byte - p.size = size_slice_slice_byte - } + if t2 := t1.Elem(); t2.Kind() == reflect.Ptr && t2.Elem().Kind() == reflect.Struct { + p.stype = t2.Elem() } case reflect.Map: - p.enc = (*Buffer).enc_new_map - p.dec = (*Buffer).dec_new_map - p.size = size_new_map - p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} vtype := p.mtype.Elem() if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { // The value type is not a message (*T) or bytes ([]byte), // so we need encoders for the pointer to this type. vtype = reflect.PtrTo(vtype) } - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) } - // precalculate tag code - wire := p.WireType - if p.Packed { - wire = WireBytes - } - x := uint32(p.Tag)<<3 | uint32(wire) - i := 0 - for i = 0; x > 127; i++ { - p.tagbuf[i] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - p.tagbuf[i] = uint8(x) - p.tagcode = p.tagbuf[0 : i+1] - if p.stype != nil { if lockGetProp { p.sprop = GetProperties(p.stype) @@ -586,32 +297,9 @@ func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lock } var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() - unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() ) -// isMarshaler reports whether type t implements Marshaler. -func isMarshaler(t reflect.Type) bool { - // We're checking for (likely) pointer-receiver methods - // so if t is not a pointer, something is very wrong. - // The calls above only invoke isMarshaler on pointer types. - if t.Kind() != reflect.Ptr { - panic("proto: misuse of isMarshaler") - } - return t.Implements(marshalerType) -} - -// isUnmarshaler reports whether type t implements Unmarshaler. -func isUnmarshaler(t reflect.Type) bool { - // We're checking for (likely) pointer-receiver methods - // so if t is not a pointer, something is very wrong. - // The calls above only invoke isUnmarshaler on pointer types. - if t.Kind() != reflect.Ptr { - panic("proto: misuse of isUnmarshaler") - } - return t.Implements(unmarshalerType) -} - // Init populates the properties from a protocol buffer struct tag. func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { p.init(typ, name, tag, f, true) @@ -621,14 +309,11 @@ func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructF // "bytes,49,opt,def=hello!" p.Name = name p.OrigName = name - if f != nil { - p.field = toField(f) - } if tag == "" { return } p.Parse(tag) - p.setEncAndDec(typ, f, lockGetProp) + p.setFieldProps(typ, f, lockGetProp) } var ( @@ -678,9 +363,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { propertiesMap[t] = prop // build properties - prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) || - reflect.PtrTo(t).Implements(extendableProtoV1Type) - prop.unrecField = invalidField prop.Prop = make([]*Properties, t.NumField()) prop.order = make([]int, t.NumField()) @@ -690,17 +372,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { name := f.Name p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) - if f.Name == "XXX_InternalExtensions" { // special case - p.enc = (*Buffer).enc_exts - p.dec = nil // not needed - p.size = size_exts - } else if f.Name == "XXX_extensions" { // special case - p.enc = (*Buffer).enc_map - p.dec = nil // not needed - p.size = size_map - } else if f.Name == "XXX_unrecognized" { // special case - prop.unrecField = toField(&f) - } oneof := f.Tag.Get("protobuf_oneof") // special case if oneof != "" { // Oneof fields don't use the traditional protobuf tag. @@ -715,9 +386,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { } print("\n") } - if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" { - fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") - } } // Re-order prop.order. @@ -728,8 +396,7 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { } if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { var oots []interface{} - prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs() - prop.stype = t + _, _, _, oots = om.XXX_OneofFuncs() // Interpret oneof metadata. prop.OneofTypes = make(map[string]*OneofProperties) @@ -779,30 +446,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { return prop } -// Return the Properties object for the x[0]'th field of the structure. -func propByIndex(t reflect.Type, x []int) *Properties { - if len(x) != 1 { - fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) - return nil - } - prop := GetProperties(t) - return prop.Prop[x[0]] -} - -// Get the address and type of a pointer to a struct from an interface. -func getbase(pb Message) (t reflect.Type, b structPointer, err error) { - if pb == nil { - err = ErrNil - return - } - // get the reflect type of the pointer to the struct. - t = reflect.TypeOf(pb) - // get the address of the struct. - value := reflect.ValueOf(pb) - b = toStructPointer(value) - return -} - // A global registry of enum types. // The generated code will register the generated maps by calling RegisterEnum. @@ -826,20 +469,42 @@ func EnumValueMap(enumType string) map[string]int32 { // A registry of all linked message types. // The string is a fully-qualified proto name ("pkg.Message"). var ( - protoTypes = make(map[string]reflect.Type) - revProtoTypes = make(map[reflect.Type]string) + protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers + protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types + revProtoTypes = make(map[reflect.Type]string) ) // RegisterType is called from generated code and maps from the fully qualified // proto name to the type (pointer to struct) of the protocol buffer. func RegisterType(x Message, name string) { - if _, ok := protoTypes[name]; ok { + if _, ok := protoTypedNils[name]; ok { // TODO: Some day, make this a panic. log.Printf("proto: duplicate proto type registered: %s", name) return } t := reflect.TypeOf(x) - protoTypes[name] = t + if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 { + // Generated code always calls RegisterType with nil x. + // This check is just for extra safety. + protoTypedNils[name] = x + } else { + protoTypedNils[name] = reflect.Zero(t).Interface().(Message) + } + revProtoTypes[t] = name +} + +// RegisterMapType is called from generated code and maps from the fully qualified +// proto name to the native map type of the proto map definition. +func RegisterMapType(x interface{}, name string) { + if reflect.TypeOf(x).Kind() != reflect.Map { + panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name)) + } + if _, ok := protoMapTypes[name]; ok { + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoMapTypes[name] = t revProtoTypes[t] = name } @@ -855,7 +520,14 @@ func MessageName(x Message) string { } // MessageType returns the message type (pointer to struct) for a named message. -func MessageType(name string) reflect.Type { return protoTypes[name] } +// The type is not guaranteed to implement proto.Message if the name refers to a +// map entry. +func MessageType(name string) reflect.Type { + if t, ok := protoTypedNils[name]; ok { + return reflect.TypeOf(t) + } + return protoMapTypes[name] +} // A registry of all linked proto files. var ( 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 19383efc..00000000 --- a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go +++ /dev/null @@ -1,219 +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 -*/ -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. -const _ = proto.ProtoPackageIsVersion1 - -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,name=key" json:"key,omitempty"` - ShortKey []int32 `protobuf:"varint,19,rep,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,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) GetNested() *Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *Message) GetTerrain() map[string]*Nested { - if m != nil { - return m.Terrain - } - return nil -} - -func (m *Message) GetProto2Field() *testdata.SubDefaults { - if m != nil { - return m.Proto2Field - } - return nil -} - -func (m *Message) GetProto2Value() map[string]*testdata.SubDefaults { - if m != nil { - return m.Proto2Value - } - return nil -} - -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} } - -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 -} - -func init() { - proto.RegisterType((*Message)(nil), "proto3_proto.Message") - proto.RegisterType((*Nested)(nil), "proto3_proto.Nested") - proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap") - proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) -} - -var fileDescriptor0 = []byte{ - // 669 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0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 0xf1, 0x70, 0x74, 0xd5, 0x3b, 0xbd, 0xb0, 0xcb, 0x68, 0x1b, 0xcc, - 0x93, 0x5e, 0xbf, 0xef, 0x9e, 0x1c, 0xf7, 0xfa, 0x67, 0xdf, 0xec, 0x4a, 0xa7, 0x0b, 0x75, 0x3d, - 0xac, 0x7c, 0x33, 0xbe, 0x8a, 0xaf, 0x9e, 0x47, 0x6f, 0xe4, 0x2b, 0x1d, 0xa7, 0x5c, 0x0f, 0x64, - 0x10, 0xb5, 0xee, 0xfc, 0x2c, 0xc1, 0x56, 0xee, 0xd9, 0x4d, 0xc0, 0xe7, 0x97, 0xde, 0x12, 0x09, - 0xc3, 0xfc, 0x8c, 0x53, 0x37, 0xf4, 0x96, 0x4b, 0x99, 0x83, 0x92, 0xf2, 0xf9, 0xe5, 0x46, 0x9f, - 0x73, 0x8d, 0x73, 0x22, 0x04, 0x97, 0x9a, 0x9f, 0xa7, 0xca, 0xbf, 0x45, 0xda, 0x1f, 0xc0, 0xbe, - 0x4f, 0x28, 0x1a, 0x66, 0x68, 0xc3, 0x76, 0x8b, 0x86, 0x59, 0x05, 0x67, 0xfc, 0xba, 0x6e, 0xfd, - 0x3b, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x40, 0x3c, 0xbe, 0x3c, 0x05, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto deleted file mode 100644 index 75d5a025..00000000 --- a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto +++ /dev/null @@ -1,78 +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"; - -import "google/protobuf/any.proto"; -import "testdata/test.proto"; - -package proto3_proto; - -message Message { - enum Humour { - UNKNOWN = 0; - PUNS = 1; - SLAPSTICK = 2; - BILL_BAILEY = 3; - } - - string name = 1; - Humour hilarity = 2; - uint32 height_in_cm = 3; - bytes data = 4; - int64 result_count = 7; - bool true_scotsman = 8; - float score = 9; - - repeated uint64 key = 5; - repeated int32 short_key = 19; - Nested nested = 6; - repeated Humour r_funny = 16; - - map terrain = 10; - testdata.SubDefaults proto2_field = 11; - map proto2_value = 13; - - google.protobuf.Any anything = 14; - repeated google.protobuf.Any many_things = 15; - - Message submessage = 17; - repeated Message children = 18; -} - -message Nested { - string bunny = 1; - bool cute = 2; -} - -message MessageWithMap { - map byte_mapping = 1; -} diff --git a/vendor/github.com/golang/protobuf/proto/proto3_test.go b/vendor/github.com/golang/protobuf/proto/proto3_test.go deleted file mode 100644 index 462f8055..00000000 --- a/vendor/github.com/golang/protobuf/proto/proto3_test.go +++ /dev/null @@ -1,125 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "testing" - - "github.com/golang/protobuf/proto" - pb "github.com/golang/protobuf/proto/proto3_proto" - tpb "github.com/golang/protobuf/proto/testdata" -) - -func TestProto3ZeroValues(t *testing.T) { - tests := []struct { - desc string - m proto.Message - }{ - {"zero message", &pb.Message{}}, - {"empty bytes field", &pb.Message{Data: []byte{}}}, - } - for _, test := range tests { - b, err := proto.Marshal(test.m) - if err != nil { - t.Errorf("%s: proto.Marshal: %v", test.desc, err) - continue - } - if len(b) > 0 { - t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) - } - } -} - -func TestRoundTripProto3(t *testing.T) { - m := &pb.Message{ - Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" - Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 - HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 - Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" - ResultCount: 47, // (0 | 7<<3): 0x38 0x2f - TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 - Score: 8.1, // (5 | 9<<3): 0x4d <8.1> - - Key: []uint64{1, 0xdeadbeef}, - Nested: &pb.Nested{ - Bunny: "Monty", - }, - } - t.Logf(" m: %v", m) - - b, err := proto.Marshal(m) - if err != nil { - t.Fatalf("proto.Marshal: %v", err) - } - t.Logf(" b: %q", b) - - m2 := new(pb.Message) - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatalf("proto.Unmarshal: %v", err) - } - t.Logf("m2: %v", m2) - - if !proto.Equal(m, m2) { - t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) - } -} - -func TestProto3SetDefaults(t *testing.T) { - in := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: new(tpb.SubDefaults), - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": new(tpb.SubDefaults), - }, - } - - got := proto.Clone(in).(*pb.Message) - proto.SetDefaults(got) - - // There are no defaults in proto3. Everything should be the zero value, but - // we need to remember to set defaults for nested proto2 messages. - want := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": &tpb.SubDefaults{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/golang/protobuf/proto/size2_test.go b/vendor/github.com/golang/protobuf/proto/size2_test.go deleted file mode 100644 index a2729c39..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/proto/size_test.go b/vendor/github.com/golang/protobuf/proto/size_test.go deleted file mode 100644 index af1034dc..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/proto" - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/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: []byte{}}}}, - - {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, - {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: &pb.FloatingPoint{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: []byte{}}}}, - - {"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{true}}}, - {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{0}}}, - {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{1 << 20}}}, - {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{42}}}, - {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{43}}}, - {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{44}}}, - {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{45}}}, - {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{46}}}, - {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{47.1}}}, - {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{48.9}}}, - {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{"Rhythmic Fman"}}}, - {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{[]byte("let go")}}}, - {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{50}}}, - {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{51}}}, - {"oneof enum", &pb.Oneof{Union: &pb.Oneof_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{&pb.GoTestField{Label: String("k"), Type: String("v")}}}}, - {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{&pb.Oneof_F_Group{X: Int32(52)}}}}, - {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{1}}}, - {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{1}, Tormato: &pb.Oneof_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/golang/protobuf/proto/table_marshal.go b/vendor/github.com/golang/protobuf/proto/table_marshal.go new file mode 100644 index 00000000..b1679449 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/table_marshal.go @@ -0,0 +1,2767 @@ +// 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 + +import ( + "errors" + "fmt" + "math" + "reflect" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// a sizer takes a pointer to a field and the size of its tag, computes the size of +// the encoded data. +type sizer func(pointer, int) int + +// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format), +// marshals the field to the end of the slice, returns the slice and error (if any). +type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) + +// marshalInfo is the information used for marshaling a message. +type marshalInfo struct { + typ reflect.Type + fields []*marshalFieldInfo + unrecognized field // offset of XXX_unrecognized + extensions field // offset of XXX_InternalExtensions + v1extensions field // offset of XXX_extensions + sizecache field // offset of XXX_sizecache + initialized int32 // 0 -- only typ is set, 1 -- fully initialized + messageset bool // uses message set wire format + hasmarshaler bool // has custom marshaler + sync.RWMutex // protect extElems map, also for initialization + extElems map[int32]*marshalElemInfo // info of extension elements +} + +// marshalFieldInfo is the information used for marshaling a field of a message. +type marshalFieldInfo struct { + field field + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isPointer bool + required bool // field is required + name string // name of the field, for error reporting + oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements +} + +// marshalElemInfo is the information used for marshaling an extension or oneof element. +type marshalElemInfo struct { + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only) +} + +var ( + marshalInfoMap = map[reflect.Type]*marshalInfo{} + marshalInfoLock sync.Mutex +) + +// getMarshalInfo returns the information to marshal a given type of message. +// The info it returns may not necessarily initialized. +// t is the type of the message (NOT the pointer to it). +func getMarshalInfo(t reflect.Type) *marshalInfo { + marshalInfoLock.Lock() + u, ok := marshalInfoMap[t] + if !ok { + u = &marshalInfo{typ: t} + marshalInfoMap[t] = u + } + marshalInfoLock.Unlock() + return u +} + +// Size is the entry point from generated code, +// and should be ONLY called by generated code. +// It computes the size of encoded data of msg. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Size(msg Message) int { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return 0 + } + return u.size(ptr) +} + +// Marshal is the entry point from generated code, +// and should be ONLY called by generated code. +// It marshals msg to the end of b. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return b, ErrNil + } + return u.marshal(b, ptr, deterministic) +} + +func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo { + // u := a.marshal, but atomically. + // We use an atomic here to ensure memory consistency. + u := atomicLoadMarshalInfo(&a.marshal) + if u == nil { + // Get marshal information from type of message. + t := reflect.ValueOf(msg).Type() + if t.Kind() != reflect.Ptr { + panic(fmt.Sprintf("cannot handle non-pointer message type %v", t)) + } + u = getMarshalInfo(t.Elem()) + // Store it in the cache for later users. + // a.marshal = u, but atomically. + atomicStoreMarshalInfo(&a.marshal, u) + } + return u +} + +// size is the main function to compute the size of the encoded data of a message. +// ptr is the pointer to the message. +func (u *marshalInfo) size(ptr pointer) int { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b, _ := m.Marshal() + return len(b) + } + + n := 0 + for _, f := range u.fields { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + n += f.sizer(ptr.offset(f.field), f.tagsize) + } + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + n += u.sizeMessageSet(e) + } else { + n += u.sizeExtensions(e) + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + n += u.sizeV1Extensions(m) + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + n += len(s) + } + // cache the result for use in marshal + if u.sizecache.IsValid() { + atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n)) + } + return n +} + +// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated), +// fall back to compute the size. +func (u *marshalInfo) cachedsize(ptr pointer) int { + if u.sizecache.IsValid() { + return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32())) + } + return u.size(ptr) +} + +// marshal is the main function to marshal a message. It takes a byte slice and appends +// the encoded data to the end of the slice, returns the slice and error (if any). +// ptr is the pointer to the message. +// If deterministic is true, map is marshaled in deterministic order. +func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b1, err := m.Marshal() + b = append(b, b1...) + return b, err + } + + var err, errLater error + // The old marshaler encodes extensions at beginning. + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + b, err = u.appendMessageSet(b, e, deterministic) + } else { + b, err = u.appendExtensions(b, e, deterministic) + } + if err != nil { + return b, err + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + b, err = u.appendV1Extensions(b, m, deterministic) + if err != nil { + return b, err + } + } + for _, f := range u.fields { + if f.required { + if ptr.offset(f.field).getPointer().isNil() { + // Required field is not set. + // We record the error but keep going, to give a complete marshaling. + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } + continue + } + } + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic) + if err != nil { + if err1, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} + } + continue + } + if err == errRepeatedHasNil { + err = errors.New("proto: repeated field " + f.name + " has nil element") + } + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } + return b, err + } + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + b = append(b, s...) + } + return b, errLater +} + +// computeMarshalInfo initializes the marshal info. +func (u *marshalInfo) computeMarshalInfo() { + u.Lock() + defer u.Unlock() + if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock + return + } + + t := u.typ + u.unrecognized = invalidField + u.extensions = invalidField + u.v1extensions = invalidField + u.sizecache = invalidField + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if reflect.PtrTo(t).Implements(marshalerType) { + u.hasmarshaler = true + atomic.StoreInt32(&u.initialized, 1) + return + } + + // get oneof implementers + var oneofImplementers []interface{} + if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { + _, _, _, oneofImplementers = m.XXX_OneofFuncs() + } + + n := t.NumField() + + // deal with XXX fields first + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if !strings.HasPrefix(f.Name, "XXX_") { + continue + } + switch f.Name { + case "XXX_sizecache": + u.sizecache = toField(&f) + case "XXX_unrecognized": + u.unrecognized = toField(&f) + case "XXX_InternalExtensions": + u.extensions = toField(&f) + u.messageset = f.Tag.Get("protobuf_messageset") == "1" + case "XXX_extensions": + u.v1extensions = toField(&f) + case "XXX_NoUnkeyedLiteral": + // nothing to do + default: + panic("unknown XXX field: " + f.Name) + } + n-- + } + + // normal fields + fields := make([]marshalFieldInfo, n) // batch allocation + u.fields = make([]*marshalFieldInfo, 0, n) + for i, j := 0, 0; i < t.NumField(); i++ { + f := t.Field(i) + + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + field := &fields[j] + j++ + field.name = f.Name + u.fields = append(u.fields, field) + if f.Tag.Get("protobuf_oneof") != "" { + field.computeOneofFieldInfo(&f, oneofImplementers) + continue + } + if f.Tag.Get("protobuf") == "" { + // field has no tag (not in generated message), ignore it + u.fields = u.fields[:len(u.fields)-1] + j-- + continue + } + field.computeMarshalFieldInfo(&f) + } + + // fields are marshaled in tag order on the wire. + sort.Sort(byTag(u.fields)) + + atomic.StoreInt32(&u.initialized, 1) +} + +// helper for sorting fields by tag +type byTag []*marshalFieldInfo + +func (a byTag) Len() int { return len(a) } +func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag } + +// getExtElemInfo returns the information to marshal an extension element. +// The info it returns is initialized. +func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo { + // get from cache first + u.RLock() + e, ok := u.extElems[desc.Field] + u.RUnlock() + if ok { + return e + } + + t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct + tags := strings.Split(desc.Tag, ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizer, marshaler := typeMarshaler(t, tags, false, false) + e = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizer, + marshaler: marshaler, + isptr: t.Kind() == reflect.Ptr, + } + + // update cache + u.Lock() + if u.extElems == nil { + u.extElems = make(map[int32]*marshalElemInfo) + } + u.extElems[desc.Field] = e + u.Unlock() + return e +} + +// computeMarshalFieldInfo fills up the information to marshal a field. +func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) { + // parse protobuf tag of the field. + // tag has format of "bytes,49,opt,name=foo,def=hello!" + tags := strings.Split(f.Tag.Get("protobuf"), ",") + if tags[0] == "" { + return + } + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + if tags[2] == "req" { + fi.required = true + } + fi.setTag(f, tag, wt) + fi.setMarshaler(f, tags) +} + +func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) { + fi.field = toField(f) + fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. + fi.isPointer = true + fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f) + fi.oneofElems = make(map[reflect.Type]*marshalElemInfo) + + ityp := f.Type // interface type + for _, o := range oneofImplementers { + t := reflect.TypeOf(o) + if !t.Implements(ityp) { + continue + } + sf := t.Elem().Field(0) // oneof implementer is a struct with a single field + tags := strings.Split(sf.Tag.Get("protobuf"), ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizer, marshaler := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value + fi.oneofElems[t.Elem()] = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizer, + marshaler: marshaler, + } + } +} + +type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) +} + +// wiretype returns the wire encoding of the type. +func wiretype(encoding string) uint64 { + switch encoding { + case "fixed32": + return WireFixed32 + case "fixed64": + return WireFixed64 + case "varint", "zigzag32", "zigzag64": + return WireVarint + case "bytes": + return WireBytes + case "group": + return WireStartGroup + } + panic("unknown wire type " + encoding) +} + +// setTag fills up the tag (in wire format) and its size in the info of a field. +func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) { + fi.field = toField(f) + fi.wiretag = uint64(tag)<<3 | wt + fi.tagsize = SizeVarint(uint64(tag) << 3) +} + +// setMarshaler fills up the sizer and marshaler in the info of a field. +func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) { + switch f.Type.Kind() { + case reflect.Map: + // map field + fi.isPointer = true + fi.sizer, fi.marshaler = makeMapMarshaler(f) + return + case reflect.Ptr, reflect.Slice: + fi.isPointer = true + } + fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false) +} + +// typeMarshaler returns the sizer and marshaler of a given field. +// t is the type of the field. +// tags is the generated "protobuf" tag of the field. +// If nozero is true, zero value is not marshaled to the wire. +// If oneof is true, it is a oneof field. +func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) { + encoding := tags[0] + + pointer := false + slice := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + packed := false + proto3 := false + validateUTF8 := true + for i := 2; i < len(tags); i++ { + if tags[i] == "packed" { + packed = true + } + if tags[i] == "proto3" { + proto3 = true + } + } + validateUTF8 = validateUTF8 && proto3 + + switch t.Kind() { + case reflect.Bool: + if pointer { + return sizeBoolPtr, appendBoolPtr + } + if slice { + if packed { + return sizeBoolPackedSlice, appendBoolPackedSlice + } + return sizeBoolSlice, appendBoolSlice + } + if nozero { + return sizeBoolValueNoZero, appendBoolValueNoZero + } + return sizeBoolValue, appendBoolValue + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixed32Ptr, appendFixed32Ptr + } + if slice { + if packed { + return sizeFixed32PackedSlice, appendFixed32PackedSlice + } + return sizeFixed32Slice, appendFixed32Slice + } + if nozero { + return sizeFixed32ValueNoZero, appendFixed32ValueNoZero + } + return sizeFixed32Value, appendFixed32Value + case "varint": + if pointer { + return sizeVarint32Ptr, appendVarint32Ptr + } + if slice { + if packed { + return sizeVarint32PackedSlice, appendVarint32PackedSlice + } + return sizeVarint32Slice, appendVarint32Slice + } + if nozero { + return sizeVarint32ValueNoZero, appendVarint32ValueNoZero + } + return sizeVarint32Value, appendVarint32Value + } + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixedS32Ptr, appendFixedS32Ptr + } + if slice { + if packed { + return sizeFixedS32PackedSlice, appendFixedS32PackedSlice + } + return sizeFixedS32Slice, appendFixedS32Slice + } + if nozero { + return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero + } + return sizeFixedS32Value, appendFixedS32Value + case "varint": + if pointer { + return sizeVarintS32Ptr, appendVarintS32Ptr + } + if slice { + if packed { + return sizeVarintS32PackedSlice, appendVarintS32PackedSlice + } + return sizeVarintS32Slice, appendVarintS32Slice + } + if nozero { + return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero + } + return sizeVarintS32Value, appendVarintS32Value + case "zigzag32": + if pointer { + return sizeZigzag32Ptr, appendZigzag32Ptr + } + if slice { + if packed { + return sizeZigzag32PackedSlice, appendZigzag32PackedSlice + } + return sizeZigzag32Slice, appendZigzag32Slice + } + if nozero { + return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero + } + return sizeZigzag32Value, appendZigzag32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixed64Ptr, appendFixed64Ptr + } + if slice { + if packed { + return sizeFixed64PackedSlice, appendFixed64PackedSlice + } + return sizeFixed64Slice, appendFixed64Slice + } + if nozero { + return sizeFixed64ValueNoZero, appendFixed64ValueNoZero + } + return sizeFixed64Value, appendFixed64Value + case "varint": + if pointer { + return sizeVarint64Ptr, appendVarint64Ptr + } + if slice { + if packed { + return sizeVarint64PackedSlice, appendVarint64PackedSlice + } + return sizeVarint64Slice, appendVarint64Slice + } + if nozero { + return sizeVarint64ValueNoZero, appendVarint64ValueNoZero + } + return sizeVarint64Value, appendVarint64Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixedS64Ptr, appendFixedS64Ptr + } + if slice { + if packed { + return sizeFixedS64PackedSlice, appendFixedS64PackedSlice + } + return sizeFixedS64Slice, appendFixedS64Slice + } + if nozero { + return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero + } + return sizeFixedS64Value, appendFixedS64Value + case "varint": + if pointer { + return sizeVarintS64Ptr, appendVarintS64Ptr + } + if slice { + if packed { + return sizeVarintS64PackedSlice, appendVarintS64PackedSlice + } + return sizeVarintS64Slice, appendVarintS64Slice + } + if nozero { + return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero + } + return sizeVarintS64Value, appendVarintS64Value + case "zigzag64": + if pointer { + return sizeZigzag64Ptr, appendZigzag64Ptr + } + if slice { + if packed { + return sizeZigzag64PackedSlice, appendZigzag64PackedSlice + } + return sizeZigzag64Slice, appendZigzag64Slice + } + if nozero { + return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero + } + return sizeZigzag64Value, appendZigzag64Value + } + case reflect.Float32: + if pointer { + return sizeFloat32Ptr, appendFloat32Ptr + } + if slice { + if packed { + return sizeFloat32PackedSlice, appendFloat32PackedSlice + } + return sizeFloat32Slice, appendFloat32Slice + } + if nozero { + return sizeFloat32ValueNoZero, appendFloat32ValueNoZero + } + return sizeFloat32Value, appendFloat32Value + case reflect.Float64: + if pointer { + return sizeFloat64Ptr, appendFloat64Ptr + } + if slice { + if packed { + return sizeFloat64PackedSlice, appendFloat64PackedSlice + } + return sizeFloat64Slice, appendFloat64Slice + } + if nozero { + return sizeFloat64ValueNoZero, appendFloat64ValueNoZero + } + return sizeFloat64Value, appendFloat64Value + case reflect.String: + if validateUTF8 { + if pointer { + return sizeStringPtr, appendUTF8StringPtr + } + if slice { + return sizeStringSlice, appendUTF8StringSlice + } + if nozero { + return sizeStringValueNoZero, appendUTF8StringValueNoZero + } + return sizeStringValue, appendUTF8StringValue + } + if pointer { + return sizeStringPtr, appendStringPtr + } + if slice { + return sizeStringSlice, appendStringSlice + } + if nozero { + return sizeStringValueNoZero, appendStringValueNoZero + } + return sizeStringValue, appendStringValue + case reflect.Slice: + if slice { + return sizeBytesSlice, appendBytesSlice + } + if oneof { + // Oneof bytes field may also have "proto3" tag. + // We want to marshal it as a oneof field. Do this + // check before the proto3 check. + return sizeBytesOneof, appendBytesOneof + } + if proto3 { + return sizeBytes3, appendBytes3 + } + return sizeBytes, appendBytes + case reflect.Struct: + switch encoding { + case "group": + if slice { + return makeGroupSliceMarshaler(getMarshalInfo(t)) + } + return makeGroupMarshaler(getMarshalInfo(t)) + case "bytes": + if slice { + return makeMessageSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageMarshaler(getMarshalInfo(t)) + } + } + panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding)) +} + +// Below are functions to size/marshal a specific type of a field. +// They are stored in the field's info, and called by function pointers. +// They have type sizer or marshaler. + +func sizeFixed32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixed32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixedS32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFloat32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + return (4 + tagsize) * len(s) +} +func sizeFloat32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixed64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixed64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFixedS64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFloat64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + return (8 + tagsize) * len(s) +} +func sizeFloat64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeVarint32Value(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarint32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarint32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarint64Value(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + return SizeVarint(v) + tagsize +} +func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return SizeVarint(v) + tagsize +} +func sizeVarint64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return SizeVarint(*p) + tagsize +} +func sizeVarint64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(v) + tagsize + } + return n +} +func sizeVarint64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize + } + return n +} +func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize + } + return n +} +func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeBoolValue(_ pointer, tagsize int) int { + return 1 + tagsize +} +func sizeBoolValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toBool() + if !v { + return 0 + } + return 1 + tagsize +} +func sizeBoolPtr(ptr pointer, tagsize int) int { + p := *ptr.toBoolPtr() + if p == nil { + return 0 + } + return 1 + tagsize +} +func sizeBoolSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + return (1 + tagsize) * len(s) +} +func sizeBoolPackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return 0 + } + return len(s) + SizeVarint(uint64(len(s))) + tagsize +} +func sizeStringValue(ptr pointer, tagsize int) int { + v := *ptr.toString() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toString() + if v == "" { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringPtr(ptr pointer, tagsize int) int { + p := *ptr.toStringPtr() + if p == nil { + return 0 + } + v := *p + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringSlice(ptr pointer, tagsize int) int { + s := *ptr.toStringSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} +func sizeBytes(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if v == nil { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytes3(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if len(v) == 0 { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesOneof(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesSlice(ptr pointer, tagsize int) int { + s := *ptr.toBytesSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} + +// appendFixed32 appends an encoded fixed32 to b. +func appendFixed32(b []byte, v uint32) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24)) + return b +} + +// appendFixed64 appends an encoded fixed64 to b. +func appendFixed64(b []byte, v uint64) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24), + byte(v>>32), + byte(v>>40), + byte(v>>48), + byte(v>>56)) + return b +} + +// appendVarint appends an encoded varint to b. +func appendVarint(b []byte, v uint64) []byte { + // TODO: make 1-byte (maybe 2-byte) case inline-able, once we + // have non-leaf inliner. + switch { + case v < 1<<7: + b = append(b, byte(v)) + case v < 1<<14: + b = append(b, + byte(v&0x7f|0x80), + byte(v>>7)) + case v < 1<<21: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte(v>>14)) + case v < 1<<28: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte(v>>21)) + case v < 1<<35: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte(v>>28)) + case v < 1<<42: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte(v>>35)) + case v < 1<<49: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte(v>>42)) + case v < 1<<56: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte(v>>49)) + case v < 1<<63: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte(v>>56)) + default: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte((v>>56)&0x7f|0x80), + 1) + } + return b +} + +func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, *p) + return b, nil +} +func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(*p)) + return b, nil +} +func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(*p)) + return b, nil +} +func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, *p) + return b, nil +} +func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(*p)) + return b, nil +} +func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(*p)) + return b, nil +} +func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, *p) + return b, nil +} +func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + } + return b, nil +} +func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, v) + } + return b, nil +} +func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + if !v { + return b, nil + } + b = appendVarint(b, wiretag) + b = append(b, 1) + return b, nil +} + +func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toBoolPtr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + if *p { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(len(s))) + for _, v := range s { + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if v == "" { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if v == "" { + return b, nil + } + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + s := *ptr.toStringSlice() + for _, v := range s { + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if v == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if len(v) == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBytesSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} + +// makeGroupMarshaler returns the sizer and marshaler for a group. +// u is the marshal info of the underlying message. +func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + return u.size(p) + 2*tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + var err error + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, p, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + return b, err + } +} + +// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice. +// u is the marshal info of the underlying message. +func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + n += u.size(v) + 2*tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err error + var nerr nonFatal + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, v, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + if !nerr.Merge(err) { + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, nerr.E + } +} + +// makeMessageMarshaler returns the sizer and marshaler for a message field. +// u is the marshal info of the message. +func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.size(p) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(p) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, p, deterministic) + } +} + +// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice. +// u is the marshal info of the message. +func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err error + var nerr nonFatal + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + + if !nerr.Merge(err) { + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, nerr.E + } +} + +// makeMapMarshaler returns the sizer and marshaler for a map field. +// f is the pointer to the reflect data structure of the field. +func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { + // figure out key and value type + t := f.Type + keyType := t.Key() + valType := t.Elem() + keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map + valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map + keyWireTag := 1<<3 | wiretype(keyTags[0]) + valWireTag := 2<<3 | wiretype(valTags[0]) + + // We create an interface to get the addresses of the map key and value. + // If value is pointer-typed, the interface is a direct interface, the + // idata itself is the value. Otherwise, the idata is the pointer to the + // value. + // Key cannot be pointer-typed. + valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(t).Elem() // the map + n := 0 + for _, k := range m.MapKeys() { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(t).Elem() // the map + var err error + keys := m.MapKeys() + if len(keys) > 1 && deterministic { + sort.Sort(mapKeys(keys)) + } + + var nerr nonFatal + for _, k := range keys { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + b = appendVarint(b, tag) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + b = appendVarint(b, uint64(siz)) + b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) + if !nerr.Merge(err) { + return b, err + } + b, err = valMarshaler(b, vaddr, valWireTag, deterministic) + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map + return b, err + } + } + return b, nerr.E + } +} + +// makeOneOfMarshaler returns the sizer and marshaler for a oneof field. +// fi is the marshal info of the field. +// f is the pointer to the reflect data structure of the field. +func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) { + // Oneof field is an interface. We need to get the actual data type on the fly. + t := f.Type + return func(ptr pointer, _ int) int { + p := ptr.getInterfacePointer() + if p.isNil() { + return 0 + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + e := fi.oneofElems[telem] + return e.sizer(p, e.tagsize) + }, + func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) { + p := ptr.getInterfacePointer() + if p.isNil() { + return b, nil + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() { + return b, errOneofHasNil + } + e := fi.oneofElems[telem] + return e.marshaler(b, p, e.wiretag, deterministic) + } +} + +// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field. +func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + mu.Unlock() + return n +} + +// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b. +func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + var nerr nonFatal + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E + } + + // Sort the keys to provide a deterministic encoding. + // Not sure this is required, but the old code does it. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// message set format is: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } + +// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field +// in message set format (above). +func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for id, e := range m { + n += 2 // start group, end group. tag = 1 (size=1) + n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + siz := len(msgWithLen) + n += siz + 1 // message, tag = 3 (size=1) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, 1) // message, tag = 3 (size=1) + } + mu.Unlock() + return n +} + +// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above) +// to the end of byte slice b. +func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + var nerr nonFatal + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for id, e := range m { + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + if !nerr.Merge(err) { + return b, err + } + b = append(b, 1<<3|WireEndGroup) + } + return b, nerr.E + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, id := range keys { + e := m[int32(id)] + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + b = append(b, 1<<3|WireEndGroup) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// sizeV1Extensions computes the size of encoded data for a V1-API extension field. +func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int { + if m == nil { + return 0 + } + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + return n +} + +// appendV1Extensions marshals a V1-API extension field to the end of byte slice b. +func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) { + if m == nil { + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + var err error + var nerr nonFatal + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// newMarshaler is the interface representing objects that can marshal themselves. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newMarshaler interface { + XXX_Size() int + XXX_Marshal(b []byte, deterministic bool) ([]byte, error) +} + +// Size returns the encoded size of a protocol buffer message. +// This is the main entry point. +func Size(pb Message) int { + if m, ok := pb.(newMarshaler); ok { + return m.XXX_Size() + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + b, _ := m.Marshal() + return len(b) + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return 0 + } + var info InternalMessageInfo + return info.Size(pb) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, returning the data. +// This is the main entry point. +func Marshal(pb Message) ([]byte, error) { + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + b := make([]byte, 0, siz) + return m.XXX_Marshal(b, false) + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + return m.Marshal() + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return nil, ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + b := make([]byte, 0, siz) + return info.Marshal(b, pb, false) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, writing the result to the +// Buffer. +// This is an alternative entry point. It is not necessary to use +// a Buffer for most applications. +func (p *Buffer) Marshal(pb Message) error { + var err error + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + p.grow(siz) // make sure buf has enough capacity + p.buf, err = m.XXX_Marshal(p.buf, p.deterministic) + return err + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + b, err := m.Marshal() + p.buf = append(p.buf, b...) + return err + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + p.grow(siz) // make sure buf has enough capacity + p.buf, err = info.Marshal(p.buf, pb, p.deterministic) + return err +} + +// grow grows the buffer's capacity, if necessary, to guarantee space for +// another n bytes. After grow(n), at least n bytes can be written to the +// buffer without another allocation. +func (p *Buffer) grow(n int) { + need := len(p.buf) + n + if need <= cap(p.buf) { + return + } + newCap := len(p.buf) * 2 + if newCap < need { + newCap = need + } + p.buf = append(make([]byte, 0, newCap), p.buf...) +} diff --git a/vendor/github.com/golang/protobuf/proto/table_merge.go b/vendor/github.com/golang/protobuf/proto/table_merge.go new file mode 100644 index 00000000..5525def6 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/table_merge.go @@ -0,0 +1,654 @@ +// 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 + +import ( + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" +) + +// Merge merges the src message into dst. +// This assumes that dst and src of the same type and are non-nil. +func (a *InternalMessageInfo) Merge(dst, src Message) { + mi := atomicLoadMergeInfo(&a.merge) + if mi == nil { + mi = getMergeInfo(reflect.TypeOf(dst).Elem()) + atomicStoreMergeInfo(&a.merge, mi) + } + mi.merge(toPointer(&dst), toPointer(&src)) +} + +type mergeInfo struct { + typ reflect.Type + + initialized int32 // 0: only typ is valid, 1: everything is valid + lock sync.Mutex + + fields []mergeFieldInfo + unrecognized field // Offset of XXX_unrecognized +} + +type mergeFieldInfo struct { + field field // Offset of field, guaranteed to be valid + + // isPointer reports whether the value in the field is a pointer. + // This is true for the following situations: + // * Pointer to struct + // * Pointer to basic type (proto2 only) + // * Slice (first value in slice header is a pointer) + // * String (first value in string header is a pointer) + isPointer bool + + // basicWidth reports the width of the field assuming that it is directly + // embedded in the struct (as is the case for basic types in proto3). + // The possible values are: + // 0: invalid + // 1: bool + // 4: int32, uint32, float32 + // 8: int64, uint64, float64 + basicWidth int + + // Where dst and src are pointers to the types being merged. + merge func(dst, src pointer) +} + +var ( + mergeInfoMap = map[reflect.Type]*mergeInfo{} + mergeInfoLock sync.Mutex +) + +func getMergeInfo(t reflect.Type) *mergeInfo { + mergeInfoLock.Lock() + defer mergeInfoLock.Unlock() + mi := mergeInfoMap[t] + if mi == nil { + mi = &mergeInfo{typ: t} + mergeInfoMap[t] = mi + } + return mi +} + +// merge merges src into dst assuming they are both of type *mi.typ. +func (mi *mergeInfo) merge(dst, src pointer) { + if dst.isNil() { + panic("proto: nil destination") + } + if src.isNil() { + return // Nothing to do. + } + + if atomic.LoadInt32(&mi.initialized) == 0 { + mi.computeMergeInfo() + } + + for _, fi := range mi.fields { + sfp := src.offset(fi.field) + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string + continue + } + if fi.basicWidth > 0 { + switch { + case fi.basicWidth == 1 && !*sfp.toBool(): + continue + case fi.basicWidth == 4 && *sfp.toUint32() == 0: + continue + case fi.basicWidth == 8 && *sfp.toUint64() == 0: + continue + } + } + } + + dfp := dst.offset(fi.field) + fi.merge(dfp, sfp) + } + + // TODO: Make this faster? + out := dst.asPointerTo(mi.typ).Elem() + in := src.asPointerTo(mi.typ).Elem() + if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + if mi.unrecognized.IsValid() { + if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 { + *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...) + } + } +} + +func (mi *mergeInfo) computeMergeInfo() { + mi.lock.Lock() + defer mi.lock.Unlock() + if mi.initialized != 0 { + return + } + t := mi.typ + n := t.NumField() + + props := GetProperties(t) + for i := 0; i < n; i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + + mfi := mergeFieldInfo{field: toField(&f)} + tf := f.Type + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + switch tf.Kind() { + case reflect.Ptr, reflect.Slice, reflect.String: + // As a special case, we assume slices and strings are pointers + // since we know that the first field in the SliceSlice or + // StringHeader is a data pointer. + mfi.isPointer = true + case reflect.Bool: + mfi.basicWidth = 1 + case reflect.Int32, reflect.Uint32, reflect.Float32: + mfi.basicWidth = 4 + case reflect.Int64, reflect.Uint64, reflect.Float64: + mfi.basicWidth = 8 + } + } + + // Unwrap tf to get at its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + tf.Name()) + } + + switch tf.Kind() { + case reflect.Int32: + switch { + case isSlice: // E.g., []int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Slice is not defined (see pointer_reflect.go). + /* + sfsp := src.toInt32Slice() + if *sfsp != nil { + dfsp := dst.toInt32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + */ + sfs := src.getInt32Slice() + if sfs != nil { + dfs := dst.getInt32Slice() + dfs = append(dfs, sfs...) + if dfs == nil { + dfs = []int32{} + } + dst.setInt32Slice(dfs) + } + } + case isPointer: // E.g., *int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Ptr is not defined (see pointer_reflect.go). + /* + sfpp := src.toInt32Ptr() + if *sfpp != nil { + dfpp := dst.toInt32Ptr() + if *dfpp == nil { + *dfpp = Int32(**sfpp) + } else { + **dfpp = **sfpp + } + } + */ + sfp := src.getInt32Ptr() + if sfp != nil { + dfp := dst.getInt32Ptr() + if dfp == nil { + dst.setInt32Ptr(*sfp) + } else { + *dfp = *sfp + } + } + } + default: // E.g., int32 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt32(); v != 0 { + *dst.toInt32() = v + } + } + } + case reflect.Int64: + switch { + case isSlice: // E.g., []int64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toInt64Slice() + if *sfsp != nil { + dfsp := dst.toInt64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + } + case isPointer: // E.g., *int64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toInt64Ptr() + if *sfpp != nil { + dfpp := dst.toInt64Ptr() + if *dfpp == nil { + *dfpp = Int64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., int64 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt64(); v != 0 { + *dst.toInt64() = v + } + } + } + case reflect.Uint32: + switch { + case isSlice: // E.g., []uint32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint32Slice() + if *sfsp != nil { + dfsp := dst.toUint32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint32{} + } + } + } + case isPointer: // E.g., *uint32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint32Ptr() + if *sfpp != nil { + dfpp := dst.toUint32Ptr() + if *dfpp == nil { + *dfpp = Uint32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint32 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint32(); v != 0 { + *dst.toUint32() = v + } + } + } + case reflect.Uint64: + switch { + case isSlice: // E.g., []uint64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint64Slice() + if *sfsp != nil { + dfsp := dst.toUint64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint64{} + } + } + } + case isPointer: // E.g., *uint64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint64Ptr() + if *sfpp != nil { + dfpp := dst.toUint64Ptr() + if *dfpp == nil { + *dfpp = Uint64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint64 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint64(); v != 0 { + *dst.toUint64() = v + } + } + } + case reflect.Float32: + switch { + case isSlice: // E.g., []float32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat32Slice() + if *sfsp != nil { + dfsp := dst.toFloat32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float32{} + } + } + } + case isPointer: // E.g., *float32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat32Ptr() + if *sfpp != nil { + dfpp := dst.toFloat32Ptr() + if *dfpp == nil { + *dfpp = Float32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float32 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat32(); v != 0 { + *dst.toFloat32() = v + } + } + } + case reflect.Float64: + switch { + case isSlice: // E.g., []float64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat64Slice() + if *sfsp != nil { + dfsp := dst.toFloat64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float64{} + } + } + } + case isPointer: // E.g., *float64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat64Ptr() + if *sfpp != nil { + dfpp := dst.toFloat64Ptr() + if *dfpp == nil { + *dfpp = Float64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float64 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat64(); v != 0 { + *dst.toFloat64() = v + } + } + } + case reflect.Bool: + switch { + case isSlice: // E.g., []bool + mfi.merge = func(dst, src pointer) { + sfsp := src.toBoolSlice() + if *sfsp != nil { + dfsp := dst.toBoolSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []bool{} + } + } + } + case isPointer: // E.g., *bool + mfi.merge = func(dst, src pointer) { + sfpp := src.toBoolPtr() + if *sfpp != nil { + dfpp := dst.toBoolPtr() + if *dfpp == nil { + *dfpp = Bool(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., bool + mfi.merge = func(dst, src pointer) { + if v := *src.toBool(); v { + *dst.toBool() = v + } + } + } + case reflect.String: + switch { + case isSlice: // E.g., []string + mfi.merge = func(dst, src pointer) { + sfsp := src.toStringSlice() + if *sfsp != nil { + dfsp := dst.toStringSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []string{} + } + } + } + case isPointer: // E.g., *string + mfi.merge = func(dst, src pointer) { + sfpp := src.toStringPtr() + if *sfpp != nil { + dfpp := dst.toStringPtr() + if *dfpp == nil { + *dfpp = String(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., string + mfi.merge = func(dst, src pointer) { + if v := *src.toString(); v != "" { + *dst.toString() = v + } + } + } + case reflect.Slice: + isProto3 := props.Prop[i].proto3 + switch { + case isPointer: + panic("bad pointer in byte slice case in " + tf.Name()) + case tf.Elem().Kind() != reflect.Uint8: + panic("bad element kind in byte slice case in " + tf.Name()) + case isSlice: // E.g., [][]byte + mfi.merge = func(dst, src pointer) { + sbsp := src.toBytesSlice() + if *sbsp != nil { + dbsp := dst.toBytesSlice() + for _, sb := range *sbsp { + if sb == nil { + *dbsp = append(*dbsp, nil) + } else { + *dbsp = append(*dbsp, append([]byte{}, sb...)) + } + } + if *dbsp == nil { + *dbsp = [][]byte{} + } + } + } + default: // E.g., []byte + mfi.merge = func(dst, src pointer) { + sbp := src.toBytes() + if *sbp != nil { + dbp := dst.toBytes() + if !isProto3 || len(*sbp) > 0 { + *dbp = append([]byte{}, *sbp...) + } + } + } + } + case reflect.Struct: + switch { + case !isPointer: + panic(fmt.Sprintf("message field %s without pointer", tf)) + case isSlice: // E.g., []*pb.T + mi := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sps := src.getPointerSlice() + if sps != nil { + dps := dst.getPointerSlice() + for _, sp := range sps { + var dp pointer + if !sp.isNil() { + dp = valToPointer(reflect.New(tf)) + mi.merge(dp, sp) + } + dps = append(dps, dp) + } + if dps == nil { + dps = []pointer{} + } + dst.setPointerSlice(dps) + } + } + default: // E.g., *pb.T + mi := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sp := src.getPointer() + if !sp.isNil() { + dp := dst.getPointer() + if dp.isNil() { + dp = valToPointer(reflect.New(tf)) + dst.setPointer(dp) + } + mi.merge(dp, sp) + } + } + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic("bad pointer or slice in map case in " + tf.Name()) + default: // E.g., map[K]V + mfi.merge = func(dst, src pointer) { + sm := src.asPointerTo(tf).Elem() + if sm.Len() == 0 { + return + } + dm := dst.asPointerTo(tf).Elem() + if dm.IsNil() { + dm.Set(reflect.MakeMap(tf)) + } + + switch tf.Elem().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(Clone(val.Interface().(Message))) + dm.SetMapIndex(key, val) + } + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + dm.SetMapIndex(key, val) + } + default: // Basic type (e.g., string) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + dm.SetMapIndex(key, val) + } + } + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic("bad pointer or slice in interface case in " + tf.Name()) + default: // E.g., interface{} + // TODO: Make this faster? + mfi.merge = func(dst, src pointer) { + su := src.asPointerTo(tf).Elem() + if !su.IsNil() { + du := dst.asPointerTo(tf).Elem() + typ := su.Elem().Type() + if du.IsNil() || du.Elem().Type() != typ { + du.Set(reflect.New(typ.Elem())) // Initialize interface if empty + } + sv := su.Elem().Elem().Field(0) + if sv.Kind() == reflect.Ptr && sv.IsNil() { + return + } + dv := du.Elem().Elem().Field(0) + if dv.Kind() == reflect.Ptr && dv.IsNil() { + dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty + } + switch sv.Type().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + Merge(dv.Interface().(Message), sv.Interface().(Message)) + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...))) + default: // Basic type (e.g., string) + dv.Set(sv) + } + } + } + } + default: + panic(fmt.Sprintf("merger not found for type:%s", tf)) + } + mi.fields = append(mi.fields, mfi) + } + + mi.unrecognized = invalidField + if f, ok := t.FieldByName("XXX_unrecognized"); ok { + if f.Type != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + mi.unrecognized = toField(&f) + } + + atomic.StoreInt32(&mi.initialized, 1) +} diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go new file mode 100644 index 00000000..ebf1caa5 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go @@ -0,0 +1,2051 @@ +// 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 + +import ( + "errors" + "fmt" + "io" + "math" + "reflect" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// Unmarshal is the entry point from the generated .pb.go files. +// This function is not intended to be used by non-generated code. +// This function is not subject to any compatibility guarantee. +// msg contains a pointer to a protocol buffer struct. +// b is the data to be unmarshaled into the protocol buffer. +// a is a pointer to a place to store cached unmarshal information. +func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error { + // Load the unmarshal information for this message type. + // The atomic load ensures memory consistency. + u := atomicLoadUnmarshalInfo(&a.unmarshal) + if u == nil { + // Slow path: find unmarshal info for msg, update a with it. + u = getUnmarshalInfo(reflect.TypeOf(msg).Elem()) + atomicStoreUnmarshalInfo(&a.unmarshal, u) + } + // Then do the unmarshaling. + err := u.unmarshal(toPointer(&msg), b) + return err +} + +type unmarshalInfo struct { + typ reflect.Type // type of the protobuf struct + + // 0 = only typ field is initialized + // 1 = completely initialized + initialized int32 + lock sync.Mutex // prevents double initialization + dense []unmarshalFieldInfo // fields indexed by tag # + sparse map[uint64]unmarshalFieldInfo // fields indexed by tag # + reqFields []string // names of required fields + reqMask uint64 // 1< 0 { + // Read tag and wire type. + // Special case 1 and 2 byte varints. + var x uint64 + if b[0] < 128 { + x = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + x = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + x, n = decodeVarint(b) + if n == 0 { + return io.ErrUnexpectedEOF + } + b = b[n:] + } + tag := x >> 3 + wire := int(x) & 7 + + // Dispatch on the tag to one of the unmarshal* functions below. + var f unmarshalFieldInfo + if tag < uint64(len(u.dense)) { + f = u.dense[tag] + } else { + f = u.sparse[tag] + } + if fn := f.unmarshal; fn != nil { + var err error + b, err = fn(b, m.offset(f.field), wire) + if err == nil { + reqMask |= f.reqMask + continue + } + if r, ok := err.(*RequiredNotSetError); ok { + // Remember this error, but keep parsing. We need to produce + // a full parse even if a required field is missing. + if errLater == nil { + errLater = r + } + reqMask |= f.reqMask + continue + } + if err != errInternalBadWireType { + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } + return err + } + // Fragments with bad wire type are treated as unknown fields. + } + + // Unknown tag. + if !u.unrecognized.IsValid() { + // Don't keep unrecognized data; just skip it. + var err error + b, err = skipField(b, wire) + if err != nil { + return err + } + continue + } + // Keep unrecognized data around. + // maybe in extensions, maybe in the unrecognized field. + z := m.offset(u.unrecognized).toBytes() + var emap map[int32]Extension + var e Extension + for _, r := range u.extensionRanges { + if uint64(r.Start) <= tag && tag <= uint64(r.End) { + if u.extensions.IsValid() { + mp := m.offset(u.extensions).toExtensions() + emap = mp.extensionsWrite() + e = emap[int32(tag)] + z = &e.enc + break + } + if u.oldExtensions.IsValid() { + p := m.offset(u.oldExtensions).toOldExtensions() + emap = *p + if emap == nil { + emap = map[int32]Extension{} + *p = emap + } + e = emap[int32(tag)] + z = &e.enc + break + } + panic("no extensions field available") + } + } + + // Use wire type to skip data. + var err error + b0 := b + b, err = skipField(b, wire) + if err != nil { + return err + } + *z = encodeVarint(*z, tag<<3|uint64(wire)) + *z = append(*z, b0[:len(b0)-len(b)]...) + + if emap != nil { + emap[int32(tag)] = e + } + } + if reqMask != u.reqMask && errLater == nil { + // A required field of this message is missing. + for _, n := range u.reqFields { + if reqMask&1 == 0 { + errLater = &RequiredNotSetError{n} + } + reqMask >>= 1 + } + } + return errLater +} + +// computeUnmarshalInfo fills in u with information for use +// in unmarshaling protocol buffers of type u.typ. +func (u *unmarshalInfo) computeUnmarshalInfo() { + u.lock.Lock() + defer u.lock.Unlock() + if u.initialized != 0 { + return + } + t := u.typ + n := t.NumField() + + // Set up the "not found" value for the unrecognized byte buffer. + // This is the default for proto3. + u.unrecognized = invalidField + u.extensions = invalidField + u.oldExtensions = invalidField + + // List of the generated type and offset for each oneof field. + type oneofField struct { + ityp reflect.Type // interface type of oneof field + field field // offset in containing message + } + var oneofFields []oneofField + + for i := 0; i < n; i++ { + f := t.Field(i) + if f.Name == "XXX_unrecognized" { + // The byte slice used to hold unrecognized input is special. + if f.Type != reflect.TypeOf(([]byte)(nil)) { + panic("bad type for XXX_unrecognized field: " + f.Type.Name()) + } + u.unrecognized = toField(&f) + continue + } + if f.Name == "XXX_InternalExtensions" { + // Ditto here. + if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) { + panic("bad type for XXX_InternalExtensions field: " + f.Type.Name()) + } + u.extensions = toField(&f) + if f.Tag.Get("protobuf_messageset") == "1" { + u.isMessageSet = true + } + continue + } + if f.Name == "XXX_extensions" { + // An older form of the extensions field. + if f.Type != reflect.TypeOf((map[int32]Extension)(nil)) { + panic("bad type for XXX_extensions field: " + f.Type.Name()) + } + u.oldExtensions = toField(&f) + continue + } + if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" { + continue + } + + oneof := f.Tag.Get("protobuf_oneof") + if oneof != "" { + oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)}) + // The rest of oneof processing happens below. + continue + } + + tags := f.Tag.Get("protobuf") + tagArray := strings.Split(tags, ",") + if len(tagArray) < 2 { + panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags) + } + tag, err := strconv.Atoi(tagArray[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tagArray[1]) + } + + name := "" + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + } + + // Extract unmarshaling function from the field (its type and tags). + unmarshal := fieldUnmarshaler(&f) + + // Required field? + var reqMask uint64 + if tagArray[2] == "req" { + bit := len(u.reqFields) + u.reqFields = append(u.reqFields, name) + reqMask = uint64(1) << uint(bit) + // TODO: if we have more than 64 required fields, we end up + // not verifying that all required fields are present. + // Fix this, perhaps using a count of required fields? + } + + // Store the info in the correct slot in the message. + u.setTag(tag, toField(&f), unmarshal, reqMask, name) + } + + // Find any types associated with oneof fields. + // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it? + fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs") + if fn.IsValid() { + res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{} + for i := res.Len() - 1; i >= 0; i-- { + v := res.Index(i) // interface{} + tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X + typ := tptr.Elem() // Msg_X + + f := typ.Field(0) // oneof implementers have one field + baseUnmarshal := fieldUnmarshaler(&f) + tags := strings.Split(f.Tag.Get("protobuf"), ",") + fieldNum, err := strconv.Atoi(tags[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tags[1]) + } + var name string + for _, tag := range tags { + if strings.HasPrefix(tag, "name=") { + name = strings.TrimPrefix(tag, "name=") + break + } + } + + // Find the oneof field that this struct implements. + // Might take O(n^2) to process all of the oneofs, but who cares. + for _, of := range oneofFields { + if tptr.Implements(of.ityp) { + // We have found the corresponding interface for this struct. + // That lets us know where this struct should be stored + // when we encounter it during unmarshaling. + unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) + u.setTag(fieldNum, of.field, unmarshal, 0, name) + } + } + } + } + + // Get extension ranges, if any. + fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray") + if fn.IsValid() { + if !u.extensions.IsValid() && !u.oldExtensions.IsValid() { + panic("a message with extensions, but no extensions field in " + t.Name()) + } + u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange) + } + + // Explicitly disallow tag 0. This will ensure we flag an error + // when decoding a buffer of all zeros. Without this code, we + // would decode and skip an all-zero buffer of even length. + // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. + u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { + return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) + }, 0, "") + + // Set mask for required field check. + u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? + for len(u.dense) <= tag { + u.dense = append(u.dense, unmarshalFieldInfo{}) + } + u.dense[tag] = i + return + } + if u.sparse == nil { + u.sparse = map[uint64]unmarshalFieldInfo{} + } + u.sparse[uint64(tag)] = i +} + +// fieldUnmarshaler returns an unmarshaler for the given field. +func fieldUnmarshaler(f *reflect.StructField) unmarshaler { + if f.Type.Kind() == reflect.Map { + return makeUnmarshalMap(f) + } + return typeUnmarshaler(f.Type, f.Tag.Get("protobuf")) +} + +// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair. +func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { + tagArray := strings.Split(tags, ",") + encoding := tagArray[0] + name := "unknown" + proto3 := false + validateUTF8 := true + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + if tag == "proto3" { + proto3 = true + } + } + validateUTF8 = validateUTF8 && proto3 + + // Figure out packaging (pointer, slice, or both) + slice := false + pointer := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + // We'll never have both pointer and slice for basic types. + if pointer && slice && t.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + t.Name()) + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return unmarshalBoolPtr + } + if slice { + return unmarshalBoolSlice + } + return unmarshalBoolValue + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixedS32Ptr + } + if slice { + return unmarshalFixedS32Slice + } + return unmarshalFixedS32Value + case "varint": + // this could be int32 or enum + if pointer { + return unmarshalInt32Ptr + } + if slice { + return unmarshalInt32Slice + } + return unmarshalInt32Value + case "zigzag32": + if pointer { + return unmarshalSint32Ptr + } + if slice { + return unmarshalSint32Slice + } + return unmarshalSint32Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixedS64Ptr + } + if slice { + return unmarshalFixedS64Slice + } + return unmarshalFixedS64Value + case "varint": + if pointer { + return unmarshalInt64Ptr + } + if slice { + return unmarshalInt64Slice + } + return unmarshalInt64Value + case "zigzag64": + if pointer { + return unmarshalSint64Ptr + } + if slice { + return unmarshalSint64Slice + } + return unmarshalSint64Value + } + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixed32Ptr + } + if slice { + return unmarshalFixed32Slice + } + return unmarshalFixed32Value + case "varint": + if pointer { + return unmarshalUint32Ptr + } + if slice { + return unmarshalUint32Slice + } + return unmarshalUint32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixed64Ptr + } + if slice { + return unmarshalFixed64Slice + } + return unmarshalFixed64Value + case "varint": + if pointer { + return unmarshalUint64Ptr + } + if slice { + return unmarshalUint64Slice + } + return unmarshalUint64Value + } + case reflect.Float32: + if pointer { + return unmarshalFloat32Ptr + } + if slice { + return unmarshalFloat32Slice + } + return unmarshalFloat32Value + case reflect.Float64: + if pointer { + return unmarshalFloat64Ptr + } + if slice { + return unmarshalFloat64Slice + } + return unmarshalFloat64Value + case reflect.Map: + panic("map type in typeUnmarshaler in " + t.Name()) + case reflect.Slice: + if pointer { + panic("bad pointer in slice case in " + t.Name()) + } + if slice { + return unmarshalBytesSlice + } + return unmarshalBytesValue + case reflect.String: + if validateUTF8 { + if pointer { + return unmarshalUTF8StringPtr + } + if slice { + return unmarshalUTF8StringSlice + } + return unmarshalUTF8StringValue + } + if pointer { + return unmarshalStringPtr + } + if slice { + return unmarshalStringSlice + } + return unmarshalStringValue + case reflect.Struct: + // message or group field + if !pointer { + panic(fmt.Sprintf("message/group field %s:%s without pointer", t, encoding)) + } + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name) + case "group": + if slice { + return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name) + } + } + panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding)) +} + +// Below are all the unmarshalers for individual fields of various types. + +func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64() = v + return b, nil +} + +func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64() = v + return b, nil +} + +func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64() = v + return b, nil +} + +func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64Ptr() = &v + return b, nil +} + +func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + *f.toInt32() = v + return b, nil +} + +func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + *f.toInt32() = v + return b, nil +} + +func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32() = v + return b, nil +} + +func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32Ptr() = &v + return b, nil +} + +func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64() = v + return b[8:], nil +} + +func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64() = v + return b[8:], nil +} + +func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32() = v + return b[4:], nil +} + +func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32Ptr() = &v + return b[4:], nil +} + +func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + *f.toInt32() = v + return b[4:], nil +} + +func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.setInt32Ptr(v) + return b[4:], nil +} + +func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + return b[4:], nil +} + +func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + // Note: any length varint is allowed, even though any sane + // encoder will use one byte. + // See https://github.com/golang/protobuf/issues/76 + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + // TODO: check if x>1? Tests seem to indicate no. + v := x != 0 + *f.toBool() = v + return b[n:], nil +} + +func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + *f.toBoolPtr() = &v + return b[n:], nil +} + +func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + b = b[n:] + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + return b[n:], nil +} + +func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64() = v + return b[8:], nil +} + +func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64Ptr() = &v + return b[8:], nil +} + +func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32() = v + return b[4:], nil +} + +func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32Ptr() = &v + return b[4:], nil +} + +func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + return b[x:], nil +} + +func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + return b[x:], nil +} + +func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + return b[x:], nil +} + +func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +var emptyBuf [0]byte + +func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // The use of append here is a trick which avoids the zeroing + // that would be required if we used a make/copy pair. + // We append to emptyBuf instead of nil because we want + // a non-nil result even when the length is 0. + v := append(emptyBuf[:], b[:x]...) + *f.toBytes() = v + return b[x:], nil +} + +func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := append(emptyBuf[:], b[:x]...) + s := f.toBytesSlice() + *s = append(*s, v) + return b[x:], nil +} + +func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[y:], err + } +} + +func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[y:], err + } +} + +func makeUnmarshalMap(f *reflect.StructField) unmarshaler { + t := f.Type + kt := t.Key() + vt := t.Elem() + unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key")) + unmarshalVal := typeUnmarshaler(vt, f.Tag.Get("protobuf_val")) + return func(b []byte, f pointer, w int) ([]byte, error) { + // The map entry is a submessage. Figure out how big it is. + if w != WireBytes { + return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes) + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + r := b[x:] // unused data to return + b = b[:x] // data for map entry + + // Note: we could use #keys * #values ~= 200 functions + // to do map decoding without reflection. Probably not worth it. + // Maps will be somewhat slow. Oh well. + + // Read key and value from data. + var nerr nonFatal + k := reflect.New(kt) + v := reflect.New(vt) + for len(b) > 0 { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + wire := int(x) & 7 + b = b[n:] + + var err error + switch x >> 3 { + case 1: + b, err = unmarshalKey(b, valToPointer(k), wire) + case 2: + b, err = unmarshalVal(b, valToPointer(v), wire) + default: + err = errInternalBadWireType // skip unknown tag + } + + if nerr.Merge(err) { + continue + } + if err != errInternalBadWireType { + return nil, err + } + + // Skip past unknown fields. + b, err = skipField(b, wire) + if err != nil { + return nil, err + } + } + + // Get map, allocate if needed. + m := f.asPointerTo(t).Elem() // an addressable map[K]T + if m.IsNil() { + m.Set(reflect.MakeMap(t)) + } + + // Insert into map. + m.SetMapIndex(k.Elem(), v.Elem()) + + return r, nerr.E + } +} + +// makeUnmarshalOneof makes an unmarshaler for oneof fields. +// for: +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// typ is the type of the concrete entry for a oneof case (e.g. Msg_X). +// ityp is the interface type of the oneof field (e.g. isMsg_F). +// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). +// Note that this function will be called once for each case in the oneof. +func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler { + sf := typ.Field(0) + field0 := toField(&sf) + return func(b []byte, f pointer, w int) ([]byte, error) { + // Allocate holder for value. + v := reflect.New(typ) + + // Unmarshal data into holder. + // We unmarshal into the first field of the holder object. + var err error + var nerr nonFatal + b, err = unmarshal(b, valToPointer(v).offset(field0), w) + if !nerr.Merge(err) { + return nil, err + } + + // Write pointer to holder into target field. + f.asPointerTo(ityp).Elem().Set(v) + + return b, nerr.E + } +} + +// Error used by decode internally. +var errInternalBadWireType = errors.New("proto: internal error: bad wiretype") + +// skipField skips past a field of type wire and returns the remaining bytes. +func skipField(b []byte, wire int) ([]byte, error) { + switch wire { + case WireVarint: + _, k := decodeVarint(b) + if k == 0 { + return b, io.ErrUnexpectedEOF + } + b = b[k:] + case WireFixed32: + if len(b) < 4 { + return b, io.ErrUnexpectedEOF + } + b = b[4:] + case WireFixed64: + if len(b) < 8 { + return b, io.ErrUnexpectedEOF + } + b = b[8:] + case WireBytes: + m, k := decodeVarint(b) + if k == 0 || uint64(len(b)-k) < m { + return b, io.ErrUnexpectedEOF + } + b = b[uint64(k)+m:] + case WireStartGroup: + _, i := findEndGroup(b) + if i == -1 { + return b, io.ErrUnexpectedEOF + } + b = b[i:] + default: + return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire) + } + return b, nil +} + +// findEndGroup finds the index of the next EndGroup tag. +// Groups may be nested, so the "next" EndGroup tag is the first +// unpaired EndGroup. +// findEndGroup returns the indexes of the start and end of the EndGroup tag. +// Returns (-1,-1) if it can't find one. +func findEndGroup(b []byte) (int, int) { + depth := 1 + i := 0 + for { + x, n := decodeVarint(b[i:]) + if n == 0 { + return -1, -1 + } + j := i + i += n + switch x & 7 { + case WireVarint: + _, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + case WireFixed32: + if len(b)-4 < i { + return -1, -1 + } + i += 4 + case WireFixed64: + if len(b)-8 < i { + return -1, -1 + } + i += 8 + case WireBytes: + m, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + if uint64(len(b)-i) < m { + return -1, -1 + } + i += int(m) + case WireStartGroup: + depth++ + case WireEndGroup: + depth-- + if depth == 0 { + return j, i + } + default: + return -1, -1 + } + } +} + +// encodeVarint appends a varint-encoded integer to b and returns the result. +func encodeVarint(b []byte, x uint64) []byte { + for x >= 1<<7 { + b = append(b, byte(x&0x7f|0x80)) + x >>= 7 + } + return append(b, byte(x)) +} + +// decodeVarint reads a varint-encoded integer from b. +// Returns the decoded integer and the number of bytes read. +// If there is an error, it returns 0,0. +func decodeVarint(b []byte) (uint64, int) { + var x, y uint64 + if len(b) <= 0 { + goto bad + } + x = uint64(b[0]) + if x < 0x80 { + return x, 1 + } + x -= 0x80 + + if len(b) <= 1 { + goto bad + } + y = uint64(b[1]) + x += y << 7 + if y < 0x80 { + return x, 2 + } + x -= 0x80 << 7 + + if len(b) <= 2 { + goto bad + } + y = uint64(b[2]) + x += y << 14 + if y < 0x80 { + return x, 3 + } + x -= 0x80 << 14 + + if len(b) <= 3 { + goto bad + } + y = uint64(b[3]) + x += y << 21 + if y < 0x80 { + return x, 4 + } + x -= 0x80 << 21 + + if len(b) <= 4 { + goto bad + } + y = uint64(b[4]) + x += y << 28 + if y < 0x80 { + return x, 5 + } + x -= 0x80 << 28 + + if len(b) <= 5 { + goto bad + } + y = uint64(b[5]) + x += y << 35 + if y < 0x80 { + return x, 6 + } + x -= 0x80 << 35 + + if len(b) <= 6 { + goto bad + } + y = uint64(b[6]) + x += y << 42 + if y < 0x80 { + return x, 7 + } + x -= 0x80 << 42 + + if len(b) <= 7 { + goto bad + } + y = uint64(b[7]) + x += y << 49 + if y < 0x80 { + return x, 8 + } + x -= 0x80 << 49 + + if len(b) <= 8 { + goto bad + } + y = uint64(b[8]) + x += y << 56 + if y < 0x80 { + return x, 9 + } + x -= 0x80 << 56 + + if len(b) <= 9 { + goto bad + } + y = uint64(b[9]) + x += y << 63 + if y < 2 { + return x, 10 + } + +bad: + return 0, 0 +} diff --git a/vendor/github.com/golang/protobuf/proto/testdata/Makefile b/vendor/github.com/golang/protobuf/proto/testdata/Makefile deleted file mode 100644 index fc288628..00000000 --- a/vendor/github.com/golang/protobuf/proto/testdata/Makefile +++ /dev/null @@ -1,50 +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. - - -include ../../Make.protobuf - -all: regenerate - -regenerate: - rm -f test.pb.go - make test.pb.go - -# The following rules are just aids to development. Not needed for typical testing. - -diff: regenerate - git diff test.pb.go - -restore: - cp test.pb.go.golden test.pb.go - -preserve: - cp test.pb.go test.pb.go.golden diff --git a/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go b/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go deleted file mode 100644 index 7172d0e9..00000000 --- a/vendor/github.com/golang/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", "--go_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/golang/protobuf/proto/testdata/test.pb.go b/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go deleted file mode 100644 index 85b3bdf5..00000000 --- a/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go +++ /dev/null @@ -1,4061 +0,0 @@ -// Code generated by protoc-gen-go. -// source: test.proto -// DO NOT EDIT! - -/* -Package testdata is a generated protocol buffer package. - -It is generated from these files: - test.proto - -It has these top-level messages: - GoEnum - GoTestField - GoTest - GoTestRequiredGroupField - GoSkipTest - NonPackedTest - PackedTest - MaxTag - OldMessage - NewMessage - InnerMessage - OtherMessage - RequiredInnerMessage - MyMessage - Ext - ComplexExtension - DefaultsMessage - MyMessageSet - Empty - MessageList - Strings - Defaults - SubDefaults - RepeatedEnum - MoreRepeated - GroupOld - GroupNew - FloatingPoint - MessageWithMap - Oneof - Communique -*/ -package testdata - -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 - -type FOO int32 - -const ( - FOO_FOO1 FOO = 1 -) - -var FOO_name = map[int32]string{ - 1: "FOO1", -} -var FOO_value = map[string]int32{ - "FOO1": 1, -} - -func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p -} -func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) -} -func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") - if err != nil { - return err - } - *x = FOO(value) - return nil -} -func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -// An enum, for completeness. -type GoTest_KIND int32 - -const ( - GoTest_VOID GoTest_KIND = 0 - // Basic types - GoTest_BOOL GoTest_KIND = 1 - GoTest_BYTES GoTest_KIND = 2 - GoTest_FINGERPRINT GoTest_KIND = 3 - GoTest_FLOAT GoTest_KIND = 4 - GoTest_INT GoTest_KIND = 5 - GoTest_STRING GoTest_KIND = 6 - GoTest_TIME GoTest_KIND = 7 - // Groupings - GoTest_TUPLE GoTest_KIND = 8 - GoTest_ARRAY GoTest_KIND = 9 - GoTest_MAP GoTest_KIND = 10 - // Table types - GoTest_TABLE GoTest_KIND = 11 - // Functions - GoTest_FUNCTION GoTest_KIND = 12 -) - -var GoTest_KIND_name = map[int32]string{ - 0: "VOID", - 1: "BOOL", - 2: "BYTES", - 3: "FINGERPRINT", - 4: "FLOAT", - 5: "INT", - 6: "STRING", - 7: "TIME", - 8: "TUPLE", - 9: "ARRAY", - 10: "MAP", - 11: "TABLE", - 12: "FUNCTION", -} -var GoTest_KIND_value = map[string]int32{ - "VOID": 0, - "BOOL": 1, - "BYTES": 2, - "FINGERPRINT": 3, - "FLOAT": 4, - "INT": 5, - "STRING": 6, - "TIME": 7, - "TUPLE": 8, - "ARRAY": 9, - "MAP": 10, - "TABLE": 11, - "FUNCTION": 12, -} - -func (x GoTest_KIND) Enum() *GoTest_KIND { - p := new(GoTest_KIND) - *p = x - return p -} -func (x GoTest_KIND) String() string { - return proto.EnumName(GoTest_KIND_name, int32(x)) -} -func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") - if err != nil { - return err - } - *x = GoTest_KIND(value) - return nil -} -func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -type MyMessage_Color int32 - -const ( - MyMessage_RED MyMessage_Color = 0 - MyMessage_GREEN MyMessage_Color = 1 - MyMessage_BLUE MyMessage_Color = 2 -) - -var MyMessage_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var MyMessage_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x MyMessage_Color) Enum() *MyMessage_Color { - p := new(MyMessage_Color) - *p = x - return p -} -func (x MyMessage_Color) String() string { - return proto.EnumName(MyMessage_Color_name, int32(x)) -} -func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") - if err != nil { - return err - } - *x = MyMessage_Color(value) - return nil -} -func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{13, 0} } - -type DefaultsMessage_DefaultsEnum int32 - -const ( - DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 - DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 - DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 -) - -var DefaultsMessage_DefaultsEnum_name = map[int32]string{ - 0: "ZERO", - 1: "ONE", - 2: "TWO", -} -var DefaultsMessage_DefaultsEnum_value = map[string]int32{ - "ZERO": 0, - "ONE": 1, - "TWO": 2, -} - -func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { - p := new(DefaultsMessage_DefaultsEnum) - *p = x - return p -} -func (x DefaultsMessage_DefaultsEnum) String() string { - return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) -} -func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") - if err != nil { - return err - } - *x = DefaultsMessage_DefaultsEnum(value) - return nil -} -func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{16, 0} -} - -type Defaults_Color int32 - -const ( - Defaults_RED Defaults_Color = 0 - Defaults_GREEN Defaults_Color = 1 - Defaults_BLUE Defaults_Color = 2 -) - -var Defaults_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Defaults_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Defaults_Color) Enum() *Defaults_Color { - p := new(Defaults_Color) - *p = x - return p -} -func (x Defaults_Color) String() string { - return proto.EnumName(Defaults_Color_name, int32(x)) -} -func (x *Defaults_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") - if err != nil { - return err - } - *x = Defaults_Color(value) - return nil -} -func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{21, 0} } - -type RepeatedEnum_Color int32 - -const ( - RepeatedEnum_RED RepeatedEnum_Color = 1 -) - -var RepeatedEnum_Color_name = map[int32]string{ - 1: "RED", -} -var RepeatedEnum_Color_value = map[string]int32{ - "RED": 1, -} - -func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { - p := new(RepeatedEnum_Color) - *p = x - return p -} -func (x RepeatedEnum_Color) String() string { - return proto.EnumName(RepeatedEnum_Color_name, int32(x)) -} -func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") - if err != nil { - return err - } - *x = RepeatedEnum_Color(value) - return nil -} -func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{23, 0} } - -type GoEnum struct { - Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoEnum) Reset() { *m = GoEnum{} } -func (m *GoEnum) String() string { return proto.CompactTextString(m) } -func (*GoEnum) ProtoMessage() {} -func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *GoEnum) GetFoo() FOO { - if m != nil && m.Foo != nil { - return *m.Foo - } - return FOO_FOO1 -} - -type GoTestField struct { - Label *string `protobuf:"bytes,1,req,name=Label,json=label" json:"Label,omitempty"` - Type *string `protobuf:"bytes,2,req,name=Type,json=type" json:"Type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestField) Reset() { *m = GoTestField{} } -func (m *GoTestField) String() string { return proto.CompactTextString(m) } -func (*GoTestField) ProtoMessage() {} -func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *GoTestField) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" -} - -func (m *GoTestField) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -type GoTest struct { - // Some typical parameters - Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,json=kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` - Table *string `protobuf:"bytes,2,opt,name=Table,json=table" json:"Table,omitempty"` - Param *int32 `protobuf:"varint,3,opt,name=Param,json=param" json:"Param,omitempty"` - // Required, repeated and optional foreign fields. - RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField,json=repeatedField" json:"RepeatedField,omitempty"` - OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField,json=optionalField" json:"OptionalField,omitempty"` - // Required fields of all basic types - F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=fBoolRequired" json:"F_Bool_required,omitempty"` - F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=fInt32Required" json:"F_Int32_required,omitempty"` - F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=fInt64Required" json:"F_Int64_required,omitempty"` - F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=fFixed32Required" json:"F_Fixed32_required,omitempty"` - F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=fFixed64Required" json:"F_Fixed64_required,omitempty"` - F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=fUint32Required" json:"F_Uint32_required,omitempty"` - F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=fUint64Required" json:"F_Uint64_required,omitempty"` - F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=fFloatRequired" json:"F_Float_required,omitempty"` - F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=fDoubleRequired" json:"F_Double_required,omitempty"` - F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=fStringRequired" json:"F_String_required,omitempty"` - F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=fBytesRequired" json:"F_Bytes_required,omitempty"` - F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=fSint32Required" json:"F_Sint32_required,omitempty"` - F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=fSint64Required" json:"F_Sint64_required,omitempty"` - // Repeated fields of all basic types - F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=fBoolRepeated" json:"F_Bool_repeated,omitempty"` - F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=fInt32Repeated" json:"F_Int32_repeated,omitempty"` - F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=fInt64Repeated" json:"F_Int64_repeated,omitempty"` - F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=fFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` - F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=fFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` - F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=fUint32Repeated" json:"F_Uint32_repeated,omitempty"` - F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=fUint64Repeated" json:"F_Uint64_repeated,omitempty"` - F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=fFloatRepeated" json:"F_Float_repeated,omitempty"` - F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=fDoubleRepeated" json:"F_Double_repeated,omitempty"` - F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=fStringRepeated" json:"F_String_repeated,omitempty"` - F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=fBytesRepeated" json:"F_Bytes_repeated,omitempty"` - F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=fSint32Repeated" json:"F_Sint32_repeated,omitempty"` - F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=fSint64Repeated" json:"F_Sint64_repeated,omitempty"` - // Optional fields of all basic types - F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=fBoolOptional" json:"F_Bool_optional,omitempty"` - F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=fInt32Optional" json:"F_Int32_optional,omitempty"` - F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=fInt64Optional" json:"F_Int64_optional,omitempty"` - F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=fFixed32Optional" json:"F_Fixed32_optional,omitempty"` - F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=fFixed64Optional" json:"F_Fixed64_optional,omitempty"` - F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=fUint32Optional" json:"F_Uint32_optional,omitempty"` - F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=fUint64Optional" json:"F_Uint64_optional,omitempty"` - F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=fFloatOptional" json:"F_Float_optional,omitempty"` - F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=fDoubleOptional" json:"F_Double_optional,omitempty"` - F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=fStringOptional" json:"F_String_optional,omitempty"` - F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=fBytesOptional" json:"F_Bytes_optional,omitempty"` - F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=fSint32Optional" json:"F_Sint32_optional,omitempty"` - F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=fSint64Optional" json:"F_Sint64_optional,omitempty"` - // Default-valued fields of all basic types - F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=fBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` - F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=fInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` - F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=fInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` - F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=fFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` - F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=fFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` - F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=fUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` - F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=fUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` - F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=fFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` - F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=fDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` - F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=fStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` - F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=fBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` - F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=fSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` - F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=fSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` - // Packed repeated fields (no string or bytes). - F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=fBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` - F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=fInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` - F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=fInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` - F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=fFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` - F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=fFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` - F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=fUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` - F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=fUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` - F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=fFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` - F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=fDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` - F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=fSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` - F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=fSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` - Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` - Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` - Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest) Reset() { *m = GoTest{} } -func (m *GoTest) String() string { return proto.CompactTextString(m) } -func (*GoTest) ProtoMessage() {} -func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -const Default_GoTest_F_BoolDefaulted bool = true -const Default_GoTest_F_Int32Defaulted int32 = 32 -const Default_GoTest_F_Int64Defaulted int64 = 64 -const Default_GoTest_F_Fixed32Defaulted uint32 = 320 -const Default_GoTest_F_Fixed64Defaulted uint64 = 640 -const Default_GoTest_F_Uint32Defaulted uint32 = 3200 -const Default_GoTest_F_Uint64Defaulted uint64 = 6400 -const Default_GoTest_F_FloatDefaulted float32 = 314159 -const Default_GoTest_F_DoubleDefaulted float64 = 271828 -const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" - -var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") - -const Default_GoTest_F_Sint32Defaulted int32 = -32 -const Default_GoTest_F_Sint64Defaulted int64 = -64 - -func (m *GoTest) GetKind() GoTest_KIND { - if m != nil && m.Kind != nil { - return *m.Kind - } - return GoTest_VOID -} - -func (m *GoTest) GetTable() string { - if m != nil && m.Table != nil { - return *m.Table - } - return "" -} - -func (m *GoTest) GetParam() int32 { - if m != nil && m.Param != nil { - return *m.Param - } - return 0 -} - -func (m *GoTest) GetRequiredField() *GoTestField { - if m != nil { - return m.RequiredField - } - return nil -} - -func (m *GoTest) GetRepeatedField() []*GoTestField { - if m != nil { - return m.RepeatedField - } - return nil -} - -func (m *GoTest) GetOptionalField() *GoTestField { - if m != nil { - return m.OptionalField - } - return nil -} - -func (m *GoTest) GetF_BoolRequired() bool { - if m != nil && m.F_BoolRequired != nil { - return *m.F_BoolRequired - } - return false -} - -func (m *GoTest) GetF_Int32Required() int32 { - if m != nil && m.F_Int32Required != nil { - return *m.F_Int32Required - } - return 0 -} - -func (m *GoTest) GetF_Int64Required() int64 { - if m != nil && m.F_Int64Required != nil { - return *m.F_Int64Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Required() uint32 { - if m != nil && m.F_Fixed32Required != nil { - return *m.F_Fixed32Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Required() uint64 { - if m != nil && m.F_Fixed64Required != nil { - return *m.F_Fixed64Required - } - return 0 -} - -func (m *GoTest) GetF_Uint32Required() uint32 { - if m != nil && m.F_Uint32Required != nil { - return *m.F_Uint32Required - } - return 0 -} - -func (m *GoTest) GetF_Uint64Required() uint64 { - if m != nil && m.F_Uint64Required != nil { - return *m.F_Uint64Required - } - return 0 -} - -func (m *GoTest) GetF_FloatRequired() float32 { - if m != nil && m.F_FloatRequired != nil { - return *m.F_FloatRequired - } - return 0 -} - -func (m *GoTest) GetF_DoubleRequired() float64 { - if m != nil && m.F_DoubleRequired != nil { - return *m.F_DoubleRequired - } - return 0 -} - -func (m *GoTest) GetF_StringRequired() string { - if m != nil && m.F_StringRequired != nil { - return *m.F_StringRequired - } - return "" -} - -func (m *GoTest) GetF_BytesRequired() []byte { - if m != nil { - return m.F_BytesRequired - } - return nil -} - -func (m *GoTest) GetF_Sint32Required() int32 { - if m != nil && m.F_Sint32Required != nil { - return *m.F_Sint32Required - } - return 0 -} - -func (m *GoTest) GetF_Sint64Required() int64 { - if m != nil && m.F_Sint64Required != nil { - return *m.F_Sint64Required - } - return 0 -} - -func (m *GoTest) GetF_BoolRepeated() []bool { - if m != nil { - return m.F_BoolRepeated - } - return nil -} - -func (m *GoTest) GetF_Int32Repeated() []int32 { - if m != nil { - return m.F_Int32Repeated - } - return nil -} - -func (m *GoTest) GetF_Int64Repeated() []int64 { - if m != nil { - return m.F_Int64Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed32Repeated() []uint32 { - if m != nil { - return m.F_Fixed32Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed64Repeated() []uint64 { - if m != nil { - return m.F_Fixed64Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint32Repeated() []uint32 { - if m != nil { - return m.F_Uint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint64Repeated() []uint64 { - if m != nil { - return m.F_Uint64Repeated - } - return nil -} - -func (m *GoTest) GetF_FloatRepeated() []float32 { - if m != nil { - return m.F_FloatRepeated - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeated() []float64 { - if m != nil { - return m.F_DoubleRepeated - } - return nil -} - -func (m *GoTest) GetF_StringRepeated() []string { - if m != nil { - return m.F_StringRepeated - } - return nil -} - -func (m *GoTest) GetF_BytesRepeated() [][]byte { - if m != nil { - return m.F_BytesRepeated - } - return nil -} - -func (m *GoTest) GetF_Sint32Repeated() []int32 { - if m != nil { - return m.F_Sint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Sint64Repeated() []int64 { - if m != nil { - return m.F_Sint64Repeated - } - return nil -} - -func (m *GoTest) GetF_BoolOptional() bool { - if m != nil && m.F_BoolOptional != nil { - return *m.F_BoolOptional - } - return false -} - -func (m *GoTest) GetF_Int32Optional() int32 { - if m != nil && m.F_Int32Optional != nil { - return *m.F_Int32Optional - } - return 0 -} - -func (m *GoTest) GetF_Int64Optional() int64 { - if m != nil && m.F_Int64Optional != nil { - return *m.F_Int64Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Optional() uint32 { - if m != nil && m.F_Fixed32Optional != nil { - return *m.F_Fixed32Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Optional() uint64 { - if m != nil && m.F_Fixed64Optional != nil { - return *m.F_Fixed64Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint32Optional() uint32 { - if m != nil && m.F_Uint32Optional != nil { - return *m.F_Uint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint64Optional() uint64 { - if m != nil && m.F_Uint64Optional != nil { - return *m.F_Uint64Optional - } - return 0 -} - -func (m *GoTest) GetF_FloatOptional() float32 { - if m != nil && m.F_FloatOptional != nil { - return *m.F_FloatOptional - } - return 0 -} - -func (m *GoTest) GetF_DoubleOptional() float64 { - if m != nil && m.F_DoubleOptional != nil { - return *m.F_DoubleOptional - } - return 0 -} - -func (m *GoTest) GetF_StringOptional() string { - if m != nil && m.F_StringOptional != nil { - return *m.F_StringOptional - } - return "" -} - -func (m *GoTest) GetF_BytesOptional() []byte { - if m != nil { - return m.F_BytesOptional - } - return nil -} - -func (m *GoTest) GetF_Sint32Optional() int32 { - if m != nil && m.F_Sint32Optional != nil { - return *m.F_Sint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Sint64Optional() int64 { - if m != nil && m.F_Sint64Optional != nil { - return *m.F_Sint64Optional - } - return 0 -} - -func (m *GoTest) GetF_BoolDefaulted() bool { - if m != nil && m.F_BoolDefaulted != nil { - return *m.F_BoolDefaulted - } - return Default_GoTest_F_BoolDefaulted -} - -func (m *GoTest) GetF_Int32Defaulted() int32 { - if m != nil && m.F_Int32Defaulted != nil { - return *m.F_Int32Defaulted - } - return Default_GoTest_F_Int32Defaulted -} - -func (m *GoTest) GetF_Int64Defaulted() int64 { - if m != nil && m.F_Int64Defaulted != nil { - return *m.F_Int64Defaulted - } - return Default_GoTest_F_Int64Defaulted -} - -func (m *GoTest) GetF_Fixed32Defaulted() uint32 { - if m != nil && m.F_Fixed32Defaulted != nil { - return *m.F_Fixed32Defaulted - } - return Default_GoTest_F_Fixed32Defaulted -} - -func (m *GoTest) GetF_Fixed64Defaulted() uint64 { - if m != nil && m.F_Fixed64Defaulted != nil { - return *m.F_Fixed64Defaulted - } - return Default_GoTest_F_Fixed64Defaulted -} - -func (m *GoTest) GetF_Uint32Defaulted() uint32 { - if m != nil && m.F_Uint32Defaulted != nil { - return *m.F_Uint32Defaulted - } - return Default_GoTest_F_Uint32Defaulted -} - -func (m *GoTest) GetF_Uint64Defaulted() uint64 { - if m != nil && m.F_Uint64Defaulted != nil { - return *m.F_Uint64Defaulted - } - return Default_GoTest_F_Uint64Defaulted -} - -func (m *GoTest) GetF_FloatDefaulted() float32 { - if m != nil && m.F_FloatDefaulted != nil { - return *m.F_FloatDefaulted - } - return Default_GoTest_F_FloatDefaulted -} - -func (m *GoTest) GetF_DoubleDefaulted() float64 { - if m != nil && m.F_DoubleDefaulted != nil { - return *m.F_DoubleDefaulted - } - return Default_GoTest_F_DoubleDefaulted -} - -func (m *GoTest) GetF_StringDefaulted() string { - if m != nil && m.F_StringDefaulted != nil { - return *m.F_StringDefaulted - } - return Default_GoTest_F_StringDefaulted -} - -func (m *GoTest) GetF_BytesDefaulted() []byte { - if m != nil && m.F_BytesDefaulted != nil { - return m.F_BytesDefaulted - } - return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) -} - -func (m *GoTest) GetF_Sint32Defaulted() int32 { - if m != nil && m.F_Sint32Defaulted != nil { - return *m.F_Sint32Defaulted - } - return Default_GoTest_F_Sint32Defaulted -} - -func (m *GoTest) GetF_Sint64Defaulted() int64 { - if m != nil && m.F_Sint64Defaulted != nil { - return *m.F_Sint64Defaulted - } - return Default_GoTest_F_Sint64Defaulted -} - -func (m *GoTest) GetF_BoolRepeatedPacked() []bool { - if m != nil { - return m.F_BoolRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { - if m != nil { - return m.F_Int32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { - if m != nil { - return m.F_Int64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Fixed32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Fixed64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Uint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Uint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { - if m != nil { - return m.F_FloatRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { - if m != nil { - return m.F_DoubleRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { - if m != nil { - return m.F_Sint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { - if m != nil { - return m.F_Sint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { - if m != nil { - return m.Requiredgroup - } - return nil -} - -func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { - if m != nil { - return m.Repeatedgroup - } - return nil -} - -func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil -} - -// Required, repeated, and optional groups. -type GoTest_RequiredGroup struct { - RequiredField *string `protobuf:"bytes,71,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } -func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RequiredGroup) ProtoMessage() {} -func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -func (m *GoTest_RequiredGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_RepeatedGroup struct { - RequiredField *string `protobuf:"bytes,81,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } -func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RepeatedGroup) ProtoMessage() {} -func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} } - -func (m *GoTest_RepeatedGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,91,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } -func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_OptionalGroup) ProtoMessage() {} -func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 2} } - -func (m *GoTest_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -// For testing a group containing a required field. -type GoTestRequiredGroupField struct { - Group *GoTestRequiredGroupField_Group `protobuf:"group,1,req,name=Group,json=group" json:"group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestRequiredGroupField) Reset() { *m = GoTestRequiredGroupField{} } -func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) } -func (*GoTestRequiredGroupField) ProtoMessage() {} -func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *GoTestRequiredGroupField) GetGroup() *GoTestRequiredGroupField_Group { - if m != nil { - return m.Group - } - return nil -} - -type GoTestRequiredGroupField_Group struct { - Field *int32 `protobuf:"varint,2,req,name=Field,json=field" json:"Field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestRequiredGroupField_Group) Reset() { *m = GoTestRequiredGroupField_Group{} } -func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) } -func (*GoTestRequiredGroupField_Group) ProtoMessage() {} -func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 0} -} - -func (m *GoTestRequiredGroupField_Group) GetField() int32 { - if m != nil && m.Field != nil { - return *m.Field - } - return 0 -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -type GoSkipTest struct { - SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` - SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` - SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` - SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` - Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } -func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest) ProtoMessage() {} -func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *GoSkipTest) GetSkipInt32() int32 { - if m != nil && m.SkipInt32 != nil { - return *m.SkipInt32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed32() uint32 { - if m != nil && m.SkipFixed32 != nil { - return *m.SkipFixed32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed64() uint64 { - if m != nil && m.SkipFixed64 != nil { - return *m.SkipFixed64 - } - return 0 -} - -func (m *GoSkipTest) GetSkipString() string { - if m != nil && m.SkipString != nil { - return *m.SkipString - } - return "" -} - -func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { - if m != nil { - return m.Skipgroup - } - return nil -} - -type GoSkipTest_SkipGroup struct { - GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` - GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } -func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest_SkipGroup) ProtoMessage() {} -func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} } - -func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { - if m != nil && m.GroupInt32 != nil { - return *m.GroupInt32 - } - return 0 -} - -func (m *GoSkipTest_SkipGroup) GetGroupString() string { - if m != nil && m.GroupString != nil { - return *m.GroupString - } - return "" -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -type NonPackedTest struct { - A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } -func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } -func (*NonPackedTest) ProtoMessage() {} -func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *NonPackedTest) GetA() []int32 { - if m != nil { - return m.A - } - return nil -} - -type PackedTest struct { - B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PackedTest) Reset() { *m = PackedTest{} } -func (m *PackedTest) String() string { return proto.CompactTextString(m) } -func (*PackedTest) ProtoMessage() {} -func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *PackedTest) GetB() []int32 { - if m != nil { - return m.B - } - return nil -} - -type MaxTag struct { - // Maximum possible tag number. - LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MaxTag) Reset() { *m = MaxTag{} } -func (m *MaxTag) String() string { return proto.CompactTextString(m) } -func (*MaxTag) ProtoMessage() {} -func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } - -func (m *MaxTag) GetLastField() string { - if m != nil && m.LastField != nil { - return *m.LastField - } - return "" -} - -type OldMessage struct { - Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage) Reset() { *m = OldMessage{} } -func (m *OldMessage) String() string { return proto.CompactTextString(m) } -func (*OldMessage) ProtoMessage() {} -func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } - -func (m *OldMessage) GetNested() *OldMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *OldMessage) GetNum() int32 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type OldMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } -func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*OldMessage_Nested) ProtoMessage() {} -func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} } - -func (m *OldMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -type NewMessage struct { - Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - // This is an int32 in OldMessage. - Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage) Reset() { *m = NewMessage{} } -func (m *NewMessage) String() string { return proto.CompactTextString(m) } -func (*NewMessage) ProtoMessage() {} -func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } - -func (m *NewMessage) GetNested() *NewMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *NewMessage) GetNum() int64 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type NewMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } -func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*NewMessage_Nested) ProtoMessage() {} -func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 0} } - -func (m *NewMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *NewMessage_Nested) GetFoodGroup() string { - if m != nil && m.FoodGroup != nil { - return *m.FoodGroup - } - return "" -} - -type InnerMessage struct { - Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` - Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` - Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *InnerMessage) Reset() { *m = InnerMessage{} } -func (m *InnerMessage) String() string { return proto.CompactTextString(m) } -func (*InnerMessage) ProtoMessage() {} -func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } - -const Default_InnerMessage_Port int32 = 4000 - -func (m *InnerMessage) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *InnerMessage) GetPort() int32 { - if m != nil && m.Port != nil { - return *m.Port - } - return Default_InnerMessage_Port -} - -func (m *InnerMessage) GetConnected() bool { - if m != nil && m.Connected != nil { - return *m.Connected - } - return false -} - -type OtherMessage struct { - Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` - Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherMessage) Reset() { *m = OtherMessage{} } -func (m *OtherMessage) String() string { return proto.CompactTextString(m) } -func (*OtherMessage) ProtoMessage() {} -func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } - -var extRange_OtherMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherMessage -} - -func (m *OtherMessage) GetKey() int64 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -func (m *OtherMessage) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *OtherMessage) GetWeight() float32 { - if m != nil && m.Weight != nil { - return *m.Weight - } - return 0 -} - -func (m *OtherMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -type RequiredInnerMessage struct { - LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} } -func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } -func (*RequiredInnerMessage) ProtoMessage() {} -func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage { - if m != nil { - return m.LeoFinallyWonAnOscar - } - return nil -} - -type MyMessage struct { - Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` - Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` - Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` - Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` - WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"` - RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` - Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` - Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` - // This field becomes [][]byte in the generated code. - RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` - Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - 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 fileDescriptor0, []int{13} } - -var extRange_MyMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessage -} - -func (m *MyMessage) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *MyMessage) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MyMessage) GetQuote() string { - if m != nil && m.Quote != nil { - return *m.Quote - } - return "" -} - -func (m *MyMessage) GetPet() []string { - if m != nil { - return m.Pet - } - return nil -} - -func (m *MyMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -func (m *MyMessage) GetOthers() []*OtherMessage { - if m != nil { - return m.Others - } - return nil -} - -func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage { - if m != nil { - return m.WeMustGoDeeper - } - return nil -} - -func (m *MyMessage) GetRepInner() []*InnerMessage { - if m != nil { - return m.RepInner - } - return nil -} - -func (m *MyMessage) GetBikeshed() MyMessage_Color { - if m != nil && m.Bikeshed != nil { - return *m.Bikeshed - } - return MyMessage_RED -} - -func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *MyMessage) GetRepBytes() [][]byte { - if m != nil { - return m.RepBytes - } - return nil -} - -func (m *MyMessage) GetBigfloat() float64 { - if m != nil && m.Bigfloat != nil { - return *m.Bigfloat - } - return 0 -} - -type MyMessage_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } -func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*MyMessage_SomeGroup) ProtoMessage() {} -func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13, 0} } - -func (m *MyMessage_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Ext struct { - Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Ext) Reset() { *m = Ext{} } -func (m *Ext) String() string { return proto.CompactTextString(m) } -func (*Ext) ProtoMessage() {} -func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } - -func (m *Ext) GetData() string { - if m != nil && m.Data != nil { - return *m.Data - } - return "" -} - -var E_Ext_More = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*Ext)(nil), - Field: 103, - Name: "testdata.Ext.more", - Tag: "bytes,103,opt,name=more", -} - -var E_Ext_Text = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*string)(nil), - Field: 104, - Name: "testdata.Ext.text", - Tag: "bytes,104,opt,name=text", -} - -var E_Ext_Number = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 105, - Name: "testdata.Ext.number", - Tag: "varint,105,opt,name=number", -} - -type ComplexExtension struct { - First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` - Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` - Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } -func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } -func (*ComplexExtension) ProtoMessage() {} -func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } - -func (m *ComplexExtension) GetFirst() int32 { - if m != nil && m.First != nil { - return *m.First - } - return 0 -} - -func (m *ComplexExtension) GetSecond() int32 { - if m != nil && m.Second != nil { - return *m.Second - } - return 0 -} - -func (m *ComplexExtension) GetThird() []int32 { - if m != nil { - return m.Third - } - return nil -} - -type DefaultsMessage struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } -func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } -func (*DefaultsMessage) ProtoMessage() {} -func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } - -var extRange_DefaultsMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_DefaultsMessage -} - -type MyMessageSet struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } -func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } -func (*MyMessageSet) ProtoMessage() {} -func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } - -func (m *MyMessageSet) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(&m.XXX_InternalExtensions) -} -func (m *MyMessageSet) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions) -} -func (m *MyMessageSet) MarshalJSON() ([]byte, error) { - return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) -} -func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { - return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) -} - -// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*MyMessageSet)(nil) -var _ proto.Unmarshaler = (*MyMessageSet)(nil) - -var extRange_MyMessageSet = []proto.ExtensionRange{ - {100, 2147483646}, -} - -func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessageSet -} - -type Empty struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } - -type MessageList struct { - Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList) Reset() { *m = MessageList{} } -func (m *MessageList) String() string { return proto.CompactTextString(m) } -func (*MessageList) ProtoMessage() {} -func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } - -func (m *MessageList) GetMessage() []*MessageList_Message { - if m != nil { - return m.Message - } - return nil -} - -type MessageList_Message struct { - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } -func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } -func (*MessageList_Message) ProtoMessage() {} -func (*MessageList_Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} } - -func (m *MessageList_Message) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MessageList_Message) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -type Strings struct { - StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` - BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Strings) Reset() { *m = Strings{} } -func (m *Strings) String() string { return proto.CompactTextString(m) } -func (*Strings) ProtoMessage() {} -func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } - -func (m *Strings) GetStringField() string { - if m != nil && m.StringField != nil { - return *m.StringField - } - return "" -} - -func (m *Strings) GetBytesField() []byte { - if m != nil { - return m.BytesField - } - return nil -} - -type Defaults struct { - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,def=1" json:"F_Bool,omitempty"` - F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,def=32" json:"F_Int32,omitempty"` - F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,def=64" json:"F_Int64,omitempty"` - F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,def=320" json:"F_Fixed32,omitempty"` - F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,def=640" json:"F_Fixed64,omitempty"` - F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,def=3200" json:"F_Uint32,omitempty"` - F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,def=6400" json:"F_Uint64,omitempty"` - F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,def=314159" json:"F_Float,omitempty"` - F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,def=271828" json:"F_Double,omitempty"` - F_String *string `protobuf:"bytes,10,opt,name=F_String,json=fString,def=hello, \"world!\"\n" json:"F_String,omitempty"` - F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,def=Bignose" json:"F_Bytes,omitempty"` - F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,def=-32" json:"F_Sint32,omitempty"` - F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,def=-64" json:"F_Sint64,omitempty"` - F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` - // More fields with crazy defaults. - F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=fPinf,def=inf" json:"F_Pinf,omitempty"` - F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=fNinf,def=-inf" json:"F_Ninf,omitempty"` - F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=fNan,def=nan" json:"F_Nan,omitempty"` - // Sub-message. - Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` - // Redundant but explicit defaults. - StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Defaults) Reset() { *m = Defaults{} } -func (m *Defaults) String() string { return proto.CompactTextString(m) } -func (*Defaults) ProtoMessage() {} -func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } - -const Default_Defaults_F_Bool bool = true -const Default_Defaults_F_Int32 int32 = 32 -const Default_Defaults_F_Int64 int64 = 64 -const Default_Defaults_F_Fixed32 uint32 = 320 -const Default_Defaults_F_Fixed64 uint64 = 640 -const Default_Defaults_F_Uint32 uint32 = 3200 -const Default_Defaults_F_Uint64 uint64 = 6400 -const Default_Defaults_F_Float float32 = 314159 -const Default_Defaults_F_Double float64 = 271828 -const Default_Defaults_F_String string = "hello, \"world!\"\n" - -var Default_Defaults_F_Bytes []byte = []byte("Bignose") - -const Default_Defaults_F_Sint32 int32 = -32 -const Default_Defaults_F_Sint64 int64 = -64 -const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN - -var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) -var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) -var Default_Defaults_F_Nan float32 = float32(math.NaN()) - -func (m *Defaults) GetF_Bool() bool { - if m != nil && m.F_Bool != nil { - return *m.F_Bool - } - return Default_Defaults_F_Bool -} - -func (m *Defaults) GetF_Int32() int32 { - if m != nil && m.F_Int32 != nil { - return *m.F_Int32 - } - return Default_Defaults_F_Int32 -} - -func (m *Defaults) GetF_Int64() int64 { - if m != nil && m.F_Int64 != nil { - return *m.F_Int64 - } - return Default_Defaults_F_Int64 -} - -func (m *Defaults) GetF_Fixed32() uint32 { - if m != nil && m.F_Fixed32 != nil { - return *m.F_Fixed32 - } - return Default_Defaults_F_Fixed32 -} - -func (m *Defaults) GetF_Fixed64() uint64 { - if m != nil && m.F_Fixed64 != nil { - return *m.F_Fixed64 - } - return Default_Defaults_F_Fixed64 -} - -func (m *Defaults) GetF_Uint32() uint32 { - if m != nil && m.F_Uint32 != nil { - return *m.F_Uint32 - } - return Default_Defaults_F_Uint32 -} - -func (m *Defaults) GetF_Uint64() uint64 { - if m != nil && m.F_Uint64 != nil { - return *m.F_Uint64 - } - return Default_Defaults_F_Uint64 -} - -func (m *Defaults) GetF_Float() float32 { - if m != nil && m.F_Float != nil { - return *m.F_Float - } - return Default_Defaults_F_Float -} - -func (m *Defaults) GetF_Double() float64 { - if m != nil && m.F_Double != nil { - return *m.F_Double - } - return Default_Defaults_F_Double -} - -func (m *Defaults) GetF_String() string { - if m != nil && m.F_String != nil { - return *m.F_String - } - return Default_Defaults_F_String -} - -func (m *Defaults) GetF_Bytes() []byte { - if m != nil && m.F_Bytes != nil { - return m.F_Bytes - } - return append([]byte(nil), Default_Defaults_F_Bytes...) -} - -func (m *Defaults) GetF_Sint32() int32 { - if m != nil && m.F_Sint32 != nil { - return *m.F_Sint32 - } - return Default_Defaults_F_Sint32 -} - -func (m *Defaults) GetF_Sint64() int64 { - if m != nil && m.F_Sint64 != nil { - return *m.F_Sint64 - } - return Default_Defaults_F_Sint64 -} - -func (m *Defaults) GetF_Enum() Defaults_Color { - if m != nil && m.F_Enum != nil { - return *m.F_Enum - } - return Default_Defaults_F_Enum -} - -func (m *Defaults) GetF_Pinf() float32 { - if m != nil && m.F_Pinf != nil { - return *m.F_Pinf - } - return Default_Defaults_F_Pinf -} - -func (m *Defaults) GetF_Ninf() float32 { - if m != nil && m.F_Ninf != nil { - return *m.F_Ninf - } - return Default_Defaults_F_Ninf -} - -func (m *Defaults) GetF_Nan() float32 { - if m != nil && m.F_Nan != nil { - return *m.F_Nan - } - return Default_Defaults_F_Nan -} - -func (m *Defaults) GetSub() *SubDefaults { - if m != nil { - return m.Sub - } - return nil -} - -func (m *Defaults) GetStrZero() string { - if m != nil && m.StrZero != nil { - return *m.StrZero - } - return "" -} - -type SubDefaults struct { - N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubDefaults) Reset() { *m = SubDefaults{} } -func (m *SubDefaults) String() string { return proto.CompactTextString(m) } -func (*SubDefaults) ProtoMessage() {} -func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } - -const Default_SubDefaults_N int64 = 7 - -func (m *SubDefaults) GetN() int64 { - if m != nil && m.N != nil { - return *m.N - } - return Default_SubDefaults_N -} - -type RepeatedEnum struct { - Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } -func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } -func (*RepeatedEnum) ProtoMessage() {} -func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } - -func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { - if m != nil { - return m.Color - } - return nil -} - -type MoreRepeated struct { - Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` - BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` - Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` - IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` - Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` - Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` - Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } -func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } -func (*MoreRepeated) ProtoMessage() {} -func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } - -func (m *MoreRepeated) GetBools() []bool { - if m != nil { - return m.Bools - } - return nil -} - -func (m *MoreRepeated) GetBoolsPacked() []bool { - if m != nil { - return m.BoolsPacked - } - return nil -} - -func (m *MoreRepeated) GetInts() []int32 { - if m != nil { - return m.Ints - } - return nil -} - -func (m *MoreRepeated) GetIntsPacked() []int32 { - if m != nil { - return m.IntsPacked - } - return nil -} - -func (m *MoreRepeated) GetInt64SPacked() []int64 { - if m != nil { - return m.Int64SPacked - } - return nil -} - -func (m *MoreRepeated) GetStrings() []string { - if m != nil { - return m.Strings - } - return nil -} - -func (m *MoreRepeated) GetFixeds() []uint32 { - if m != nil { - return m.Fixeds - } - return nil -} - -type GroupOld struct { - G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld) Reset() { *m = GroupOld{} } -func (m *GroupOld) String() string { return proto.CompactTextString(m) } -func (*GroupOld) ProtoMessage() {} -func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } - -func (m *GroupOld) GetG() *GroupOld_G { - if m != nil { - return m.G - } - return nil -} - -type GroupOld_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } -func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } -func (*GroupOld_G) ProtoMessage() {} -func (*GroupOld_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25, 0} } - -func (m *GroupOld_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -type GroupNew struct { - G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew) Reset() { *m = GroupNew{} } -func (m *GroupNew) String() string { return proto.CompactTextString(m) } -func (*GroupNew) ProtoMessage() {} -func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } - -func (m *GroupNew) GetG() *GroupNew_G { - if m != nil { - return m.G - } - return nil -} - -type GroupNew_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } -func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } -func (*GroupNew_G) ProtoMessage() {} -func (*GroupNew_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26, 0} } - -func (m *GroupNew_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *GroupNew_G) GetY() int32 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` - Exact *bool `protobuf:"varint,2,opt,name=exact" json:"exact,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } -func (*FloatingPoint) ProtoMessage() {} -func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } - -func (m *FloatingPoint) GetF() float64 { - if m != nil && m.F != nil { - return *m.F - } - return 0 -} - -func (m *FloatingPoint) GetExact() bool { - if m != nil && m.Exact != nil { - return *m.Exact - } - return false -} - -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" protobuf_val:"bytes,2,opt,name=value"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } -func (*MessageWithMap) ProtoMessage() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } - -func (m *MessageWithMap) GetNameMapping() map[int32]string { - if m != nil { - return m.NameMapping - } - return nil -} - -func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - if m != nil { - return m.MsgMapping - } - return nil -} - -func (m *MessageWithMap) GetByteMapping() map[bool][]byte { - if m != nil { - return m.ByteMapping - } - return nil -} - -func (m *MessageWithMap) GetStrToStr() map[string]string { - if m != nil { - return m.StrToStr - } - return nil -} - -type Oneof struct { - // Types that are valid to be assigned to Union: - // *Oneof_F_Bool - // *Oneof_F_Int32 - // *Oneof_F_Int64 - // *Oneof_F_Fixed32 - // *Oneof_F_Fixed64 - // *Oneof_F_Uint32 - // *Oneof_F_Uint64 - // *Oneof_F_Float - // *Oneof_F_Double - // *Oneof_F_String - // *Oneof_F_Bytes - // *Oneof_F_Sint32 - // *Oneof_F_Sint64 - // *Oneof_F_Enum - // *Oneof_F_Message - // *Oneof_FGroup - // *Oneof_F_Largest_Tag - Union isOneof_Union `protobuf_oneof:"union"` - // Types that are valid to be assigned to Tormato: - // *Oneof_Value - Tormato isOneof_Tormato `protobuf_oneof:"tormato"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Oneof) Reset() { *m = Oneof{} } -func (m *Oneof) String() string { return proto.CompactTextString(m) } -func (*Oneof) ProtoMessage() {} -func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } - -type isOneof_Union interface { - isOneof_Union() -} -type isOneof_Tormato interface { - isOneof_Tormato() -} - -type Oneof_F_Bool struct { - F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,oneof"` -} -type Oneof_F_Int32 struct { - F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,oneof"` -} -type Oneof_F_Int64 struct { - F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,oneof"` -} -type Oneof_F_Fixed32 struct { - F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,oneof"` -} -type Oneof_F_Fixed64 struct { - F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,oneof"` -} -type Oneof_F_Uint32 struct { - F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,oneof"` -} -type Oneof_F_Uint64 struct { - F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,oneof"` -} -type Oneof_F_Float struct { - F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,oneof"` -} -type Oneof_F_Double struct { - F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,oneof"` -} -type Oneof_F_String struct { - F_String string `protobuf:"bytes,10,opt,name=F_String,json=fString,oneof"` -} -type Oneof_F_Bytes struct { - F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,oneof"` -} -type Oneof_F_Sint32 struct { - F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,oneof"` -} -type Oneof_F_Sint64 struct { - F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,oneof"` -} -type Oneof_F_Enum struct { - F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.MyMessage_Color,oneof"` -} -type Oneof_F_Message struct { - F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=fMessage,oneof"` -} -type Oneof_FGroup struct { - FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` -} -type Oneof_F_Largest_Tag struct { - F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=fLargestTag,oneof"` -} -type Oneof_Value struct { - Value int32 `protobuf:"varint,100,opt,name=value,oneof"` -} - -func (*Oneof_F_Bool) isOneof_Union() {} -func (*Oneof_F_Int32) isOneof_Union() {} -func (*Oneof_F_Int64) isOneof_Union() {} -func (*Oneof_F_Fixed32) isOneof_Union() {} -func (*Oneof_F_Fixed64) isOneof_Union() {} -func (*Oneof_F_Uint32) isOneof_Union() {} -func (*Oneof_F_Uint64) isOneof_Union() {} -func (*Oneof_F_Float) isOneof_Union() {} -func (*Oneof_F_Double) isOneof_Union() {} -func (*Oneof_F_String) isOneof_Union() {} -func (*Oneof_F_Bytes) isOneof_Union() {} -func (*Oneof_F_Sint32) isOneof_Union() {} -func (*Oneof_F_Sint64) isOneof_Union() {} -func (*Oneof_F_Enum) isOneof_Union() {} -func (*Oneof_F_Message) isOneof_Union() {} -func (*Oneof_FGroup) isOneof_Union() {} -func (*Oneof_F_Largest_Tag) isOneof_Union() {} -func (*Oneof_Value) isOneof_Tormato() {} - -func (m *Oneof) GetUnion() isOneof_Union { - if m != nil { - return m.Union - } - return nil -} -func (m *Oneof) GetTormato() isOneof_Tormato { - if m != nil { - return m.Tormato - } - return nil -} - -func (m *Oneof) GetF_Bool() bool { - if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { - return x.F_Bool - } - return false -} - -func (m *Oneof) GetF_Int32() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { - return x.F_Int32 - } - return 0 -} - -func (m *Oneof) GetF_Int64() int64 { - if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { - return x.F_Int64 - } - return 0 -} - -func (m *Oneof) GetF_Fixed32() uint32 { - if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { - return x.F_Fixed32 - } - return 0 -} - -func (m *Oneof) GetF_Fixed64() uint64 { - if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { - return x.F_Fixed64 - } - return 0 -} - -func (m *Oneof) GetF_Uint32() uint32 { - if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { - return x.F_Uint32 - } - return 0 -} - -func (m *Oneof) GetF_Uint64() uint64 { - if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { - return x.F_Uint64 - } - return 0 -} - -func (m *Oneof) GetF_Float() float32 { - if x, ok := m.GetUnion().(*Oneof_F_Float); ok { - return x.F_Float - } - return 0 -} - -func (m *Oneof) GetF_Double() float64 { - if x, ok := m.GetUnion().(*Oneof_F_Double); ok { - return x.F_Double - } - return 0 -} - -func (m *Oneof) GetF_String() string { - if x, ok := m.GetUnion().(*Oneof_F_String); ok { - return x.F_String - } - return "" -} - -func (m *Oneof) GetF_Bytes() []byte { - if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { - return x.F_Bytes - } - return nil -} - -func (m *Oneof) GetF_Sint32() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { - return x.F_Sint32 - } - return 0 -} - -func (m *Oneof) GetF_Sint64() int64 { - if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { - return x.F_Sint64 - } - return 0 -} - -func (m *Oneof) GetF_Enum() MyMessage_Color { - if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { - return x.F_Enum - } - return MyMessage_RED -} - -func (m *Oneof) GetF_Message() *GoTestField { - if x, ok := m.GetUnion().(*Oneof_F_Message); ok { - return x.F_Message - } - return nil -} - -func (m *Oneof) GetFGroup() *Oneof_F_Group { - if x, ok := m.GetUnion().(*Oneof_FGroup); ok { - return x.FGroup - } - return nil -} - -func (m *Oneof) GetF_Largest_Tag() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { - return x.F_Largest_Tag - } - return 0 -} - -func (m *Oneof) GetValue() int32 { - if x, ok := m.GetTormato().(*Oneof_Value); ok { - return x.Value - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Oneof) 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 _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ - (*Oneof_F_Bool)(nil), - (*Oneof_F_Int32)(nil), - (*Oneof_F_Int64)(nil), - (*Oneof_F_Fixed32)(nil), - (*Oneof_F_Fixed64)(nil), - (*Oneof_F_Uint32)(nil), - (*Oneof_F_Uint64)(nil), - (*Oneof_F_Float)(nil), - (*Oneof_F_Double)(nil), - (*Oneof_F_String)(nil), - (*Oneof_F_Bytes)(nil), - (*Oneof_F_Sint32)(nil), - (*Oneof_F_Sint64)(nil), - (*Oneof_F_Enum)(nil), - (*Oneof_F_Message)(nil), - (*Oneof_FGroup)(nil), - (*Oneof_F_Largest_Tag)(nil), - (*Oneof_Value)(nil), - } -} - -func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Oneof) - // union - switch x := m.Union.(type) { - case *Oneof_F_Bool: - t := uint64(0) - if x.F_Bool { - t = 1 - } - b.EncodeVarint(1<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *Oneof_F_Int32: - b.EncodeVarint(2<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Int32)) - case *Oneof_F_Int64: - b.EncodeVarint(3<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Int64)) - case *Oneof_F_Fixed32: - b.EncodeVarint(4<<3 | proto.WireFixed32) - b.EncodeFixed32(uint64(x.F_Fixed32)) - case *Oneof_F_Fixed64: - b.EncodeVarint(5<<3 | proto.WireFixed64) - b.EncodeFixed64(uint64(x.F_Fixed64)) - case *Oneof_F_Uint32: - b.EncodeVarint(6<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Uint32)) - case *Oneof_F_Uint64: - b.EncodeVarint(7<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Uint64)) - case *Oneof_F_Float: - b.EncodeVarint(8<<3 | proto.WireFixed32) - b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) - case *Oneof_F_Double: - b.EncodeVarint(9<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.F_Double)) - case *Oneof_F_String: - b.EncodeVarint(10<<3 | proto.WireBytes) - b.EncodeStringBytes(x.F_String) - case *Oneof_F_Bytes: - b.EncodeVarint(11<<3 | proto.WireBytes) - b.EncodeRawBytes(x.F_Bytes) - case *Oneof_F_Sint32: - b.EncodeVarint(12<<3 | proto.WireVarint) - b.EncodeZigzag32(uint64(x.F_Sint32)) - case *Oneof_F_Sint64: - b.EncodeVarint(13<<3 | proto.WireVarint) - b.EncodeZigzag64(uint64(x.F_Sint64)) - case *Oneof_F_Enum: - b.EncodeVarint(14<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Enum)) - case *Oneof_F_Message: - b.EncodeVarint(15<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.F_Message); err != nil { - return err - } - case *Oneof_FGroup: - b.EncodeVarint(16<<3 | proto.WireStartGroup) - if err := b.Marshal(x.FGroup); err != nil { - return err - } - b.EncodeVarint(16<<3 | proto.WireEndGroup) - case *Oneof_F_Largest_Tag: - b.EncodeVarint(536870911<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Largest_Tag)) - case nil: - default: - return fmt.Errorf("Oneof.Union has unexpected type %T", x) - } - // tormato - switch x := m.Tormato.(type) { - case *Oneof_Value: - b.EncodeVarint(100<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Value)) - case nil: - default: - return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) - } - return nil -} - -func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Oneof) - switch tag { - case 1: // union.F_Bool - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Bool{x != 0} - return true, err - case 2: // union.F_Int32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Int32{int32(x)} - return true, err - case 3: // union.F_Int64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Int64{int64(x)} - return true, err - case 4: // union.F_Fixed32 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Oneof_F_Fixed32{uint32(x)} - return true, err - case 5: // union.F_Fixed64 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Oneof_F_Fixed64{x} - return true, err - case 6: // union.F_Uint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Uint32{uint32(x)} - return true, err - case 7: // union.F_Uint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Uint64{x} - return true, err - case 8: // union.F_Float - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} - return true, err - case 9: // union.F_Double - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Oneof_F_Double{math.Float64frombits(x)} - return true, err - case 10: // union.F_String - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Oneof_F_String{x} - return true, err - case 11: // union.F_Bytes - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Oneof_F_Bytes{x} - return true, err - case 12: // union.F_Sint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.Union = &Oneof_F_Sint32{int32(x)} - return true, err - case 13: // union.F_Sint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.Union = &Oneof_F_Sint64{int64(x)} - return true, err - case 14: // union.F_Enum - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Enum{MyMessage_Color(x)} - return true, err - case 15: // union.F_Message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GoTestField) - err := b.DecodeMessage(msg) - m.Union = &Oneof_F_Message{msg} - return true, err - case 16: // union.f_group - if wire != proto.WireStartGroup { - return true, proto.ErrInternalBadWireType - } - msg := new(Oneof_F_Group) - err := b.DecodeGroup(msg) - m.Union = &Oneof_FGroup{msg} - return true, err - case 536870911: // union.F_Largest_Tag - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Largest_Tag{int32(x)} - return true, err - case 100: // tormato.value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Tormato = &Oneof_Value{int32(x)} - return true, err - default: - return false, nil - } -} - -func _Oneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Oneof) - // union - switch x := m.Union.(type) { - case *Oneof_F_Bool: - n += proto.SizeVarint(1<<3 | proto.WireVarint) - n += 1 - case *Oneof_F_Int32: - n += proto.SizeVarint(2<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Int32)) - case *Oneof_F_Int64: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Int64)) - case *Oneof_F_Fixed32: - n += proto.SizeVarint(4<<3 | proto.WireFixed32) - n += 4 - case *Oneof_F_Fixed64: - n += proto.SizeVarint(5<<3 | proto.WireFixed64) - n += 8 - case *Oneof_F_Uint32: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Uint32)) - case *Oneof_F_Uint64: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Uint64)) - case *Oneof_F_Float: - n += proto.SizeVarint(8<<3 | proto.WireFixed32) - n += 4 - case *Oneof_F_Double: - n += proto.SizeVarint(9<<3 | proto.WireFixed64) - n += 8 - case *Oneof_F_String: - n += proto.SizeVarint(10<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.F_String))) - n += len(x.F_String) - case *Oneof_F_Bytes: - n += proto.SizeVarint(11<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.F_Bytes))) - n += len(x.F_Bytes) - case *Oneof_F_Sint32: - n += proto.SizeVarint(12<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) - case *Oneof_F_Sint64: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) - case *Oneof_F_Enum: - n += proto.SizeVarint(14<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Enum)) - case *Oneof_F_Message: - s := proto.Size(x.F_Message) - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Oneof_FGroup: - n += proto.SizeVarint(16<<3 | proto.WireStartGroup) - n += proto.Size(x.FGroup) - n += proto.SizeVarint(16<<3 | proto.WireEndGroup) - case *Oneof_F_Largest_Tag: - n += proto.SizeVarint(536870911<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Largest_Tag)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // tormato - switch x := m.Tormato.(type) { - case *Oneof_Value: - n += proto.SizeVarint(100<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Value)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Oneof_F_Group struct { - X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } -func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } -func (*Oneof_F_Group) ProtoMessage() {} -func (*Oneof_F_Group) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29, 0} } - -func (m *Oneof_F_Group) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -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_Col - // *Communique_Msg - Union isCommunique_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique) Reset() { *m = Communique{} } -func (m *Communique) String() string { return proto.CompactTextString(m) } -func (*Communique) ProtoMessage() {} -func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } - -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_Col struct { - Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"` -} -type Communique_Msg struct { - Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` -} - -func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Col) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} - -func (m *Communique) GetUnion() isCommunique_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *Communique) GetMakeMeCry() bool { - if m != nil && m.MakeMeCry != nil { - return *m.MakeMeCry - } - return false -} - -func (m *Communique) GetNumber() int32 { - if x, ok := m.GetUnion().(*Communique_Number); ok { - return x.Number - } - return 0 -} - -func (m *Communique) GetName() string { - if x, ok := m.GetUnion().(*Communique_Name); ok { - return x.Name - } - return "" -} - -func (m *Communique) GetData() []byte { - if x, ok := m.GetUnion().(*Communique_Data); ok { - return x.Data - } - return nil -} - -func (m *Communique) GetTempC() float64 { - if x, ok := m.GetUnion().(*Communique_TempC); ok { - return x.TempC - } - return 0 -} - -func (m *Communique) GetCol() MyMessage_Color { - if x, ok := m.GetUnion().(*Communique_Col); ok { - return x.Col - } - return MyMessage_RED -} - -func (m *Communique) GetMsg() *Strings { - if x, ok := m.GetUnion().(*Communique_Msg); ok { - return x.Msg - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), 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_Col)(nil), - (*Communique_Msg)(nil), - } -} - -func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - b.EncodeVarint(5<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Number)) - case *Communique_Name: - b.EncodeVarint(6<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Name) - case *Communique_Data: - b.EncodeVarint(7<<3 | proto.WireBytes) - b.EncodeRawBytes(x.Data) - case *Communique_TempC: - b.EncodeVarint(8<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.TempC)) - case *Communique_Col: - b.EncodeVarint(9<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Col)) - case *Communique_Msg: - b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Communique.Union has unexpected type %T", x) - } - return nil -} - -func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Communique) - switch tag { - case 5: // union.number - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Number{int32(x)} - return true, err - case 6: // union.name - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Communique_Name{x} - return true, err - case 7: // union.data - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Communique_Data{x} - return true, err - case 8: // union.temp_c - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Communique_TempC{math.Float64frombits(x)} - return true, err - case 9: // union.col - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Col{MyMessage_Color(x)} - return true, err - case 10: // union.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Strings) - err := b.DecodeMessage(msg) - m.Union = &Communique_Msg{msg} - return true, err - default: - return false, nil - } -} - -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_Col: - n += proto.SizeVarint(9<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Col)) - case *Communique_Msg: - s := proto.Size(x.Msg) - n += proto.SizeVarint(10<<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 -} - -var E_Greeting = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: ([]string)(nil), - Field: 106, - Name: "testdata.greeting", - Tag: "bytes,106,rep,name=greeting", -} - -var E_Complex = &proto.ExtensionDesc{ - ExtendedType: (*OtherMessage)(nil), - ExtensionType: (*ComplexExtension)(nil), - Field: 200, - Name: "testdata.complex", - Tag: "bytes,200,opt,name=complex", -} - -var E_RComplex = &proto.ExtensionDesc{ - ExtendedType: (*OtherMessage)(nil), - ExtensionType: ([]*ComplexExtension)(nil), - Field: 201, - Name: "testdata.r_complex", - Tag: "bytes,201,rep,name=r_complex,json=rComplex", -} - -var E_NoDefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 101, - Name: "testdata.no_default_double", - Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", -} - -var E_NoDefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 102, - Name: "testdata.no_default_float", - Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", -} - -var E_NoDefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 103, - Name: "testdata.no_default_int32", - Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", -} - -var E_NoDefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 104, - Name: "testdata.no_default_int64", - Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", -} - -var E_NoDefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 105, - Name: "testdata.no_default_uint32", - Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", -} - -var E_NoDefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 106, - Name: "testdata.no_default_uint64", - Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", -} - -var E_NoDefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 107, - Name: "testdata.no_default_sint32", - Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", -} - -var E_NoDefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 108, - Name: "testdata.no_default_sint64", - Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", -} - -var E_NoDefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 109, - Name: "testdata.no_default_fixed32", - Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", -} - -var E_NoDefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 110, - Name: "testdata.no_default_fixed64", - Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", -} - -var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 111, - Name: "testdata.no_default_sfixed32", - Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", -} - -var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 112, - Name: "testdata.no_default_sfixed64", - Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", -} - -var E_NoDefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 113, - Name: "testdata.no_default_bool", - Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", -} - -var E_NoDefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 114, - Name: "testdata.no_default_string", - Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", -} - -var E_NoDefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 115, - Name: "testdata.no_default_bytes", - Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", -} - -var E_NoDefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 116, - Name: "testdata.no_default_enum", - Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum", -} - -var E_DefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 201, - Name: "testdata.default_double", - Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", -} - -var E_DefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 202, - Name: "testdata.default_float", - Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", -} - -var E_DefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 203, - Name: "testdata.default_int32", - Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", -} - -var E_DefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 204, - Name: "testdata.default_int64", - Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", -} - -var E_DefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 205, - Name: "testdata.default_uint32", - Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", -} - -var E_DefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 206, - Name: "testdata.default_uint64", - Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", -} - -var E_DefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 207, - Name: "testdata.default_sint32", - Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", -} - -var E_DefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 208, - Name: "testdata.default_sint64", - Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", -} - -var E_DefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 209, - Name: "testdata.default_fixed32", - Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", -} - -var E_DefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 210, - Name: "testdata.default_fixed64", - Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", -} - -var E_DefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 211, - Name: "testdata.default_sfixed32", - Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", -} - -var E_DefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 212, - Name: "testdata.default_sfixed64", - Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", -} - -var E_DefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 213, - Name: "testdata.default_bool", - Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", -} - -var E_DefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 214, - Name: "testdata.default_string", - Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string", -} - -var E_DefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 215, - Name: "testdata.default_bytes", - Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", -} - -var E_DefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 216, - Name: "testdata.default_enum", - Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1", -} - -var E_X201 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 201, - Name: "testdata.x201", - Tag: "bytes,201,opt,name=x201", -} - -var E_X202 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 202, - Name: "testdata.x202", - Tag: "bytes,202,opt,name=x202", -} - -var E_X203 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 203, - Name: "testdata.x203", - Tag: "bytes,203,opt,name=x203", -} - -var E_X204 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 204, - Name: "testdata.x204", - Tag: "bytes,204,opt,name=x204", -} - -var E_X205 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 205, - Name: "testdata.x205", - Tag: "bytes,205,opt,name=x205", -} - -var E_X206 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 206, - Name: "testdata.x206", - Tag: "bytes,206,opt,name=x206", -} - -var E_X207 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 207, - Name: "testdata.x207", - Tag: "bytes,207,opt,name=x207", -} - -var E_X208 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 208, - Name: "testdata.x208", - Tag: "bytes,208,opt,name=x208", -} - -var E_X209 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 209, - Name: "testdata.x209", - Tag: "bytes,209,opt,name=x209", -} - -var E_X210 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 210, - Name: "testdata.x210", - Tag: "bytes,210,opt,name=x210", -} - -var E_X211 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 211, - Name: "testdata.x211", - Tag: "bytes,211,opt,name=x211", -} - -var E_X212 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 212, - Name: "testdata.x212", - Tag: "bytes,212,opt,name=x212", -} - -var E_X213 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 213, - Name: "testdata.x213", - Tag: "bytes,213,opt,name=x213", -} - -var E_X214 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 214, - Name: "testdata.x214", - Tag: "bytes,214,opt,name=x214", -} - -var E_X215 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 215, - Name: "testdata.x215", - Tag: "bytes,215,opt,name=x215", -} - -var E_X216 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 216, - Name: "testdata.x216", - Tag: "bytes,216,opt,name=x216", -} - -var E_X217 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 217, - Name: "testdata.x217", - Tag: "bytes,217,opt,name=x217", -} - -var E_X218 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 218, - Name: "testdata.x218", - Tag: "bytes,218,opt,name=x218", -} - -var E_X219 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 219, - Name: "testdata.x219", - Tag: "bytes,219,opt,name=x219", -} - -var E_X220 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 220, - Name: "testdata.x220", - Tag: "bytes,220,opt,name=x220", -} - -var E_X221 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 221, - Name: "testdata.x221", - Tag: "bytes,221,opt,name=x221", -} - -var E_X222 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 222, - Name: "testdata.x222", - Tag: "bytes,222,opt,name=x222", -} - -var E_X223 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 223, - Name: "testdata.x223", - Tag: "bytes,223,opt,name=x223", -} - -var E_X224 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 224, - Name: "testdata.x224", - Tag: "bytes,224,opt,name=x224", -} - -var E_X225 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 225, - Name: "testdata.x225", - Tag: "bytes,225,opt,name=x225", -} - -var E_X226 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 226, - Name: "testdata.x226", - Tag: "bytes,226,opt,name=x226", -} - -var E_X227 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 227, - Name: "testdata.x227", - Tag: "bytes,227,opt,name=x227", -} - -var E_X228 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 228, - Name: "testdata.x228", - Tag: "bytes,228,opt,name=x228", -} - -var E_X229 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 229, - Name: "testdata.x229", - Tag: "bytes,229,opt,name=x229", -} - -var E_X230 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 230, - Name: "testdata.x230", - Tag: "bytes,230,opt,name=x230", -} - -var E_X231 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 231, - Name: "testdata.x231", - Tag: "bytes,231,opt,name=x231", -} - -var E_X232 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 232, - Name: "testdata.x232", - Tag: "bytes,232,opt,name=x232", -} - -var E_X233 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 233, - Name: "testdata.x233", - Tag: "bytes,233,opt,name=x233", -} - -var E_X234 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 234, - Name: "testdata.x234", - Tag: "bytes,234,opt,name=x234", -} - -var E_X235 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 235, - Name: "testdata.x235", - Tag: "bytes,235,opt,name=x235", -} - -var E_X236 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 236, - Name: "testdata.x236", - Tag: "bytes,236,opt,name=x236", -} - -var E_X237 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 237, - Name: "testdata.x237", - Tag: "bytes,237,opt,name=x237", -} - -var E_X238 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 238, - Name: "testdata.x238", - Tag: "bytes,238,opt,name=x238", -} - -var E_X239 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 239, - Name: "testdata.x239", - Tag: "bytes,239,opt,name=x239", -} - -var E_X240 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 240, - Name: "testdata.x240", - Tag: "bytes,240,opt,name=x240", -} - -var E_X241 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 241, - Name: "testdata.x241", - Tag: "bytes,241,opt,name=x241", -} - -var E_X242 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 242, - Name: "testdata.x242", - Tag: "bytes,242,opt,name=x242", -} - -var E_X243 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 243, - Name: "testdata.x243", - Tag: "bytes,243,opt,name=x243", -} - -var E_X244 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 244, - Name: "testdata.x244", - Tag: "bytes,244,opt,name=x244", -} - -var E_X245 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 245, - Name: "testdata.x245", - Tag: "bytes,245,opt,name=x245", -} - -var E_X246 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 246, - Name: "testdata.x246", - Tag: "bytes,246,opt,name=x246", -} - -var E_X247 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 247, - Name: "testdata.x247", - Tag: "bytes,247,opt,name=x247", -} - -var E_X248 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 248, - Name: "testdata.x248", - Tag: "bytes,248,opt,name=x248", -} - -var E_X249 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 249, - Name: "testdata.x249", - Tag: "bytes,249,opt,name=x249", -} - -var E_X250 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 250, - Name: "testdata.x250", - Tag: "bytes,250,opt,name=x250", -} - -func init() { - proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum") - proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField") - proto.RegisterType((*GoTest)(nil), "testdata.GoTest") - proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup") - proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup") - proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup") - proto.RegisterType((*GoTestRequiredGroupField)(nil), "testdata.GoTestRequiredGroupField") - proto.RegisterType((*GoTestRequiredGroupField_Group)(nil), "testdata.GoTestRequiredGroupField.Group") - proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest") - proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup") - proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest") - proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest") - proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag") - proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage") - proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested") - proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage") - proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested") - proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage") - proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage") - proto.RegisterType((*RequiredInnerMessage)(nil), "testdata.RequiredInnerMessage") - proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage") - proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup") - proto.RegisterType((*Ext)(nil), "testdata.Ext") - proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension") - proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage") - proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet") - proto.RegisterType((*Empty)(nil), "testdata.Empty") - proto.RegisterType((*MessageList)(nil), "testdata.MessageList") - proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message") - proto.RegisterType((*Strings)(nil), "testdata.Strings") - proto.RegisterType((*Defaults)(nil), "testdata.Defaults") - proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults") - proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum") - proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated") - proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld") - proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G") - proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew") - proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G") - proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint") - proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap") - proto.RegisterType((*Oneof)(nil), "testdata.Oneof") - proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group") - proto.RegisterType((*Communique)(nil), "testdata.Communique") - proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) - proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) - proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) - proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) - proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) - proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) - proto.RegisterExtension(E_Ext_More) - proto.RegisterExtension(E_Ext_Text) - proto.RegisterExtension(E_Ext_Number) - proto.RegisterExtension(E_Greeting) - proto.RegisterExtension(E_Complex) - proto.RegisterExtension(E_RComplex) - proto.RegisterExtension(E_NoDefaultDouble) - proto.RegisterExtension(E_NoDefaultFloat) - proto.RegisterExtension(E_NoDefaultInt32) - proto.RegisterExtension(E_NoDefaultInt64) - proto.RegisterExtension(E_NoDefaultUint32) - proto.RegisterExtension(E_NoDefaultUint64) - proto.RegisterExtension(E_NoDefaultSint32) - proto.RegisterExtension(E_NoDefaultSint64) - proto.RegisterExtension(E_NoDefaultFixed32) - proto.RegisterExtension(E_NoDefaultFixed64) - proto.RegisterExtension(E_NoDefaultSfixed32) - proto.RegisterExtension(E_NoDefaultSfixed64) - proto.RegisterExtension(E_NoDefaultBool) - proto.RegisterExtension(E_NoDefaultString) - proto.RegisterExtension(E_NoDefaultBytes) - proto.RegisterExtension(E_NoDefaultEnum) - proto.RegisterExtension(E_DefaultDouble) - proto.RegisterExtension(E_DefaultFloat) - proto.RegisterExtension(E_DefaultInt32) - proto.RegisterExtension(E_DefaultInt64) - proto.RegisterExtension(E_DefaultUint32) - proto.RegisterExtension(E_DefaultUint64) - proto.RegisterExtension(E_DefaultSint32) - proto.RegisterExtension(E_DefaultSint64) - proto.RegisterExtension(E_DefaultFixed32) - proto.RegisterExtension(E_DefaultFixed64) - proto.RegisterExtension(E_DefaultSfixed32) - proto.RegisterExtension(E_DefaultSfixed64) - proto.RegisterExtension(E_DefaultBool) - proto.RegisterExtension(E_DefaultString) - proto.RegisterExtension(E_DefaultBytes) - proto.RegisterExtension(E_DefaultEnum) - proto.RegisterExtension(E_X201) - proto.RegisterExtension(E_X202) - proto.RegisterExtension(E_X203) - proto.RegisterExtension(E_X204) - proto.RegisterExtension(E_X205) - proto.RegisterExtension(E_X206) - proto.RegisterExtension(E_X207) - proto.RegisterExtension(E_X208) - proto.RegisterExtension(E_X209) - proto.RegisterExtension(E_X210) - proto.RegisterExtension(E_X211) - proto.RegisterExtension(E_X212) - proto.RegisterExtension(E_X213) - proto.RegisterExtension(E_X214) - proto.RegisterExtension(E_X215) - proto.RegisterExtension(E_X216) - proto.RegisterExtension(E_X217) - proto.RegisterExtension(E_X218) - proto.RegisterExtension(E_X219) - proto.RegisterExtension(E_X220) - proto.RegisterExtension(E_X221) - proto.RegisterExtension(E_X222) - proto.RegisterExtension(E_X223) - proto.RegisterExtension(E_X224) - proto.RegisterExtension(E_X225) - proto.RegisterExtension(E_X226) - proto.RegisterExtension(E_X227) - proto.RegisterExtension(E_X228) - proto.RegisterExtension(E_X229) - proto.RegisterExtension(E_X230) - proto.RegisterExtension(E_X231) - proto.RegisterExtension(E_X232) - proto.RegisterExtension(E_X233) - proto.RegisterExtension(E_X234) - proto.RegisterExtension(E_X235) - proto.RegisterExtension(E_X236) - proto.RegisterExtension(E_X237) - proto.RegisterExtension(E_X238) - proto.RegisterExtension(E_X239) - proto.RegisterExtension(E_X240) - proto.RegisterExtension(E_X241) - proto.RegisterExtension(E_X242) - proto.RegisterExtension(E_X243) - proto.RegisterExtension(E_X244) - proto.RegisterExtension(E_X245) - proto.RegisterExtension(E_X246) - proto.RegisterExtension(E_X247) - proto.RegisterExtension(E_X248) - proto.RegisterExtension(E_X249) - proto.RegisterExtension(E_X250) -} - -func init() { proto.RegisterFile("test.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 4465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x5a, 0xc9, 0x77, 0xdb, 0x48, - 0x7a, 0x37, 0xc0, 0xfd, 0x23, 0x25, 0x42, 0x65, 0xb5, 0x9b, 0x96, 0xbc, 0xc0, 0x9c, 0xe9, 0x6e, - 0x7a, 0xd3, 0x48, 0x20, 0x44, 0xdb, 0x74, 0xa7, 0xdf, 0xf3, 0x42, 0xc9, 0x7a, 0x63, 0x89, 0x0a, - 0xa4, 0xee, 0x7e, 0xd3, 0x39, 0xf0, 0x51, 0x22, 0x48, 0xb3, 0x4d, 0x02, 0x34, 0x09, 0xc5, 0x52, - 0x72, 0xe9, 0x4b, 0x72, 0xcd, 0x76, 0xc9, 0x35, 0xa7, 0x9c, 0x92, 0xbc, 0x97, 0x7f, 0x22, 0xe9, - 0xee, 0x59, 0x7b, 0xd6, 0xac, 0x93, 0x7d, 0x99, 0xec, 0xdb, 0x4c, 0x92, 0x4b, 0xcf, 0xab, 0xaf, - 0x0a, 0x40, 0x01, 0x24, 0x20, 0xf9, 0x24, 0x56, 0xd5, 0xef, 0xf7, 0xd5, 0xf6, 0xab, 0xef, 0xab, - 0xaf, 0x20, 0x00, 0xc7, 0x9c, 0x38, 0x2b, 0xa3, 0xb1, 0xed, 0xd8, 0x24, 0x4b, 0x7f, 0x77, 0xda, - 0x4e, 0xbb, 0x7c, 0x1d, 0xd2, 0x9b, 0x76, 0xc3, 0x3a, 0x1a, 0x92, 0xab, 0x90, 0xe8, 0xda, 0x76, - 0x49, 0x52, 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97, 0xd6, 0xba, 0x53, 0x22, 0x15, 0x50, - 0x36, 0x5a, 0x5b, 0x96, 0x53, 0xd5, 0x7c, 0x60, 0x5e, 0x95, 0x2b, 0x29, 0x63, 0xbe, 0x8b, 0xd5, - 0x53, 0xc8, 0x9a, 0xee, 0x23, 0x0b, 0xaa, 0x5c, 0x49, 0x30, 0x64, 0x4d, 0xf7, 0x90, 0xb7, 0x80, - 0x6c, 0xb4, 0x36, 0xfa, 0xc7, 0x66, 0x47, 0xb4, 0x3a, 0xa7, 0xca, 0x95, 0x8c, 0xa1, 0x74, 0x79, - 0xc3, 0x0c, 0xb4, 0x68, 0x79, 0x5e, 0x95, 0x2b, 0x69, 0x17, 0x2d, 0xd8, 0xbe, 0x01, 0x0b, 0x1b, - 0xad, 0x77, 0xfb, 0xc1, 0x01, 0x17, 0x55, 0xb9, 0x32, 0x67, 0x14, 0xbb, 0xac, 0x7e, 0x1a, 0x2b, - 0x1a, 0x56, 0x54, 0xb9, 0x92, 0xe4, 0x58, 0xc1, 0x2e, 0xce, 0x6e, 0x63, 0x60, 0xb7, 0x1d, 0x1f, - 0xba, 0xa0, 0xca, 0x15, 0xd9, 0x98, 0xef, 0x62, 0x75, 0xd0, 0xea, 0x63, 0xfb, 0xe8, 0x60, 0x60, - 0xfa, 0x50, 0xa2, 0xca, 0x15, 0xc9, 0x28, 0x76, 0x59, 0x7d, 0x10, 0xbb, 0xe7, 0x8c, 0xfb, 0x56, - 0xcf, 0xc7, 0x9e, 0x47, 0xfd, 0x16, 0xbb, 0xac, 0x3e, 0x38, 0x82, 0x87, 0x27, 0x8e, 0x39, 0xf1, - 0xa1, 0xa6, 0x2a, 0x57, 0x0a, 0xc6, 0x7c, 0x17, 0xab, 0x43, 0x56, 0x43, 0x6b, 0xd0, 0x55, 0xe5, - 0xca, 0x02, 0xb5, 0x3a, 0x63, 0x0d, 0xf6, 0x42, 0x6b, 0xd0, 0x53, 0xe5, 0x0a, 0xe1, 0x58, 0x61, - 0x0d, 0x44, 0xcd, 0x30, 0x21, 0x96, 0x16, 0xd5, 0x84, 0xa0, 0x19, 0x56, 0x19, 0xd4, 0x0c, 0x07, - 0xbe, 0xa6, 0x26, 0x44, 0xcd, 0x84, 0x90, 0xd8, 0x39, 0x47, 0x5e, 0x50, 0x13, 0xa2, 0x66, 0x38, - 0x32, 0xa4, 0x19, 0x8e, 0x7d, 0x5d, 0x4d, 0x04, 0x35, 0x33, 0x85, 0x16, 0x2d, 0x97, 0xd4, 0x44, - 0x50, 0x33, 0x1c, 0x1d, 0xd4, 0x0c, 0x07, 0x5f, 0x54, 0x13, 0x01, 0xcd, 0x84, 0xb1, 0xa2, 0xe1, - 0x25, 0x35, 0x11, 0xd0, 0x8c, 0x38, 0x3b, 0x57, 0x33, 0x1c, 0xba, 0xac, 0x26, 0x44, 0xcd, 0x88, - 0x56, 0x3d, 0xcd, 0x70, 0xe8, 0x25, 0x35, 0x11, 0xd0, 0x8c, 0x88, 0xf5, 0x34, 0xc3, 0xb1, 0x97, - 0xd5, 0x44, 0x40, 0x33, 0x1c, 0x7b, 0x5d, 0xd4, 0x0c, 0x87, 0x7e, 0x2c, 0xa9, 0x09, 0x51, 0x34, - 0x1c, 0x7a, 0x33, 0x20, 0x1a, 0x8e, 0xfd, 0x84, 0x62, 0x45, 0xd5, 0x84, 0xc1, 0xe2, 0x2a, 0x7c, - 0x4a, 0xc1, 0xa2, 0x6c, 0x38, 0xd8, 0x97, 0x8d, 0xeb, 0x82, 0x4a, 0x57, 0x54, 0xc9, 0x93, 0x8d, - 0xeb, 0xc3, 0x44, 0xd9, 0x78, 0xc0, 0xab, 0xe8, 0x6a, 0xb9, 0x6c, 0xa6, 0x90, 0x35, 0xdd, 0x47, - 0xaa, 0xaa, 0xe4, 0xcb, 0xc6, 0x43, 0x06, 0x64, 0xe3, 0x61, 0xaf, 0xa9, 0x92, 0x28, 0x9b, 0x19, - 0x68, 0xd1, 0x72, 0x59, 0x95, 0x44, 0xd9, 0x78, 0x68, 0x51,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xf2, 0xf9, - 0x4a, 0x78, 0xdd, 0x13, 0x35, 0xe5, 0xe3, 0xdc, 0xdf, 0x86, 0x8b, 0x5e, 0xaa, 0x42, 0x46, 0xf0, - 0xa5, 0xfc, 0xa8, 0xcb, 0xe2, 0x51, 0x67, 0x4e, 0x21, 0x21, 0x38, 0x85, 0xf2, 0x36, 0x64, 0x58, - 0x04, 0x9c, 0x60, 0x54, 0x67, 0xa9, 0x22, 0x13, 0x13, 0xdb, 0xf9, 0x3c, 0xab, 0x63, 0x17, 0x95, - 0xab, 0x90, 0x47, 0xc1, 0x72, 0x04, 0x73, 0x9d, 0x80, 0x55, 0x4c, 0x6e, 0xbf, 0x9f, 0x82, 0xac, - 0xbb, 0x52, 0x64, 0x19, 0xd2, 0x2c, 0x3f, 0x43, 0x53, 0xee, 0xfb, 0x41, 0x0a, 0x33, 0x32, 0xb2, - 0x0c, 0x19, 0x9e, 0x83, 0x71, 0xef, 0x2e, 0x57, 0x35, 0x23, 0xcd, 0x72, 0x2e, 0xaf, 0xb1, 0xa6, - 0xa3, 0x63, 0x62, 0x2f, 0x03, 0x69, 0x96, 0x55, 0x11, 0x15, 0x72, 0x5e, 0x1e, 0x85, 0xfe, 0x98, - 0x3f, 0x03, 0x64, 0xdd, 0xc4, 0x49, 0x40, 0xd4, 0x74, 0xf4, 0x58, 0x3c, 0xe7, 0xcf, 0x76, 0xfd, - 0xeb, 0x49, 0xd6, 0xcd, 0x86, 0xf0, 0xf9, 0xde, 0x4d, 0xf0, 0x33, 0x3c, 0xff, 0xf1, 0x01, 0x35, - 0x1d, 0x5d, 0x82, 0x9b, 0xcd, 0x67, 0x78, 0x8e, 0x43, 0xae, 0xd2, 0x21, 0x62, 0xce, 0x82, 0x47, - 0xdf, 0x4f, 0xdd, 0xd3, 0x2c, 0x93, 0x21, 0xd7, 0xa8, 0x05, 0x96, 0x98, 0xe0, 0xb9, 0xf4, 0xf3, - 0xf4, 0x0c, 0xcf, 0x57, 0xc8, 0x4d, 0x0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 0x06, 0xe7, - 0xab, 0xd1, 0x93, 0x34, 0xb0, 0xc7, 0x78, 0x3e, 0xe7, 0xb5, 0x4b, 0x62, 0x88, 0xf2, 0x61, 0x3c, - 0x5c, 0x30, 0x68, 0x59, 0x09, 0x0d, 0x45, 0x2a, 0xff, 0x50, 0x82, 0xc2, 0xb6, 0x3d, 0xf6, 0x1f, - 0x98, 0x17, 0x21, 0x75, 0x60, 0xdb, 0x83, 0x09, 0x9a, 0xcd, 0x1a, 0xac, 0x40, 0xde, 0x80, 0x02, - 0xfe, 0x70, 0x73, 0x4f, 0xd9, 0x7b, 0xda, 0xc8, 0x63, 0x3d, 0x4f, 0x38, 0x09, 0x24, 0xfb, 0x96, - 0x33, 0xe1, 0x9e, 0x0c, 0x7f, 0x93, 0x2f, 0x40, 0x9e, 0xfe, 0x75, 0x99, 0x49, 0xef, 0xc2, 0x0a, - 0xb4, 0x9a, 0x13, 0xdf, 0x82, 0x39, 0xdc, 0x7d, 0x0f, 0x96, 0xf1, 0x9e, 0x31, 0x0a, 0xac, 0x81, - 0x03, 0x4b, 0x90, 0x61, 0xae, 0x60, 0x82, 0x5f, 0xcb, 0x72, 0x86, 0x5b, 0xa4, 0xee, 0x15, 0x33, - 0x01, 0x16, 0xee, 0x33, 0x06, 0x2f, 0x95, 0x1f, 0x40, 0x16, 0xa3, 0x54, 0x73, 0xd0, 0x21, 0x65, - 0x90, 0x7a, 0x25, 0x13, 0x63, 0xe4, 0xa2, 0x70, 0xcd, 0xe7, 0xcd, 0x2b, 0x9b, 0x86, 0xd4, 0x5b, - 0x5a, 0x00, 0x69, 0x93, 0xde, 0xbb, 0x8f, 0xb9, 0x9b, 0x96, 0x8e, 0xcb, 0x4d, 0x6e, 0x62, 0xc7, - 0x7c, 0x19, 0x67, 0x62, 0xc7, 0x7c, 0xc9, 0x4c, 0x5c, 0x9d, 0x32, 0x41, 0x4b, 0x27, 0xfc, 0xd3, - 0xa1, 0x74, 0x52, 0xae, 0xc2, 0x1c, 0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d6, 0xda, 0xbf, 0xc4, - 0xb0, 0xb9, 0xd6, 0xaa, 0xd1, 0x5a, 0xfb, 0xd7, 0x18, 0x36, 0xd7, 0x5a, 0x35, 0x5a, 0x6b, 0xff, - 0x16, 0xc3, 0xe6, 0x5a, 0xd3, 0xa3, 0xb5, 0xf6, 0xef, 0xd1, 0x6c, 0x9d, 0x6b, 0x4d, 0x8f, 0xd6, - 0xda, 0x7f, 0xc4, 0xb0, 0xb9, 0xd6, 0xf4, 0x68, 0xad, 0xfd, 0x67, 0x0c, 0x9b, 0x6b, 0x4d, 0x8f, - 0xd6, 0xda, 0x7f, 0xc5, 0xb0, 0xb9, 0xd6, 0xf4, 0x68, 0xad, 0xfd, 0x77, 0x0c, 0x9b, 0x6b, 0x4d, - 0x8f, 0xd6, 0xda, 0xff, 0xc4, 0xb0, 0xb9, 0xd6, 0xf4, 0x68, 0xad, 0xfd, 0x38, 0x86, 0xcd, 0xb5, - 0xa6, 0x47, 0x6b, 0xed, 0x27, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a, 0x6b, 0xff, 0x1b, 0xc3, 0xe6, - 0x5a, 0xd3, 0xa3, 0xb5, 0xf6, 0x7f, 0x31, 0x6c, 0xae, 0xb5, 0xf5, 0x68, 0xad, 0xfd, 0x7f, 0x34, - 0x7b, 0x7d, 0xf5, 0xa7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x40, 0x32, 0xb7, 0xac, 0x57, 0x39, 0x00, - 0x00, -} diff --git a/vendor/github.com/golang/protobuf/proto/testdata/test.proto b/vendor/github.com/golang/protobuf/proto/testdata/test.proto deleted file mode 100644 index 70e3cfcd..00000000 --- a/vendor/github.com/golang/protobuf/proto/testdata/test.proto +++ /dev/null @@ -1,548 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A feature-rich test file for the protocol compiler and libraries. - -syntax = "proto2"; - -package testdata; - -enum FOO { FOO1 = 1; }; - -message GoEnum { - required FOO foo = 1; -} - -message GoTestField { - required string Label = 1; - required string Type = 2; -} - -message GoTest { - // An enum, for completeness. - enum KIND { - VOID = 0; - - // Basic types - BOOL = 1; - BYTES = 2; - FINGERPRINT = 3; - FLOAT = 4; - INT = 5; - STRING = 6; - TIME = 7; - - // Groupings - TUPLE = 8; - ARRAY = 9; - MAP = 10; - - // Table types - TABLE = 11; - - // Functions - FUNCTION = 12; // last tag - }; - - // Some typical parameters - required KIND Kind = 1; - optional string Table = 2; - optional int32 Param = 3; - - // Required, repeated and optional foreign fields. - required GoTestField RequiredField = 4; - repeated GoTestField RepeatedField = 5; - optional GoTestField OptionalField = 6; - - // Required fields of all basic types - required bool F_Bool_required = 10; - required int32 F_Int32_required = 11; - required int64 F_Int64_required = 12; - required fixed32 F_Fixed32_required = 13; - required fixed64 F_Fixed64_required = 14; - required uint32 F_Uint32_required = 15; - required uint64 F_Uint64_required = 16; - required float F_Float_required = 17; - required double F_Double_required = 18; - required string F_String_required = 19; - required bytes F_Bytes_required = 101; - required sint32 F_Sint32_required = 102; - required sint64 F_Sint64_required = 103; - - // Repeated fields of all basic types - repeated bool F_Bool_repeated = 20; - repeated int32 F_Int32_repeated = 21; - repeated int64 F_Int64_repeated = 22; - repeated fixed32 F_Fixed32_repeated = 23; - repeated fixed64 F_Fixed64_repeated = 24; - repeated uint32 F_Uint32_repeated = 25; - repeated uint64 F_Uint64_repeated = 26; - repeated float F_Float_repeated = 27; - repeated double F_Double_repeated = 28; - repeated string F_String_repeated = 29; - repeated bytes F_Bytes_repeated = 201; - repeated sint32 F_Sint32_repeated = 202; - repeated sint64 F_Sint64_repeated = 203; - - // Optional fields of all basic types - optional bool F_Bool_optional = 30; - optional int32 F_Int32_optional = 31; - optional int64 F_Int64_optional = 32; - optional fixed32 F_Fixed32_optional = 33; - optional fixed64 F_Fixed64_optional = 34; - optional uint32 F_Uint32_optional = 35; - optional uint64 F_Uint64_optional = 36; - optional float F_Float_optional = 37; - optional double F_Double_optional = 38; - optional string F_String_optional = 39; - optional bytes F_Bytes_optional = 301; - optional sint32 F_Sint32_optional = 302; - optional sint64 F_Sint64_optional = 303; - - // Default-valued fields of all basic types - optional bool F_Bool_defaulted = 40 [default=true]; - optional int32 F_Int32_defaulted = 41 [default=32]; - optional int64 F_Int64_defaulted = 42 [default=64]; - optional fixed32 F_Fixed32_defaulted = 43 [default=320]; - optional fixed64 F_Fixed64_defaulted = 44 [default=640]; - optional uint32 F_Uint32_defaulted = 45 [default=3200]; - optional uint64 F_Uint64_defaulted = 46 [default=6400]; - optional float F_Float_defaulted = 47 [default=314159.]; - optional double F_Double_defaulted = 48 [default=271828.]; - optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; - optional sint32 F_Sint32_defaulted = 402 [default = -32]; - optional sint64 F_Sint64_defaulted = 403 [default = -64]; - - // Packed repeated fields (no string or bytes). - repeated bool F_Bool_repeated_packed = 50 [packed=true]; - repeated int32 F_Int32_repeated_packed = 51 [packed=true]; - repeated int64 F_Int64_repeated_packed = 52 [packed=true]; - repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; - repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; - repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; - repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; - repeated float F_Float_repeated_packed = 57 [packed=true]; - repeated double F_Double_repeated_packed = 58 [packed=true]; - repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; - repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; - - // Required, repeated, and optional groups. - required group RequiredGroup = 70 { - required string RequiredField = 71; - }; - - repeated group RepeatedGroup = 80 { - required string RequiredField = 81; - }; - - optional group OptionalGroup = 90 { - required string RequiredField = 91; - }; -} - -// For testing a group containing a required field. -message GoTestRequiredGroupField { - required group Group = 1 { - required int32 Field = 2; - }; -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -message GoSkipTest { - required int32 skip_int32 = 11; - required fixed32 skip_fixed32 = 12; - required fixed64 skip_fixed64 = 13; - required string skip_string = 14; - required group SkipGroup = 15 { - required int32 group_int32 = 16; - required string group_string = 17; - } -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -message NonPackedTest { - repeated int32 a = 1; -} - -message PackedTest { - repeated int32 b = 1 [packed=true]; -} - -message MaxTag { - // Maximum possible tag number. - optional string last_field = 536870911; -} - -message OldMessage { - message Nested { - optional string name = 1; - } - optional Nested nested = 1; - - optional int32 num = 2; -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -message NewMessage { - message Nested { - optional string name = 1; - optional string food_group = 2; - } - optional Nested nested = 1; - - // This is an int32 in OldMessage. - optional int64 num = 2; -} - -// Smaller tests for ASCII formatting. - -message InnerMessage { - required string host = 1; - optional int32 port = 2 [default=4000]; - optional bool connected = 3; -} - -message OtherMessage { - optional int64 key = 1; - optional bytes value = 2; - optional float weight = 3; - optional InnerMessage inner = 4; - - extensions 100 to max; -} - -message RequiredInnerMessage { - required InnerMessage leo_finally_won_an_oscar = 1; -} - -message MyMessage { - required int32 count = 1; - optional string name = 2; - optional string quote = 3; - repeated string pet = 4; - optional InnerMessage inner = 5; - repeated OtherMessage others = 6; - optional RequiredInnerMessage we_must_go_deeper = 13; - repeated InnerMessage rep_inner = 12; - - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - }; - optional Color bikeshed = 7; - - optional group SomeGroup = 8 { - optional int32 group_field = 9; - } - - // This field becomes [][]byte in the generated code. - repeated bytes rep_bytes = 10; - - optional double bigfloat = 11; - - extensions 100 to max; -} - -message Ext { - extend MyMessage { - optional Ext more = 103; - optional string text = 104; - optional int32 number = 105; - } - - optional string data = 1; -} - -extend MyMessage { - repeated string greeting = 106; -} - -message ComplexExtension { - optional int32 first = 1; - optional int32 second = 2; - repeated int32 third = 3; -} - -extend OtherMessage { - optional ComplexExtension complex = 200; - repeated ComplexExtension r_complex = 201; -} - -message DefaultsMessage { - enum DefaultsEnum { - ZERO = 0; - ONE = 1; - TWO = 2; - }; - extensions 100 to max; -} - -extend DefaultsMessage { - optional double no_default_double = 101; - optional float no_default_float = 102; - optional int32 no_default_int32 = 103; - optional int64 no_default_int64 = 104; - optional uint32 no_default_uint32 = 105; - optional uint64 no_default_uint64 = 106; - optional sint32 no_default_sint32 = 107; - optional sint64 no_default_sint64 = 108; - optional fixed32 no_default_fixed32 = 109; - optional fixed64 no_default_fixed64 = 110; - optional sfixed32 no_default_sfixed32 = 111; - optional sfixed64 no_default_sfixed64 = 112; - optional bool no_default_bool = 113; - optional string no_default_string = 114; - optional bytes no_default_bytes = 115; - optional DefaultsMessage.DefaultsEnum no_default_enum = 116; - - optional double default_double = 201 [default = 3.1415]; - optional float default_float = 202 [default = 3.14]; - optional int32 default_int32 = 203 [default = 42]; - optional int64 default_int64 = 204 [default = 43]; - optional uint32 default_uint32 = 205 [default = 44]; - optional uint64 default_uint64 = 206 [default = 45]; - optional sint32 default_sint32 = 207 [default = 46]; - optional sint64 default_sint64 = 208 [default = 47]; - optional fixed32 default_fixed32 = 209 [default = 48]; - optional fixed64 default_fixed64 = 210 [default = 49]; - optional sfixed32 default_sfixed32 = 211 [default = 50]; - optional sfixed64 default_sfixed64 = 212 [default = 51]; - optional bool default_bool = 213 [default = true]; - optional string default_string = 214 [default = "Hello, string"]; - optional bytes default_bytes = 215 [default = "Hello, bytes"]; - optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; -} - -message MyMessageSet { - option message_set_wire_format = true; - extensions 100 to max; -} - -message Empty { -} - -extend MyMessageSet { - optional Empty x201 = 201; - optional Empty x202 = 202; - optional Empty x203 = 203; - optional Empty x204 = 204; - optional Empty x205 = 205; - optional Empty x206 = 206; - optional Empty x207 = 207; - optional Empty x208 = 208; - optional Empty x209 = 209; - optional Empty x210 = 210; - optional Empty x211 = 211; - optional Empty x212 = 212; - optional Empty x213 = 213; - optional Empty x214 = 214; - optional Empty x215 = 215; - optional Empty x216 = 216; - optional Empty x217 = 217; - optional Empty x218 = 218; - optional Empty x219 = 219; - optional Empty x220 = 220; - optional Empty x221 = 221; - optional Empty x222 = 222; - optional Empty x223 = 223; - optional Empty x224 = 224; - optional Empty x225 = 225; - optional Empty x226 = 226; - optional Empty x227 = 227; - optional Empty x228 = 228; - optional Empty x229 = 229; - optional Empty x230 = 230; - optional Empty x231 = 231; - optional Empty x232 = 232; - optional Empty x233 = 233; - optional Empty x234 = 234; - optional Empty x235 = 235; - optional Empty x236 = 236; - optional Empty x237 = 237; - optional Empty x238 = 238; - optional Empty x239 = 239; - optional Empty x240 = 240; - optional Empty x241 = 241; - optional Empty x242 = 242; - optional Empty x243 = 243; - optional Empty x244 = 244; - optional Empty x245 = 245; - optional Empty x246 = 246; - optional Empty x247 = 247; - optional Empty x248 = 248; - optional Empty x249 = 249; - optional Empty x250 = 250; -} - -message MessageList { - repeated group Message = 1 { - required string name = 2; - required int32 count = 3; - } -} - -message Strings { - optional string string_field = 1; - optional bytes bytes_field = 2; -} - -message Defaults { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - } - - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - optional bool F_Bool = 1 [default=true]; - optional int32 F_Int32 = 2 [default=32]; - optional int64 F_Int64 = 3 [default=64]; - optional fixed32 F_Fixed32 = 4 [default=320]; - optional fixed64 F_Fixed64 = 5 [default=640]; - optional uint32 F_Uint32 = 6 [default=3200]; - optional uint64 F_Uint64 = 7 [default=6400]; - optional float F_Float = 8 [default=314159.]; - optional double F_Double = 9 [default=271828.]; - optional string F_String = 10 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes = 11 [default="Bignose"]; - optional sint32 F_Sint32 = 12 [default=-32]; - optional sint64 F_Sint64 = 13 [default=-64]; - optional Color F_Enum = 14 [default=GREEN]; - - // More fields with crazy defaults. - optional float F_Pinf = 15 [default=inf]; - optional float F_Ninf = 16 [default=-inf]; - optional float F_Nan = 17 [default=nan]; - - // Sub-message. - optional SubDefaults sub = 18; - - // Redundant but explicit defaults. - optional string str_zero = 19 [default=""]; -} - -message SubDefaults { - optional int64 n = 1 [default=7]; -} - -message RepeatedEnum { - enum Color { - RED = 1; - } - repeated Color color = 1; -} - -message MoreRepeated { - repeated bool bools = 1; - repeated bool bools_packed = 2 [packed=true]; - repeated int32 ints = 3; - repeated int32 ints_packed = 4 [packed=true]; - repeated int64 int64s_packed = 7 [packed=true]; - repeated string strings = 5; - repeated fixed32 fixeds = 6; -} - -// GroupOld and GroupNew have the same wire format. -// GroupNew has a new field inside a group. - -message GroupOld { - optional group G = 101 { - optional int32 x = 2; - } -} - -message GroupNew { - optional group G = 101 { - optional int32 x = 2; - optional int32 y = 3; - } -} - -message FloatingPoint { - required double f = 1; - optional bool exact = 2; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; - map str_to_str = 4; -} - -message Oneof { - oneof union { - bool F_Bool = 1; - int32 F_Int32 = 2; - int64 F_Int64 = 3; - fixed32 F_Fixed32 = 4; - fixed64 F_Fixed64 = 5; - uint32 F_Uint32 = 6; - uint64 F_Uint64 = 7; - float F_Float = 8; - double F_Double = 9; - string F_String = 10; - bytes F_Bytes = 11; - sint32 F_Sint32 = 12; - sint64 F_Sint64 = 13; - MyMessage.Color F_Enum = 14; - GoTestField F_Message = 15; - group F_Group = 16 { - optional int32 x = 17; - } - int32 F_Largest_Tag = 536870911; - } - - oneof tormato { - int32 value = 100; - } -} - -message Communique { - optional bool make_me_cry = 1; - - // This is a oneof, called "union". - oneof union { - int32 number = 5; - string name = 6; - bytes data = 7; - double temp_c = 8; - MyMessage.Color col = 9; - Strings msg = 10; - } -} diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go index 965876bf..1aaee725 100644 --- a/vendor/github.com/golang/protobuf/proto/text.go +++ b/vendor/github.com/golang/protobuf/proto/text.go @@ -50,7 +50,6 @@ import ( var ( newline = []byte("\n") spaces = []byte(" ") - gtNewline = []byte(">\n") endBraceNewline = []byte("}\n") backslashN = []byte{'\\', 'n'} backslashR = []byte{'\\', 'r'} @@ -170,11 +169,6 @@ func writeName(w *textWriter, props *Properties) error { return nil } -// raw is the interface satisfied by RawMessage. -type raw interface { - Bytes() []byte -} - func requiresQuotes(u string) bool { // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. for _, ch := range u { @@ -269,6 +263,10 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { props := sprops.Prop[i] name := st.Field(i).Name + if name == "XXX_NoUnkeyedLiteral" { + continue + } + if strings.HasPrefix(name, "XXX_") { // There are two XXX_ fields: // XXX_unrecognized []byte @@ -355,7 +353,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -372,7 +370,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { + if err := tm.writeAny(w, val, props.MapValProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -436,12 +434,6 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if b, ok := fv.Interface().(raw); ok { - if err := writeRaw(w, b.Bytes()); err != nil { - return err - } - continue - } // Enums have a String method, so writeAny will work fine. if err := tm.writeAny(w, fv, props); err != nil { @@ -455,7 +447,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { // Extensions (the XXX_extensions field). pv := sv.Addr() - if _, ok := extendable(pv.Interface()); ok { + if _, err := extendable(pv.Interface()); err == nil { if err := tm.writeExtensions(w, pv); err != nil { return err } @@ -464,27 +456,6 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return nil } -// writeRaw writes an uninterpreted raw message. -func writeRaw(w *textWriter, b []byte) error { - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if err := writeUnknownStruct(w, b); err != nil { - return err - } - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - return nil -} - // writeAny writes an arbitrary field. func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { v = reflect.Indirect(v) @@ -535,6 +506,19 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert } } w.indent() + if v.CanAddr() { + // Calling v.Interface on a struct causes the reflect package to + // copy the entire struct. This is racy with the new Marshaler + // since we atomically update the XXX_sizecache. + // + // Thus, we retrieve a pointer to the struct if possible to avoid + // a race since v.Interface on the pointer doesn't copy the struct. + // + // If v is not addressable, then we are not worried about a race + // since it implies that the binary Marshaler cannot possibly be + // mutating this value. + v = v.Addr() + } if etm, ok := v.Interface().(encoding.TextMarshaler); ok { text, err := etm.MarshalText() if err != nil { @@ -543,8 +527,13 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert if _, err = w.Write(text); err != nil { return err } - } else if err := tm.writeStruct(w, v); err != nil { - return err + } else { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if err := tm.writeStruct(w, v); err != nil { + return err + } } w.unindent() if err := w.WriteByte(ket); err != nil { diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go index 4fd05312..bb55a3af 100644 --- a/vendor/github.com/golang/protobuf/proto/text_parser.go +++ b/vendor/github.com/golang/protobuf/proto/text_parser.go @@ -206,7 +206,6 @@ func (p *textParser) advance() { var ( errBadUTF8 = errors.New("proto: bad UTF-8") - errBadHex = errors.New("proto: bad hexadecimal") ) func unquoteC(s string, quote rune) (string, error) { @@ -277,60 +276,47 @@ func unescape(s string) (ch string, tail string, err error) { return "?", s, nil // trigraph workaround case '\'', '"', '\\': return string(r), s, nil - case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': + case '0', '1', '2', '3', '4', '5', '6', '7': if len(s) < 2 { return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) } - base := 8 - ss := s[:2] + ss := string(r) + s[:2] s = s[2:] - if r == 'x' || r == 'X' { - base = 16 - } else { - ss = string(r) + ss - } - i, err := strconv.ParseUint(ss, base, 8) + i, err := strconv.ParseUint(ss, 8, 8) if err != nil { - return "", "", err + return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) } return string([]byte{byte(i)}), s, nil - case 'u', 'U': - n := 4 - if r == 'U' { + case 'x', 'X', 'u', 'U': + var n int + switch r { + case 'x', 'X': + n = 2 + case 'u': + n = 4 + case 'U': n = 8 } if len(s) < n { - return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) - } - - bs := make([]byte, n/2) - for i := 0; i < n; i += 2 { - a, ok1 := unhex(s[i]) - b, ok2 := unhex(s[i+1]) - if !ok1 || !ok2 { - return "", "", errBadHex - } - bs[i/2] = a<<4 | b + return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) } + ss := s[:n] s = s[n:] - return string(bs), s, nil + i, err := strconv.ParseUint(ss, 16, 64) + if err != nil { + return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) + } + if r == 'x' || r == 'X' { + return string([]byte{byte(i)}), s, nil + } + if i > utf8.MaxRune { + return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) + } + return string(i), s, nil } return "", "", fmt.Errorf(`unknown escape \%c`, r) } -// Adapted from src/pkg/strconv/quote.go. -func unhex(b byte) (v byte, ok bool) { - switch { - case '0' <= b && b <= '9': - return b - '0', true - case 'a' <= b && b <= 'f': - return b - 'a' + 10, true - case 'A' <= b && b <= 'F': - return b - 'A' + 10, true - } - return 0, false -} - // Back off the parser by one token. Can only be done between calls to next(). // It makes the next advance() a no-op. func (p *textParser) back() { p.backed = true } @@ -592,7 +578,11 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { props = oop.Prop nv := reflect.New(oop.Type.Elem()) dst = nv.Elem().Field(0) - sv.Field(oop.Field).Set(nv) + field := sv.Field(oop.Field) + if !field.IsNil() { + return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) + } + field.Set(nv) } if !dst.IsValid() { return p.errorf("unknown field name %q in %v", name, st) @@ -640,17 +630,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { if err := p.consumeToken(":"); err != nil { return err } - if err := p.readAny(key, props.mkeyprop); err != nil { + if err := p.readAny(key, props.MapKeyProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { return err } case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { return err } - if err := p.readAny(val, props.mvalprop); err != nil { + if err := p.readAny(val, props.MapValProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { @@ -724,6 +714,9 @@ func (p *textParser) consumeExtName() (string, error) { if tok.err != nil { return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) } + if p.done && tok.value != "]" { + return "", p.errorf("unclosed type_url or extension name") + } } return strings.Join(parts, ""), nil } @@ -879,13 +872,9 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { // UnmarshalText returns *RequiredNotSetError. func UnmarshalText(s string, pb Message) error { if um, ok := pb.(encoding.TextUnmarshaler); ok { - err := um.UnmarshalText([]byte(s)) - return err + return um.UnmarshalText([]byte(s)) } pb.Reset() v := reflect.ValueOf(pb) - if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { - return pe - } - return nil + return newTextParser(s).readStruct(v.Elem(), "") } diff --git a/vendor/github.com/golang/protobuf/proto/text_parser_test.go b/vendor/github.com/golang/protobuf/proto/text_parser_test.go deleted file mode 100644 index b26500b5..00000000 --- a/vendor/github.com/golang/protobuf/proto/text_parser_test.go +++ /dev/null @@ -1,662 +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/golang/protobuf/proto" - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - . "github.com/golang/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{"Shrek"}} - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } -} - -var benchInput string - -func init() { - benchInput = "count: 4\n" - for i := 0; i < 1000; i++ { - benchInput += "pet: \"fido\"\n" - } - - // Check it is valid input. - pb := new(MyMessage) - err := UnmarshalText(benchInput, pb) - if err != nil { - panic("Bad benchmark input: " + err.Error()) - } -} - -func BenchmarkUnmarshalText(b *testing.B) { - pb := new(MyMessage) - for i := 0; i < b.N; i++ { - UnmarshalText(benchInput, pb) - } - b.SetBytes(int64(len(benchInput))) -} diff --git a/vendor/github.com/golang/protobuf/proto/text_test.go b/vendor/github.com/golang/protobuf/proto/text_test.go deleted file mode 100644 index 3eabacac..00000000 --- a/vendor/github.com/golang/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/golang/protobuf/proto" - - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/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{4}}, `number:4`}, - // message field - {&pb.Communique{Union: &pb.Communique_Msg{ - &pb.Strings{StringField: proto.String("why hello!")}, - }}, `msg:`}, - // bad oneof (should not panic) - {&pb.Communique{Union: &pb.Communique_Msg{nil}}, `msg:/* nil */`}, - } - for _, test := range tests { - got := strings.TrimSpace(test.m.String()) - if got != test.want { - t.Errorf("\n got %s\nwant %s", got, test.want) - } - } -} - -func BenchmarkMarshalTextBuffered(b *testing.B) { - buf := new(bytes.Buffer) - m := newTestMessage() - for i := 0; i < b.N; i++ { - buf.Reset() - proto.MarshalText(buf, m) - } -} - -func BenchmarkMarshalTextUnbuffered(b *testing.B) { - w := ioutil.Discard - m := newTestMessage() - for i := 0; i < b.N; i++ { - proto.MarshalText(w, m) - } -} - -func compact(src string) string { - // s/[ \n]+/ /g; s/ $//; - dst := make([]byte, len(src)) - space, comment := false, false - j := 0 - for i := 0; i < len(src); i++ { - if strings.HasPrefix(src[i:], "/*") { - comment = true - i++ - continue - } - if comment && strings.HasPrefix(src[i:], "*/") { - comment = false - i++ - continue - } - if comment { - continue - } - c := src[i] - if c == ' ' || c == '\n' { - space = true - continue - } - if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { - space = false - } - if c == '{' { - space = false - } - if space { - dst[j] = ' ' - j++ - space = false - } - dst[j] = c - j++ - } - if space { - dst[j] = ' ' - j++ - } - return string(dst[0:j]) -} - -var compactText = compact(text) - -func TestCompactText(t *testing.T) { - s := proto.CompactTextString(newTestMessage()) - if s != compactText { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) - } -} - -func TestStringEscaping(t *testing.T) { - testCases := []struct { - in *pb.Strings - out string - }{ - { - // Test data from C++ test (TextFormatTest.StringEscape). - // Single divergence: we don't escape apostrophes. - &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, - "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", - }, - { - // Test data from the same C++ test. - &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, - "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", - }, - { - // Some UTF-8. - &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, - `string_field: "\000\001\377\201"` + "\n", - }, - } - - for i, tc := range testCases { - var buf bytes.Buffer - if err := proto.MarshalText(&buf, tc.in); err != nil { - t.Errorf("proto.MarsalText: %v", err) - continue - } - s := buf.String() - if s != tc.out { - t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) - continue - } - - // Check round-trip. - pb := new(pb.Strings) - if err := proto.UnmarshalText(s, pb); err != nil { - t.Errorf("#%d: UnmarshalText: %v", i, err) - continue - } - if !proto.Equal(pb, tc.in) { - t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) - } - } -} - -// A limitedWriter accepts some output before it fails. -// This is a proxy for something like a nearly-full or imminently-failing disk, -// or a network connection that is about to die. -type limitedWriter struct { - b bytes.Buffer - limit int -} - -var outOfSpace = errors.New("proto: insufficient space") - -func (w *limitedWriter) Write(p []byte) (n int, err error) { - var avail = w.limit - w.b.Len() - if avail <= 0 { - return 0, outOfSpace - } - if len(p) <= avail { - return w.b.Write(p) - } - n, _ = w.b.Write(p[:avail]) - return n, outOfSpace -} - -func TestMarshalTextFailing(t *testing.T) { - // Try lots of different sizes to exercise more error code-paths. - for lim := 0; lim < len(text); lim++ { - buf := new(limitedWriter) - buf.limit = lim - err := proto.MarshalText(buf, newTestMessage()) - // We expect a certain error, but also some partial results in the buffer. - if err != outOfSpace { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) - } - s := buf.b.String() - x := text[:buf.limit] - if s != x { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) - } - } -} - -func TestFloats(t *testing.T) { - tests := []struct { - f float64 - want string - }{ - {0, "0"}, - {4.7, "4.7"}, - {math.Inf(1), "inf"}, - {math.Inf(-1), "-inf"}, - {math.NaN(), "nan"}, - } - for _, test := range tests { - msg := &pb.FloatingPoint{F: &test.f} - got := strings.TrimSpace(msg.String()) - want := `f:` + test.want - if got != want { - t.Errorf("f=%f: got %q, want %q", test.f, got, want) - } - } -} - -func TestRepeatedNilText(t *testing.T) { - m := &pb.MessageList{ - Message: []*pb.MessageList_Message{ - nil, - &pb.MessageList_Message{ - 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/golang/protobuf/protoc-gen-go/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile deleted file mode 100644 index a42cc371..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -test: - cd testdata && make test diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile deleted file mode 100644 index 4942418e..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Not stored here, but descriptor.proto is in https://github.com/google/protobuf/ -# at src/google/protobuf/descriptor.proto -regenerate: - echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION - protoc --go_out=. -I$(HOME)/src/protobuf/src $(HOME)/src/protobuf/src/google/protobuf/descriptor.proto && \ - sed 's,^package google_protobuf,package descriptor,' google/protobuf/descriptor.pb.go > \ - $(GOPATH)/src/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go && \ - rm -f google/protobuf/descriptor.pb.go diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go deleted file mode 100644 index 2e06cb3a..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go +++ /dev/null @@ -1,2076 +0,0 @@ -// Code generated by protoc-gen-go. -// source: google/protobuf/descriptor.proto -// DO NOT EDIT! - -/* -Package descriptor is a generated protocol buffer package. - -It is generated from these files: - google/protobuf/descriptor.proto - -It has these top-level messages: - FileDescriptorSet - FileDescriptorProto - DescriptorProto - FieldDescriptorProto - OneofDescriptorProto - EnumDescriptorProto - EnumValueDescriptorProto - ServiceDescriptorProto - MethodDescriptorProto - FileOptions - MessageOptions - FieldOptions - OneofOptions - EnumOptions - EnumValueOptions - ServiceOptions - MethodOptions - UninterpretedOption - SourceCodeInfo - GeneratedCodeInfo -*/ -package descriptor - -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 - -type FieldDescriptorProto_Type int32 - -const ( - // 0 is reserved for errors. - // Order is weird for historical reasons. - FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 - FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 - FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 - FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 - FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 - FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 - FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 - FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 - FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 - // New in version 2. - FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 - FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 - FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 - FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 - FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 - FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 - FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 -) - -var FieldDescriptorProto_Type_name = map[int32]string{ - 1: "TYPE_DOUBLE", - 2: "TYPE_FLOAT", - 3: "TYPE_INT64", - 4: "TYPE_UINT64", - 5: "TYPE_INT32", - 6: "TYPE_FIXED64", - 7: "TYPE_FIXED32", - 8: "TYPE_BOOL", - 9: "TYPE_STRING", - 10: "TYPE_GROUP", - 11: "TYPE_MESSAGE", - 12: "TYPE_BYTES", - 13: "TYPE_UINT32", - 14: "TYPE_ENUM", - 15: "TYPE_SFIXED32", - 16: "TYPE_SFIXED64", - 17: "TYPE_SINT32", - 18: "TYPE_SINT64", -} -var FieldDescriptorProto_Type_value = map[string]int32{ - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18, -} - -func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { - p := new(FieldDescriptorProto_Type) - *p = x - return p -} -func (x FieldDescriptorProto_Type) String() string { - return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) -} -func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") - if err != nil { - return err - } - *x = FieldDescriptorProto_Type(value) - return nil -} -func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} } - -type FieldDescriptorProto_Label int32 - -const ( - // 0 is reserved for errors - FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 - FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 - FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 -) - -var FieldDescriptorProto_Label_name = map[int32]string{ - 1: "LABEL_OPTIONAL", - 2: "LABEL_REQUIRED", - 3: "LABEL_REPEATED", -} -var FieldDescriptorProto_Label_value = map[string]int32{ - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3, -} - -func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { - p := new(FieldDescriptorProto_Label) - *p = x - return p -} -func (x FieldDescriptorProto_Label) String() string { - return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) -} -func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") - if err != nil { - return err - } - *x = FieldDescriptorProto_Label(value) - return nil -} -func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 1} -} - -// Generated classes can be optimized for speed or code size. -type FileOptions_OptimizeMode int32 - -const ( - FileOptions_SPEED FileOptions_OptimizeMode = 1 - // etc. - FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 - FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 -) - -var FileOptions_OptimizeMode_name = map[int32]string{ - 1: "SPEED", - 2: "CODE_SIZE", - 3: "LITE_RUNTIME", -} -var FileOptions_OptimizeMode_value = map[string]int32{ - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3, -} - -func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { - p := new(FileOptions_OptimizeMode) - *p = x - return p -} -func (x FileOptions_OptimizeMode) String() string { - return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) -} -func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") - if err != nil { - return err - } - *x = FileOptions_OptimizeMode(value) - return nil -} -func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 0} } - -type FieldOptions_CType int32 - -const ( - // Default mode. - FieldOptions_STRING FieldOptions_CType = 0 - FieldOptions_CORD FieldOptions_CType = 1 - FieldOptions_STRING_PIECE FieldOptions_CType = 2 -) - -var FieldOptions_CType_name = map[int32]string{ - 0: "STRING", - 1: "CORD", - 2: "STRING_PIECE", -} -var FieldOptions_CType_value = map[string]int32{ - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2, -} - -func (x FieldOptions_CType) Enum() *FieldOptions_CType { - p := new(FieldOptions_CType) - *p = x - return p -} -func (x FieldOptions_CType) String() string { - return proto.EnumName(FieldOptions_CType_name, int32(x)) -} -func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") - if err != nil { - return err - } - *x = FieldOptions_CType(value) - return nil -} -func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{11, 0} } - -type FieldOptions_JSType int32 - -const ( - // Use the default type. - FieldOptions_JS_NORMAL FieldOptions_JSType = 0 - // Use JavaScript strings. - FieldOptions_JS_STRING FieldOptions_JSType = 1 - // Use JavaScript numbers. - FieldOptions_JS_NUMBER FieldOptions_JSType = 2 -) - -var FieldOptions_JSType_name = map[int32]string{ - 0: "JS_NORMAL", - 1: "JS_STRING", - 2: "JS_NUMBER", -} -var FieldOptions_JSType_value = map[string]int32{ - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2, -} - -func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { - p := new(FieldOptions_JSType) - *p = x - return p -} -func (x FieldOptions_JSType) String() string { - return proto.EnumName(FieldOptions_JSType_name, int32(x)) -} -func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") - if err != nil { - return err - } - *x = FieldOptions_JSType(value) - return nil -} -func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{11, 1} } - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -type FileDescriptorSet struct { - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } -func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorSet) ProtoMessage() {} -func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { - if m != nil { - return m.File - } - return nil -} - -// Describes a complete .proto file. -type FileDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` - // Names of files imported by this file. - Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` - // Indexes of the public imported files in the dependency list above. - PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` - // All top-level definitions in this file. - MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` - Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` - Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } -func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorProto) ProtoMessage() {} -func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *FileDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *FileDescriptorProto) GetPackage() string { - if m != nil && m.Package != nil { - return *m.Package - } - return "" -} - -func (m *FileDescriptorProto) GetDependency() []string { - if m != nil { - return m.Dependency - } - return nil -} - -func (m *FileDescriptorProto) GetPublicDependency() []int32 { - if m != nil { - return m.PublicDependency - } - return nil -} - -func (m *FileDescriptorProto) GetWeakDependency() []int32 { - if m != nil { - return m.WeakDependency - } - return nil -} - -func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto { - if m != nil { - return m.MessageType - } - return nil -} - -func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { - if m != nil { - return m.EnumType - } - return nil -} - -func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto { - if m != nil { - return m.Service - } - return nil -} - -func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { - if m != nil { - return m.Extension - } - return nil -} - -func (m *FileDescriptorProto) GetOptions() *FileOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { - if m != nil { - return m.SourceCodeInfo - } - return nil -} - -func (m *FileDescriptorProto) GetSyntax() string { - if m != nil && m.Syntax != nil { - return *m.Syntax - } - return "" -} - -// Describes a message type. -type DescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` - NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` - ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` - OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` - Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` - ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } -func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto) ProtoMessage() {} -func (*DescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *DescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *DescriptorProto) GetField() []*FieldDescriptorProto { - if m != nil { - return m.Field - } - return nil -} - -func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto { - if m != nil { - return m.Extension - } - return nil -} - -func (m *DescriptorProto) GetNestedType() []*DescriptorProto { - if m != nil { - return m.NestedType - } - return nil -} - -func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto { - if m != nil { - return m.EnumType - } - return nil -} - -func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { - if m != nil { - return m.ExtensionRange - } - return nil -} - -func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { - if m != nil { - return m.OneofDecl - } - return nil -} - -func (m *DescriptorProto) GetOptions() *MessageOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { - if m != nil { - return m.ReservedRange - } - return nil -} - -func (m *DescriptorProto) GetReservedName() []string { - if m != nil { - return m.ReservedName - } - return nil -} - -type DescriptorProto_ExtensionRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } -func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto_ExtensionRange) ProtoMessage() {} -func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{2, 0} -} - -func (m *DescriptorProto_ExtensionRange) GetStart() int32 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -// Range of reserved tag numbers. Reserved tag numbers may not be used by -// fields or extension ranges in the same message. Reserved ranges may -// not overlap. -type DescriptorProto_ReservedRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } -func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto_ReservedRange) ProtoMessage() {} -func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{2, 1} -} - -func (m *DescriptorProto_ReservedRange) GetStart() int32 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *DescriptorProto_ReservedRange) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -// Describes a field within a message. -type FieldDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` - Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` - Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } -func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FieldDescriptorProto) ProtoMessage() {} -func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *FieldDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *FieldDescriptorProto) GetNumber() int32 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { - if m != nil && m.Label != nil { - return *m.Label - } - return FieldDescriptorProto_LABEL_OPTIONAL -} - -func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return FieldDescriptorProto_TYPE_DOUBLE -} - -func (m *FieldDescriptorProto) GetTypeName() string { - if m != nil && m.TypeName != nil { - return *m.TypeName - } - return "" -} - -func (m *FieldDescriptorProto) GetExtendee() string { - if m != nil && m.Extendee != nil { - return *m.Extendee - } - return "" -} - -func (m *FieldDescriptorProto) GetDefaultValue() string { - if m != nil && m.DefaultValue != nil { - return *m.DefaultValue - } - return "" -} - -func (m *FieldDescriptorProto) GetOneofIndex() int32 { - if m != nil && m.OneofIndex != nil { - return *m.OneofIndex - } - return 0 -} - -func (m *FieldDescriptorProto) GetJsonName() string { - if m != nil && m.JsonName != nil { - return *m.JsonName - } - return "" -} - -func (m *FieldDescriptorProto) GetOptions() *FieldOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a oneof. -type OneofDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } -func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*OneofDescriptorProto) ProtoMessage() {} -func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *OneofDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *OneofDescriptorProto) GetOptions() *OneofOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes an enum type. -type EnumDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } -func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*EnumDescriptorProto) ProtoMessage() {} -func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *EnumDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { - if m != nil { - return m.Value - } - return nil -} - -func (m *EnumDescriptorProto) GetOptions() *EnumOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a value within an enum. -type EnumValueDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } -func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*EnumValueDescriptorProto) ProtoMessage() {} -func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *EnumValueDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *EnumValueDescriptorProto) GetNumber() int32 { - if m != nil && m.Number != nil { - return *m.Number - } - return 0 -} - -func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a service. -type ServiceDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } -func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*ServiceDescriptorProto) ProtoMessage() {} -func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } - -func (m *ServiceDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { - if m != nil { - return m.Method - } - return nil -} - -func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions { - if m != nil { - return m.Options - } - return nil -} - -// Describes a method of a service. -type MethodDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` - OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` - Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` - // Identifies if client streams multiple client messages - ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` - // Identifies if server streams multiple server messages - ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } -func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*MethodDescriptorProto) ProtoMessage() {} -func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } - -const Default_MethodDescriptorProto_ClientStreaming bool = false -const Default_MethodDescriptorProto_ServerStreaming bool = false - -func (m *MethodDescriptorProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MethodDescriptorProto) GetInputType() string { - if m != nil && m.InputType != nil { - return *m.InputType - } - return "" -} - -func (m *MethodDescriptorProto) GetOutputType() string { - if m != nil && m.OutputType != nil { - return *m.OutputType - } - return "" -} - -func (m *MethodDescriptorProto) GetOptions() *MethodOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *MethodDescriptorProto) GetClientStreaming() bool { - if m != nil && m.ClientStreaming != nil { - return *m.ClientStreaming - } - return Default_MethodDescriptorProto_ClientStreaming -} - -func (m *MethodDescriptorProto) GetServerStreaming() bool { - if m != nil && m.ServerStreaming != nil { - return *m.ServerStreaming - } - return Default_MethodDescriptorProto_ServerStreaming -} - -type FileOptions struct { - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` - // If set true, then the Java code generator will generate equals() and - // hashCode() methods for all messages defined in the .proto file. - // This increases generated code size, potentially substantially for large - // protos, which may harm a memory-constrained application. - // - In the full runtime this is a speed optimization, as the - // AbstractMessage base class includes reflection-based implementations of - // these methods. - // - In the lite runtime, setting this option changes the semantics of - // equals() and hashCode() to more closely match those of the full runtime; - // the generated methods compute their results based on field values rather - // than object identity. (Implementations should not assume that hashcodes - // will be consistent across runtimes or versions of the protocol compiler.) - JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash,def=0" json:"java_generate_equals_and_hash,omitempty"` - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` - OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` - JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` - PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"` - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` - // Namespace for generated classes; defaults to the package. - CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FileOptions) Reset() { *m = FileOptions{} } -func (m *FileOptions) String() string { return proto.CompactTextString(m) } -func (*FileOptions) ProtoMessage() {} -func (*FileOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } - -var extRange_FileOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_FileOptions -} - -const Default_FileOptions_JavaMultipleFiles bool = false -const Default_FileOptions_JavaGenerateEqualsAndHash bool = false -const Default_FileOptions_JavaStringCheckUtf8 bool = false -const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED -const Default_FileOptions_CcGenericServices bool = false -const Default_FileOptions_JavaGenericServices bool = false -const Default_FileOptions_PyGenericServices bool = false -const Default_FileOptions_Deprecated bool = false -const Default_FileOptions_CcEnableArenas bool = false - -func (m *FileOptions) GetJavaPackage() string { - if m != nil && m.JavaPackage != nil { - return *m.JavaPackage - } - return "" -} - -func (m *FileOptions) GetJavaOuterClassname() string { - if m != nil && m.JavaOuterClassname != nil { - return *m.JavaOuterClassname - } - return "" -} - -func (m *FileOptions) GetJavaMultipleFiles() bool { - if m != nil && m.JavaMultipleFiles != nil { - return *m.JavaMultipleFiles - } - return Default_FileOptions_JavaMultipleFiles -} - -func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { - if m != nil && m.JavaGenerateEqualsAndHash != nil { - return *m.JavaGenerateEqualsAndHash - } - return Default_FileOptions_JavaGenerateEqualsAndHash -} - -func (m *FileOptions) GetJavaStringCheckUtf8() bool { - if m != nil && m.JavaStringCheckUtf8 != nil { - return *m.JavaStringCheckUtf8 - } - return Default_FileOptions_JavaStringCheckUtf8 -} - -func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { - if m != nil && m.OptimizeFor != nil { - return *m.OptimizeFor - } - return Default_FileOptions_OptimizeFor -} - -func (m *FileOptions) GetGoPackage() string { - if m != nil && m.GoPackage != nil { - return *m.GoPackage - } - return "" -} - -func (m *FileOptions) GetCcGenericServices() bool { - if m != nil && m.CcGenericServices != nil { - return *m.CcGenericServices - } - return Default_FileOptions_CcGenericServices -} - -func (m *FileOptions) GetJavaGenericServices() bool { - if m != nil && m.JavaGenericServices != nil { - return *m.JavaGenericServices - } - return Default_FileOptions_JavaGenericServices -} - -func (m *FileOptions) GetPyGenericServices() bool { - if m != nil && m.PyGenericServices != nil { - return *m.PyGenericServices - } - return Default_FileOptions_PyGenericServices -} - -func (m *FileOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_FileOptions_Deprecated -} - -func (m *FileOptions) GetCcEnableArenas() bool { - if m != nil && m.CcEnableArenas != nil { - return *m.CcEnableArenas - } - return Default_FileOptions_CcEnableArenas -} - -func (m *FileOptions) GetObjcClassPrefix() string { - if m != nil && m.ObjcClassPrefix != nil { - return *m.ObjcClassPrefix - } - return "" -} - -func (m *FileOptions) GetCsharpNamespace() string { - if m != nil && m.CsharpNamespace != nil { - return *m.CsharpNamespace - } - return "" -} - -func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type MessageOptions struct { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageOptions) Reset() { *m = MessageOptions{} } -func (m *MessageOptions) String() string { return proto.CompactTextString(m) } -func (*MessageOptions) ProtoMessage() {} -func (*MessageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } - -var extRange_MessageOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MessageOptions -} - -const Default_MessageOptions_MessageSetWireFormat bool = false -const Default_MessageOptions_NoStandardDescriptorAccessor bool = false -const Default_MessageOptions_Deprecated bool = false - -func (m *MessageOptions) GetMessageSetWireFormat() bool { - if m != nil && m.MessageSetWireFormat != nil { - return *m.MessageSetWireFormat - } - return Default_MessageOptions_MessageSetWireFormat -} - -func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool { - if m != nil && m.NoStandardDescriptorAccessor != nil { - return *m.NoStandardDescriptorAccessor - } - return Default_MessageOptions_NoStandardDescriptorAccessor -} - -func (m *MessageOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_MessageOptions_Deprecated -} - -func (m *MessageOptions) GetMapEntry() bool { - if m != nil && m.MapEntry != nil { - return *m.MapEntry - } - return false -} - -func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type FieldOptions struct { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). By default these types are - // represented as JavaScript strings. This avoids loss of precision that can - // happen when a large value is converted to a floating point JavaScript - // numbers. Specifying JS_NUMBER for the jstype causes the generated - // JavaScript code to use the JavaScript "number" type instead of strings. - // This option is an enum to permit additional types to be added, - // e.g. goog.math.Integer. - Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outher message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // For Google-internal migration only. Do not use. - Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FieldOptions) Reset() { *m = FieldOptions{} } -func (m *FieldOptions) String() string { return proto.CompactTextString(m) } -func (*FieldOptions) ProtoMessage() {} -func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } - -var extRange_FieldOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_FieldOptions -} - -const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING -const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL -const Default_FieldOptions_Lazy bool = false -const Default_FieldOptions_Deprecated bool = false -const Default_FieldOptions_Weak bool = false - -func (m *FieldOptions) GetCtype() FieldOptions_CType { - if m != nil && m.Ctype != nil { - return *m.Ctype - } - return Default_FieldOptions_Ctype -} - -func (m *FieldOptions) GetPacked() bool { - if m != nil && m.Packed != nil { - return *m.Packed - } - return false -} - -func (m *FieldOptions) GetJstype() FieldOptions_JSType { - if m != nil && m.Jstype != nil { - return *m.Jstype - } - return Default_FieldOptions_Jstype -} - -func (m *FieldOptions) GetLazy() bool { - if m != nil && m.Lazy != nil { - return *m.Lazy - } - return Default_FieldOptions_Lazy -} - -func (m *FieldOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_FieldOptions_Deprecated -} - -func (m *FieldOptions) GetWeak() bool { - if m != nil && m.Weak != nil { - return *m.Weak - } - return Default_FieldOptions_Weak -} - -func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type OneofOptions struct { - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OneofOptions) Reset() { *m = OneofOptions{} } -func (m *OneofOptions) String() string { return proto.CompactTextString(m) } -func (*OneofOptions) ProtoMessage() {} -func (*OneofOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -var extRange_OneofOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OneofOptions -} - -func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type EnumOptions struct { - // Set this option to true to allow mapping different tag names to the same - // value. - AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumOptions) Reset() { *m = EnumOptions{} } -func (m *EnumOptions) String() string { return proto.CompactTextString(m) } -func (*EnumOptions) ProtoMessage() {} -func (*EnumOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } - -var extRange_EnumOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_EnumOptions -} - -const Default_EnumOptions_Deprecated bool = false - -func (m *EnumOptions) GetAllowAlias() bool { - if m != nil && m.AllowAlias != nil { - return *m.AllowAlias - } - return false -} - -func (m *EnumOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_EnumOptions_Deprecated -} - -func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type EnumValueOptions struct { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } -func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } -func (*EnumValueOptions) ProtoMessage() {} -func (*EnumValueOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } - -var extRange_EnumValueOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_EnumValueOptions -} - -const Default_EnumValueOptions_Deprecated bool = false - -func (m *EnumValueOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_EnumValueOptions_Deprecated -} - -func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type ServiceOptions struct { - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } -func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } -func (*ServiceOptions) ProtoMessage() {} -func (*ServiceOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } - -var extRange_ServiceOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ServiceOptions -} - -const Default_ServiceOptions_Deprecated bool = false - -func (m *ServiceOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_ServiceOptions_Deprecated -} - -func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -type MethodOptions struct { - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MethodOptions) Reset() { *m = MethodOptions{} } -func (m *MethodOptions) String() string { return proto.CompactTextString(m) } -func (*MethodOptions) ProtoMessage() {} -func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } - -var extRange_MethodOptions = []proto.ExtensionRange{ - {1000, 536870911}, -} - -func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MethodOptions -} - -const Default_MethodOptions_Deprecated bool = false - -func (m *MethodOptions) GetDeprecated() bool { - if m != nil && m.Deprecated != nil { - return *m.Deprecated - } - return Default_MethodOptions_Deprecated -} - -func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { - if m != nil { - return m.UninterpretedOption - } - return nil -} - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -type UninterpretedOption struct { - Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` - PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` - NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` - StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` - AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } -func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } -func (*UninterpretedOption) ProtoMessage() {} -func (*UninterpretedOption) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } - -func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { - if m != nil { - return m.Name - } - return nil -} - -func (m *UninterpretedOption) GetIdentifierValue() string { - if m != nil && m.IdentifierValue != nil { - return *m.IdentifierValue - } - return "" -} - -func (m *UninterpretedOption) GetPositiveIntValue() uint64 { - if m != nil && m.PositiveIntValue != nil { - return *m.PositiveIntValue - } - return 0 -} - -func (m *UninterpretedOption) GetNegativeIntValue() int64 { - if m != nil && m.NegativeIntValue != nil { - return *m.NegativeIntValue - } - return 0 -} - -func (m *UninterpretedOption) GetDoubleValue() float64 { - if m != nil && m.DoubleValue != nil { - return *m.DoubleValue - } - return 0 -} - -func (m *UninterpretedOption) GetStringValue() []byte { - if m != nil { - return m.StringValue - } - return nil -} - -func (m *UninterpretedOption) GetAggregateValue() string { - if m != nil && m.AggregateValue != nil { - return *m.AggregateValue - } - return "" -} - -// The name of the uninterpreted option. Each string represents a segment in -// a dot-separated name. is_extension is true iff a segment represents an -// extension (denoted with parentheses in options specs in .proto files). -// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents -// "foo.(bar.baz).qux". -type UninterpretedOption_NamePart struct { - NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } -func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } -func (*UninterpretedOption_NamePart) ProtoMessage() {} -func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{17, 0} -} - -func (m *UninterpretedOption_NamePart) GetNamePart() string { - if m != nil && m.NamePart != nil { - return *m.NamePart - } - return "" -} - -func (m *UninterpretedOption_NamePart) GetIsExtension() bool { - if m != nil && m.IsExtension != nil { - return *m.IsExtension - } - return false -} - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -type SourceCodeInfo struct { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } -func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } -func (*SourceCodeInfo) ProtoMessage() {} -func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } - -func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { - if m != nil { - return m.Location - } - return nil -} - -type SourceCodeInfo_Location struct { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` - TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` - LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } -func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } -func (*SourceCodeInfo_Location) ProtoMessage() {} -func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18, 0} } - -func (m *SourceCodeInfo_Location) GetPath() []int32 { - if m != nil { - return m.Path - } - return nil -} - -func (m *SourceCodeInfo_Location) GetSpan() []int32 { - if m != nil { - return m.Span - } - return nil -} - -func (m *SourceCodeInfo_Location) GetLeadingComments() string { - if m != nil && m.LeadingComments != nil { - return *m.LeadingComments - } - return "" -} - -func (m *SourceCodeInfo_Location) GetTrailingComments() string { - if m != nil && m.TrailingComments != nil { - return *m.TrailingComments - } - return "" -} - -func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { - if m != nil { - return m.LeadingDetachedComments - } - return nil -} - -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. -type GeneratedCodeInfo struct { - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } -func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } -func (*GeneratedCodeInfo) ProtoMessage() {} -func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } - -func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { - if m != nil { - return m.Annotation - } - return nil -} - -type GeneratedCodeInfo_Annotation struct { - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` - // Identifies the filesystem path to the original source .proto. - SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` - // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past - // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} } -func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } -func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} -func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{19, 0} -} - -func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 { - if m != nil { - return m.Path - } - return nil -} - -func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string { - if m != nil && m.SourceFile != nil { - return *m.SourceFile - } - return "" -} - -func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 { - if m != nil && m.Begin != nil { - return *m.Begin - } - return 0 -} - -func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -func init() { - proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") - proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") - proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") - proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") - proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") - proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") - proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") - proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") - proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") - proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") - proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") - proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions") - proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions") - proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions") - proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions") - proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions") - proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions") - proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions") - proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions") - proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption") - proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart") - proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo") - proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") - proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo") - proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") - proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) - proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) - proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) - proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) - proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) -} - -func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 2287 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x73, 0xdb, 0xc6, - 0x15, 0x0f, 0xf8, 0x25, 0xf2, 0x91, 0xa2, 0x56, 0x2b, 0xc5, 0x86, 0xe5, 0x38, 0x96, 0x19, 0x3b, - 0x96, 0xed, 0x96, 0xce, 0xc8, 0x1f, 0x71, 0x94, 0x4e, 0x3a, 0x94, 0x08, 0x2b, 0xf4, 0x50, 0x22, - 0x0b, 0x4a, 0xad, 0x93, 0x1e, 0x30, 0x2b, 0x60, 0x49, 0xc1, 0x06, 0x17, 0x28, 0x00, 0xda, 0x56, - 0x4e, 0x9e, 0xe9, 0xa9, 0xc7, 0xde, 0x3a, 0x6d, 0xa7, 0xd3, 0xc9, 0x25, 0x33, 0xfd, 0x03, 0x7a, - 0xe8, 0xbd, 0xd7, 0xce, 0xf4, 0xde, 0x63, 0x67, 0xda, 0xff, 0xa0, 0xd7, 0xce, 0xee, 0x02, 0x20, - 0xf8, 0x15, 0xab, 0x99, 0x49, 0xd2, 0x93, 0xb8, 0xbf, 0xf7, 0x7b, 0x0f, 0x6f, 0xdf, 0x3e, 0xbc, - 0xf7, 0xb0, 0x82, 0xcd, 0x81, 0xeb, 0x0e, 0x1c, 0x7a, 0xd7, 0xf3, 0xdd, 0xd0, 0x3d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0xac, - 0x22, 0xad, 0x74, 0x0f, 0xc9, 0x2e, 0x9a, 0x36, 0xa4, 0x37, 0x33, 0x9e, 0xfe, 0x2a, 0x03, 0x6f, - 0xcf, 0x35, 0x3e, 0xd7, 0xd1, 0x2b, 0x00, 0x36, 0xf3, 0x46, 0xa1, 0x6c, 0xc8, 0xb2, 0x3e, 0x95, - 0x04, 0x22, 0xde, 0x7d, 0x5e, 0x7b, 0x46, 0x61, 0x22, 0xcf, 0x0a, 0x39, 0x48, 0x48, 0x10, 0x1e, - 0x8d, 0x1d, 0xcd, 0x09, 0x47, 0xdf, 0x5d, 0xb0, 0xd3, 0x99, 0x5e, 0xf7, 0x01, 0x20, 0xd3, 0xb1, - 0x29, 0x0b, 0x8d, 0x20, 0xf4, 0x29, 0x19, 0xda, 0x6c, 0x20, 0x0a, 0x70, 0x71, 0x27, 0xdf, 0x27, - 0x4e, 0x40, 0xf5, 0x15, 0x29, 0xee, 0xc5, 0x52, 0xae, 0x21, 0xba, 0x8c, 0x9f, 0xd2, 0x28, 0x4c, - 0x68, 0x48, 0x71, 0xa2, 0x51, 0xfb, 0xf5, 0x12, 0x94, 0x53, 0x63, 0x1d, 0xbe, 0x06, 0x95, 0x67, - 0xe4, 0x05, 0x31, 0xe2, 0x51, 0x5d, 0x46, 0xa2, 0xcc, 0xb1, 0x6e, 0x34, 0xae, 0x7f, 0x00, 0xeb, - 0x82, 0xe2, 0x8e, 0x42, 0xea, 0x1b, 0xa6, 0x43, 0x82, 0x40, 0x04, 0xad, 0x28, 0xa8, 0x98, 0xcb, - 0x3a, 0x5c, 0xb4, 0x17, 0x4b, 0xf0, 0x03, 0x58, 0x13, 0x1a, 0xc3, 0x91, 0x13, 0xda, 0x9e, 0x43, - 0x0d, 0xfe, 0xf1, 0x10, 0x88, 0x42, 0x9c, 0x78, 0xb6, 0xca, 0x19, 0x07, 0x11, 0x81, 0x7b, 0x14, - 0xe0, 0x7d, 0xb8, 0x22, 0xd4, 0x06, 0x94, 0x51,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x84, - 0xcd, 0xe8, 0x80, 0x4c, 0xb1, 0x79, 0xed, 0xcb, 0xea, 0x28, 0x96, 0x24, 0xec, 0x6b, 0x50, 0xb1, - 0xdc, 0x11, 0x1f, 0x22, 0x24, 0x8f, 0x97, 0x5a, 0x45, 0x2f, 0x4b, 0x2c, 0xa1, 0x44, 0x53, 0xde, - 0xf8, 0xba, 0xa0, 0xa2, 0x97, 0x25, 0x26, 0x29, 0x37, 0x61, 0x85, 0x0c, 0x06, 0x3e, 0x37, 0x1e, - 0x1b, 0x92, 0xa3, 0x6b, 0x35, 0x81, 0x05, 0x71, 0xe3, 0x09, 0x14, 0xe3, 0x38, 0xf0, 0x6e, 0xc6, - 0x23, 0x61, 0x78, 0xf2, 0xd2, 0x26, 0xb3, 0x55, 0xd2, 0x8b, 0x2c, 0x16, 0x5e, 0x83, 0x8a, 0x1d, - 0x18, 0xe3, 0xdb, 0xc3, 0xcc, 0x66, 0x66, 0xab, 0xa8, 0x97, 0xed, 0x20, 0xb9, 0x2e, 0xaa, 0x7d, - 0x95, 0x81, 0xea, 0xe4, 0xed, 0x27, 0x6e, 0x42, 0xd1, 0x71, 0x4d, 0x22, 0x12, 0x41, 0x5e, 0xbd, - 0x6f, 0xbd, 0xe1, 0xc2, 0xb4, 0xde, 0x8e, 0xf8, 0x7a, 0xa2, 0xb9, 0xf1, 0x37, 0x05, 0x8a, 0x31, - 0x8c, 0x2f, 0x40, 0xce, 0x23, 0xe1, 0xa9, 0x30, 0x97, 0xdf, 0xcd, 0x20, 0x45, 0x17, 0x6b, 0x8e, - 0x07, 0x1e, 0x61, 0x22, 0x05, 0x22, 0x9c, 0xaf, 0xf9, 0xb9, 0x3a, 0x94, 0x58, 0x62, 0x28, 0x76, - 0x87, 0x43, 0xca, 0xc2, 0x20, 0x3e, 0xd7, 0x08, 0xdf, 0x8b, 0x60, 0x7c, 0x07, 0x56, 0x43, 0x9f, - 0xd8, 0xce, 0x04, 0x37, 0x27, 0xb8, 0x28, 0x16, 0x24, 0xe4, 0x1d, 0xb8, 0x14, 0xdb, 0xb5, 0x68, - 0x48, 0xcc, 0x53, 0x6a, 0x8d, 0x95, 0x0a, 0xe2, 0x6a, 0xed, 0x62, 0x44, 0x68, 0x46, 0xf2, 0x58, - 0xb7, 0xf6, 0x77, 0x05, 0x56, 0xe3, 0x31, 0xde, 0x4a, 0x82, 0x75, 0x00, 0x40, 0x18, 0x73, 0xc3, - 0x74, 0xb8, 0x66, 0x53, 0x79, 0x46, 0xaf, 0xde, 0x48, 0x94, 0xf4, 0x94, 0x81, 0x8d, 0x21, 0xc0, - 0x58, 0xb2, 0x30, 0x6c, 0x57, 0xa1, 0x1c, 0x5d, 0x6d, 0x8b, 0xff, 0x8f, 0xc8, 0x6f, 0x3f, 0x90, - 0x10, 0x9f, 0xf7, 0xf1, 0x3a, 0xe4, 0x4f, 0xe8, 0xc0, 0x66, 0xd1, 0x85, 0x9b, 0x5c, 0xc4, 0xd7, - 0x78, 0xb9, 0xe4, 0x1a, 0x6f, 0xf7, 0xe7, 0xb0, 0x66, 0xba, 0xc3, 0x69, 0x77, 0x77, 0xd1, 0xd4, - 0xf7, 0x67, 0xf0, 0xa9, 0xf2, 0x39, 0x8c, 0xa7, 0xb3, 0x3f, 0x2a, 0xca, 0x97, 0x99, 0xec, 0x7e, - 0x77, 0xf7, 0x4f, 0x99, 0x8d, 0x7d, 0xa9, 0xda, 0x8d, 0x77, 0xaa, 0xd3, 0xbe, 0x43, 0x4d, 0xee, - 0xfd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x05, 0x54, 0xc8, 0x7d, 0x07, 0x1a, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go deleted file mode 100644 index 0d6055d6..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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-go - That word 'go' 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 --go_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 documentation diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile deleted file mode 100644 index b5715c35..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile +++ /dev/null @@ -1,40 +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. - -include $(GOROOT)/src/Make.inc - -TARG=github.com/golang/protobuf/compiler/generator -GOFILES=\ - generator.go\ - -DEPS=../descriptor ../plugin ../../proto - -include $(GOROOT)/src/Make.pkg diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go deleted file mode 100644 index 4d7d19b6..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go +++ /dev/null @@ -1,2808 +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. - -/* - The code generator for the plugin for the Google protocol buffer compiler. - It generates Go code from the protocol buffer description files read by the - main routine. -*/ -package generator - -import ( - "bufio" - "bytes" - "compress/gzip" - "fmt" - "go/parser" - "go/printer" - "go/token" - "log" - "os" - "path" - "strconv" - "strings" - "unicode" - "unicode/utf8" - - "github.com/golang/protobuf/proto" - - "github.com/golang/protobuf/protoc-gen-go/descriptor" - plugin "github.com/golang/protobuf/protoc-gen-go/plugin" -) - -// generatedCodeVersion indicates a version of the generated code. -// It is incremented whenever an incompatibility between the generated code and -// proto package is introduced; the generated code references -// a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion). -const generatedCodeVersion = 2 - -// A Plugin provides functionality to add to the output during Go code generation, -// such as to produce RPC stubs. -type Plugin interface { - // Name identifies the plugin. - Name() string - // Init is called once after data structures are built but before - // code generation begins. - Init(g *Generator) - // Generate produces the code generated by the plugin for this file, - // except for the imports, by calling the generator's methods P, In, and Out. - Generate(file *FileDescriptor) - // GenerateImports produces the import declarations for this file. - // It is called after Generate. - GenerateImports(file *FileDescriptor) -} - -var plugins []Plugin - -// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated. -// It is typically called during initialization. -func RegisterPlugin(p Plugin) { - plugins = append(plugins, p) -} - -// Each type we import as a protocol buffer (other than FileDescriptorProto) needs -// a pointer to the FileDescriptorProto that represents it. These types achieve that -// wrapping by placing each Proto inside a struct with the pointer to its File. The -// structs have the same names as their contents, with "Proto" removed. -// FileDescriptor is used to store the things that it points to. - -// The file and package name method are common to messages and enums. -type common struct { - file *descriptor.FileDescriptorProto // File this object comes from. -} - -// PackageName is name in the package clause in the generated file. -func (c *common) PackageName() string { return uniquePackageOf(c.file) } - -func (c *common) File() *descriptor.FileDescriptorProto { return c.file } - -func fileIsProto3(file *descriptor.FileDescriptorProto) bool { - return file.GetSyntax() == "proto3" -} - -func (c *common) proto3() bool { return fileIsProto3(c.file) } - -// Descriptor represents a protocol buffer message. -type Descriptor struct { - common - *descriptor.DescriptorProto - parent *Descriptor // The containing message, if any. - nested []*Descriptor // Inner messages, if any. - enums []*EnumDescriptor // Inner enums, if any. - ext []*ExtensionDescriptor // Extensions, if any. - typename []string // Cached typename vector. - index int // The index into the container, whether the file or another message. - path string // The SourceCodeInfo path as comma-separated integers. - group bool -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (d *Descriptor) TypeName() []string { - if d.typename != nil { - return d.typename - } - n := 0 - for parent := d; parent != nil; parent = parent.parent { - n++ - } - s := make([]string, n, n) - for parent := d; parent != nil; parent = parent.parent { - n-- - s[n] = parent.GetName() - } - d.typename = s - return s -} - -// EnumDescriptor describes an enum. If it's at top level, its parent will be nil. -// Otherwise it will be the descriptor of the message in which it is defined. -type EnumDescriptor struct { - common - *descriptor.EnumDescriptorProto - parent *Descriptor // The containing message, if any. - typename []string // Cached typename vector. - index int // The index into the container, whether the file or a message. - path string // The SourceCodeInfo path as comma-separated integers. -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (e *EnumDescriptor) TypeName() (s []string) { - if e.typename != nil { - return e.typename - } - name := e.GetName() - if e.parent == nil { - s = make([]string, 1) - } else { - pname := e.parent.TypeName() - s = make([]string, len(pname)+1) - copy(s, pname) - } - s[len(s)-1] = name - e.typename = s - return s -} - -// Everything but the last element of the full type name, CamelCased. -// The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... . -func (e *EnumDescriptor) prefix() string { - if e.parent == nil { - // If the enum is not part of a message, the prefix is just the type name. - return CamelCase(*e.Name) + "_" - } - typeName := e.TypeName() - return CamelCaseSlice(typeName[0:len(typeName)-1]) + "_" -} - -// The integer value of the named constant in this enumerated type. -func (e *EnumDescriptor) integerValueAsString(name string) string { - for _, c := range e.Value { - if c.GetName() == name { - return fmt.Sprint(c.GetNumber()) - } - } - log.Fatal("cannot find value for enum constant") - return "" -} - -// ExtensionDescriptor describes an extension. If it's at top level, its parent will be nil. -// Otherwise it will be the descriptor of the message in which it is defined. -type ExtensionDescriptor struct { - common - *descriptor.FieldDescriptorProto - parent *Descriptor // The containing message, if any. -} - -// TypeName returns the elements of the dotted type name. -// The package name is not part of this name. -func (e *ExtensionDescriptor) TypeName() (s []string) { - name := e.GetName() - if e.parent == nil { - // top-level extension - s = make([]string, 1) - } else { - pname := e.parent.TypeName() - s = make([]string, len(pname)+1) - copy(s, pname) - } - s[len(s)-1] = name - return s -} - -// DescName returns the variable name used for the generated descriptor. -func (e *ExtensionDescriptor) DescName() string { - // The full type name. - typeName := e.TypeName() - // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix. - for i, s := range typeName { - typeName[i] = CamelCase(s) - } - return "E_" + strings.Join(typeName, "_") -} - -// ImportedDescriptor describes a type that has been publicly imported from another file. -type ImportedDescriptor struct { - common - o Object -} - -func (id *ImportedDescriptor) TypeName() []string { return id.o.TypeName() } - -// FileDescriptor describes an protocol buffer descriptor file (.proto). -// It includes slices of all the messages and enums defined within it. -// Those slices are constructed by WrapTypes. -type FileDescriptor struct { - *descriptor.FileDescriptorProto - desc []*Descriptor // All the messages defined in this file. - enum []*EnumDescriptor // All the enums defined in this file. - ext []*ExtensionDescriptor // All the top-level extensions defined in this file. - imp []*ImportedDescriptor // All types defined in files publicly imported by this file. - - // Comments, stored as a map of path (comma-separated integers) to the comment. - comments map[string]*descriptor.SourceCodeInfo_Location - - // The full list of symbols that are exported, - // as a map from the exported object to its symbols. - // This is used for supporting public imports. - exported map[Object][]symbol - - index int // The index of this file in the list of files to generate code for - - proto3 bool // whether to generate proto3 code for this file -} - -// PackageName is the package name we'll use in the generated code to refer to this file. -func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) } - -// VarName is the variable name we'll use in the generated code to refer -// to the compressed bytes of this descriptor. It is not exported, so -// it is only valid inside the generated package. -func (d *FileDescriptor) VarName() string { return fmt.Sprintf("fileDescriptor%d", d.index) } - -// goPackageOption interprets the file's go_package option. -// If there is no go_package, it returns ("", "", false). -// If there's a simple name, it returns ("", pkg, true). -// If the option implies an import path, it returns (impPath, pkg, true). -func (d *FileDescriptor) goPackageOption() (impPath, pkg string, ok bool) { - pkg = d.GetOptions().GetGoPackage() - if pkg == "" { - return - } - ok = true - // The presence of a slash implies there's an import path. - slash := strings.LastIndex(pkg, "/") - if slash < 0 { - return - } - impPath, pkg = pkg, pkg[slash+1:] - // A semicolon-delimited suffix overrides the package name. - sc := strings.IndexByte(impPath, ';') - if sc < 0 { - return - } - impPath, pkg = impPath[:sc], impPath[sc+1:] - return -} - -// goPackageName returns the Go package name to use in the -// generated Go file. The result explicit reports whether the name -// came from an option go_package statement. If explicit is false, -// the name was derived from the protocol buffer's package statement -// or the input file name. -func (d *FileDescriptor) goPackageName() (name string, explicit bool) { - // Does the file have a "go_package" option? - if _, pkg, ok := d.goPackageOption(); ok { - return pkg, true - } - - // Does the file have a package clause? - if pkg := d.GetPackage(); pkg != "" { - return pkg, false - } - // Use the file base name. - return baseName(d.GetName()), false -} - -// goFileName returns the output name for the generated Go file. -func (d *FileDescriptor) goFileName() string { - name := *d.Name - if ext := path.Ext(name); ext == ".proto" || ext == ".protodevel" { - name = name[:len(name)-len(ext)] - } - name += ".pb.go" - - // Does the file have a "go_package" option? - // If it does, it may override the filename. - if impPath, _, ok := d.goPackageOption(); ok && impPath != "" { - // Replace the existing dirname with the declared import path. - _, name = path.Split(name) - name = path.Join(impPath, name) - return name - } - - return name -} - -func (d *FileDescriptor) addExport(obj Object, sym symbol) { - d.exported[obj] = append(d.exported[obj], sym) -} - -// symbol is an interface representing an exported Go symbol. -type symbol interface { - // GenerateAlias should generate an appropriate alias - // for the symbol from the named package. - GenerateAlias(g *Generator, pkg string) -} - -type messageSymbol struct { - sym string - hasExtensions, isMessageSet bool - hasOneof bool - getters []getterSymbol -} - -type getterSymbol struct { - name string - typ string - typeName string // canonical name in proto world; empty for proto.Message and similar - genType bool // whether typ contains a generated type (message/group/enum) -} - -func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) { - remoteSym := pkg + "." + ms.sym - - g.P("type ", ms.sym, " ", remoteSym) - g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }") - g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }") - g.P("func (*", ms.sym, ") ProtoMessage() {}") - if ms.hasExtensions { - g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ", - "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }") - if ms.isMessageSet { - g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ", - "{ return (*", remoteSym, ")(m).Marshal() }") - g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ", - "{ return (*", remoteSym, ")(m).Unmarshal(buf) }") - } - } - if ms.hasOneof { - // Oneofs and public imports do not mix well. - // We can make them work okay for the binary format, - // but they're going to break weirdly for text/JSON. - enc := "_" + ms.sym + "_OneofMarshaler" - dec := "_" + ms.sym + "_OneofUnmarshaler" - size := "_" + ms.sym + "_OneofSizer" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - sizeSig := "(msg " + g.Pkg["proto"] + ".Message) int" - g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", ", size, ", nil") - g.P("}") - - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("enc, _, _, _ := m0.XXX_OneofFuncs()") - g.P("return enc(m0, b)") - g.P("}") - - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("_, dec, _, _ := m0.XXX_OneofFuncs()") - g.P("return dec(m0, tag, wire, b)") - g.P("}") - - g.P("func ", size, sizeSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("_, _, size, _ := m0.XXX_OneofFuncs()") - g.P("return size(m0)") - g.P("}") - } - for _, get := range ms.getters { - - if get.typeName != "" { - g.RecordTypeUse(get.typeName) - } - typ := get.typ - val := "(*" + remoteSym + ")(m)." + get.name + "()" - if get.genType { - // typ will be "*pkg.T" (message/group) or "pkg.T" (enum) - // or "map[t]*pkg.T" (map to message/enum). - // The first two of those might have a "[]" prefix if it is repeated. - // Drop any package qualifier since we have hoisted the type into this package. - rep := strings.HasPrefix(typ, "[]") - if rep { - typ = typ[2:] - } - isMap := strings.HasPrefix(typ, "map[") - star := typ[0] == '*' - if !isMap { // map types handled lower down - typ = typ[strings.Index(typ, ".")+1:] - } - if star { - typ = "*" + typ - } - if rep { - // Go does not permit conversion between slice types where both - // element types are named. That means we need to generate a bit - // of code in this situation. - // typ is the element type. - // val is the expression to get the slice from the imported type. - - ctyp := typ // conversion type expression; "Foo" or "(*Foo)" - if star { - ctyp = "(" + typ + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {") - g.In() - g.P("o := ", val) - g.P("if o == nil {") - g.In() - g.P("return nil") - g.Out() - g.P("}") - g.P("s := make([]", typ, ", len(o))") - g.P("for i, x := range o {") - g.In() - g.P("s[i] = ", ctyp, "(x)") - g.Out() - g.P("}") - g.P("return s") - g.Out() - g.P("}") - continue - } - if isMap { - // Split map[keyTyp]valTyp. - bra, ket := strings.Index(typ, "["), strings.Index(typ, "]") - keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:] - // Drop any package qualifier. - // Only the value type may be foreign. - star := valTyp[0] == '*' - valTyp = valTyp[strings.Index(valTyp, ".")+1:] - if star { - valTyp = "*" + valTyp - } - - typ := "map[" + keyTyp + "]" + valTyp - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {") - g.P("o := ", val) - g.P("if o == nil { return nil }") - g.P("s := make(", typ, ", len(o))") - g.P("for k, v := range o {") - g.P("s[k] = (", valTyp, ")(v)") - g.P("}") - g.P("return s") - g.P("}") - continue - } - // Convert imported type into the forwarding type. - val = "(" + typ + ")(" + val + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }") - } - -} - -type enumSymbol struct { - name string - proto3 bool // Whether this came from a proto3 file. -} - -func (es enumSymbol) GenerateAlias(g *Generator, pkg string) { - s := es.name - g.P("type ", s, " ", pkg, ".", s) - g.P("var ", s, "_name = ", pkg, ".", s, "_name") - g.P("var ", s, "_value = ", pkg, ".", s, "_value") - g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }") - if !es.proto3 { - g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }") - g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }") - } -} - -type constOrVarSymbol struct { - sym string - typ string // either "const" or "var" - cast string // if non-empty, a type cast is required (used for enums) -} - -func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) { - v := pkg + "." + cs.sym - if cs.cast != "" { - v = cs.cast + "(" + v + ")" - } - g.P(cs.typ, " ", cs.sym, " = ", v) -} - -// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects. -type Object interface { - PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness. - TypeName() []string - File() *descriptor.FileDescriptorProto -} - -// Each package name we generate must be unique. The package we're generating -// gets its own name but every other package must have a unique name that does -// not conflict in the code we generate. These names are chosen globally (although -// they don't have to be, it simplifies things to do them globally). -func uniquePackageOf(fd *descriptor.FileDescriptorProto) string { - s, ok := uniquePackageName[fd] - if !ok { - log.Fatal("internal error: no package name defined for " + fd.GetName()) - } - return s -} - -// Generator is the type whose methods generate the output, stored in the associated response structure. -type Generator struct { - *bytes.Buffer - - Request *plugin.CodeGeneratorRequest // The input. - Response *plugin.CodeGeneratorResponse // The output. - - Param map[string]string // Command-line parameters. - PackageImportPath string // Go import path of the package we're generating code for - ImportPrefix string // String to prefix to imported package file names. - ImportMap map[string]string // Mapping from .proto file name to import path - - Pkg map[string]string // The names under which we import support packages - - packageName string // What we're calling ourselves. - allFiles []*FileDescriptor // All files in the tree - allFilesByName map[string]*FileDescriptor // All files by filename. - genFiles []*FileDescriptor // Those files we will generate output for. - file *FileDescriptor // The file we are compiling now. - usedPackages map[string]bool // Names of packages used in current file. - typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. - init []string // Lines to emit in the init function. - indent string - writeOutput bool -} - -// New creates a new generator and allocates the request and response protobufs. -func New() *Generator { - g := new(Generator) - g.Buffer = new(bytes.Buffer) - g.Request = new(plugin.CodeGeneratorRequest) - g.Response = new(plugin.CodeGeneratorResponse) - return g -} - -// Error reports a problem, including an error, and exits the program. -func (g *Generator) Error(err error, msgs ...string) { - s := strings.Join(msgs, " ") + ":" + err.Error() - log.Print("protoc-gen-go: error:", s) - os.Exit(1) -} - -// Fail reports a problem and exits the program. -func (g *Generator) Fail(msgs ...string) { - s := strings.Join(msgs, " ") - log.Print("protoc-gen-go: error:", s) - os.Exit(1) -} - -// CommandLineParameters breaks the comma-separated list of key=value pairs -// in the parameter (a member of the request protobuf) into a key/value map. -// It then sets file name mappings defined by those entries. -func (g *Generator) CommandLineParameters(parameter string) { - g.Param = make(map[string]string) - for _, p := range strings.Split(parameter, ",") { - if i := strings.Index(p, "="); i < 0 { - g.Param[p] = "" - } else { - g.Param[p[0:i]] = p[i+1:] - } - } - - g.ImportMap = make(map[string]string) - pluginList := "none" // Default list of plugin names to enable (empty means all). - for k, v := range g.Param { - switch k { - case "import_prefix": - g.ImportPrefix = v - case "import_path": - g.PackageImportPath = v - case "plugins": - pluginList = v - default: - if len(k) > 0 && k[0] == 'M' { - g.ImportMap[k[1:]] = v - } - } - } - - if pluginList != "" { - // Amend the set of plugins. - enabled := make(map[string]bool) - for _, name := range strings.Split(pluginList, "+") { - enabled[name] = true - } - var nplugins []Plugin - for _, p := range plugins { - if enabled[p.Name()] { - nplugins = append(nplugins, p) - } - } - plugins = nplugins - } -} - -// DefaultPackageName returns the package name printed for the object. -// If its file is in a different package, it returns the package name we're using for this file, plus ".". -// Otherwise it returns the empty string. -func (g *Generator) DefaultPackageName(obj Object) string { - pkg := obj.PackageName() - if pkg == g.packageName { - return "" - } - return pkg + "." -} - -// For each input file, the unique package name to use, underscored. -var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) - -// Package names already registered. Key is the name from the .proto file; -// value is the name that appears in the generated code. -var pkgNamesInUse = make(map[string]bool) - -// Create and remember a guaranteed unique package name for this file descriptor. -// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and -// has no file descriptor. -func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { - // Convert dots to underscores before finding a unique alias. - pkg = strings.Map(badToUnderscore, pkg) - - for i, orig := 1, pkg; pkgNamesInUse[pkg]; i++ { - // It's a duplicate; must rename. - pkg = orig + strconv.Itoa(i) - } - // Install it. - pkgNamesInUse[pkg] = true - if f != nil { - uniquePackageName[f.FileDescriptorProto] = pkg - } - return pkg -} - -var isGoKeyword = map[string]bool{ - "break": true, - "case": true, - "chan": true, - "const": true, - "continue": true, - "default": true, - "else": true, - "defer": true, - "fallthrough": true, - "for": true, - "func": true, - "go": true, - "goto": true, - "if": true, - "import": true, - "interface": true, - "map": true, - "package": true, - "range": true, - "return": true, - "select": true, - "struct": true, - "switch": true, - "type": true, - "var": true, -} - -// defaultGoPackage returns the package name to use, -// derived from the import path of the package we're building code for. -func (g *Generator) defaultGoPackage() string { - p := g.PackageImportPath - if i := strings.LastIndex(p, "/"); i >= 0 { - p = p[i+1:] - } - if p == "" { - return "" - } - - p = strings.Map(badToUnderscore, p) - // Identifier must not be keyword: insert _. - if isGoKeyword[p] { - p = "_" + p - } - // Identifier must not begin with digit: insert _. - if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) { - p = "_" + p - } - return p -} - -// SetPackageNames sets the package name for this run. -// The package name must agree across all files being generated. -// It also defines unique package names for all imported files. -func (g *Generator) SetPackageNames() { - // Register the name for this package. It will be the first name - // registered so is guaranteed to be unmodified. - pkg, explicit := g.genFiles[0].goPackageName() - - // Check all files for an explicit go_package option. - for _, f := range g.genFiles { - thisPkg, thisExplicit := f.goPackageName() - if thisExplicit { - if !explicit { - // Let this file's go_package option serve for all input files. - pkg, explicit = thisPkg, true - } else if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } - } - } - - // If we don't have an explicit go_package option but we have an - // import path, use that. - if !explicit { - p := g.defaultGoPackage() - if p != "" { - pkg, explicit = p, true - } - } - - // If there was no go_package and no import path to use, - // double-check that all the inputs have the same implicit - // Go package name. - if !explicit { - for _, f := range g.genFiles { - thisPkg, _ := f.goPackageName() - if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } - } - } - - g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0]) - - // Register the support package names. They might collide with the - // name of a package we import. - g.Pkg = map[string]string{ - "fmt": RegisterUniquePackageName("fmt", nil), - "math": RegisterUniquePackageName("math", nil), - "proto": RegisterUniquePackageName("proto", nil), - } - -AllFiles: - for _, f := range g.allFiles { - for _, genf := range g.genFiles { - if f == genf { - // In this package already. - uniquePackageName[f.FileDescriptorProto] = g.packageName - continue AllFiles - } - } - // The file is a dependency, so we want to ignore its go_package option - // because that is only relevant for its specific generated output. - pkg := f.GetPackage() - if pkg == "" { - pkg = baseName(*f.Name) - } - RegisterUniquePackageName(pkg, f) - } -} - -// WrapTypes walks the incoming data, wrapping DescriptorProtos, EnumDescriptorProtos -// and FileDescriptorProtos into file-referenced objects within the Generator. -// It also creates the list of files to generate and so should be called before GenerateAllFiles. -func (g *Generator) WrapTypes() { - g.allFiles = make([]*FileDescriptor, 0, len(g.Request.ProtoFile)) - g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles)) - for _, f := range g.Request.ProtoFile { - // We must wrap the descriptors before we wrap the enums - descs := wrapDescriptors(f) - g.buildNestedDescriptors(descs) - enums := wrapEnumDescriptors(f, descs) - g.buildNestedEnums(descs, enums) - exts := wrapExtensions(f) - fd := &FileDescriptor{ - FileDescriptorProto: f, - desc: descs, - enum: enums, - ext: exts, - exported: make(map[Object][]symbol), - proto3: fileIsProto3(f), - } - extractComments(fd) - g.allFiles = append(g.allFiles, fd) - g.allFilesByName[f.GetName()] = fd - } - for _, fd := range g.allFiles { - fd.imp = wrapImported(fd.FileDescriptorProto, g) - } - - g.genFiles = make([]*FileDescriptor, 0, len(g.Request.FileToGenerate)) - for _, fileName := range g.Request.FileToGenerate { - fd := g.allFilesByName[fileName] - if fd == nil { - g.Fail("could not find file named", fileName) - } - fd.index = len(g.genFiles) - g.genFiles = append(g.genFiles, fd) - } -} - -// Scan the descriptors in this file. For each one, build the slice of nested descriptors -func (g *Generator) buildNestedDescriptors(descs []*Descriptor) { - for _, desc := range descs { - if len(desc.NestedType) != 0 { - for _, nest := range descs { - if nest.parent == desc { - desc.nested = append(desc.nested, nest) - } - } - if len(desc.nested) != len(desc.NestedType) { - g.Fail("internal error: nesting failure for", desc.GetName()) - } - } - } -} - -func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescriptor) { - for _, desc := range descs { - if len(desc.EnumType) != 0 { - for _, enum := range enums { - if enum.parent == desc { - desc.enums = append(desc.enums, enum) - } - } - if len(desc.enums) != len(desc.EnumType) { - g.Fail("internal error: enum nesting failure for", desc.GetName()) - } - } - } -} - -// Construct the Descriptor -func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor { - d := &Descriptor{ - common: common{file}, - DescriptorProto: desc, - parent: parent, - index: index, - } - if parent == nil { - d.path = fmt.Sprintf("%d,%d", messagePath, index) - } else { - d.path = fmt.Sprintf("%s,%d,%d", parent.path, messageMessagePath, index) - } - - // The only way to distinguish a group from a message is whether - // the containing message has a TYPE_GROUP field that matches. - if parent != nil { - parts := d.TypeName() - if file.Package != nil { - parts = append([]string{*file.Package}, parts...) - } - exp := "." + strings.Join(parts, ".") - for _, field := range parent.Field { - if field.GetType() == descriptor.FieldDescriptorProto_TYPE_GROUP && field.GetTypeName() == exp { - d.group = true - break - } - } - } - - for _, field := range desc.Extension { - d.ext = append(d.ext, &ExtensionDescriptor{common{file}, field, d}) - } - - return d -} - -// Return a slice of all the Descriptors defined within this file -func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor { - sl := make([]*Descriptor, 0, len(file.MessageType)+10) - for i, desc := range file.MessageType { - sl = wrapThisDescriptor(sl, desc, nil, file, i) - } - return sl -} - -// Wrap this Descriptor, recursively -func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor { - sl = append(sl, newDescriptor(desc, parent, file, index)) - me := sl[len(sl)-1] - for i, nested := range desc.NestedType { - sl = wrapThisDescriptor(sl, nested, me, file, i) - } - return sl -} - -// Construct the EnumDescriptor -func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor { - ed := &EnumDescriptor{ - common: common{file}, - EnumDescriptorProto: desc, - parent: parent, - index: index, - } - if parent == nil { - ed.path = fmt.Sprintf("%d,%d", enumPath, index) - } else { - ed.path = fmt.Sprintf("%s,%d,%d", parent.path, messageEnumPath, index) - } - return ed -} - -// Return a slice of all the EnumDescriptors defined within this file -func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor { - sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10) - // Top-level enums. - for i, enum := range file.EnumType { - sl = append(sl, newEnumDescriptor(enum, nil, file, i)) - } - // Enums within messages. Enums within embedded messages appear in the outer-most message. - for _, nested := range descs { - for i, enum := range nested.EnumType { - sl = append(sl, newEnumDescriptor(enum, nested, file, i)) - } - } - return sl -} - -// Return a slice of all the top-level ExtensionDescriptors defined within this file. -func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor { - var sl []*ExtensionDescriptor - for _, field := range file.Extension { - sl = append(sl, &ExtensionDescriptor{common{file}, field, nil}) - } - return sl -} - -// Return a slice of all the types that are publicly imported into this file. -func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) { - for _, index := range file.PublicDependency { - df := g.fileByName(file.Dependency[index]) - for _, d := range df.desc { - if d.GetOptions().GetMapEntry() { - continue - } - sl = append(sl, &ImportedDescriptor{common{file}, d}) - } - for _, e := range df.enum { - sl = append(sl, &ImportedDescriptor{common{file}, e}) - } - for _, ext := range df.ext { - sl = append(sl, &ImportedDescriptor{common{file}, ext}) - } - } - return -} - -func extractComments(file *FileDescriptor) { - file.comments = make(map[string]*descriptor.SourceCodeInfo_Location) - for _, loc := range file.GetSourceCodeInfo().GetLocation() { - if loc.LeadingComments == nil { - continue - } - var p []string - for _, n := range loc.Path { - p = append(p, strconv.Itoa(int(n))) - } - file.comments[strings.Join(p, ",")] = loc - } -} - -// BuildTypeNameMap builds the map from fully qualified type names to objects. -// The key names for the map come from the input data, which puts a period at the beginning. -// It should be called after SetPackageNames and before GenerateAllFiles. -func (g *Generator) BuildTypeNameMap() { - g.typeNameToObject = make(map[string]Object) - for _, f := range g.allFiles { - // The names in this loop are defined by the proto world, not us, so the - // package name may be empty. If so, the dotted package name of X will - // be ".X"; otherwise it will be ".pkg.X". - dottedPkg := "." + f.GetPackage() - if dottedPkg != "." { - dottedPkg += "." - } - for _, enum := range f.enum { - name := dottedPkg + dottedSlice(enum.TypeName()) - g.typeNameToObject[name] = enum - } - for _, desc := range f.desc { - name := dottedPkg + dottedSlice(desc.TypeName()) - g.typeNameToObject[name] = desc - } - } -} - -// ObjectNamed, given a fully-qualified input type name as it appears in the input data, -// returns the descriptor for the message or enum with that name. -func (g *Generator) ObjectNamed(typeName string) Object { - o, ok := g.typeNameToObject[typeName] - if !ok { - g.Fail("can't find object with type", typeName) - } - - // If the file of this object isn't a direct dependency of the current file, - // or in the current file, then this object has been publicly imported into - // a dependency of the current file. - // We should return the ImportedDescriptor object for it instead. - direct := *o.File().Name == *g.file.Name - if !direct { - for _, dep := range g.file.Dependency { - if *g.fileByName(dep).Name == *o.File().Name { - direct = true - break - } - } - } - if !direct { - found := false - Loop: - for _, dep := range g.file.Dependency { - df := g.fileByName(*g.fileByName(dep).Name) - for _, td := range df.imp { - if td.o == o { - // Found it! - o = td - found = true - break Loop - } - } - } - if !found { - log.Printf("protoc-gen-go: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name) - } - } - - return o -} - -// P prints the arguments to the generated output. It handles strings and int32s, plus -// handling indirections because they may be *string, etc. -func (g *Generator) P(str ...interface{}) { - if !g.writeOutput { - return - } - g.WriteString(g.indent) - for _, v := range str { - switch s := v.(type) { - case string: - g.WriteString(s) - case *string: - g.WriteString(*s) - case bool: - fmt.Fprintf(g, "%t", s) - case *bool: - fmt.Fprintf(g, "%t", *s) - case int: - fmt.Fprintf(g, "%d", s) - case *int32: - fmt.Fprintf(g, "%d", *s) - case *int64: - fmt.Fprintf(g, "%d", *s) - case float64: - fmt.Fprintf(g, "%g", s) - case *float64: - fmt.Fprintf(g, "%g", *s) - default: - g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) - } - } - g.WriteByte('\n') -} - -// addInitf stores the given statement to be printed inside the file's init function. -// The statement is given as a format specifier and arguments. -func (g *Generator) addInitf(stmt string, a ...interface{}) { - g.init = append(g.init, fmt.Sprintf(stmt, a...)) -} - -// In Indents the output one tab stop. -func (g *Generator) In() { g.indent += "\t" } - -// Out unindents the output one tab stop. -func (g *Generator) Out() { - if len(g.indent) > 0 { - g.indent = g.indent[1:] - } -} - -// GenerateAllFiles generates the output for all the files we're outputting. -func (g *Generator) GenerateAllFiles() { - // Initialize the plugins - for _, p := range plugins { - p.Init(g) - } - // Generate the output. The generator runs for every file, even the files - // that we don't generate output for, so that we can collate the full list - // of exported symbols to support public imports. - genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) - for _, file := range g.genFiles { - genFileMap[file] = true - } - for _, file := range g.allFiles { - g.Reset() - g.writeOutput = genFileMap[file] - g.generate(file) - if !g.writeOutput { - continue - } - g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ - Name: proto.String(file.goFileName()), - Content: proto.String(g.String()), - }) - } -} - -// Run all the plugins associated with the file. -func (g *Generator) runPlugins(file *FileDescriptor) { - for _, p := range plugins { - p.Generate(file) - } -} - -// FileOf return the FileDescriptor for this FileDescriptorProto. -func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor { - for _, file := range g.allFiles { - if file.FileDescriptorProto == fd { - return file - } - } - g.Fail("could not find file in table:", fd.GetName()) - return nil -} - -// Fill the response protocol buffer with the generated output for all the files we're -// supposed to generate. -func (g *Generator) generate(file *FileDescriptor) { - g.file = g.FileOf(file.FileDescriptorProto) - g.usedPackages = make(map[string]bool) - - if g.file.index == 0 { - // For one file in the package, assert version compatibility. - g.P("// This is a compile-time assertion to ensure that this generated file") - g.P("// is compatible with the proto package it is being compiled against.") - g.P("// A compilation error at this line likely means your copy of the") - g.P("// proto package needs to be updated.") - g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") - g.P() - } - - for _, td := range g.file.imp { - g.generateImported(td) - } - for _, enum := range g.file.enum { - g.generateEnum(enum) - } - for _, desc := range g.file.desc { - // Don't generate virtual messages for maps. - if desc.GetOptions().GetMapEntry() { - continue - } - g.generateMessage(desc) - } - for _, ext := range g.file.ext { - g.generateExtension(ext) - } - g.generateInitFunction() - - // Run the plugins before the imports so we know which imports are necessary. - g.runPlugins(file) - - g.generateFileDescriptor(file) - - // Generate header and imports last, though they appear first in the output. - rem := g.Buffer - g.Buffer = new(bytes.Buffer) - g.generateHeader() - g.generateImports() - if !g.writeOutput { - return - } - g.Write(rem.Bytes()) - - // Reformat generated code. - fset := token.NewFileSet() - raw := g.Bytes() - ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) - if err != nil { - // Print out the bad code with line numbers. - // This should never happen in practice, but it can while changing generated code, - // so consider this a debugging aid. - var src bytes.Buffer - s := bufio.NewScanner(bytes.NewReader(raw)) - for line := 1; s.Scan(); line++ { - fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes()) - } - g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) - } - g.Reset() - err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) - if err != nil { - g.Fail("generated Go source code could not be reformatted:", err.Error()) - } -} - -// Generate the header, including package definition -func (g *Generator) generateHeader() { - g.P("// Code generated by protoc-gen-go.") - g.P("// source: ", g.file.Name) - g.P("// DO NOT EDIT!") - g.P() - - name := g.file.PackageName() - - if g.file.index == 0 { - // Generate package docs for the first file in the package. - g.P("/*") - g.P("Package ", name, " is a generated protocol buffer package.") - g.P() - if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { - // not using g.PrintComments because this is a /* */ comment block. - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - line = strings.TrimPrefix(line, " ") - // ensure we don't escape from the block comment - line = strings.Replace(line, "*/", "* /", -1) - g.P(line) - } - g.P() - } - var topMsgs []string - g.P("It is generated from these files:") - for _, f := range g.genFiles { - g.P("\t", f.Name) - for _, msg := range f.desc { - if msg.parent != nil { - continue - } - topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName())) - } - } - g.P() - g.P("It has these top-level messages:") - for _, msg := range topMsgs { - g.P("\t", msg) - } - g.P("*/") - } - - g.P("package ", name) - g.P() -} - -// PrintComments prints any comments from the source .proto file. -// The path is a comma-separated list of integers. -// It returns an indication of whether any comments were printed. -// See descriptor.proto for its format. -func (g *Generator) PrintComments(path string) bool { - if !g.writeOutput { - return false - } - if loc, ok := g.file.comments[path]; ok { - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - g.P("// ", strings.TrimPrefix(line, " ")) - } - return true - } - return false -} - -func (g *Generator) fileByName(filename string) *FileDescriptor { - return g.allFilesByName[filename] -} - -// weak returns whether the ith import of the current file is a weak import. -func (g *Generator) weak(i int32) bool { - for _, j := range g.file.WeakDependency { - if j == i { - return true - } - } - return false -} - -// Generate the imports -func (g *Generator) generateImports() { - // We almost always need a proto import. Rather than computing when we - // do, which is tricky when there's a plugin, just import it and - // reference it later. The same argument applies to the fmt and math packages. - g.P("import " + g.Pkg["proto"] + " " + strconv.Quote(g.ImportPrefix+"github.com/golang/protobuf/proto")) - g.P("import " + g.Pkg["fmt"] + ` "fmt"`) - g.P("import " + g.Pkg["math"] + ` "math"`) - for i, s := range g.file.Dependency { - fd := g.fileByName(s) - // Do not import our own package. - if fd.PackageName() == g.packageName { - continue - } - filename := fd.goFileName() - // By default, import path is the dirname of the Go filename. - importPath := path.Dir(filename) - if substitution, ok := g.ImportMap[s]; ok { - importPath = substitution - } - importPath = g.ImportPrefix + importPath - // Skip weak imports. - if g.weak(int32(i)) { - g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath)) - continue - } - // We need to import all the dependencies, even if we don't reference them, - // because other code and tools depend on having the full transitive closure - // of protocol buffer types in the binary. - pname := fd.PackageName() - if _, ok := g.usedPackages[pname]; !ok { - pname = "_" - } - g.P("import ", pname, " ", strconv.Quote(importPath)) - } - g.P() - // TODO: may need to worry about uniqueness across plugins - for _, p := range plugins { - p.GenerateImports(g.file) - g.P() - } - g.P("// Reference imports to suppress errors if they are not otherwise used.") - g.P("var _ = ", g.Pkg["proto"], ".Marshal") - g.P("var _ = ", g.Pkg["fmt"], ".Errorf") - g.P("var _ = ", g.Pkg["math"], ".Inf") - g.P() -} - -func (g *Generator) generateImported(id *ImportedDescriptor) { - // Don't generate public import symbols for files that we are generating - // code for, since those symbols will already be in this package. - // We can't simply avoid creating the ImportedDescriptor objects, - // because g.genFiles isn't populated at that stage. - tn := id.TypeName() - sn := tn[len(tn)-1] - df := g.FileOf(id.o.File()) - filename := *df.Name - for _, fd := range g.genFiles { - if *fd.Name == filename { - g.P("// Ignoring public import of ", sn, " from ", filename) - g.P() - return - } - } - g.P("// ", sn, " from public import ", filename) - g.usedPackages[df.PackageName()] = true - - for _, sym := range df.exported[id.o] { - sym.GenerateAlias(g, df.PackageName()) - } - - g.P() -} - -// Generate the enum definitions for this EnumDescriptor. -func (g *Generator) generateEnum(enum *EnumDescriptor) { - // The full type name - typeName := enum.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - ccPrefix := enum.prefix() - - g.PrintComments(enum.path) - g.P("type ", ccTypeName, " int32") - g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) - g.P("const (") - g.In() - for i, e := range enum.Value { - g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)) - - name := ccPrefix + *e.Name - g.P(name, " ", ccTypeName, " = ", e.Number) - g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) - } - g.Out() - g.P(")") - g.P("var ", ccTypeName, "_name = map[int32]string{") - g.In() - generated := make(map[int32]bool) // avoid duplicate values - for _, e := range enum.Value { - duplicate := "" - if _, present := generated[*e.Number]; present { - duplicate = "// Duplicate value: " - } - g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",") - generated[*e.Number] = true - } - g.Out() - g.P("}") - g.P("var ", ccTypeName, "_value = map[string]int32{") - g.In() - for _, e := range enum.Value { - g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") - } - g.Out() - g.P("}") - - if !enum.proto3() { - g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") - g.In() - g.P("p := new(", ccTypeName, ")") - g.P("*p = x") - g.P("return p") - g.Out() - g.P("}") - } - - g.P("func (x ", ccTypeName, ") String() string {") - g.In() - g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") - g.Out() - g.P("}") - - if !enum.proto3() { - g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") - g.In() - g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`) - g.P("if err != nil {") - g.In() - g.P("return err") - g.Out() - g.P("}") - g.P("*x = ", ccTypeName, "(value)") - g.P("return nil") - g.Out() - g.P("}") - } - - var indexes []string - for m := enum.parent; m != nil; m = m.parent { - // XXX: skip groups? - indexes = append([]string{strconv.Itoa(m.index)}, indexes...) - } - indexes = append(indexes, strconv.Itoa(enum.index)) - g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") - if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" { - g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`) - } - - g.P() -} - -// The tag is a string like "varint,2,opt,name=fieldname,def=7" that -// identifies details of the field for the protocol buffer marshaling and unmarshaling -// code. The fields are: -// wire encoding -// protocol tag number -// opt,req,rep for optional, required, or repeated -// packed whether the encoding is "packed" (optional; repeated primitives only) -// name= the original declared name -// enum= the name of the enum type if it is an enum-typed field. -// proto3 if this field is in a proto3 message -// def= string representation of the default value, if any. -// The default value must be in a representation that can be used at run-time -// to generate the default value. Thus bools become 0 and 1, for instance. -func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string { - optrepreq := "" - switch { - case isOptional(field): - optrepreq = "opt" - case isRequired(field): - optrepreq = "req" - case isRepeated(field): - optrepreq = "rep" - } - var defaultValue string - if dv := field.DefaultValue; dv != nil { // set means an explicit default - defaultValue = *dv - // Some types need tweaking. - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - if defaultValue == "true" { - defaultValue = "1" - } else { - defaultValue = "0" - } - case descriptor.FieldDescriptorProto_TYPE_STRING, - descriptor.FieldDescriptorProto_TYPE_BYTES: - // Nothing to do. Quoting is done for the whole tag. - case descriptor.FieldDescriptorProto_TYPE_ENUM: - // For enums we need to provide the integer constant. - obj := g.ObjectNamed(field.GetTypeName()) - if id, ok := obj.(*ImportedDescriptor); ok { - // It is an enum that was publicly imported. - // We need the underlying type. - obj = id.o - } - enum, ok := obj.(*EnumDescriptor) - if !ok { - log.Printf("obj is a %T", obj) - if id, ok := obj.(*ImportedDescriptor); ok { - log.Printf("id.o is a %T", id.o) - } - g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName())) - } - defaultValue = enum.integerValueAsString(defaultValue) - } - defaultValue = ",def=" + defaultValue - } - enum := "" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM { - // We avoid using obj.PackageName(), because we want to use the - // original (proto-world) package name. - obj := g.ObjectNamed(field.GetTypeName()) - if id, ok := obj.(*ImportedDescriptor); ok { - obj = id.o - } - enum = ",enum=" - if pkg := obj.File().GetPackage(); pkg != "" { - enum += pkg + "." - } - enum += CamelCaseSlice(obj.TypeName()) - } - packed := "" - if (field.Options != nil && field.Options.GetPacked()) || - // Per https://developers.google.com/protocol-buffers/docs/proto3#simple: - // "In proto3, repeated fields of scalar numeric types use packed encoding by default." - (message.proto3() && (field.Options == nil || field.Options.Packed == nil) && - isRepeated(field) && isScalar(field)) { - packed = ",packed" - } - fieldName := field.GetName() - name := fieldName - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - // We must use the type name for groups instead of - // the field name to preserve capitalization. - // type_name in FieldDescriptorProto is fully-qualified, - // but we only want the local part. - name = *field.TypeName - if i := strings.LastIndex(name, "."); i >= 0 { - name = name[i+1:] - } - } - if json := field.GetJsonName(); json != "" && json != name { - // TODO: escaping might be needed, in which case - // perhaps this should be in its own "json" tag. - name += ",json=" + json - } - name = ",name=" + name - if message.proto3() { - // We only need the extra tag for []byte fields; - // no need to add noise for the others. - if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES { - name += ",proto3" - } - - } - oneof := "" - if field.OneofIndex != nil { - oneof = ",oneof" - } - return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s", - wiretype, - field.GetNumber(), - optrepreq, - packed, - name, - enum, - oneof, - defaultValue)) -} - -func needsStar(typ descriptor.FieldDescriptorProto_Type) bool { - switch typ { - case descriptor.FieldDescriptorProto_TYPE_GROUP: - return false - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - return false - case descriptor.FieldDescriptorProto_TYPE_BYTES: - return false - } - return true -} - -// TypeName is the printed name appropriate for an item. If the object is in the current file, -// TypeName drops the package name and underscores the rest. -// Otherwise the object is from another package; and the result is the underscored -// package name followed by the item name. -// The result always has an initial capital. -func (g *Generator) TypeName(obj Object) string { - return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName()) -} - -// TypeNameWithPackage is like TypeName, but always includes the package -// name even if the object is in our own package. -func (g *Generator) TypeNameWithPackage(obj Object) string { - return obj.PackageName() + CamelCaseSlice(obj.TypeName()) -} - -// GoType returns a string representing the type name, and the wire type -func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) { - // TODO: Options. - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - typ, wire = "float64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - typ, wire = "float32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_INT64: - typ, wire = "int64", "varint" - case descriptor.FieldDescriptorProto_TYPE_UINT64: - typ, wire = "uint64", "varint" - case descriptor.FieldDescriptorProto_TYPE_INT32: - typ, wire = "int32", "varint" - case descriptor.FieldDescriptorProto_TYPE_UINT32: - typ, wire = "uint32", "varint" - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - typ, wire = "uint64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - typ, wire = "uint32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - typ, wire = "bool", "varint" - case descriptor.FieldDescriptorProto_TYPE_STRING: - typ, wire = "string", "bytes" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = "*"+g.TypeName(desc), "group" - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = "*"+g.TypeName(desc), "bytes" - case descriptor.FieldDescriptorProto_TYPE_BYTES: - typ, wire = "[]byte", "bytes" - case descriptor.FieldDescriptorProto_TYPE_ENUM: - desc := g.ObjectNamed(field.GetTypeName()) - typ, wire = g.TypeName(desc), "varint" - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - typ, wire = "int32", "fixed32" - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - typ, wire = "int64", "fixed64" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - typ, wire = "int32", "zigzag32" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - typ, wire = "int64", "zigzag64" - default: - g.Fail("unknown type for", field.GetName()) - } - if isRepeated(field) { - typ = "[]" + typ - } else if message != nil && message.proto3() { - return - } else if field.OneofIndex != nil && message != nil { - return - } else if needsStar(*field.Type) { - typ = "*" + typ - } - return -} - -func (g *Generator) RecordTypeUse(t string) { - if obj, ok := g.typeNameToObject[t]; ok { - // Call ObjectNamed to get the true object to record the use. - obj = g.ObjectNamed(t) - g.usedPackages[obj.PackageName()] = true - } -} - -// Method names that may be generated. Fields with these names get an -// underscore appended. Any change to this set is a potential incompatible -// API change because it changes generated field names. -var methodNames = [...]string{ - "Reset", - "String", - "ProtoMessage", - "Marshal", - "Unmarshal", - "ExtensionRangeArray", - "ExtensionMap", - "Descriptor", -} - -// Names of messages in the `google.protobuf` package for which -// we will generate XXX_WellKnownType methods. -var wellKnownTypes = map[string]bool{ - "Any": true, - "Duration": true, - "Empty": true, - "Struct": true, - "Timestamp": true, - - "Value": true, - "ListValue": true, - "DoubleValue": true, - "FloatValue": true, - "Int64Value": true, - "UInt64Value": true, - "Int32Value": true, - "UInt32Value": true, - "BoolValue": true, - "StringValue": true, - "BytesValue": true, -} - -// Generate the type and default constant definitions for this Descriptor. -func (g *Generator) generateMessage(message *Descriptor) { - // The full type name - typeName := message.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - - usedNames := make(map[string]bool) - for _, n := range methodNames { - usedNames[n] = true - } - fieldNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - - oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto - oneofDisc := make(map[int32]string) // name of discriminator method - oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star - oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer - - g.PrintComments(message.path) - g.P("type ", ccTypeName, " struct {") - g.In() - - // allocNames finds a conflict-free variation of the given strings, - // consistently mutating their suffixes. - // It returns the same number of strings. - allocNames := func(ns ...string) []string { - Loop: - for { - for _, n := range ns { - if usedNames[n] { - for i := range ns { - ns[i] += "_" - } - continue Loop - } - } - for _, n := range ns { - usedNames[n] = true - } - return ns - } - } - - for i, field := range message.Field { - // Allocate the getter and the field at the same time so name - // collisions create field/method consistent names. - // TODO: This allocation occurs based on the order of the fields - // in the proto file, meaning that a change in the field - // ordering can change generated Method/Field names. - base := CamelCase(*field.Name) - ns := allocNames(base, "Get"+base) - fieldName, fieldGetterName := ns[0], ns[1] - typename, wiretype := g.GoType(message, field) - jsonName := *field.Name - tag := fmt.Sprintf("protobuf:%s json:%q", g.goTag(message, field, wiretype), jsonName+",omitempty") - - fieldNames[field] = fieldName - fieldGetterNames[field] = fieldGetterName - - oneof := field.OneofIndex != nil - if oneof && oneofFieldName[*field.OneofIndex] == "" { - odp := message.OneofDecl[int(*field.OneofIndex)] - fname := allocNames(CamelCase(odp.GetName()))[0] - - // This is the first field of a oneof we haven't seen before. - // Generate the union field. - com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)) - if com { - g.P("//") - } - g.P("// Types that are valid to be assigned to ", fname, ":") - // Generate the rest of this comment later, - // when we've computed any disambiguation. - oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len() - - dname := "is" + ccTypeName + "_" + fname - oneofFieldName[*field.OneofIndex] = fname - oneofDisc[*field.OneofIndex] = dname - tag := `protobuf_oneof:"` + odp.GetName() + `"` - g.P(fname, " ", dname, " `", tag, "`") - } - - if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { - desc := g.ObjectNamed(field.GetTypeName()) - if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { - // Figure out the Go types and tags for the key and value types. - keyField, valField := d.Field[0], d.Field[1] - keyType, keyWire := g.GoType(d, keyField) - valType, valWire := g.GoType(d, valField) - keyTag, valTag := g.goTag(d, keyField, keyWire), g.goTag(d, valField, valWire) - - // We don't use stars, except for message-typed values. - // Message and enum types are the only two possibly foreign types used in maps, - // so record their use. They are not permitted as map keys. - keyType = strings.TrimPrefix(keyType, "*") - switch *valField.Type { - case descriptor.FieldDescriptorProto_TYPE_ENUM: - valType = strings.TrimPrefix(valType, "*") - g.RecordTypeUse(valField.GetTypeName()) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - g.RecordTypeUse(valField.GetTypeName()) - default: - valType = strings.TrimPrefix(valType, "*") - } - - typename = fmt.Sprintf("map[%s]%s", keyType, valType) - mapFieldTypes[field] = typename // record for the getter generation - - tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", keyTag, valTag) - } - } - - fieldTypes[field] = typename - - if oneof { - tname := ccTypeName + "_" + fieldName - // It is possible for this to collide with a message or enum - // nested in this message. Check for collisions. - for { - ok := true - for _, desc := range message.nested { - if CamelCaseSlice(desc.TypeName()) == tname { - ok = false - break - } - } - for _, enum := range message.enums { - if CamelCaseSlice(enum.TypeName()) == tname { - ok = false - break - } - } - if !ok { - tname += "_" - continue - } - break - } - - oneofTypeName[field] = tname - continue - } - - g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)) - g.P(fieldName, "\t", typename, "\t`", tag, "`") - g.RecordTypeUse(field.GetTypeName()) - } - if len(message.ExtensionRange) > 0 { - g.P(g.Pkg["proto"], ".XXX_InternalExtensions `json:\"-\"`") - } - if !message.proto3() { - g.P("XXX_unrecognized\t[]byte `json:\"-\"`") - } - g.Out() - g.P("}") - - // Update g.Buffer to list valid oneof types. - // We do this down here, after we've disambiguated the oneof type names. - // We go in reverse order of insertion point to avoid invalidating offsets. - for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- { - ip := oneofInsertPoints[oi] - all := g.Buffer.Bytes() - rem := all[ip:] - g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem - for _, field := range message.Field { - if field.OneofIndex == nil || *field.OneofIndex != oi { - continue - } - g.P("//\t*", oneofTypeName[field]) - } - g.Buffer.Write(rem) - } - - // Reset, String and ProtoMessage methods. - g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }") - g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") - g.P("func (*", ccTypeName, ") ProtoMessage() {}") - var indexes []string - for m := message; m != nil; m = m.parent { - indexes = append([]string{strconv.Itoa(m.index)}, indexes...) - } - g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") - // TODO: Revisit the decision to use a XXX_WellKnownType method - // if we change proto.MessageName to work with multiple equivalents. - if message.file.GetPackage() == "google.protobuf" && wellKnownTypes[message.GetName()] { - g.P("func (*", ccTypeName, `) XXX_WellKnownType() string { return "`, message.GetName(), `" }`) - } - - // Extension support methods - var hasExtensions, isMessageSet bool - if len(message.ExtensionRange) > 0 { - hasExtensions = true - // message_set_wire_format only makes sense when extensions are defined. - if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { - isMessageSet = true - g.P() - g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(&m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler") - g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)") - g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)") - } - - g.P() - g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{") - g.In() - for _, r := range message.ExtensionRange { - end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends - g.P("{", r.Start, ", ", end, "},") - } - g.Out() - g.P("}") - g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") - g.In() - g.P("return extRange_", ccTypeName) - g.Out() - g.P("}") - } - - // Default constants - defNames := make(map[*descriptor.FieldDescriptorProto]string) - for _, field := range message.Field { - def := field.GetDefaultValue() - if def == "" { - continue - } - fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name) - defNames[field] = fieldname - typename, _ := g.GoType(message, field) - if typename[0] == '*' { - typename = typename[1:] - } - kind := "const " - switch { - case typename == "bool": - case typename == "string": - def = strconv.Quote(def) - case typename == "[]byte": - def = "[]byte(" + strconv.Quote(def) + ")" - kind = "var " - case def == "inf", def == "-inf", def == "nan": - // These names are known to, and defined by, the protocol language. - switch def { - case "inf": - def = "math.Inf(1)" - case "-inf": - def = "math.Inf(-1)" - case "nan": - def = "math.NaN()" - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT { - def = "float32(" + def + ")" - } - kind = "var " - case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM: - // Must be an enum. Need to construct the prefixed name. - obj := g.ObjectNamed(field.GetTypeName()) - var enum *EnumDescriptor - if id, ok := obj.(*ImportedDescriptor); ok { - // The enum type has been publicly imported. - enum, _ = id.o.(*EnumDescriptor) - } else { - enum, _ = obj.(*EnumDescriptor) - } - if enum == nil { - log.Printf("don't know how to generate constant for %s", fieldname) - continue - } - def = g.DefaultPackageName(obj) + enum.prefix() + def - } - g.P(kind, fieldname, " ", typename, " = ", def) - g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""}) - } - g.P() - - // Oneof per-field types, discriminants and getters. - // - // Generate unexported named types for the discriminant interfaces. - // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug - // that was triggered by using anonymous interfaces here. - // TODO: Revisit this and consider reverting back to anonymous interfaces. - for oi := range message.OneofDecl { - dname := oneofDisc[int32(oi)] - g.P("type ", dname, " interface { ", dname, "() }") - } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - _, wiretype := g.GoType(message, field) - tag := "protobuf:" + g.goTag(message, field, wiretype) - g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }") - g.RecordTypeUse(field.GetTypeName()) - } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") - } - g.P() - for oi := range message.OneofDecl { - fname := oneofFieldName[int32(oi)] - g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {") - g.P("if m != nil { return m.", fname, " }") - g.P("return nil") - g.P("}") - } - g.P() - - // Field getters - var getters []getterSymbol - for _, field := range message.Field { - oneof := field.OneofIndex != nil - - fname := fieldNames[field] - typename, _ := g.GoType(message, field) - if t, ok := mapFieldTypes[field]; ok { - typename = t - } - mname := fieldGetterNames[field] - star := "" - if needsStar(*field.Type) && typename[0] == '*' { - typename = typename[1:] - star = "*" - } - - // In proto3, only generate getters for message fields and oneof fields. - if message.proto3() && *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && !oneof { - continue - } - - // Only export getter symbols for basic types, - // and for messages and enums in the same package. - // Groups are not exported. - // Foreign types can't be hoisted through a public import because - // the importer may not already be importing the defining .proto. - // As an example, imagine we have an import tree like this: - // A.proto -> B.proto -> C.proto - // If A publicly imports B, we need to generate the getters from B in A's output, - // but if one such getter returns something from C then we cannot do that - // because A is not importing C already. - var getter, genType bool - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_GROUP: - getter = false - case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM: - // Only export getter if its return type is in this package. - getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName() - genType = true - default: - getter = true - } - if getter { - getters = append(getters, getterSymbol{ - name: mname, - typ: typename, - typeName: field.GetTypeName(), - genType: genType, - }) - } - - g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {") - g.In() - def, hasDef := defNames[field] - typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BYTES: - typeDefaultIsNil = !hasDef - case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: - typeDefaultIsNil = true - } - if isRepeated(field) { - typeDefaultIsNil = true - } - if typeDefaultIsNil && !oneof { - // A bytes field with no explicit default needs less generated code, - // as does a message or group field, or a repeated field. - g.P("if m != nil {") - g.In() - g.P("return m." + fname) - g.Out() - g.P("}") - g.P("return nil") - g.Out() - g.P("}") - g.P() - continue - } - if !oneof { - g.P("if m != nil && m." + fname + " != nil {") - g.In() - g.P("return " + star + "m." + fname) - g.Out() - g.P("}") - } else { - uname := oneofFieldName[*field.OneofIndex] - tname := oneofTypeName[field] - g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {") - g.P("return x.", fname) - g.P("}") - } - if hasDef { - if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { - g.P("return " + def) - } else { - // The default is a []byte var. - // Make a copy when returning it to be safe. - g.P("return append([]byte(nil), ", def, "...)") - } - } else { - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - g.P("return false") - case descriptor.FieldDescriptorProto_TYPE_STRING: - g.P(`return ""`) - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE, - descriptor.FieldDescriptorProto_TYPE_BYTES: - // This is only possible for oneof fields. - g.P("return nil") - case descriptor.FieldDescriptorProto_TYPE_ENUM: - // The default default for an enum is the first value in the enum, - // not zero. - obj := g.ObjectNamed(field.GetTypeName()) - var enum *EnumDescriptor - if id, ok := obj.(*ImportedDescriptor); ok { - // The enum type has been publicly imported. - enum, _ = id.o.(*EnumDescriptor) - } else { - enum, _ = obj.(*EnumDescriptor) - } - if enum == nil { - log.Printf("don't know how to generate getter for %s", field.GetName()) - continue - } - if len(enum.Value) == 0 { - g.P("return 0 // empty enum") - } else { - first := enum.Value[0].GetName() - g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first) - } - default: - g.P("return 0") - } - } - g.Out() - g.P("}") - g.P() - } - - if !message.group { - ms := &messageSymbol{ - sym: ccTypeName, - hasExtensions: hasExtensions, - isMessageSet: isMessageSet, - hasOneof: len(message.OneofDecl) > 0, - getters: getters, - } - g.file.addExport(message, ms) - } - - // Oneof functions - if len(message.OneofDecl) > 0 { - fieldWire := make(map[*descriptor.FieldDescriptorProto]string) - - // method - enc := "_" + ccTypeName + "_OneofMarshaler" - dec := "_" + ccTypeName + "_OneofUnmarshaler" - size := "_" + ccTypeName + "_OneofSizer" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" - - g.P("// XXX_OneofFuncs is for the internal use of the proto package.") - g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("(*", oneofTypeName[field], ")(nil),") - } - g.P("}") - g.P("}") - g.P() - - // marshaler - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - for oi, odp := range message.OneofDecl { - g.P("// ", odp.GetName()) - fname := oneofFieldName[int32(oi)] - g.P("switch x := m.", fname, ".(type) {") - for _, field := range message.Field { - if field.OneofIndex == nil || int(*field.OneofIndex) != oi { - continue - } - g.P("case *", oneofTypeName[field], ":") - var wire, pre, post string - val := "x." + fieldNames[field] // overridden for TYPE_BOOL - canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - wire = "WireFixed64" - pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" - post = "))" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - wire = "WireFixed32" - pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" - post = ")))" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - wire = "WireFixed64" - pre, post = "b.EncodeFixed64(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - wire = "WireFixed32" - pre, post = "b.EncodeFixed32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - // bool needs special handling. - g.P("t := uint64(0)") - g.P("if ", val, " { t = 1 }") - val = "t" - wire = "WireVarint" - pre, post = "b.EncodeVarint(", ")" - case descriptor.FieldDescriptorProto_TYPE_STRING: - wire = "WireBytes" - pre, post = "b.EncodeStringBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - wire = "WireStartGroup" - pre, post = "b.Marshal(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - wire = "WireBytes" - pre, post = "b.EncodeMessage(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_BYTES: - wire = "WireBytes" - pre, post = "b.EncodeRawBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - wire = "WireVarint" - pre, post = "b.EncodeZigzag32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - wire = "WireVarint" - pre, post = "b.EncodeZigzag64(uint64(", "))" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - fieldWire[field] = wire - g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") - if !canFail { - g.P(pre, val, post) - } else { - g.P("if err := ", pre, val, post, "; err != nil {") - g.P("return err") - g.P("}") - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") - } - } - g.P("case nil:") - g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`) - g.P("}") - } - g.P("return nil") - g.P("}") - g.P() - - // unmarshaler - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - g.P("switch tag {") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - odp := message.OneofDecl[int(*field.OneofIndex)] - g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name) - g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {") - g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") - g.P("}") - lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP - var dec, cast, cast2 string - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" - case descriptor.FieldDescriptorProto_TYPE_INT64: - dec, cast = "b.DecodeVarint()", "int64" - case descriptor.FieldDescriptorProto_TYPE_UINT64: - dec = "b.DecodeVarint()" - case descriptor.FieldDescriptorProto_TYPE_INT32: - dec, cast = "b.DecodeVarint()", "int32" - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - dec = "b.DecodeFixed64()" - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - dec, cast = "b.DecodeFixed32()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - dec = "b.DecodeVarint()" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_STRING: - dec = "b.DecodeStringBytes()" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeGroup(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeMessage(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_BYTES: - dec = "b.DecodeRawBytes(true)" - case descriptor.FieldDescriptorProto_TYPE_UINT32: - dec, cast = "b.DecodeVarint()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_ENUM: - dec, cast = "b.DecodeVarint()", fieldTypes[field] - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - dec, cast = "b.DecodeFixed32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - dec, cast = "b.DecodeFixed64()", "int64" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - dec, cast = "b.DecodeZigzag32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - dec, cast = "b.DecodeZigzag64()", "int64" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - g.P(lhs, " := ", dec) - val := "x" - if cast != "" { - val = cast + "(" + val + ")" - } - if cast2 != "" { - val = cast2 + "(" + val + ")" - } - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - val += " != 0" - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE: - val = "msg" - } - g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}") - g.P("return true, err") - } - g.P("default: return false, nil") - g.P("}") - g.P("}") - g.P() - - // sizer - g.P("func ", size, sizeSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - for oi, odp := range message.OneofDecl { - g.P("// ", odp.GetName()) - fname := oneofFieldName[int32(oi)] - g.P("switch x := m.", fname, ".(type) {") - for _, field := range message.Field { - if field.OneofIndex == nil || int(*field.OneofIndex) != oi { - continue - } - g.P("case *", oneofTypeName[field], ":") - val := "x." + fieldNames[field] - var wire, varint, fixed string - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - wire = "WireFixed64" - fixed = "8" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - wire = "WireFixed32" - fixed = "4" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - wire = "WireVarint" - varint = val - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - wire = "WireFixed64" - fixed = "8" - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - wire = "WireFixed32" - fixed = "4" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - wire = "WireVarint" - fixed = "1" - case descriptor.FieldDescriptorProto_TYPE_STRING: - wire = "WireBytes" - fixed = "len(" + val + ")" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_GROUP: - wire = "WireStartGroup" - fixed = g.Pkg["proto"] + ".Size(" + val + ")" - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - wire = "WireBytes" - g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") - fixed = "s" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_BYTES: - wire = "WireBytes" - fixed = "len(" + val + ")" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_SINT32: - wire = "WireVarint" - varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - wire = "WireVarint" - varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") - if varint != "" { - g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") - } - if fixed != "" { - g.P("n += ", fixed) - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") - } - } - g.P("case nil:") - g.P("default:") - g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") - g.P("}") - } - g.P("return n") - g.P("}") - g.P() - } - - for _, ext := range message.ext { - g.generateExtension(ext) - } - - fullName := strings.Join(message.TypeName(), ".") - if g.file.Package != nil { - fullName = *g.file.Package + "." + fullName - } - - g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName) -} - -func (g *Generator) generateExtension(ext *ExtensionDescriptor) { - ccTypeName := ext.DescName() - - extObj := g.ObjectNamed(*ext.Extendee) - var extDesc *Descriptor - if id, ok := extObj.(*ImportedDescriptor); ok { - // This is extending a publicly imported message. - // We need the underlying type for goTag. - extDesc = id.o.(*Descriptor) - } else { - extDesc = extObj.(*Descriptor) - } - extendedType := "*" + g.TypeName(extObj) // always use the original - field := ext.FieldDescriptorProto - fieldType, wireType := g.GoType(ext.parent, field) - tag := g.goTag(extDesc, field, wireType) - g.RecordTypeUse(*ext.Extendee) - if n := ext.FieldDescriptorProto.TypeName; n != nil { - // foreign extension type - g.RecordTypeUse(*n) - } - - typeName := ext.TypeName() - - // Special case for proto2 message sets: If this extension is extending - // proto2_bridge.MessageSet, and its final name component is "message_set_extension", - // then drop that last component. - mset := false - if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" { - typeName = typeName[:len(typeName)-1] - mset = true - } - - // For text formatting, the package must be exactly what the .proto file declares, - // ignoring overrides such as the go_package option, and with no dot/underscore mapping. - extName := strings.Join(typeName, ".") - if g.file.Package != nil { - extName = *g.file.Package + "." + extName - } - - g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{") - g.In() - g.P("ExtendedType: (", extendedType, ")(nil),") - g.P("ExtensionType: (", fieldType, ")(nil),") - g.P("Field: ", field.Number, ",") - g.P(`Name: "`, extName, `",`) - g.P("Tag: ", tag, ",") - - g.Out() - g.P("}") - g.P() - - if mset { - // Generate a bit more code to register with message_set.go. - g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName) - } - - g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""}) -} - -func (g *Generator) generateInitFunction() { - for _, enum := range g.file.enum { - g.generateEnumRegistration(enum) - } - for _, d := range g.file.desc { - for _, ext := range d.ext { - g.generateExtensionRegistration(ext) - } - } - for _, ext := range g.file.ext { - g.generateExtensionRegistration(ext) - } - if len(g.init) == 0 { - return - } - g.P("func init() {") - g.In() - for _, l := range g.init { - g.P(l) - } - g.Out() - g.P("}") - g.init = nil -} - -func (g *Generator) generateFileDescriptor(file *FileDescriptor) { - // Make a copy and trim source_code_info data. - // TODO: Trim this more when we know exactly what we need. - pb := proto.Clone(file.FileDescriptorProto).(*descriptor.FileDescriptorProto) - pb.SourceCodeInfo = nil - - b, err := proto.Marshal(pb) - if err != nil { - g.Fail(err.Error()) - } - - var buf bytes.Buffer - w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) - w.Write(b) - w.Close() - b = buf.Bytes() - - v := file.VarName() - g.P() - g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }") - g.P("var ", v, " = []byte{") - g.In() - g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto") - for len(b) > 0 { - n := 16 - if n > len(b) { - n = len(b) - } - - s := "" - for _, c := range b[:n] { - s += fmt.Sprintf("0x%02x,", c) - } - g.P(s) - - b = b[n:] - } - g.Out() - g.P("}") -} - -func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) { - // // We always print the full (proto-world) package name here. - pkg := enum.File().GetPackage() - if pkg != "" { - pkg += "." - } - // The full type name - typeName := enum.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) -} - -func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) { - g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) -} - -// And now lots of helper functions. - -// Is c an ASCII lower-case letter? -func isASCIILower(c byte) bool { - return 'a' <= c && c <= 'z' -} - -// Is c an ASCII digit? -func isASCIIDigit(c byte) bool { - return '0' <= c && c <= '9' -} - -// CamelCase returns the CamelCased name. -// If there is an interior underscore followed by a lower case letter, -// drop the underscore and convert the letter to upper case. -// There is a remote possibility of this rewrite causing a name collision, -// but it's so remote we're prepared to pretend it's nonexistent - since the -// C++ generator lowercases names, it's extremely unlikely to have two fields -// with different capitalizations. -// In short, _my_field_name_2 becomes XMyFieldName_2. -func CamelCase(s string) string { - if s == "" { - return "" - } - t := make([]byte, 0, 32) - i := 0 - if s[0] == '_' { - // Need a capital letter; drop the '_'. - t = append(t, 'X') - i++ - } - // Invariant: if the next letter is lower case, it must be converted - // to upper case. - // That is, we process a word at a time, where words are marked by _ or - // upper case letter. Digits are treated as words. - for ; i < len(s); i++ { - c := s[i] - if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) { - continue // Skip the underscore in s. - } - if isASCIIDigit(c) { - t = append(t, c) - continue - } - // Assume we have a letter now - if not, it's a bogus identifier. - // The next word is a sequence of characters that must start upper case. - if isASCIILower(c) { - c ^= ' ' // Make it a capital letter. - } - t = append(t, c) // Guaranteed not lower case. - // Accept lower case sequence that follows. - for i+1 < len(s) && isASCIILower(s[i+1]) { - i++ - t = append(t, s[i]) - } - } - return string(t) -} - -// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to -// be joined with "_". -func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) } - -// dottedSlice turns a sliced name into a dotted name. -func dottedSlice(elem []string) string { return strings.Join(elem, ".") } - -// Is this field optional? -func isOptional(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_OPTIONAL -} - -// Is this field required? -func isRequired(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REQUIRED -} - -// Is this field repeated? -func isRepeated(field *descriptor.FieldDescriptorProto) bool { - return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REPEATED -} - -// Is this field a scalar numeric type? -func isScalar(field *descriptor.FieldDescriptorProto) bool { - if field.Type == nil { - return false - } - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FLOAT, - descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_BOOL, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM, - descriptor.FieldDescriptorProto_TYPE_SFIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED64, - descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SINT64: - return true - default: - return false - } -} - -// badToUnderscore is the mapping function used to generate Go names from package names, -// which can be dotted in the input .proto file. It replaces non-identifier characters such as -// dot or dash with underscore. -func badToUnderscore(r rune) rune { - if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { - return r - } - return '_' -} - -// baseName returns the last path element of the name, with the last dotted suffix removed. -func baseName(name string) string { - // First, find the last element - if i := strings.LastIndex(name, "/"); i >= 0 { - name = name[i+1:] - } - // Now drop the suffix - if i := strings.LastIndex(name, "."); i >= 0 { - name = name[0:i] - } - return name -} - -// The SourceCodeInfo message describes the location of elements of a parsed -// .proto file by way of a "path", which is a sequence of integers that -// describe the route from a FileDescriptorProto to the relevant submessage. -// The path alternates between a field number of a repeated field, and an index -// into that repeated field. The constants below define the field numbers that -// are used. -// -// See descriptor.proto for more information about this. -const ( - // tag numbers in FileDescriptorProto - packagePath = 2 // package - messagePath = 4 // message_type - enumPath = 5 // enum_type - // tag numbers in DescriptorProto - messageFieldPath = 2 // field - messageMessagePath = 3 // nested_type - messageEnumPath = 4 // enum_type - messageOneofPath = 8 // oneof_decl - // tag numbers in EnumDescriptorProto - enumValuePath = 2 // value -) diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go deleted file mode 100644 index a5ebc853..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go +++ /dev/null @@ -1,85 +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/golang/protobuf/protoc-gen-go/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) - } - } -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go deleted file mode 100644 index a29a8d2c..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go +++ /dev/null @@ -1,463 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Package grpc outputs gRPC service descriptions in Go code. -// It runs as a plugin for the Go protocol buffer compiler plugin. -// It is linked in to protoc-gen-go. -package grpc - -import ( - "fmt" - "path" - "strconv" - "strings" - - pb "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/golang/protobuf/protoc-gen-go/generator" -) - -// generatedCodeVersion indicates a version of the generated code. -// It is incremented whenever an incompatibility between the generated code and -// the grpc package is introduced; the generated code references -// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion). -const generatedCodeVersion = 3 - -// Paths for packages used by code generated in this file, -// relative to the import_prefix of the generator.Generator. -const ( - contextPkgPath = "golang.org/x/net/context" - grpcPkgPath = "google.golang.org/grpc" -) - -func init() { - generator.RegisterPlugin(new(grpc)) -} - -// grpc is an implementation of the Go protocol buffer compiler's -// plugin architecture. It generates bindings for gRPC support. -type grpc struct { - gen *generator.Generator -} - -// Name returns the name of this plugin, "grpc". -func (g *grpc) Name() string { - return "grpc" -} - -// The names for packages imported in the generated code. -// They may vary from the final path component of the import path -// if the name is used by other packages. -var ( - contextPkg string - grpcPkg string -) - -// Init initializes the plugin. -func (g *grpc) Init(gen *generator.Generator) { - g.gen = gen - contextPkg = generator.RegisterUniquePackageName("context", nil) - grpcPkg = generator.RegisterUniquePackageName("grpc", nil) -} - -// Given a type name defined in a .proto, return its object. -// Also record that we're using it, to guarantee the associated import. -func (g *grpc) objectNamed(name string) generator.Object { - g.gen.RecordTypeUse(name) - return g.gen.ObjectNamed(name) -} - -// Given a type name defined in a .proto, return its name as we will print it. -func (g *grpc) typeName(str string) string { - return g.gen.TypeName(g.objectNamed(str)) -} - -// P forwards to g.gen.P. -func (g *grpc) P(args ...interface{}) { g.gen.P(args...) } - -// Generate generates code for the services in the given file. -func (g *grpc) Generate(file *generator.FileDescriptor) { - if len(file.FileDescriptorProto.Service) == 0 { - return - } - - g.P("// Reference imports to suppress errors if they are not otherwise used.") - g.P("var _ ", contextPkg, ".Context") - g.P("var _ ", grpcPkg, ".ClientConn") - g.P() - - // Assert version compatibility. - g.P("// This is a compile-time assertion to ensure that this generated file") - g.P("// is compatible with the grpc package it is being compiled against.") - g.P("const _ = ", grpcPkg, ".SupportPackageIsVersion", generatedCodeVersion) - g.P() - - for i, service := range file.FileDescriptorProto.Service { - g.generateService(file, service, i) - } -} - -// GenerateImports generates the import declaration for this file. -func (g *grpc) GenerateImports(file *generator.FileDescriptor) { - if len(file.FileDescriptorProto.Service) == 0 { - return - } - g.P("import (") - g.P(contextPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, contextPkgPath))) - g.P(grpcPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, grpcPkgPath))) - g.P(")") - g.P() -} - -// reservedClientName records whether a client name is reserved on the client side. -var reservedClientName = map[string]bool{ -// TODO: do we need any in gRPC? -} - -func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } - -// generateService generates all the code for the named service. -func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) { - path := fmt.Sprintf("6,%d", index) // 6 means service. - - origServName := service.GetName() - fullServName := origServName - if pkg := file.GetPackage(); pkg != "" { - fullServName = pkg + "." + fullServName - } - servName := generator.CamelCase(origServName) - - g.P() - g.P("// Client API for ", servName, " service") - g.P() - - // Client interface. - g.P("type ", servName, "Client interface {") - for i, method := range service.Method { - g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. - g.P(g.generateClientSignature(servName, method)) - } - g.P("}") - g.P() - - // Client structure. - g.P("type ", unexport(servName), "Client struct {") - g.P("cc *", grpcPkg, ".ClientConn") - g.P("}") - g.P() - - // NewClient factory. - g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {") - g.P("return &", unexport(servName), "Client{cc}") - g.P("}") - g.P() - - var methodIndex, streamIndex int - serviceDescVar := "_" + servName + "_serviceDesc" - // Client method implementations. - for _, method := range service.Method { - var descExpr string - if !method.GetServerStreaming() && !method.GetClientStreaming() { - // Unary RPC method - descExpr = fmt.Sprintf("&%s.Methods[%d]", serviceDescVar, methodIndex) - methodIndex++ - } else { - // Streaming RPC method - descExpr = fmt.Sprintf("&%s.Streams[%d]", serviceDescVar, streamIndex) - streamIndex++ - } - g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr) - } - - g.P("// Server API for ", servName, " service") - g.P() - - // Server interface. - serverType := servName + "Server" - g.P("type ", serverType, " interface {") - for i, method := range service.Method { - g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. - g.P(g.generateServerSignature(servName, method)) - } - g.P("}") - g.P() - - // Server registration. - g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {") - g.P("s.RegisterService(&", serviceDescVar, `, srv)`) - g.P("}") - g.P() - - // Server handler implementations. - var handlerNames []string - for _, method := range service.Method { - hname := g.generateServerMethod(servName, fullServName, method) - handlerNames = append(handlerNames, hname) - } - - // Service descriptor. - g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {") - g.P("ServiceName: ", strconv.Quote(fullServName), ",") - g.P("HandlerType: (*", serverType, ")(nil),") - g.P("Methods: []", grpcPkg, ".MethodDesc{") - for i, method := range service.Method { - if method.GetServerStreaming() || method.GetClientStreaming() { - continue - } - g.P("{") - g.P("MethodName: ", strconv.Quote(method.GetName()), ",") - g.P("Handler: ", handlerNames[i], ",") - g.P("},") - } - g.P("},") - g.P("Streams: []", grpcPkg, ".StreamDesc{") - for i, method := range service.Method { - if !method.GetServerStreaming() && !method.GetClientStreaming() { - continue - } - g.P("{") - g.P("StreamName: ", strconv.Quote(method.GetName()), ",") - g.P("Handler: ", handlerNames[i], ",") - if method.GetServerStreaming() { - g.P("ServerStreams: true,") - } - if method.GetClientStreaming() { - g.P("ClientStreams: true,") - } - g.P("},") - } - g.P("},") - g.P("Metadata: ", file.VarName(), ",") - g.P("}") - g.P() -} - -// generateClientSignature returns the client-side signature for a method. -func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string { - origMethName := method.GetName() - methName := generator.CamelCase(origMethName) - if reservedClientName[methName] { - methName += "_" - } - reqArg := ", in *" + g.typeName(method.GetInputType()) - if method.GetClientStreaming() { - reqArg = "" - } - respName := "*" + g.typeName(method.GetOutputType()) - if method.GetServerStreaming() || method.GetClientStreaming() { - respName = servName + "_" + generator.CamelCase(origMethName) + "Client" - } - return fmt.Sprintf("%s(ctx %s.Context%s, opts ...%s.CallOption) (%s, error)", methName, contextPkg, reqArg, grpcPkg, respName) -} - -func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) { - sname := fmt.Sprintf("/%s/%s", fullServName, method.GetName()) - methName := generator.CamelCase(method.GetName()) - inType := g.typeName(method.GetInputType()) - outType := g.typeName(method.GetOutputType()) - - g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{") - if !method.GetServerStreaming() && !method.GetClientStreaming() { - g.P("out := new(", outType, ")") - // TODO: Pass descExpr to Invoke. - g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`) - g.P("if err != nil { return nil, err }") - g.P("return out, nil") - g.P("}") - g.P() - return - } - streamType := unexport(servName) + methName + "Client" - g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`) - g.P("if err != nil { return nil, err }") - g.P("x := &", streamType, "{stream}") - if !method.GetClientStreaming() { - g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }") - g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") - } - g.P("return x, nil") - g.P("}") - g.P() - - genSend := method.GetClientStreaming() - genRecv := method.GetServerStreaming() - genCloseAndRecv := !method.GetServerStreaming() - - // Stream auxiliary types and methods. - g.P("type ", servName, "_", methName, "Client interface {") - if genSend { - g.P("Send(*", inType, ") error") - } - if genRecv { - g.P("Recv() (*", outType, ", error)") - } - if genCloseAndRecv { - g.P("CloseAndRecv() (*", outType, ", error)") - } - g.P(grpcPkg, ".ClientStream") - g.P("}") - g.P() - - g.P("type ", streamType, " struct {") - g.P(grpcPkg, ".ClientStream") - g.P("}") - g.P() - - if genSend { - g.P("func (x *", streamType, ") Send(m *", inType, ") error {") - g.P("return x.ClientStream.SendMsg(m)") - g.P("}") - g.P() - } - if genRecv { - g.P("func (x *", streamType, ") Recv() (*", outType, ", error) {") - g.P("m := new(", outType, ")") - g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } - if genCloseAndRecv { - g.P("func (x *", streamType, ") CloseAndRecv() (*", outType, ", error) {") - g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") - g.P("m := new(", outType, ")") - g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } -} - -// generateServerSignature returns the server-side signature for a method. -func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string { - origMethName := method.GetName() - methName := generator.CamelCase(origMethName) - if reservedClientName[methName] { - methName += "_" - } - - var reqArgs []string - ret := "error" - if !method.GetServerStreaming() && !method.GetClientStreaming() { - reqArgs = append(reqArgs, contextPkg+".Context") - ret = "(*" + g.typeName(method.GetOutputType()) + ", error)" - } - if !method.GetClientStreaming() { - reqArgs = append(reqArgs, "*"+g.typeName(method.GetInputType())) - } - if method.GetServerStreaming() || method.GetClientStreaming() { - reqArgs = append(reqArgs, servName+"_"+generator.CamelCase(origMethName)+"Server") - } - - return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret -} - -func (g *grpc) generateServerMethod(servName, fullServName string, method *pb.MethodDescriptorProto) string { - methName := generator.CamelCase(method.GetName()) - hname := fmt.Sprintf("_%s_%s_Handler", servName, methName) - inType := g.typeName(method.GetInputType()) - outType := g.typeName(method.GetOutputType()) - - if !method.GetServerStreaming() && !method.GetClientStreaming() { - g.P("func ", hname, "(srv interface{}, ctx ", contextPkg, ".Context, dec func(interface{}) error, interceptor ", grpcPkg, ".UnaryServerInterceptor) (interface{}, error) {") - g.P("in := new(", inType, ")") - g.P("if err := dec(in); err != nil { return nil, err }") - g.P("if interceptor == nil { return srv.(", servName, "Server).", methName, "(ctx, in) }") - g.P("info := &", grpcPkg, ".UnaryServerInfo{") - g.P("Server: srv,") - g.P("FullMethod: ", strconv.Quote(fmt.Sprintf("/%s/%s", fullServName, methName)), ",") - g.P("}") - g.P("handler := func(ctx ", contextPkg, ".Context, req interface{}) (interface{}, error) {") - g.P("return srv.(", servName, "Server).", methName, "(ctx, req.(*", inType, "))") - g.P("}") - g.P("return interceptor(ctx, in, info, handler)") - g.P("}") - g.P() - return hname - } - streamType := unexport(servName) + methName + "Server" - g.P("func ", hname, "(srv interface{}, stream ", grpcPkg, ".ServerStream) error {") - if !method.GetClientStreaming() { - g.P("m := new(", inType, ")") - g.P("if err := stream.RecvMsg(m); err != nil { return err }") - g.P("return srv.(", servName, "Server).", methName, "(m, &", streamType, "{stream})") - } else { - g.P("return srv.(", servName, "Server).", methName, "(&", streamType, "{stream})") - } - g.P("}") - g.P() - - genSend := method.GetServerStreaming() - genSendAndClose := !method.GetServerStreaming() - genRecv := method.GetClientStreaming() - - // Stream auxiliary types and methods. - g.P("type ", servName, "_", methName, "Server interface {") - if genSend { - g.P("Send(*", outType, ") error") - } - if genSendAndClose { - g.P("SendAndClose(*", outType, ") error") - } - if genRecv { - g.P("Recv() (*", inType, ", error)") - } - g.P(grpcPkg, ".ServerStream") - g.P("}") - g.P() - - g.P("type ", streamType, " struct {") - g.P(grpcPkg, ".ServerStream") - g.P("}") - g.P() - - if genSend { - g.P("func (x *", streamType, ") Send(m *", outType, ") error {") - g.P("return x.ServerStream.SendMsg(m)") - g.P("}") - g.P() - } - if genSendAndClose { - g.P("func (x *", streamType, ") SendAndClose(m *", outType, ") error {") - g.P("return x.ServerStream.SendMsg(m)") - g.P("}") - g.P() - } - if genRecv { - g.P("func (x *", streamType, ") Recv() (*", inType, ", error) {") - g.P("m := new(", inType, ")") - g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") - g.P("return m, nil") - g.P("}") - g.P() - } - - return hname -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go deleted file mode 100644 index 532a5500..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go +++ /dev/null @@ -1,34 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package main - -import _ "github.com/golang/protobuf/protoc-gen-go/grpc" diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/main.go b/vendor/github.com/golang/protobuf/protoc-gen-go/main.go deleted file mode 100644 index 8e2486de..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/main.go +++ /dev/null @@ -1,98 +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-go -// That word 'go' 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 --go_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 ( - "io/ioutil" - "os" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/generator" -) - -func main() { - // Begin by allocating a generator. The request and response structures are stored there - // so we can do error handling easily - the response structure contains the field to - // report failure. - g := generator.New() - - data, err := ioutil.ReadAll(os.Stdin) - if err != nil { - g.Error(err, "reading input") - } - - if err := proto.Unmarshal(data, g.Request); err != nil { - g.Error(err, "parsing input proto") - } - - if len(g.Request.FileToGenerate) == 0 { - g.Fail("no files to generate") - } - - g.CommandLineParameters(g.Request.GetParameter()) - - // Create a wrapped version of the Descriptors and EnumDescriptors that - // point to the file that defines them. - g.WrapTypes() - - g.SetPackageNames() - g.BuildTypeNameMap() - - g.GenerateAllFiles() - - // Send back the results. - data, err = proto.Marshal(g.Response) - if err != nil { - g.Error(err, "failed to marshal output proto") - } - _, err = os.Stdout.Write(data) - if err != nil { - g.Error(err, "failed to write output proto") - } -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile deleted file mode 100644 index eb41f20d..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Not stored here, but plugin.proto is in https://github.com/google/protobuf/ -# at src/google/protobuf/compiler/plugin.proto -# Also we need to fix an import. -regenerate: - echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION - protoc --go_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor:. \ - -I$(HOME)/src/protobuf/src $(HOME)/src/protobuf/src/google/protobuf/compiler/plugin.proto && \ - mv google/protobuf/compiler/plugin.pb.go $(GOPATH)/src/github.com/golang/protobuf/protoc-gen-go/plugin - -restore: - cp plugin.pb.golden plugin.pb.go - -preserve: - cp plugin.pb.go plugin.pb.golden diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go deleted file mode 100644 index 0ff4e13a..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by protoc-gen-go. -// source: google/protobuf/compiler/plugin.proto -// DO NOT EDIT! - -/* -Package plugin_go is a generated protocol buffer package. - -It is generated from these files: - google/protobuf/compiler/plugin.proto - -It has these top-level messages: - CodeGeneratorRequest - CodeGeneratorResponse -*/ -package plugin_go - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/protoc-gen-go/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.ProtoPackageIsVersion2 // please upgrade the proto package - -// An encoded CodeGeneratorRequest is written to the plugin's stdin. -type CodeGeneratorRequest struct { - // The .proto files that were explicitly listed on the command-line. The - // code generator should generate code only for these files. Each file's - // descriptor will be included in proto_file, below. - FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"` - // The generator parameter passed on the command-line. - Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` - // FileDescriptorProtos for all files in files_to_generate and everything - // they import. The files will appear in topological order, so each file - // appears before any file that imports it. - // - // protoc guarantees that all proto_files will be written after - // the fields above, even though this is not technically guaranteed by the - // protobuf wire format. This theoretically could allow a plugin to stream - // in the FileDescriptorProtos and handle them one by one rather than read - // the entire set into memory at once. However, as of this writing, this - // is not similarly optimized on protoc's end -- it will store all fields in - // memory at once before sending them to the plugin. - ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } -func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorRequest) ProtoMessage() {} -func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *CodeGeneratorRequest) GetFileToGenerate() []string { - if m != nil { - return m.FileToGenerate - } - return nil -} - -func (m *CodeGeneratorRequest) GetParameter() string { - if m != nil && m.Parameter != nil { - return *m.Parameter - } - return "" -} - -func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto { - if m != nil { - return m.ProtoFile - } - return nil -} - -// The plugin writes an encoded CodeGeneratorResponse to stdout. -type CodeGeneratorResponse struct { - // Error message. If non-empty, code generation failed. The plugin process - // should exit with status code zero even if it reports an error in this way. - // - // This should be used to indicate errors in .proto files which prevent the - // code generator from generating correct code. Errors which indicate a - // problem in protoc itself -- such as the input CodeGeneratorRequest being - // unparseable -- should be reported by writing a message to stderr and - // exiting with a non-zero status code. - Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } -func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorResponse) ProtoMessage() {} -func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *CodeGeneratorResponse) GetError() string { - if m != nil && m.Error != nil { - return *m.Error - } - return "" -} - -func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File { - if m != nil { - return m.File - } - return nil -} - -// Represents a single generated file. -type CodeGeneratorResponse_File struct { - // The file name, relative to the output directory. The name must not - // contain "." or ".." components and must be relative, not be absolute (so, - // the file cannot lie outside the output directory). "/" must be used as - // the path separator, not "\". - // - // If the name is omitted, the content will be appended to the previous - // file. This allows the generator to break large files into small chunks, - // and allows the generated text to be streamed back to protoc so that large - // files need not reside completely in memory at one time. Note that as of - // this writing protoc does not optimize for this -- it will read the entire - // CodeGeneratorResponse before writing files to disk. - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // If non-empty, indicates that the named file should already exist, and the - // content here is to be inserted into that file at a defined insertion - // point. This feature allows a code generator to extend the output - // produced by another code generator. The original generator may provide - // insertion points by placing special annotations in the file that look - // like: - // @@protoc_insertion_point(NAME) - // The annotation can have arbitrary text before and after it on the line, - // which allows it to be placed in a comment. NAME should be replaced with - // an identifier naming the point -- this is what other generators will use - // as the insertion_point. Code inserted at this point will be placed - // immediately above the line containing the insertion point (thus multiple - // insertions to the same point will come out in the order they were added). - // The double-@ is intended to make it unlikely that the generated code - // could contain things that look like insertion points by accident. - // - // For example, the C++ code generator places the following line in the - // .pb.h files that it generates: - // // @@protoc_insertion_point(namespace_scope) - // This line appears within the scope of the file's package namespace, but - // outside of any particular class. Another plugin can then specify the - // insertion_point "namespace_scope" to generate additional classes or - // other declarations that should be placed in this scope. - // - // Note that if the line containing the insertion point begins with - // whitespace, the same whitespace will be added to every line of the - // inserted text. This is useful for languages like Python, where - // indentation matters. In these languages, the insertion point comment - // should be indented the same amount as any inserted code will need to be - // in order to work correctly in that context. - // - // The code generator that generates the initial file and the one which - // inserts into it must both run as part of a single invocation of protoc. - // Code generators are executed in the order in which they appear on the - // command line. - // - // If |insertion_point| is present, |name| must also be present. - InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"` - // The file contents. - Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} } -func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorResponse_File) ProtoMessage() {} -func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } - -func (m *CodeGeneratorResponse_File) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *CodeGeneratorResponse_File) GetInsertionPoint() string { - if m != nil && m.InsertionPoint != nil { - return *m.InsertionPoint - } - return "" -} - -func (m *CodeGeneratorResponse_File) GetContent() string { - if m != nil && m.Content != nil { - return *m.Content - } - return "" -} - -func init() { - proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest") - proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse") - proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File") -} - -func init() { proto.RegisterFile("google/protobuf/compiler/plugin.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 310 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x51, 0xc1, 0x4a, 0xc3, 0x40, - 0x10, 0x25, 0xb6, 0x22, 0x19, 0xa5, 0x95, 0xa5, 0xc2, 0x52, 0x7a, 0x08, 0x45, 0x31, 0xa7, 0x14, - 0x44, 0xf0, 0xde, 0x8a, 0x7a, 0x2c, 0xc1, 0x93, 0x20, 0x21, 0xa6, 0xd3, 0xb0, 0x90, 0xec, 0xac, - 0xb3, 0xdb, 0x2f, 0xf2, 0x9f, 0xfc, 0x1e, 0xd9, 0x4d, 0x5b, 0xa5, 0xd8, 0xdb, 0xce, 0x7b, 0x6f, - 0xe6, 0xbd, 0x9d, 0x81, 0x9b, 0x9a, 0xa8, 0x6e, 0x70, 0x66, 0x98, 0x1c, 0x7d, 0x6c, 0xd6, 0xb3, - 0x8a, 0x5a, 0xa3, 0x1a, 0xe4, 0x99, 0x69, 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0x9d, 0x1c, - 0x06, 0xc1, 0xae, 0x9c, 0x3f, 0xc0, 0xa4, 0xa2, 0xf6, 0x68, 0xbe, 0xf9, 0xc5, 0x32, 0x1c, 0x3a, - 0x2c, 0xc4, 0xbe, 0xc5, 0xdd, 0xd9, 0x8b, 0x9a, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x83, 0x7b, - 0x5c, 0x7c, 0x1b, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden deleted file mode 100644 index 8953d0ff..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by protoc-gen-go. -// source: google/protobuf/compiler/plugin.proto -// DO NOT EDIT! - -package google_protobuf_compiler - -import proto "github.com/golang/protobuf/proto" -import "math" -import google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor" - -// Reference proto and math imports to suppress error if they are not otherwise used. -var _ = proto.GetString -var _ = math.Inf - -type CodeGeneratorRequest struct { - FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate" json:"file_to_generate,omitempty"` - Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` - ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file" json:"proto_file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (this *CodeGeneratorRequest) Reset() { *this = CodeGeneratorRequest{} } -func (this *CodeGeneratorRequest) String() string { return proto.CompactTextString(this) } -func (*CodeGeneratorRequest) ProtoMessage() {} - -func (this *CodeGeneratorRequest) GetParameter() string { - if this != nil && this.Parameter != nil { - return *this.Parameter - } - return "" -} - -type CodeGeneratorResponse struct { - Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (this *CodeGeneratorResponse) Reset() { *this = CodeGeneratorResponse{} } -func (this *CodeGeneratorResponse) String() string { return proto.CompactTextString(this) } -func (*CodeGeneratorResponse) ProtoMessage() {} - -func (this *CodeGeneratorResponse) GetError() string { - if this != nil && this.Error != nil { - return *this.Error - } - return "" -} - -type CodeGeneratorResponse_File struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point" json:"insertion_point,omitempty"` - Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (this *CodeGeneratorResponse_File) Reset() { *this = CodeGeneratorResponse_File{} } -func (this *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(this) } -func (*CodeGeneratorResponse_File) ProtoMessage() {} - -func (this *CodeGeneratorResponse_File) GetName() string { - if this != nil && this.Name != nil { - return *this.Name - } - return "" -} - -func (this *CodeGeneratorResponse_File) GetInsertionPoint() string { - if this != nil && this.InsertionPoint != nil { - return *this.InsertionPoint - } - return "" -} - -func (this *CodeGeneratorResponse_File) GetContent() string { - if this != nil && this.Content != nil { - return *this.Content - } - return "" -} - -func init() { -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile deleted file mode 100644 index 105cdec5..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile +++ /dev/null @@ -1,73 +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 - -include ../../Make.protobuf - -test: golden testbuild - -#test: golden testbuild extension_test -# ./extension_test -# @echo PASS - -my_test/test.pb.go: my_test/test.proto - protoc --go_out=Mmulti/multi1.proto=github.com/golang/protobuf/protoc-gen-go/testdata/multi:. $< - -golden: - make -B my_test/test.pb.go - sed -i '/return.*fileDescriptor/d' my_test/test.pb.go - sed -i '/^var fileDescriptor/,/^}/d' my_test/test.pb.go - sed -i '/proto.RegisterFile.*fileDescriptor/d' my_test/test.pb.go - gofmt -w my_test/test.pb.go - diff -w my_test/test.pb.go my_test/test.pb.go.golden - -nuke: clean - -testbuild: regenerate - go test - -regenerate: - # Invoke protoc once to generate three independent .pb.go files in the same package. - protoc --go_out=. multi/multi{1,2,3}.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/golang/protobuf/protoc-gen-go/testdata/extension_base.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto deleted file mode 100644 index 94acfc1b..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto deleted file mode 100644 index fca7f600..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/extension_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go deleted file mode 100644 index 86e9c118..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/extension_user.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto deleted file mode 100644 index ff65873d..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/grpc.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto deleted file mode 100644 index b8bc41ac..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden deleted file mode 100644 index 784a4f86..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/imp.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto deleted file mode 100644 index 156e078d..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/imp2.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto deleted file mode 100644 index 3bb0632b..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/imp3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto deleted file mode 100644 index 58fc7598..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/main_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go deleted file mode 100644 index f9b5ccf2..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/multi" -) - -func TestLink(t *testing.T) { - _ = &multipb.Multi1{} - _ = &mytestpb.Request{} -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto deleted file mode 100644 index 0da6e0af..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto deleted file mode 100644 index e6bfc71b..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto deleted file mode 100644 index 146c255b..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go deleted file mode 100644 index 9ec3e129..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go +++ /dev/null @@ -1,866 +0,0 @@ -// Code generated by protoc-gen-go. -// source: my_test/test.proto -// DO NOT EDIT! - -/* -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/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/golang/protobuf/protoc-gen-go/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.ProtoPackageIsVersion2 // 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 -} - -// 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 -} - -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 -} - -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 -} - -// 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() {} - -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 (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() {} - -var extRange_Reply = []proto.ExtensionRange{ - {100, 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() {} - -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() {} - -var extRange_OtherBase = []proto.ExtensionRange{ - {100, 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() {} - -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", -} - -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", -} - -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", -} - -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 (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 (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{ - {100, 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() {} - -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 (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() {} - -var E_Tag = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*string)(nil), - Field: 103, - Name: "my.test.tag", - Tag: "bytes,103,opt,name=tag", -} - -var E_Donut = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*OtherReplyExtensions)(nil), - Field: 106, - Name: "my.test.donut", - Tag: "bytes,106,opt,name=donut", -} - -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) -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden deleted file mode 100644 index 9ec3e129..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden +++ /dev/null @@ -1,866 +0,0 @@ -// Code generated by protoc-gen-go. -// source: my_test/test.proto -// DO NOT EDIT! - -/* -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/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/golang/protobuf/protoc-gen-go/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.ProtoPackageIsVersion2 // 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 -} - -// 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 -} - -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 -} - -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 -} - -// 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() {} - -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 (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() {} - -var extRange_Reply = []proto.ExtensionRange{ - {100, 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() {} - -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() {} - -var extRange_OtherBase = []proto.ExtensionRange{ - {100, 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() {} - -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", -} - -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", -} - -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", -} - -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 (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 (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{ - {100, 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() {} - -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 (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() {} - -var E_Tag = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*string)(nil), - Field: 103, - Name: "my.test.tag", - Tag: "bytes,103,opt,name=tag", -} - -var E_Donut = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*OtherReplyExtensions)(nil), - Field: 106, - Name: "my.test.donut", - Tag: "bytes,106,opt,name=donut", -} - -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) -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto deleted file mode 100644 index 8e709463..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/protoc-gen-go/testdata/proto3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto deleted file mode 100644 index 869b9af5..00000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/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/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go deleted file mode 100644 index 89e07ae1..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/any.go +++ /dev/null @@ -1,136 +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 ptypes - -// This file implements functions to marshal proto.Message to/from -// google.protobuf.Any message. - -import ( - "fmt" - "reflect" - "strings" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/any" -) - -const googleApis = "type.googleapis.com/" - -// AnyMessageName returns the name of the message contained in a google.protobuf.Any message. -// -// Note that regular type assertions should be done using the Is -// function. AnyMessageName is provided for less common use cases like filtering a -// sequence of Any messages based on a set of allowed message type names. -func AnyMessageName(any *any.Any) (string, error) { - slash := strings.LastIndex(any.TypeUrl, "/") - if slash < 0 { - return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) - } - return any.TypeUrl[slash+1:], nil -} - -// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any. -func MarshalAny(pb proto.Message) (*any.Any, error) { - value, err := proto.Marshal(pb) - if err != nil { - return nil, err - } - return &any.Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil -} - -// DynamicAny is a value that can be passed to UnmarshalAny to automatically -// allocate a proto.Message for the type specified in a google.protobuf.Any -// message. The allocated message is stored in the embedded proto.Message. -// -// Example: -// -// var x ptypes.DynamicAny -// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } -// fmt.Printf("unmarshaled message: %v", x.Message) -type DynamicAny struct { - proto.Message -} - -// Empty returns a new proto.Message of the type specified in a -// google.protobuf.Any message. It returns an error if corresponding message -// type isn't linked in. -func Empty(any *any.Any) (proto.Message, error) { - aname, err := AnyMessageName(any) - if err != nil { - return nil, err - } - - t := proto.MessageType(aname) - if t == nil { - return nil, fmt.Errorf("any: message type %q isn't linked in", aname) - } - return reflect.New(t.Elem()).Interface().(proto.Message), nil -} - -// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any -// message and places the decoded result in pb. It returns an error if type of -// contents of Any message does not match type of pb message. -// -// pb can be a proto.Message, or a *DynamicAny. -func UnmarshalAny(any *any.Any, pb proto.Message) error { - if d, ok := pb.(*DynamicAny); ok { - if d.Message == nil { - var err error - d.Message, err = Empty(any) - if err != nil { - return err - } - } - return UnmarshalAny(any, d.Message) - } - - aname, err := AnyMessageName(any) - if err != nil { - return err - } - - mname := proto.MessageName(pb) - if aname != mname { - return fmt.Errorf("mismatched message type: got %q want %q", aname, mname) - } - return proto.Unmarshal(any.Value, pb) -} - -// Is returns true if any value contains a given message type. -func Is(any *any.Any, pb proto.Message) bool { - aname, err := AnyMessageName(any) - if err != nil { - return false - } - - return aname == proto.MessageName(pb) -} 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 f2c6906b..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/any/any.proto -// DO NOT EDIT! - -/* -Package any is a generated protocol buffer package. - -It is generated from these files: - github.com/golang/protobuf/ptypes/any/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) -// ... -// -// 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 init() { - proto.RegisterType((*Any)(nil), "google.protobuf.Any") -} - -func init() { proto.RegisterFile("github.com/golang/protobuf/ptypes/any/any.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 187 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcc, - 0xab, 0x04, 0x61, 0x3d, 0xb0, 0xb8, 0x10, 0x7f, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x1e, 0x4c, - 0x95, 0x92, 0x19, 0x17, 0xb3, 0x63, 0x5e, 0xa5, 0x90, 0x24, 0x17, 0x07, 0x48, 0x79, 0x7c, 0x69, - 0x51, 0x8e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f, 0x5a, 0x94, 0x23, 0x24, - 0xc2, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0xe1, - 0x38, 0x15, 0x71, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe7, 0xc4, 0xe1, 0x98, 0x57, 0x19, - 0x00, 0xe2, 0x04, 0x30, 0x46, 0xa9, 0x12, 0xe5, 0xb8, 0x05, 0x8c, 0x8c, 0x8b, 0x98, 0x98, 0xdd, - 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x4c, 0x0b, 0x80, 0xaa, 0xd2, 0x0b, 0x4f, 0xcd, 0xc9, - 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4e, 0x62, 0x03, 0x6b, 0x37, 0x06, 0x04, 0x00, - 0x00, 0xff, 0xff, 0xc6, 0x4d, 0x03, 0x23, 0xf6, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto deleted file mode 100644 index 81dcf46c..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.proto +++ /dev/null @@ -1,140 +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 = "github.com/golang/protobuf/ptypes/any"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option java_generate_equals_and_hash = 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) -// ... -// -// 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/golang/protobuf/ptypes/any_test.go b/vendor/github.com/golang/protobuf/ptypes/any_test.go deleted file mode 100644 index ed675b48..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/any_test.go +++ /dev/null @@ -1,113 +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 ptypes - -import ( - "testing" - - "github.com/golang/protobuf/proto" - pb "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/golang/protobuf/ptypes/any" -) - -func TestMarshalUnmarshal(t *testing.T) { - orig := &any.Any{Value: []byte("test")} - - packed, err := MarshalAny(orig) - if err != nil { - t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err) - } - - unpacked := &any.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.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 := Empty(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.FieldMask" - if _, err := Empty(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/golang/protobuf/ptypes/doc.go b/vendor/github.com/golang/protobuf/ptypes/doc.go deleted file mode 100644 index c0d595da..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/doc.go +++ /dev/null @@ -1,35 +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 ptypes contains code for interacting with well-known types. -*/ -package ptypes diff --git a/vendor/github.com/golang/protobuf/ptypes/duration.go b/vendor/github.com/golang/protobuf/ptypes/duration.go deleted file mode 100644 index 65cb0f8e..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/duration.go +++ /dev/null @@ -1,102 +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 ptypes - -// This file implements conversions between google.protobuf.Duration -// and time.Duration. - -import ( - "errors" - "fmt" - "time" - - durpb "github.com/golang/protobuf/ptypes/duration" -) - -const ( - // Range of a durpb.Duration in seconds, as specified in - // google/protobuf/duration.proto. This is about 10,000 years in seconds. - maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) - minSeconds = -maxSeconds -) - -// validateDuration determines whether the durpb.Duration is valid according to the -// definition in google/protobuf/duration.proto. A valid durpb.Duration -// may still be too large to fit into a time.Duration (the range of durpb.Duration -// is about 10,000 years, and the range of time.Duration is about 290). -func validateDuration(d *durpb.Duration) error { - if d == nil { - return errors.New("duration: nil Duration") - } - if d.Seconds < minSeconds || d.Seconds > maxSeconds { - return fmt.Errorf("duration: %v: seconds out of range", d) - } - if d.Nanos <= -1e9 || d.Nanos >= 1e9 { - return fmt.Errorf("duration: %v: nanos out of range", d) - } - // Seconds and Nanos must have the same sign, unless d.Nanos is zero. - if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { - return fmt.Errorf("duration: %v: seconds and nanos have different signs", d) - } - return nil -} - -// Duration converts a durpb.Duration to a time.Duration. Duration -// returns an error if the durpb.Duration is invalid or is too large to be -// represented in a time.Duration. -func Duration(p *durpb.Duration) (time.Duration, error) { - if err := validateDuration(p); err != nil { - return 0, err - } - d := time.Duration(p.Seconds) * time.Second - if int64(d/time.Second) != p.Seconds { - return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) - } - if p.Nanos != 0 { - d += time.Duration(p.Nanos) - if (d < 0) != (p.Nanos < 0) { - return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) - } - } - return d, nil -} - -// DurationProto converts a time.Duration to a durpb.Duration. -func DurationProto(d time.Duration) *durpb.Duration { - nanos := d.Nanoseconds() - secs := nanos / 1e9 - nanos -= secs * 1e9 - return &durpb.Duration{ - Seconds: secs, - Nanos: int32(nanos), - } -} diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go deleted file mode 100644 index 56974834..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/duration/duration.proto -// DO NOT EDIT! - -/* -Package duration is a generated protocol buffer package. - -It is generated from these files: - github.com/golang/protobuf/ptypes/duration/duration.proto - -It has these top-level messages: - Duration -*/ -package duration - -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 - -// 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. -// -// 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; -// } -// -// -type Duration struct { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. - Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` - // 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. - Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` -} - -func (m *Duration) Reset() { *m = Duration{} } -func (m *Duration) String() string { return proto.CompactTextString(m) } -func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (*Duration) XXX_WellKnownType() string { return "Duration" } - -func init() { - proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") -} - -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/duration/duration.proto", fileDescriptor0) -} - -var fileDescriptor0 = []byte{ - // 189 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x29, - 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0x33, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, - 0xd3, 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0xac, 0xb8, 0x38, 0x5c, 0xa0, 0x4a, 0x84, 0x24, 0xb8, - 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x60, - 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xd6, - 0x20, 0x08, 0xc7, 0xa9, 0x86, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x48, 0x27, 0x5e, 0x98, - 0x81, 0x01, 0x20, 0x91, 0x00, 0xc6, 0x28, 0x2d, 0xe2, 0xdd, 0xbb, 0x80, 0x91, 0x71, 0x11, 0x13, - 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xb9, 0x01, 0x50, 0xa5, 0x7a, 0xe1, 0xa9, - 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x2d, 0x49, 0x6c, 0x60, 0x33, 0x8c, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0xfb, 0xb1, 0x51, 0x0e, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto deleted file mode 100644 index 96c1796d..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto +++ /dev/null @@ -1,98 +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 = "github.com/golang/protobuf/ptypes/duration"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DurationProto"; -option java_multiple_files = true; -option java_generate_equals_and_hash = 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. -// -// 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; -// } -// -// -message Duration { - - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. - 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/golang/protobuf/ptypes/duration_test.go b/vendor/github.com/golang/protobuf/ptypes/duration_test.go deleted file mode 100644 index e761289f..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/duration_test.go +++ /dev/null @@ -1,121 +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 ptypes - -import ( - "math" - "testing" - "time" - - "github.com/golang/protobuf/proto" - durpb "github.com/golang/protobuf/ptypes/duration" -) - -const ( - minGoSeconds = math.MinInt64 / int64(1e9) - maxGoSeconds = math.MaxInt64 / int64(1e9) -) - -var durationTests = []struct { - proto *durpb.Duration - isValid bool - inRange bool - dur time.Duration -}{ - // The zero duration. - {&durpb.Duration{0, 0}, true, true, 0}, - // Some ordinary non-zero durations. - {&durpb.Duration{100, 0}, true, true, 100 * time.Second}, - {&durpb.Duration{-100, 0}, true, true, -100 * time.Second}, - {&durpb.Duration{100, 987}, true, true, 100*time.Second + 987}, - {&durpb.Duration{-100, -987}, true, true, -(100*time.Second + 987)}, - // The largest duration representable in Go. - {&durpb.Duration{maxGoSeconds, int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64}, - // The smallest duration representable in Go. - {&durpb.Duration{minGoSeconds, int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64}, - {nil, false, false, 0}, - {&durpb.Duration{-100, 987}, false, false, 0}, - {&durpb.Duration{100, -987}, false, false, 0}, - {&durpb.Duration{math.MinInt64, 0}, false, false, 0}, - {&durpb.Duration{math.MaxInt64, 0}, false, false, 0}, - // The largest valid duration. - {&durpb.Duration{maxSeconds, 1e9 - 1}, true, false, 0}, - // The smallest valid duration. - {&durpb.Duration{minSeconds, -(1e9 - 1)}, true, false, 0}, - // The smallest invalid duration above the valid range. - {&durpb.Duration{maxSeconds + 1, 0}, false, false, 0}, - // The largest invalid duration below the valid range. - {&durpb.Duration{minSeconds - 1, -(1e9 - 1)}, false, false, 0}, - // One nanosecond past the largest duration representable in Go. - {&durpb.Duration{maxGoSeconds, int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0}, - // One nanosecond past the smallest duration representable in Go. - {&durpb.Duration{minGoSeconds, int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0}, - // One second past the largest duration representable in Go. - {&durpb.Duration{maxGoSeconds + 1, int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0}, - // One second past the smallest duration representable in Go. - {&durpb.Duration{minGoSeconds - 1, 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 TestDuration(t *testing.T) { - for _, test := range durationTests { - got, err := Duration(test.proto) - gotOK := (err == nil) - wantOK := test.isValid && test.inRange - if gotOK != wantOK { - t.Errorf("Duration(%v) ok = %t, want %t", test.proto, gotOK, wantOK) - } - if err == nil && got != test.dur { - t.Errorf("Duration(%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/golang/protobuf/ptypes/empty/empty.pb.go b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go deleted file mode 100644 index 46c765a9..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/empty/empty.proto -// DO NOT EDIT! - -/* -Package empty is a generated protocol buffer package. - -It is generated from these files: - github.com/golang/protobuf/ptypes/empty/empty.proto - -It has these top-level messages: - Empty -*/ -package empty - -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 - -// 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 `{}`. -type Empty struct { -} - -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (*Empty) XXX_WellKnownType() string { return "Empty" } - -func init() { - proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") -} - -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/empty/empty.proto", fileDescriptor0) -} - -var fileDescriptor0 = []byte{ - // 150 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0x4e, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcd, - 0x2d, 0x28, 0xa9, 0x84, 0x90, 0x7a, 0x60, 0x39, 0x21, 0xfe, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, - 0x3d, 0x98, 0x4a, 0x25, 0x76, 0x2e, 0x56, 0x57, 0x90, 0xbc, 0x53, 0x25, 0x97, 0x70, 0x72, 0x7e, - 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x52, 0x27, 0xd2, - 0xce, 0x05, 0x8c, 0x8c, 0x3f, 0x18, 0x19, 0x17, 0x31, 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, - 0x73, 0x87, 0x18, 0x1a, 0x00, 0x55, 0xaa, 0x17, 0x9e, 0x9a, 0x93, 0xe3, 0x9d, 0x97, 0x5f, 0x9e, - 0x17, 0x02, 0xd2, 0x92, 0xc4, 0x06, 0x36, 0xc3, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xbb, - 0xf4, 0x0e, 0xd2, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto b/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto deleted file mode 100644 index 37f4cd10..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto +++ /dev/null @@ -1,53 +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 = "github.com/golang/protobuf/ptypes/empty"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "EmptyProto"; -option java_multiple_files = true; -option java_generate_equals_and_hash = 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/golang/protobuf/ptypes/regen.sh b/vendor/github.com/golang/protobuf/ptypes/regen.sh deleted file mode 100755 index 2a5b4e8b..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/regen.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -e -# -# This script fetches and rebuilds the "well-known types" protocol buffers. -# To run this you will need protoc and goprotobuf installed; -# see https://github.com/golang/protobuf for instructions. -# You also need Go and Git installed. - -PKG=github.com/golang/protobuf/ptypes -UPSTREAM=https://github.com/google/protobuf -UPSTREAM_SUBDIR=src/google/protobuf -PROTO_FILES=' - any.proto - duration.proto - empty.proto - struct.proto - timestamp.proto - wrappers.proto -' - -function die() { - echo 1>&2 $* - exit 1 -} - -# Sanity check that the right tools are accessible. -for tool in go git protoc protoc-gen-go; do - q=$(which $tool) || die "didn't find $tool" - echo 1>&2 "$tool: $q" -done - -tmpdir=$(mktemp -d -t regen-wkt.XXXXXX) -trap 'rm -rf $tmpdir' EXIT - -echo -n 1>&2 "finding package dir... " -pkgdir=$(go list -f '{{.Dir}}' $PKG) -echo 1>&2 $pkgdir -base=$(echo $pkgdir | sed "s,/$PKG\$,,") -echo 1>&2 "base: $base" -cd $base - -echo 1>&2 "fetching latest protos... " -git clone -q $UPSTREAM $tmpdir -# Pass 1: build mapping from upstream filename to our filename. -declare -A filename_map -for f in $(cd $PKG && find * -name '*.proto'); do - echo -n 1>&2 "looking for latest version of $f... " - up=$(cd $tmpdir/$UPSTREAM_SUBDIR && find * -name $(basename $f) | grep -v /testdata/) - echo 1>&2 $up - if [ $(echo $up | wc -w) != "1" ]; then - die "not exactly one match" - fi - filename_map[$up]=$f -done -# Pass 2: copy files -for up in "${!filename_map[@]}"; do - f=${filename_map[$up]} - shortname=$(basename $f | sed 's,\.proto$,,') - cp $tmpdir/$UPSTREAM_SUBDIR/$up $PKG/$f -done - -# Run protoc once per package. -for dir in $(find $PKG -name '*.proto' | xargs dirname | sort | uniq); do - echo 1>&2 "* $dir" - protoc --go_out=. $dir/*.proto -done -echo 1>&2 "All OK" diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go deleted file mode 100644 index 197042ed..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go +++ /dev/null @@ -1,382 +0,0 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/struct/struct.proto -// DO NOT EDIT! - -/* -Package structpb is a generated protocol buffer package. - -It is generated from these files: - github.com/golang/protobuf/ptypes/struct/struct.proto - -It has these top-level messages: - Struct - Value - ListValue -*/ -package structpb - -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 - -// `NullValue` is a singleton enumeration to represent the null value for the -// `Value` type union. -// -// The JSON representation for `NullValue` is JSON `null`. -type NullValue int32 - -const ( - // Null value. - NullValue_NULL_VALUE NullValue = 0 -) - -var NullValue_name = map[int32]string{ - 0: "NULL_VALUE", -} -var NullValue_value = map[string]int32{ - "NULL_VALUE": 0, -} - -func (x NullValue) String() string { - return proto.EnumName(NullValue_name, int32(x)) -} -func (NullValue) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (NullValue) XXX_WellKnownType() string { return "NullValue" } - -// `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. -type Struct struct { - // Unordered map of dynamically typed values. - Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Struct) Reset() { *m = Struct{} } -func (m *Struct) String() string { return proto.CompactTextString(m) } -func (*Struct) ProtoMessage() {} -func (*Struct) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (*Struct) XXX_WellKnownType() string { return "Struct" } - -func (m *Struct) GetFields() map[string]*Value { - if m != nil { - return m.Fields - } - return nil -} - -// `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. -type Value struct { - // The kind of value. - // - // Types that are valid to be assigned to Kind: - // *Value_NullValue - // *Value_NumberValue - // *Value_StringValue - // *Value_BoolValue - // *Value_StructValue - // *Value_ListValue - Kind isValue_Kind `protobuf_oneof:"kind"` -} - -func (m *Value) Reset() { *m = Value{} } -func (m *Value) String() string { return proto.CompactTextString(m) } -func (*Value) ProtoMessage() {} -func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } -func (*Value) XXX_WellKnownType() string { return "Value" } - -type isValue_Kind interface { - isValue_Kind() -} - -type Value_NullValue struct { - NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"` -} -type Value_NumberValue struct { - NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"` -} -type Value_StringValue struct { - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"` -} -type Value_BoolValue struct { - BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"` -} -type Value_StructValue struct { - StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"` -} -type Value_ListValue struct { - ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"` -} - -func (*Value_NullValue) isValue_Kind() {} -func (*Value_NumberValue) isValue_Kind() {} -func (*Value_StringValue) isValue_Kind() {} -func (*Value_BoolValue) isValue_Kind() {} -func (*Value_StructValue) isValue_Kind() {} -func (*Value_ListValue) isValue_Kind() {} - -func (m *Value) GetKind() isValue_Kind { - if m != nil { - return m.Kind - } - return nil -} - -func (m *Value) GetNullValue() NullValue { - if x, ok := m.GetKind().(*Value_NullValue); ok { - return x.NullValue - } - return NullValue_NULL_VALUE -} - -func (m *Value) GetNumberValue() float64 { - if x, ok := m.GetKind().(*Value_NumberValue); ok { - return x.NumberValue - } - return 0 -} - -func (m *Value) GetStringValue() string { - if x, ok := m.GetKind().(*Value_StringValue); ok { - return x.StringValue - } - return "" -} - -func (m *Value) GetBoolValue() bool { - if x, ok := m.GetKind().(*Value_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (m *Value) GetStructValue() *Struct { - if x, ok := m.GetKind().(*Value_StructValue); ok { - return x.StructValue - } - return nil -} - -func (m *Value) GetListValue() *ListValue { - if x, ok := m.GetKind().(*Value_ListValue); ok { - return x.ListValue - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Value) 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 _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ - (*Value_NullValue)(nil), - (*Value_NumberValue)(nil), - (*Value_StringValue)(nil), - (*Value_BoolValue)(nil), - (*Value_StructValue)(nil), - (*Value_ListValue)(nil), - } -} - -func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Value) - // kind - switch x := m.Kind.(type) { - case *Value_NullValue: - b.EncodeVarint(1<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.NullValue)) - case *Value_NumberValue: - b.EncodeVarint(2<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.NumberValue)) - case *Value_StringValue: - b.EncodeVarint(3<<3 | proto.WireBytes) - b.EncodeStringBytes(x.StringValue) - case *Value_BoolValue: - t := uint64(0) - if x.BoolValue { - t = 1 - } - b.EncodeVarint(4<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *Value_StructValue: - b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.StructValue); err != nil { - return err - } - case *Value_ListValue: - b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ListValue); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Value.Kind has unexpected type %T", x) - } - return nil -} - -func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Value) - switch tag { - case 1: // kind.null_value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Kind = &Value_NullValue{NullValue(x)} - return true, err - case 2: // kind.number_value - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Kind = &Value_NumberValue{math.Float64frombits(x)} - return true, err - case 3: // kind.string_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Kind = &Value_StringValue{x} - return true, err - case 4: // kind.bool_value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Kind = &Value_BoolValue{x != 0} - return true, err - case 5: // kind.struct_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Struct) - err := b.DecodeMessage(msg) - m.Kind = &Value_StructValue{msg} - return true, err - case 6: // kind.list_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ListValue) - err := b.DecodeMessage(msg) - m.Kind = &Value_ListValue{msg} - return true, err - default: - return false, nil - } -} - -func _Value_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Value) - // kind - switch x := m.Kind.(type) { - case *Value_NullValue: - n += proto.SizeVarint(1<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.NullValue)) - case *Value_NumberValue: - n += proto.SizeVarint(2<<3 | proto.WireFixed64) - n += 8 - case *Value_StringValue: - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.StringValue))) - n += len(x.StringValue) - case *Value_BoolValue: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += 1 - case *Value_StructValue: - s := proto.Size(x.StructValue) - n += proto.SizeVarint(5<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Value_ListValue: - s := proto.Size(x.ListValue) - n += proto.SizeVarint(6<<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 -} - -// `ListValue` is a wrapper around a repeated field of values. -// -// The JSON representation for `ListValue` is JSON array. -type ListValue struct { - // Repeated field of dynamically typed values. - Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` -} - -func (m *ListValue) Reset() { *m = ListValue{} } -func (m *ListValue) String() string { return proto.CompactTextString(m) } -func (*ListValue) ProtoMessage() {} -func (*ListValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } -func (*ListValue) XXX_WellKnownType() string { return "ListValue" } - -func (m *ListValue) GetValues() []*Value { - if m != nil { - return m.Values - } - return nil -} - -func init() { - proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") - proto.RegisterType((*Value)(nil), "google.protobuf.Value") - proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") - proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) -} - -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/struct/struct.proto", fileDescriptor0) -} - -var fileDescriptor0 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0x80, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa0, 0xa1, 0x7b, 0x09, - 0x22, 0x09, 0x56, 0x04, 0x31, 0x5e, 0x0c, 0xac, 0xbb, 0x60, 0x58, 0x62, 0x74, 0x57, 0xf0, 0x52, - 0x9a, 0x34, 0x8d, 0xa1, 0xd3, 0x99, 0x90, 0xcc, 0x28, 0x3d, 0xfa, 0x2f, 0x3c, 0x8a, 0x47, 0x8f, - 0xfe, 0x42, 0x99, 0x99, 0x24, 0x4a, 0x4b, 0xc1, 0xd3, 0xf4, 0xbd, 0xf9, 0xde, 0x37, 0xef, 0xbd, - 0x06, 0x9e, 0x97, 0x15, 0xff, 0x2c, 0x32, 0x3f, 0x67, 0x9b, 0xa0, 0x64, 0x64, 0x41, 0xcb, 0xa0, - 0x6e, 0x18, 0x67, 0x99, 0x58, 0x05, 0x35, 0xdf, 0xd6, 0x45, 0x1b, 0xb4, 0xbc, 0x11, 0x39, 0xef, - 0x0e, 0x5f, 0xdd, 0xe2, 0x3b, 0x25, 0x63, 0x25, 0x29, 0xfc, 0x9e, 0x9d, 0x7e, 0x47, 0x60, 0xbd, - 0x57, 0x04, 0x0e, 0xc1, 0x5a, 0x55, 0x05, 0x59, 0xb6, 0x13, 0xe4, 0x9a, 0x9e, 0x33, 0x3b, 0xf3, - 0x77, 0x60, 0x5f, 0x83, 0xfe, 0x1b, 0x45, 0x9d, 0x53, 0xde, 0x6c, 0xd3, 0xae, 0xe4, 0xf4, 0x1d, - 0x38, 0xff, 0xa4, 0xf1, 0x09, 0x98, 0xeb, 0x62, 0x3b, 0x41, 0x2e, 0xf2, 0xec, 0x54, 0xfe, 0xc4, - 0x4f,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0x93, 0xc8, 0x38, 0x41, 0x9f, 0x9e, 0xfe, 0xef, 0x87, - 0x19, 0xea, 0xa3, 0xce, 0x7e, 0x20, 0xf4, 0xd3, 0x30, 0x2f, 0x92, 0xe8, 0x97, 0xf1, 0xf0, 0x42, - 0xcb, 0x93, 0xbe, 0xbf, 0x8f, 0x05, 0x21, 0x6f, 0x29, 0xfb, 0x4a, 0x3f, 0xc8, 0xca, 0xcc, 0x52, - 0xaa, 0x67, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xcf, 0x6d, 0x50, 0xfe, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto deleted file mode 100644 index beeba811..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/struct/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 go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "StructProto"; -option java_multiple_files = true; -option java_generate_equals_and_hash = 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/golang/protobuf/ptypes/timestamp.go b/vendor/github.com/golang/protobuf/ptypes/timestamp.go deleted file mode 100644 index 1b365762..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp.go +++ /dev/null @@ -1,125 +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 ptypes - -// This file implements operations on google.protobuf.Timestamp. - -import ( - "errors" - "fmt" - "time" - - tspb "github.com/golang/protobuf/ptypes/timestamp" -) - -const ( - // Seconds field of the earliest valid Timestamp. - // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). - minValidSeconds = -62135596800 - // Seconds field just after the latest valid Timestamp. - // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). - maxValidSeconds = 253402300800 -) - -// validateTimestamp determines whether a Timestamp is valid. -// A valid timestamp represents a time in the range -// [0001-01-01, 10000-01-01) and has a Nanos field -// in the range [0, 1e9). -// -// If the Timestamp is valid, validateTimestamp returns nil. -// Otherwise, it returns an error that describes -// the problem. -// -// Every valid Timestamp can be represented by a time.Time, but the converse is not true. -func validateTimestamp(ts *tspb.Timestamp) error { - if ts == nil { - return errors.New("timestamp: nil Timestamp") - } - if ts.Seconds < minValidSeconds { - return fmt.Errorf("timestamp: %v before 0001-01-01", ts) - } - if ts.Seconds >= maxValidSeconds { - return fmt.Errorf("timestamp: %v after 10000-01-01", ts) - } - if ts.Nanos < 0 || ts.Nanos >= 1e9 { - return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts) - } - return nil -} - -// Timestamp converts a google.protobuf.Timestamp proto to a time.Time. -// It returns an error if the argument is invalid. -// -// Unlike most Go functions, if Timestamp returns an error, the first return value -// is not the zero time.Time. Instead, it is the value obtained from the -// time.Unix function when passed the contents of the Timestamp, in the UTC -// locale. This may or may not be a meaningful time; many invalid Timestamps -// do map to valid time.Times. -// -// A nil Timestamp returns an error. The first return value in that case is -// undefined. -func Timestamp(ts *tspb.Timestamp) (time.Time, error) { - // Don't return the zero value on error, because corresponds to a valid - // timestamp. Instead return whatever time.Unix gives us. - var t time.Time - if ts == nil { - t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp - } else { - t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() - } - return t, validateTimestamp(ts) -} - -// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. -// It returns an error if the resulting Timestamp is invalid. -func TimestampProto(t time.Time) (*tspb.Timestamp, error) { - seconds := t.Unix() - nanos := int32(t.Sub(time.Unix(seconds, 0))) - ts := &tspb.Timestamp{ - Seconds: seconds, - Nanos: nanos, - } - if err := validateTimestamp(ts); err != nil { - return nil, err - } - return ts, nil -} - -// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid -// Timestamps, it returns an error message in parentheses. -func TimestampString(ts *tspb.Timestamp) string { - t, err := Timestamp(ts) - if err != nil { - return fmt.Sprintf("(%v)", err) - } - return t.Format(time.RFC3339Nano) -} diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go deleted file mode 100644 index ffcc5159..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto -// DO NOT EDIT! - -/* -Package timestamp is a generated protocol buffer package. - -It is generated from these files: - github.com/golang/protobuf/ptypes/timestamp/timestamp.proto - -It has these top-level messages: - Timestamp -*/ -package timestamp - -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 - -// 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). -// -// 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. -// -// now = time.time() -// seconds = int(now) -// nanos = int((now - seconds) * 10**9) -// timestamp = Timestamp(seconds=seconds, nanos=nanos) -// -// -type Timestamp struct { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` - // 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. - Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` -} - -func (m *Timestamp) Reset() { *m = Timestamp{} } -func (m *Timestamp) String() string { return proto.CompactTextString(m) } -func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } - -func init() { - proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") -} - -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/timestamp/timestamp.proto", fileDescriptor0) -} - -var fileDescriptor0 = []byte{ - // 194 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0xc9, - 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x40, 0xb0, 0xf4, 0xc0, 0x6a, 0x84, 0xf8, 0xd3, 0xf3, - 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x60, 0x3a, 0x94, 0xac, 0xb9, 0x38, 0x43, 0x60, 0x6a, 0x84, 0x24, - 0xb8, 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, - 0x60, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, - 0xd6, 0x20, 0x08, 0xc7, 0xa9, 0x91, 0x91, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x50, 0x27, - 0x3e, 0xb8, 0x91, 0x01, 0x20, 0xa1, 0x00, 0xc6, 0x28, 0x6d, 0x12, 0x1c, 0xbd, 0x80, 0x91, 0xf1, - 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, 0xc3, 0x03, - 0xa0, 0xca, 0xf5, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0xda, 0x92, - 0xd8, 0xc0, 0xe6, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x17, 0x5f, 0xb7, 0xdc, 0x17, 0x01, - 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto deleted file mode 100644 index 7992a858..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto +++ /dev/null @@ -1,111 +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 = "github.com/golang/protobuf/ptypes/timestamp"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "TimestampProto"; -option java_multiple_files = true; -option java_generate_equals_and_hash = 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). -// -// 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. -// -// now = time.time() -// seconds = int(now) -// nanos = int((now - seconds) * 10**9) -// timestamp = Timestamp(seconds=seconds, nanos=nanos) -// -// -message Timestamp { - - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 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/golang/protobuf/ptypes/timestamp_test.go b/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go deleted file mode 100644 index 114a7f9f..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go +++ /dev/null @@ -1,138 +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 ptypes - -import ( - "math" - "testing" - "time" - - "github.com/golang/protobuf/proto" - tspb "github.com/golang/protobuf/ptypes/timestamp" -) - -var tests = []struct { - ts *tspb.Timestamp - valid bool - t time.Time -}{ - // The timestamp representing the Unix epoch date. - {&tspb.Timestamp{0, 0}, true, utcDate(1970, 1, 1)}, - // The smallest representable timestamp. - {&tspb.Timestamp{math.MinInt64, math.MinInt32}, false, - time.Unix(math.MinInt64, math.MinInt32).UTC()}, - // The smallest representable timestamp with non-negative nanos. - {&tspb.Timestamp{math.MinInt64, 0}, false, time.Unix(math.MinInt64, 0).UTC()}, - // The earliest valid timestamp. - {&tspb.Timestamp{minValidSeconds, 0}, true, utcDate(1, 1, 1)}, - //"0001-01-01T00:00:00Z"}, - // The largest representable timestamp. - {&tspb.Timestamp{math.MaxInt64, math.MaxInt32}, false, - time.Unix(math.MaxInt64, math.MaxInt32).UTC()}, - // The largest representable timestamp with nanos in range. - {&tspb.Timestamp{math.MaxInt64, 1e9 - 1}, false, - time.Unix(math.MaxInt64, 1e9-1).UTC()}, - // The largest valid timestamp. - {&tspb.Timestamp{maxValidSeconds - 1, 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. - {&tspb.Timestamp{maxValidSeconds, 0}, false, time.Unix(maxValidSeconds, 0).UTC()}, - // A date before the epoch. - {&tspb.Timestamp{-281836800, 0}, true, utcDate(1961, 1, 26)}, - // A date after the epoch. - {&tspb.Timestamp{1296000000, 0}, true, utcDate(2011, 1, 26)}, - // A date after the epoch, in the middle of the day. - {&tspb.Timestamp{1296012345, 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 TestTimestamp(t *testing.T) { - for _, s := range tests { - got, err := Timestamp(s.ts) - if (err == nil) != s.valid { - t.Errorf("Timestamp(%v) error = %v, but valid = %t", s.ts, err, s.valid) - } else if s.valid && got != s.t { - t.Errorf("Timestamp(%v) = %v, want %v", s.ts, got, s.t) - } - } - // Special case: a nil Timestamp is an error, but returns the 0 Unix time. - got, err := Timestamp(nil) - want := time.Unix(0, 0).UTC() - if got != want { - t.Errorf("Timestamp(nil) = %v, want %v", got, want) - } - if err == nil { - t.Errorf("Timestamp(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 *tspb.Timestamp - want string - }{ - // Not much testing needed because presumably time.Format is - // well-tested. - {&tspb.Timestamp{0, 0}, "1970-01-01T00:00:00Z"}, - {&tspb.Timestamp{minValidSeconds - 1, 0}, "(timestamp: seconds:-62135596801 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) -} diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go deleted file mode 100644 index 5e52a81c..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/wrappers/wrappers.proto -// DO NOT EDIT! - -/* -Package wrappers is a generated protocol buffer package. - -It is generated from these files: - github.com/golang/protobuf/ptypes/wrappers/wrappers.proto - -It has these top-level messages: - DoubleValue - FloatValue - Int64Value - UInt64Value - Int32Value - UInt32Value - BoolValue - StringValue - BytesValue -*/ -package wrappers - -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 - -// Wrapper message for `double`. -// -// The JSON representation for `DoubleValue` is JSON number. -type DoubleValue struct { - // The double value. - Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` -} - -func (m *DoubleValue) Reset() { *m = DoubleValue{} } -func (m *DoubleValue) String() string { return proto.CompactTextString(m) } -func (*DoubleValue) ProtoMessage() {} -func (*DoubleValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" } - -// Wrapper message for `float`. -// -// The JSON representation for `FloatValue` is JSON number. -type FloatValue struct { - // The float value. - Value float32 `protobuf:"fixed32,1,opt,name=value" json:"value,omitempty"` -} - -func (m *FloatValue) Reset() { *m = FloatValue{} } -func (m *FloatValue) String() string { return proto.CompactTextString(m) } -func (*FloatValue) ProtoMessage() {} -func (*FloatValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } -func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" } - -// Wrapper message for `int64`. -// -// The JSON representation for `Int64Value` is JSON string. -type Int64Value struct { - // The int64 value. - Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` -} - -func (m *Int64Value) Reset() { *m = Int64Value{} } -func (m *Int64Value) String() string { return proto.CompactTextString(m) } -func (*Int64Value) ProtoMessage() {} -func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } -func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" } - -// Wrapper message for `uint64`. -// -// The JSON representation for `UInt64Value` is JSON string. -type UInt64Value struct { - // The uint64 value. - Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` -} - -func (m *UInt64Value) Reset() { *m = UInt64Value{} } -func (m *UInt64Value) String() string { return proto.CompactTextString(m) } -func (*UInt64Value) ProtoMessage() {} -func (*UInt64Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } -func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" } - -// Wrapper message for `int32`. -// -// The JSON representation for `Int32Value` is JSON number. -type Int32Value struct { - // The int32 value. - Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` -} - -func (m *Int32Value) Reset() { *m = Int32Value{} } -func (m *Int32Value) String() string { return proto.CompactTextString(m) } -func (*Int32Value) ProtoMessage() {} -func (*Int32Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } -func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" } - -// Wrapper message for `uint32`. -// -// The JSON representation for `UInt32Value` is JSON number. -type UInt32Value struct { - // The uint32 value. - Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` -} - -func (m *UInt32Value) Reset() { *m = UInt32Value{} } -func (m *UInt32Value) String() string { return proto.CompactTextString(m) } -func (*UInt32Value) ProtoMessage() {} -func (*UInt32Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } -func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" } - -// Wrapper message for `bool`. -// -// The JSON representation for `BoolValue` is JSON `true` and `false`. -type BoolValue struct { - // The bool value. - Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` -} - -func (m *BoolValue) Reset() { *m = BoolValue{} } -func (m *BoolValue) String() string { return proto.CompactTextString(m) } -func (*BoolValue) ProtoMessage() {} -func (*BoolValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } -func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" } - -// Wrapper message for `string`. -// -// The JSON representation for `StringValue` is JSON string. -type StringValue struct { - // The string value. - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` -} - -func (m *StringValue) Reset() { *m = StringValue{} } -func (m *StringValue) String() string { return proto.CompactTextString(m) } -func (*StringValue) ProtoMessage() {} -func (*StringValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } -func (*StringValue) XXX_WellKnownType() string { return "StringValue" } - -// Wrapper message for `bytes`. -// -// The JSON representation for `BytesValue` is JSON string. -type BytesValue struct { - // The bytes value. - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *BytesValue) Reset() { *m = BytesValue{} } -func (m *BytesValue) String() string { return proto.CompactTextString(m) } -func (*BytesValue) ProtoMessage() {} -func (*BytesValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } -func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" } - -func init() { - proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue") - proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue") - proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value") - proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value") - proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value") - proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value") - proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue") - proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue") - proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") -} - -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/wrappers/wrappers.proto", fileDescriptor0) -} - -var fileDescriptor0 = []byte{ - // 260 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x2f, - 0x4a, 0x2c, 0x28, 0x48, 0x2d, 0x42, 0x30, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, 0xd3, - 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0x94, 0xb9, 0xb8, 0x5d, 0xf2, 0x4b, 0x93, 0x72, 0x52, 0xc3, - 0x12, 0x73, 0x4a, 0x53, 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x40, 0x0c, 0x09, 0x46, 0x05, 0x46, 0x0d, - 0xc6, 0x20, 0x08, 0x47, 0x49, 0x89, 0x8b, 0xcb, 0x2d, 0x27, 0x3f, 0xb1, 0x04, 0x8b, 0x1a, 0x26, - 0x24, 0x35, 0x9e, 0x79, 0x25, 0x66, 0x26, 0x58, 0xd4, 0x30, 0xc3, 0xd4, 0x28, 0x73, 0x71, 0x87, - 0xe2, 0x52, 0xc4, 0x82, 0x6a, 0x90, 0xb1, 0x11, 0x16, 0x35, 0xac, 0x68, 0x06, 0x61, 0x55, 0xc4, - 0x0b, 0x53, 0xa4, 0xc8, 0xc5, 0xe9, 0x94, 0x9f, 0x9f, 0x83, 0x45, 0x09, 0x07, 0x92, 0x39, 0xc1, - 0x25, 0x45, 0x99, 0x79, 0xe9, 0x58, 0x14, 0x71, 0x22, 0x39, 0xc8, 0xa9, 0xb2, 0x24, 0xb5, 0x18, - 0x8b, 0x1a, 0x1e, 0xa8, 0x1a, 0xa7, 0x7a, 0x2e, 0xe1, 0xe4, 0xfc, 0x5c, 0x3d, 0xb4, 0xd0, 0x75, - 0xe2, 0x0d, 0x87, 0x06, 0x7f, 0x00, 0x48, 0x24, 0x80, 0x31, 0x4a, 0x8b, 0xf8, 0xa8, 0x5b, 0xc0, - 0xc8, 0xf8, 0x83, 0x91, 0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, - 0xd1, 0x01, 0x50, 0xd5, 0x7a, 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, - 0x5d, 0x49, 0x6c, 0x60, 0x63, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xdf, 0x64, 0x4b, - 0x1c, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto deleted file mode 100644 index 4828ad9a..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto +++ /dev/null @@ -1,119 +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 = "github.com/golang/protobuf/ptypes/wrappers"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "WrappersProto"; -option java_multiple_files = true; -option java_generate_equals_and_hash = 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/google/uuid/json_test.go b/vendor/github.com/google/uuid/json_test.go deleted file mode 100644 index 245f91ed..00000000 --- a/vendor/github.com/google/uuid/json_test.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "encoding/json" - "reflect" - "testing" -) - -var testUUID = Must(Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")) - -func TestJSON(t *testing.T) { - type S struct { - ID1 UUID - ID2 UUID - } - s1 := S{ID1: testUUID} - data, err := json.Marshal(&s1) - if err != nil { - t.Fatal(err) - } - var s2 S - if err := json.Unmarshal(data, &s2); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(&s1, &s2) { - t.Errorf("got %#v, want %#v", s2, s1) - } -} - -func BenchmarkUUID_MarshalJSON(b *testing.B) { - x := &struct { - UUID UUID `json:"uuid"` - }{} - var err error - x.UUID, err = Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") - if err != nil { - b.Fatal(err) - } - for i := 0; i < b.N; i++ { - js, err := json.Marshal(x) - if err != nil { - b.Fatalf("marshal json: %#v (%v)", js, err) - } - } -} - -func BenchmarkUUID_UnmarshalJSON(b *testing.B) { - js := []byte(`{"uuid":"f47ac10b-58cc-0372-8567-0e02b2c3d479"}`) - var x *struct { - UUID UUID `json:"uuid"` - } - for i := 0; i < b.N; i++ { - err := json.Unmarshal(js, &x) - if err != nil { - b.Fatalf("marshal json: %#v (%v)", js, err) - } - } -} diff --git a/vendor/github.com/google/uuid/seq_test.go b/vendor/github.com/google/uuid/seq_test.go deleted file mode 100644 index 853a4aa3..00000000 --- a/vendor/github.com/google/uuid/seq_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "flag" - "runtime" - "testing" - "time" -) - -// This test is only run when --regressions is passed on the go test line. -var regressions = flag.Bool("regressions", false, "run uuid regression tests") - -// TestClockSeqRace tests for a particular race condition of returning two -// identical Version1 UUIDs. The duration of 1 minute was chosen as the race -// condition, before being fixed, nearly always occured in under 30 seconds. -func TestClockSeqRace(t *testing.T) { - if !*regressions { - t.Skip("skipping regression tests") - } - duration := time.Minute - - done := make(chan struct{}) - defer close(done) - - ch := make(chan UUID, 10000) - ncpu := runtime.NumCPU() - switch ncpu { - case 0, 1: - // We can't run the test effectively. - t.Skip("skipping race test, only one CPU detected") - return - default: - runtime.GOMAXPROCS(ncpu) - } - for i := 0; i < ncpu; i++ { - go func() { - for { - select { - case <-done: - return - case ch <- Must(NewUUID()): - } - } - }() - } - - uuids := make(map[string]bool) - cnt := 0 - start := time.Now() - for u := range ch { - s := u.String() - if uuids[s] { - t.Errorf("duplicate uuid after %d in %v: %s", cnt, time.Since(start), s) - return - } - uuids[s] = true - if time.Since(start) > duration { - return - } - cnt++ - } -} diff --git a/vendor/github.com/google/uuid/sql_test.go b/vendor/github.com/google/uuid/sql_test.go deleted file mode 100644 index 4fbd01bd..00000000 --- a/vendor/github.com/google/uuid/sql_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "strings" - "testing" -) - -func TestScan(t *testing.T) { - var stringTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d479" - var badTypeTest int = 6 - var invalidTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d4" - - byteTest := make([]byte, 16) - byteTestUUID := Must(Parse(stringTest)) - copy(byteTest, byteTestUUID[:]) - - // sunny day tests - - var uuid UUID - err := (&uuid).Scan(stringTest) - if err != nil { - t.Fatal(err) - } - - err = (&uuid).Scan([]byte(stringTest)) - if err != nil { - t.Fatal(err) - } - - err = (&uuid).Scan(byteTest) - if err != nil { - t.Fatal(err) - } - - // bad type tests - - err = (&uuid).Scan(badTypeTest) - if err == nil { - t.Error("int correctly parsed and shouldn't have") - } - if !strings.Contains(err.Error(), "unable to scan type") { - t.Error("attempting to parse an int returned an incorrect error message") - } - - // invalid/incomplete uuids - - err = (&uuid).Scan(invalidTest) - if err == nil { - t.Error("invalid uuid was parsed without error") - } - if !strings.Contains(err.Error(), "invalid UUID") { - t.Error("attempting to parse an invalid UUID returned an incorrect error message") - } - - err = (&uuid).Scan(byteTest[:len(byteTest)-2]) - if err == nil { - t.Error("invalid byte uuid was parsed without error") - } - if !strings.Contains(err.Error(), "invalid UUID") { - t.Error("attempting to parse an invalid byte UUID returned an incorrect error message") - } - - // empty tests - - uuid = UUID{} - var emptySlice []byte - err = (&uuid).Scan(emptySlice) - if err != nil { - t.Fatal(err) - } - - for _, v := range uuid { - if v != 0 { - t.Error("UUID was not nil after scanning empty byte slice") - } - } - - uuid = UUID{} - var emptyString string - err = (&uuid).Scan(emptyString) - if err != nil { - t.Fatal(err) - } - for _, v := range uuid { - if v != 0 { - t.Error("UUID was not nil after scanning empty byte slice") - } - } - - uuid = UUID{} - err = (&uuid).Scan(nil) - if err != nil { - t.Fatal(err) - } - for _, v := range uuid { - if v != 0 { - t.Error("UUID was not nil after scanning nil") - } - } -} - -func TestValue(t *testing.T) { - stringTest := "f47ac10b-58cc-0372-8567-0e02b2c3d479" - uuid := Must(Parse(stringTest)) - val, _ := uuid.Value() - if val != stringTest { - t.Error("Value() did not return expected string") - } -} diff --git a/vendor/github.com/google/uuid/uuid_test.go b/vendor/github.com/google/uuid/uuid_test.go deleted file mode 100644 index 2426168d..00000000 --- a/vendor/github.com/google/uuid/uuid_test.go +++ /dev/null @@ -1,525 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "bytes" - "fmt" - "os" - "strings" - "testing" - "time" - "unsafe" -) - -type test struct { - in string - version Version - variant Variant - isuuid bool -} - -var tests = []test{ - {"f47ac10b-58cc-0372-8567-0e02b2c3d479", 0, RFC4122, true}, - {"f47ac10b-58cc-1372-8567-0e02b2c3d479", 1, RFC4122, true}, - {"f47ac10b-58cc-2372-8567-0e02b2c3d479", 2, RFC4122, true}, - {"f47ac10b-58cc-3372-8567-0e02b2c3d479", 3, RFC4122, true}, - {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true}, - {"f47ac10b-58cc-5372-8567-0e02b2c3d479", 5, RFC4122, true}, - {"f47ac10b-58cc-6372-8567-0e02b2c3d479", 6, RFC4122, true}, - {"f47ac10b-58cc-7372-8567-0e02b2c3d479", 7, RFC4122, true}, - {"f47ac10b-58cc-8372-8567-0e02b2c3d479", 8, RFC4122, true}, - {"f47ac10b-58cc-9372-8567-0e02b2c3d479", 9, RFC4122, true}, - {"f47ac10b-58cc-a372-8567-0e02b2c3d479", 10, RFC4122, true}, - {"f47ac10b-58cc-b372-8567-0e02b2c3d479", 11, RFC4122, true}, - {"f47ac10b-58cc-c372-8567-0e02b2c3d479", 12, RFC4122, true}, - {"f47ac10b-58cc-d372-8567-0e02b2c3d479", 13, RFC4122, true}, - {"f47ac10b-58cc-e372-8567-0e02b2c3d479", 14, RFC4122, true}, - {"f47ac10b-58cc-f372-8567-0e02b2c3d479", 15, RFC4122, true}, - - {"urn:uuid:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, - {"URN:UUID:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-1567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-2567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-3567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-4567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-5567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-6567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-7567-0e02b2c3d479", 4, Reserved, true}, - {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true}, - {"f47ac10b-58cc-4372-9567-0e02b2c3d479", 4, RFC4122, true}, - {"f47ac10b-58cc-4372-a567-0e02b2c3d479", 4, RFC4122, true}, - {"f47ac10b-58cc-4372-b567-0e02b2c3d479", 4, RFC4122, true}, - {"f47ac10b-58cc-4372-c567-0e02b2c3d479", 4, Microsoft, true}, - {"f47ac10b-58cc-4372-d567-0e02b2c3d479", 4, Microsoft, true}, - {"f47ac10b-58cc-4372-e567-0e02b2c3d479", 4, Future, true}, - {"f47ac10b-58cc-4372-f567-0e02b2c3d479", 4, Future, true}, - - {"f47ac10b158cc-5372-a567-0e02b2c3d479", 0, Invalid, false}, - {"f47ac10b-58cc25372-a567-0e02b2c3d479", 0, Invalid, false}, - {"f47ac10b-58cc-53723a567-0e02b2c3d479", 0, Invalid, false}, - {"f47ac10b-58cc-5372-a56740e02b2c3d479", 0, Invalid, false}, - {"f47ac10b-58cc-5372-a567-0e02-2c3d479", 0, Invalid, false}, - {"g47ac10b-58cc-4372-a567-0e02b2c3d479", 0, Invalid, false}, -} - -var constants = []struct { - c interface{} - name string -}{ - {Person, "Person"}, - {Group, "Group"}, - {Org, "Org"}, - {Invalid, "Invalid"}, - {RFC4122, "RFC4122"}, - {Reserved, "Reserved"}, - {Microsoft, "Microsoft"}, - {Future, "Future"}, - {Domain(17), "Domain17"}, - {Variant(42), "BadVariant42"}, -} - -func testTest(t *testing.T, in string, tt test) { - uuid, err := Parse(in) - if ok := (err == nil); ok != tt.isuuid { - t.Errorf("Parse(%s) got %v expected %v\b", in, ok, tt.isuuid) - } - if err != nil { - return - } - - if v := uuid.Variant(); v != tt.variant { - t.Errorf("Variant(%s) got %d expected %d\b", in, v, tt.variant) - } - if v := uuid.Version(); v != tt.version { - t.Errorf("Version(%s) got %d expected %d\b", in, v, tt.version) - } -} - -func testBytes(t *testing.T, in []byte, tt test) { - uuid, err := ParseBytes(in) - if ok := (err == nil); ok != tt.isuuid { - t.Errorf("ParseBytes(%s) got %v expected %v\b", in, ok, tt.isuuid) - } - if err != nil { - return - } - suuid, _ := Parse(string(in)) - if uuid != suuid { - t.Errorf("ParseBytes(%s) got %v expected %v\b", in, uuid, suuid) - } -} - -func TestUUID(t *testing.T) { - for _, tt := range tests { - testTest(t, tt.in, tt) - testTest(t, strings.ToUpper(tt.in), tt) - testBytes(t, []byte(tt.in), tt) - } -} - -func TestConstants(t *testing.T) { - for x, tt := range constants { - v, ok := tt.c.(fmt.Stringer) - if !ok { - t.Errorf("%x: %v: not a stringer", x, v) - } else if s := v.String(); s != tt.name { - v, _ := tt.c.(int) - t.Errorf("%x: Constant %T:%d gives %q, expected %q", x, tt.c, v, s, tt.name) - } - } -} - -func TestRandomUUID(t *testing.T) { - m := make(map[string]bool) - for x := 1; x < 32; x++ { - uuid := New() - s := uuid.String() - if m[s] { - t.Errorf("NewRandom returned duplicated UUID %s", s) - } - m[s] = true - if v := uuid.Version(); v != 4 { - t.Errorf("Random UUID of version %s", v) - } - if uuid.Variant() != RFC4122 { - t.Errorf("Random UUID is variant %d", uuid.Variant()) - } - } -} - -func TestNew(t *testing.T) { - m := make(map[UUID]bool) - for x := 1; x < 32; x++ { - s := New() - if m[s] { - t.Errorf("New returned duplicated UUID %s", s) - } - m[s] = true - uuid, err := Parse(s.String()) - if err != nil { - t.Errorf("New.String() returned %q which does not decode", s) - continue - } - if v := uuid.Version(); v != 4 { - t.Errorf("Random UUID of version %s", v) - } - if uuid.Variant() != RFC4122 { - t.Errorf("Random UUID is variant %d", uuid.Variant()) - } - } -} - -func TestClockSeq(t *testing.T) { - // Fake time.Now for this test to return a monotonically advancing time; restore it at end. - defer func(orig func() time.Time) { timeNow = orig }(timeNow) - monTime := time.Now() - timeNow = func() time.Time { - monTime = monTime.Add(1 * time.Second) - return monTime - } - - SetClockSequence(-1) - uuid1, err := NewUUID() - if err != nil { - t.Fatalf("could not create UUID: %v", err) - } - uuid2, err := NewUUID() - if err != nil { - t.Fatalf("could not create UUID: %v", err) - } - - if s1, s2 := uuid1.ClockSequence(), uuid2.ClockSequence(); s1 != s2 { - t.Errorf("clock sequence %d != %d", s1, s2) - } - - SetClockSequence(-1) - uuid2, err = NewUUID() - if err != nil { - t.Fatalf("could not create UUID: %v", err) - } - - // Just on the very off chance we generated the same sequence - // two times we try again. - if uuid1.ClockSequence() == uuid2.ClockSequence() { - SetClockSequence(-1) - uuid2, err = NewUUID() - if err != nil { - t.Fatalf("could not create UUID: %v", err) - } - } - if s1, s2 := uuid1.ClockSequence(), uuid2.ClockSequence(); s1 == s2 { - t.Errorf("Duplicate clock sequence %d", s1) - } - - SetClockSequence(0x1234) - uuid1, err = NewUUID() - if err != nil { - t.Fatalf("could not create UUID: %v", err) - } - if seq := uuid1.ClockSequence(); seq != 0x1234 { - t.Errorf("%s: expected seq 0x1234 got 0x%04x", uuid1, seq) - } -} - -func TestCoding(t *testing.T) { - text := "7d444840-9dc0-11d1-b245-5ffdce74fad2" - urn := "urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2" - data := UUID{ - 0x7d, 0x44, 0x48, 0x40, - 0x9d, 0xc0, - 0x11, 0xd1, - 0xb2, 0x45, - 0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2, - } - if v := data.String(); v != text { - t.Errorf("%x: encoded to %s, expected %s", data, v, text) - } - if v := data.URN(); v != urn { - t.Errorf("%x: urn is %s, expected %s", data, v, urn) - } - - uuid, err := Parse(text) - if err != nil { - t.Errorf("Parse returned unexpected error %v", err) - } - if data != uuid { - t.Errorf("%s: decoded to %s, expected %s", text, uuid, data) - } -} - -func TestVersion1(t *testing.T) { - uuid1, err := NewUUID() - if err != nil { - t.Fatalf("could not create UUID: %v", err) - } - uuid2, err := NewUUID() - if err != nil { - t.Fatalf("could not create UUID: %v", err) - } - - if uuid1 == uuid2 { - t.Errorf("%s:duplicate uuid", uuid1) - } - if v := uuid1.Version(); v != 1 { - t.Errorf("%s: version %s expected 1", uuid1, v) - } - if v := uuid2.Version(); v != 1 { - t.Errorf("%s: version %s expected 1", uuid2, v) - } - n1 := uuid1.NodeID() - n2 := uuid2.NodeID() - if !bytes.Equal(n1, n2) { - t.Errorf("Different nodes %x != %x", n1, n2) - } - t1 := uuid1.Time() - t2 := uuid2.Time() - q1 := uuid1.ClockSequence() - q2 := uuid2.ClockSequence() - - switch { - case t1 == t2 && q1 == q2: - t.Error("time stopped") - case t1 > t2 && q1 == q2: - t.Error("time reversed") - case t1 < t2 && q1 != q2: - t.Error("clock sequence chaned unexpectedly") - } -} - -func TestNode(t *testing.T) { - // This test is mostly to make sure we don't leave nodeMu locked. - ifname = "" - if ni := NodeInterface(); ni != "" { - t.Errorf("NodeInterface got %q, want %q", ni, "") - } - if SetNodeInterface("xyzzy") { - t.Error("SetNodeInterface succeeded on a bad interface name") - } - if !SetNodeInterface("") { - t.Error("SetNodeInterface failed") - } - if ni := NodeInterface(); ni == "" { - t.Error("NodeInterface returned an empty string") - } - - ni := NodeID() - if len(ni) != 6 { - t.Errorf("ni got %d bytes, want 6", len(ni)) - } - hasData := false - for _, b := range ni { - if b != 0 { - hasData = true - } - } - if !hasData { - t.Error("nodeid is all zeros") - } - - id := []byte{1, 2, 3, 4, 5, 6, 7, 8} - SetNodeID(id) - ni = NodeID() - if !bytes.Equal(ni, id[:6]) { - t.Errorf("got nodeid %v, want %v", ni, id[:6]) - } - - if ni := NodeInterface(); ni != "user" { - t.Errorf("got inteface %q, want %q", ni, "user") - } -} - -func TestNodeAndTime(t *testing.T) { - // Time is February 5, 1998 12:30:23.136364800 AM GMT - - uuid, err := Parse("7d444840-9dc0-11d1-b245-5ffdce74fad2") - if err != nil { - t.Fatalf("Parser returned unexpected error %v", err) - } - node := []byte{0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2} - - ts := uuid.Time() - c := time.Unix(ts.UnixTime()) - want := time.Date(1998, 2, 5, 0, 30, 23, 136364800, time.UTC) - if !c.Equal(want) { - t.Errorf("Got time %v, want %v", c, want) - } - if !bytes.Equal(node, uuid.NodeID()) { - t.Errorf("Expected node %v got %v", node, uuid.NodeID()) - } -} - -func TestMD5(t *testing.T) { - uuid := NewMD5(NameSpaceDNS, []byte("python.org")).String() - want := "6fa459ea-ee8a-3ca4-894e-db77e160355e" - if uuid != want { - t.Errorf("MD5: got %q expected %q", uuid, want) - } -} - -func TestSHA1(t *testing.T) { - uuid := NewSHA1(NameSpaceDNS, []byte("python.org")).String() - want := "886313e1-3b8a-5372-9b90-0c9aee199e5d" - if uuid != want { - t.Errorf("SHA1: got %q expected %q", uuid, want) - } -} - -func TestNodeID(t *testing.T) { - nid := []byte{1, 2, 3, 4, 5, 6} - SetNodeInterface("") - s := NodeInterface() - if s == "" || s == "user" { - t.Errorf("NodeInterface %q after SetInteface", s) - } - node1 := NodeID() - if node1 == nil { - t.Error("NodeID nil after SetNodeInterface", s) - } - SetNodeID(nid) - s = NodeInterface() - if s != "user" { - t.Errorf("Expected NodeInterface %q got %q", "user", s) - } - node2 := NodeID() - if node2 == nil { - t.Error("NodeID nil after SetNodeID", s) - } - if bytes.Equal(node1, node2) { - t.Error("NodeID not changed after SetNodeID", s) - } else if !bytes.Equal(nid, node2) { - t.Errorf("NodeID is %x, expected %x", node2, nid) - } -} - -func testDCE(t *testing.T, name string, uuid UUID, err error, domain Domain, id uint32) { - if err != nil { - t.Errorf("%s failed: %v", name, err) - return - } - if v := uuid.Version(); v != 2 { - t.Errorf("%s: %s: expected version 2, got %s", name, uuid, v) - return - } - if v := uuid.Domain(); v != domain { - t.Errorf("%s: %s: expected domain %d, got %d", name, uuid, domain, v) - } - if v := uuid.ID(); v != id { - t.Errorf("%s: %s: expected id %d, got %d", name, uuid, id, v) - } -} - -func TestDCE(t *testing.T) { - uuid, err := NewDCESecurity(42, 12345678) - testDCE(t, "NewDCESecurity", uuid, err, 42, 12345678) - uuid, err = NewDCEPerson() - testDCE(t, "NewDCEPerson", uuid, err, Person, uint32(os.Getuid())) - uuid, err = NewDCEGroup() - testDCE(t, "NewDCEGroup", uuid, err, Group, uint32(os.Getgid())) -} - -type badRand struct{} - -func (r badRand) Read(buf []byte) (int, error) { - for i, _ := range buf { - buf[i] = byte(i) - } - return len(buf), nil -} - -func TestBadRand(t *testing.T) { - SetRand(badRand{}) - uuid1 := New() - uuid2 := New() - if uuid1 != uuid2 { - t.Errorf("execpted duplicates, got %q and %q", uuid1, uuid2) - } - SetRand(nil) - uuid1 = New() - uuid2 = New() - if uuid1 == uuid2 { - t.Errorf("unexecpted duplicates, got %q", uuid1) - } -} - -var asString = "f47ac10b-58cc-0372-8567-0e02b2c3d479" -var asBytes = []byte(asString) - -func BenchmarkParse(b *testing.B) { - for i := 0; i < b.N; i++ { - _, err := Parse(asString) - if err != nil { - b.Fatal(err) - } - } -} - -func BenchmarkParseBytes(b *testing.B) { - for i := 0; i < b.N; i++ { - _, err := ParseBytes(asBytes) - if err != nil { - b.Fatal(err) - } - } -} - -// parseBytesUnsafe is to benchmark using unsafe. -func parseBytesUnsafe(b []byte) (UUID, error) { - return Parse(*(*string)(unsafe.Pointer(&b))) -} - -func BenchmarkParseBytesUnsafe(b *testing.B) { - for i := 0; i < b.N; i++ { - _, err := parseBytesUnsafe(asBytes) - if err != nil { - b.Fatal(err) - } - } -} - -// parseBytesCopy is to benchmark not using unsafe. -func parseBytesCopy(b []byte) (UUID, error) { - return Parse(string(b)) -} - -func BenchmarkParseBytesCopy(b *testing.B) { - for i := 0; i < b.N; i++ { - _, err := parseBytesCopy(asBytes) - if err != nil { - b.Fatal(err) - } - } -} - -func BenchmarkNew(b *testing.B) { - for i := 0; i < b.N; i++ { - New() - } -} - -func BenchmarkUUID_String(b *testing.B) { - uuid, err := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") - if err != nil { - b.Fatal(err) - } - for i := 0; i < b.N; i++ { - if uuid.String() == "" { - b.Fatal("invalid uuid") - } - } -} - -func BenchmarkUUID_URN(b *testing.B) { - uuid, err := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") - if err != nil { - b.Fatal(err) - } - for i := 0; i < b.N; i++ { - if uuid.URN() == "" { - b.Fatal("invalid uuid") - } - } -} diff --git a/vendor/github.com/gorilla/websocket/bench_test.go b/vendor/github.com/gorilla/websocket/bench_test.go deleted file mode 100644 index f66fc36b..00000000 --- a/vendor/github.com/gorilla/websocket/bench_test.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2014 The Gorilla WebSocket 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 websocket - -import ( - "testing" -) - -func BenchmarkMaskBytes(b *testing.B) { - var key [4]byte - data := make([]byte, 1024) - pos := 0 - for i := 0; i < b.N; i++ { - pos = maskBytes(key, pos, data) - } - b.SetBytes(int64(len(data))) -} diff --git a/vendor/github.com/gorilla/websocket/client_server_test.go b/vendor/github.com/gorilla/websocket/client_server_test.go deleted file mode 100644 index 3f7345dd..00000000 --- a/vendor/github.com/gorilla/websocket/client_server_test.go +++ /dev/null @@ -1,451 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "crypto/tls" - "crypto/x509" - "encoding/base64" - "io" - "io/ioutil" - "net" - "net/http" - "net/http/httptest" - "net/url" - "reflect" - "strings" - "testing" - "time" -) - -var cstUpgrader = Upgrader{ - Subprotocols: []string{"p0", "p1"}, - ReadBufferSize: 1024, - WriteBufferSize: 1024, - Error: func(w http.ResponseWriter, r *http.Request, status int, reason error) { - http.Error(w, reason.Error(), status) - }, -} - -var cstDialer = Dialer{ - Subprotocols: []string{"p1", "p2"}, - ReadBufferSize: 1024, - WriteBufferSize: 1024, -} - -type cstHandler struct{ *testing.T } - -type cstServer struct { - *httptest.Server - URL string -} - -const ( - cstPath = "/a/b" - cstRawQuery = "x=y" - cstRequestURI = cstPath + "?" + cstRawQuery -) - -func newServer(t *testing.T) *cstServer { - var s cstServer - s.Server = httptest.NewServer(cstHandler{t}) - s.Server.URL += cstRequestURI - s.URL = makeWsProto(s.Server.URL) - return &s -} - -func newTLSServer(t *testing.T) *cstServer { - var s cstServer - s.Server = httptest.NewTLSServer(cstHandler{t}) - s.Server.URL += cstRequestURI - s.URL = makeWsProto(s.Server.URL) - return &s -} - -func (t cstHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != cstPath { - t.Logf("path=%v, want %v", r.URL.Path, cstPath) - http.Error(w, "bad path", 400) - return - } - if r.URL.RawQuery != cstRawQuery { - t.Logf("query=%v, want %v", r.URL.RawQuery, cstRawQuery) - http.Error(w, "bad path", 400) - return - } - subprotos := Subprotocols(r) - if !reflect.DeepEqual(subprotos, cstDialer.Subprotocols) { - t.Logf("subprotols=%v, want %v", subprotos, cstDialer.Subprotocols) - http.Error(w, "bad protocol", 400) - return - } - ws, err := cstUpgrader.Upgrade(w, r, http.Header{"Set-Cookie": {"sessionID=1234"}}) - if err != nil { - t.Logf("Upgrade: %v", err) - return - } - defer ws.Close() - - if ws.Subprotocol() != "p1" { - t.Logf("Subprotocol() = %s, want p1", ws.Subprotocol()) - ws.Close() - return - } - op, rd, err := ws.NextReader() - if err != nil { - t.Logf("NextReader: %v", err) - return - } - wr, err := ws.NextWriter(op) - if err != nil { - t.Logf("NextWriter: %v", err) - return - } - if _, err = io.Copy(wr, rd); err != nil { - t.Logf("NextWriter: %v", err) - return - } - if err := wr.Close(); err != nil { - t.Logf("Close: %v", err) - return - } -} - -func makeWsProto(s string) string { - return "ws" + strings.TrimPrefix(s, "http") -} - -func sendRecv(t *testing.T, ws *Conn) { - const message = "Hello World!" - if err := ws.SetWriteDeadline(time.Now().Add(time.Second)); err != nil { - t.Fatalf("SetWriteDeadline: %v", err) - } - if err := ws.WriteMessage(TextMessage, []byte(message)); err != nil { - t.Fatalf("WriteMessage: %v", err) - } - if err := ws.SetReadDeadline(time.Now().Add(time.Second)); err != nil { - t.Fatalf("SetReadDeadline: %v", err) - } - _, p, err := ws.ReadMessage() - if err != nil { - t.Fatalf("ReadMessage: %v", err) - } - if string(p) != message { - t.Fatalf("message=%s, want %s", p, message) - } -} - -func TestProxyDial(t *testing.T) { - - s := newServer(t) - defer s.Close() - - surl, _ := url.Parse(s.URL) - - cstDialer.Proxy = http.ProxyURL(surl) - - connect := false - origHandler := s.Server.Config.Handler - - // Capture the request Host header. - s.Server.Config.Handler = http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { - if r.Method == "CONNECT" { - connect = true - w.WriteHeader(200) - return - } - - if !connect { - t.Log("connect not recieved") - http.Error(w, "connect not recieved", 405) - return - } - origHandler.ServeHTTP(w, r) - }) - - ws, _, err := cstDialer.Dial(s.URL, nil) - if err != nil { - t.Fatalf("Dial: %v", err) - } - defer ws.Close() - sendRecv(t, ws) - - cstDialer.Proxy = http.ProxyFromEnvironment -} - -func TestProxyAuthorizationDial(t *testing.T) { - s := newServer(t) - defer s.Close() - - surl, _ := url.Parse(s.URL) - surl.User = url.UserPassword("username", "password") - cstDialer.Proxy = http.ProxyURL(surl) - - connect := false - origHandler := s.Server.Config.Handler - - // Capture the request Host header. - s.Server.Config.Handler = http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { - proxyAuth := r.Header.Get("Proxy-Authorization") - expectedProxyAuth := "Basic " + base64.StdEncoding.EncodeToString([]byte("username:password")) - if r.Method == "CONNECT" && proxyAuth == expectedProxyAuth { - connect = true - w.WriteHeader(200) - return - } - - if !connect { - t.Log("connect with proxy authorization not recieved") - http.Error(w, "connect with proxy authorization not recieved", 405) - return - } - origHandler.ServeHTTP(w, r) - }) - - ws, _, err := cstDialer.Dial(s.URL, nil) - if err != nil { - t.Fatalf("Dial: %v", err) - } - defer ws.Close() - sendRecv(t, ws) - - cstDialer.Proxy = http.ProxyFromEnvironment -} - -func TestDial(t *testing.T) { - s := newServer(t) - defer s.Close() - - ws, _, err := cstDialer.Dial(s.URL, nil) - if err != nil { - t.Fatalf("Dial: %v", err) - } - defer ws.Close() - sendRecv(t, ws) -} - -func TestDialTLS(t *testing.T) { - s := newTLSServer(t) - defer s.Close() - - certs := x509.NewCertPool() - for _, c := range s.TLS.Certificates { - roots, err := x509.ParseCertificates(c.Certificate[len(c.Certificate)-1]) - if err != nil { - t.Fatalf("error parsing server's root cert: %v", err) - } - for _, root := range roots { - certs.AddCert(root) - } - } - - u, _ := url.Parse(s.URL) - d := cstDialer - d.NetDial = func(network, addr string) (net.Conn, error) { return net.Dial(network, u.Host) } - d.TLSClientConfig = &tls.Config{RootCAs: certs} - ws, _, err := d.Dial("wss://example.com"+cstRequestURI, nil) - if err != nil { - t.Fatalf("Dial: %v", err) - } - defer ws.Close() - sendRecv(t, ws) -} - -func xTestDialTLSBadCert(t *testing.T) { - // This test is deactivated because of noisy logging from the net/http package. - s := newTLSServer(t) - defer s.Close() - - ws, _, err := cstDialer.Dial(s.URL, nil) - if err == nil { - ws.Close() - t.Fatalf("Dial: nil") - } -} - -func xTestDialTLSNoVerify(t *testing.T) { - s := newTLSServer(t) - defer s.Close() - - d := cstDialer - d.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} - ws, _, err := d.Dial(s.URL, nil) - if err != nil { - t.Fatalf("Dial: %v", err) - } - defer ws.Close() - sendRecv(t, ws) -} - -func TestDialTimeout(t *testing.T) { - s := newServer(t) - defer s.Close() - - d := cstDialer - d.HandshakeTimeout = -1 - ws, _, err := d.Dial(s.URL, nil) - if err == nil { - ws.Close() - t.Fatalf("Dial: nil") - } -} - -func TestDialBadScheme(t *testing.T) { - s := newServer(t) - defer s.Close() - - ws, _, err := cstDialer.Dial(s.Server.URL, nil) - if err == nil { - ws.Close() - t.Fatalf("Dial: nil") - } -} - -func TestDialBadOrigin(t *testing.T) { - s := newServer(t) - defer s.Close() - - ws, resp, err := cstDialer.Dial(s.URL, http.Header{"Origin": {"bad"}}) - if err == nil { - ws.Close() - t.Fatalf("Dial: nil") - } - if resp == nil { - t.Fatalf("resp=nil, err=%v", err) - } - if resp.StatusCode != http.StatusForbidden { - t.Fatalf("status=%d, want %d", resp.StatusCode, http.StatusForbidden) - } -} - -func TestDialBadHeader(t *testing.T) { - s := newServer(t) - defer s.Close() - - for _, k := range []string{"Upgrade", - "Connection", - "Sec-Websocket-Key", - "Sec-Websocket-Version", - "Sec-Websocket-Protocol"} { - h := http.Header{} - h.Set(k, "bad") - ws, _, err := cstDialer.Dial(s.URL, http.Header{"Origin": {"bad"}}) - if err == nil { - ws.Close() - t.Errorf("Dial with header %s returned nil", k) - } - } -} - -func TestBadMethod(t *testing.T) { - s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - ws, err := cstUpgrader.Upgrade(w, r, nil) - if err == nil { - t.Errorf("handshake succeeded, expect fail") - ws.Close() - } - })) - defer s.Close() - - resp, err := http.PostForm(s.URL, url.Values{}) - if err != nil { - t.Fatalf("PostForm returned error %v", err) - } - resp.Body.Close() - if resp.StatusCode != http.StatusMethodNotAllowed { - t.Errorf("Status = %d, want %d", resp.StatusCode, http.StatusMethodNotAllowed) - } -} - -func TestHandshake(t *testing.T) { - s := newServer(t) - defer s.Close() - - ws, resp, err := cstDialer.Dial(s.URL, http.Header{"Origin": {s.URL}}) - if err != nil { - t.Fatalf("Dial: %v", err) - } - defer ws.Close() - - var sessionID string - for _, c := range resp.Cookies() { - if c.Name == "sessionID" { - sessionID = c.Value - } - } - if sessionID != "1234" { - t.Error("Set-Cookie not received from the server.") - } - - if ws.Subprotocol() != "p1" { - t.Errorf("ws.Subprotocol() = %s, want p1", ws.Subprotocol()) - } - sendRecv(t, ws) -} - -func TestRespOnBadHandshake(t *testing.T) { - const expectedStatus = http.StatusGone - const expectedBody = "This is the response body." - - s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(expectedStatus) - io.WriteString(w, expectedBody) - })) - defer s.Close() - - ws, resp, err := cstDialer.Dial(makeWsProto(s.URL), nil) - if err == nil { - ws.Close() - t.Fatalf("Dial: nil") - } - - if resp == nil { - t.Fatalf("resp=nil, err=%v", err) - } - - if resp.StatusCode != expectedStatus { - t.Errorf("resp.StatusCode=%d, want %d", resp.StatusCode, expectedStatus) - } - - p, err := ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatalf("ReadFull(resp.Body) returned error %v", err) - } - - if string(p) != expectedBody { - t.Errorf("resp.Body=%s, want %s", p, expectedBody) - } -} - -// TestHostHeader confirms that the host header provided in the call to Dial is -// sent to the server. -func TestHostHeader(t *testing.T) { - s := newServer(t) - defer s.Close() - - specifiedHost := make(chan string, 1) - origHandler := s.Server.Config.Handler - - // Capture the request Host header. - s.Server.Config.Handler = http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { - specifiedHost <- r.Host - origHandler.ServeHTTP(w, r) - }) - - ws, _, err := cstDialer.Dial(s.URL, http.Header{"Host": {"testhost"}}) - if err != nil { - t.Fatalf("Dial: %v", err) - } - defer ws.Close() - - if gotHost := <-specifiedHost; gotHost != "testhost" { - t.Fatalf("gotHost = %q, want \"testhost\"", gotHost) - } - - sendRecv(t, ws) -} diff --git a/vendor/github.com/gorilla/websocket/client_test.go b/vendor/github.com/gorilla/websocket/client_test.go deleted file mode 100644 index 7d2b0844..00000000 --- a/vendor/github.com/gorilla/websocket/client_test.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 The Gorilla WebSocket 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 websocket - -import ( - "net/url" - "reflect" - "testing" -) - -var parseURLTests = []struct { - s string - u *url.URL - rui string -}{ - {"ws://example.com/", &url.URL{Scheme: "ws", Host: "example.com", Opaque: "/"}, "/"}, - {"ws://example.com", &url.URL{Scheme: "ws", Host: "example.com", Opaque: "/"}, "/"}, - {"ws://example.com:7777/", &url.URL{Scheme: "ws", Host: "example.com:7777", Opaque: "/"}, "/"}, - {"wss://example.com/", &url.URL{Scheme: "wss", Host: "example.com", Opaque: "/"}, "/"}, - {"wss://example.com/a/b", &url.URL{Scheme: "wss", Host: "example.com", Opaque: "/a/b"}, "/a/b"}, - {"ss://example.com/a/b", nil, ""}, - {"ws://webmaster@example.com/", nil, ""}, - {"wss://example.com/a/b?x=y", &url.URL{Scheme: "wss", Host: "example.com", Opaque: "/a/b", RawQuery: "x=y"}, "/a/b?x=y"}, - {"wss://example.com?x=y", &url.URL{Scheme: "wss", Host: "example.com", Opaque: "/", RawQuery: "x=y"}, "/?x=y"}, -} - -func TestParseURL(t *testing.T) { - for _, tt := range parseURLTests { - u, err := parseURL(tt.s) - if tt.u != nil && err != nil { - t.Errorf("parseURL(%q) returned error %v", tt.s, err) - continue - } - if tt.u == nil { - if err == nil { - t.Errorf("parseURL(%q) did not return error", tt.s) - } - continue - } - if !reflect.DeepEqual(u, tt.u) { - t.Errorf("parseURL(%q) = %v, want %v", tt.s, u, tt.u) - continue - } - if u.RequestURI() != tt.rui { - t.Errorf("parseURL(%q).RequestURI() = %v, want %v", tt.s, u.RequestURI(), tt.rui) - } - } -} - -var hostPortNoPortTests = []struct { - u *url.URL - hostPort, hostNoPort string -}{ - {&url.URL{Scheme: "ws", Host: "example.com"}, "example.com:80", "example.com"}, - {&url.URL{Scheme: "wss", Host: "example.com"}, "example.com:443", "example.com"}, - {&url.URL{Scheme: "ws", Host: "example.com:7777"}, "example.com:7777", "example.com"}, - {&url.URL{Scheme: "wss", Host: "example.com:7777"}, "example.com:7777", "example.com"}, -} - -func TestHostPortNoPort(t *testing.T) { - for _, tt := range hostPortNoPortTests { - hostPort, hostNoPort := hostPortNoPort(tt.u) - if hostPort != tt.hostPort { - t.Errorf("hostPortNoPort(%v) returned hostPort %q, want %q", tt.u, hostPort, tt.hostPort) - } - if hostNoPort != tt.hostNoPort { - t.Errorf("hostPortNoPort(%v) returned hostNoPort %q, want %q", tt.u, hostNoPort, tt.hostNoPort) - } - } -} diff --git a/vendor/github.com/gorilla/websocket/compression_test.go b/vendor/github.com/gorilla/websocket/compression_test.go deleted file mode 100644 index cad70fb5..00000000 --- a/vendor/github.com/gorilla/websocket/compression_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package websocket - -import ( - "bytes" - "io" - "testing" -) - -type nopCloser struct{ io.Writer } - -func (nopCloser) Close() error { return nil } - -func TestTruncWriter(t *testing.T) { - const data = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz987654321" - for n := 1; n <= 10; n++ { - var b bytes.Buffer - w := &truncWriter{w: nopCloser{&b}} - p := []byte(data) - for len(p) > 0 { - m := len(p) - if m > n { - m = n - } - w.Write(p[:m]) - p = p[m:] - } - if b.String() != data[:len(data)-len(w.p)] { - t.Errorf("%d: %q", n, b.String()) - } - } -} diff --git a/vendor/github.com/gorilla/websocket/conn_test.go b/vendor/github.com/gorilla/websocket/conn_test.go deleted file mode 100644 index 0243c115..00000000 --- a/vendor/github.com/gorilla/websocket/conn_test.go +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "net" - "reflect" - "testing" - "testing/iotest" - "time" -) - -var _ net.Error = errWriteTimeout - -type fakeNetConn struct { - io.Reader - io.Writer -} - -func (c fakeNetConn) Close() error { return nil } -func (c fakeNetConn) LocalAddr() net.Addr { return nil } -func (c fakeNetConn) RemoteAddr() net.Addr { return nil } -func (c fakeNetConn) SetDeadline(t time.Time) error { return nil } -func (c fakeNetConn) SetReadDeadline(t time.Time) error { return nil } -func (c fakeNetConn) SetWriteDeadline(t time.Time) error { return nil } - -func TestFraming(t *testing.T) { - frameSizes := []int{0, 1, 2, 124, 125, 126, 127, 128, 129, 65534, 65535, 65536, 65537} - var readChunkers = []struct { - name string - f func(io.Reader) io.Reader - }{ - {"half", iotest.HalfReader}, - {"one", iotest.OneByteReader}, - {"asis", func(r io.Reader) io.Reader { return r }}, - } - - writeBuf := make([]byte, 65537) - for i := range writeBuf { - writeBuf[i] = byte(i) - } - - for _, isServer := range []bool{true, false} { - for _, chunker := range readChunkers { - - var connBuf bytes.Buffer - wc := newConn(fakeNetConn{Reader: nil, Writer: &connBuf}, isServer, 1024, 1024) - rc := newConn(fakeNetConn{Reader: chunker.f(&connBuf), Writer: nil}, !isServer, 1024, 1024) - - for _, n := range frameSizes { - for _, iocopy := range []bool{true, false} { - name := fmt.Sprintf("s:%v, r:%s, n:%d c:%v", isServer, chunker.name, n, iocopy) - - w, err := wc.NextWriter(TextMessage) - if err != nil { - t.Errorf("%s: wc.NextWriter() returned %v", name, err) - continue - } - var nn int - if iocopy { - var n64 int64 - n64, err = io.Copy(w, bytes.NewReader(writeBuf[:n])) - nn = int(n64) - } else { - nn, err = w.Write(writeBuf[:n]) - } - if err != nil || nn != n { - t.Errorf("%s: w.Write(writeBuf[:n]) returned %d, %v", name, nn, err) - continue - } - err = w.Close() - if err != nil { - t.Errorf("%s: w.Close() returned %v", name, err) - continue - } - - opCode, r, err := rc.NextReader() - if err != nil || opCode != TextMessage { - t.Errorf("%s: NextReader() returned %d, r, %v", name, opCode, err) - continue - } - rbuf, err := ioutil.ReadAll(r) - if err != nil { - t.Errorf("%s: ReadFull() returned rbuf, %v", name, err) - continue - } - - if len(rbuf) != n { - t.Errorf("%s: len(rbuf) is %d, want %d", name, len(rbuf), n) - continue - } - - for i, b := range rbuf { - if byte(i) != b { - t.Errorf("%s: bad byte at offset %d", name, i) - break - } - } - } - } - } - } -} - -func TestControl(t *testing.T) { - const message = "this is a ping/pong messsage" - for _, isServer := range []bool{true, false} { - for _, isWriteControl := range []bool{true, false} { - name := fmt.Sprintf("s:%v, wc:%v", isServer, isWriteControl) - var connBuf bytes.Buffer - wc := newConn(fakeNetConn{Reader: nil, Writer: &connBuf}, isServer, 1024, 1024) - rc := newConn(fakeNetConn{Reader: &connBuf, Writer: nil}, !isServer, 1024, 1024) - if isWriteControl { - wc.WriteControl(PongMessage, []byte(message), time.Now().Add(time.Second)) - } else { - w, err := wc.NextWriter(PongMessage) - if err != nil { - t.Errorf("%s: wc.NextWriter() returned %v", name, err) - continue - } - if _, err := w.Write([]byte(message)); err != nil { - t.Errorf("%s: w.Write() returned %v", name, err) - continue - } - if err := w.Close(); err != nil { - t.Errorf("%s: w.Close() returned %v", name, err) - continue - } - var actualMessage string - rc.SetPongHandler(func(s string) error { actualMessage = s; return nil }) - rc.NextReader() - if actualMessage != message { - t.Errorf("%s: pong=%q, want %q", name, actualMessage, message) - continue - } - } - } - } -} - -func TestCloseBeforeFinalFrame(t *testing.T) { - const bufSize = 512 - - expectedErr := &CloseError{Code: CloseNormalClosure, Text: "hello"} - - var b1, b2 bytes.Buffer - wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, 1024, bufSize) - rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, 1024, 1024) - - w, _ := wc.NextWriter(BinaryMessage) - w.Write(make([]byte, bufSize+bufSize/2)) - wc.WriteControl(CloseMessage, FormatCloseMessage(expectedErr.Code, expectedErr.Text), time.Now().Add(10*time.Second)) - w.Close() - - op, r, err := rc.NextReader() - if op != BinaryMessage || err != nil { - t.Fatalf("NextReader() returned %d, %v", op, err) - } - _, err = io.Copy(ioutil.Discard, r) - if !reflect.DeepEqual(err, expectedErr) { - t.Fatalf("io.Copy() returned %v, want %v", err, expectedErr) - } - _, _, err = rc.NextReader() - if !reflect.DeepEqual(err, expectedErr) { - t.Fatalf("NextReader() returned %v, want %v", err, expectedErr) - } -} - -func TestEOFWithinFrame(t *testing.T) { - const bufSize = 64 - - for n := 0; ; n++ { - var b bytes.Buffer - wc := newConn(fakeNetConn{Reader: nil, Writer: &b}, false, 1024, 1024) - rc := newConn(fakeNetConn{Reader: &b, Writer: nil}, true, 1024, 1024) - - w, _ := wc.NextWriter(BinaryMessage) - w.Write(make([]byte, bufSize)) - w.Close() - - if n >= b.Len() { - break - } - b.Truncate(n) - - op, r, err := rc.NextReader() - if err == errUnexpectedEOF { - continue - } - if op != BinaryMessage || err != nil { - t.Fatalf("%d: NextReader() returned %d, %v", n, op, err) - } - _, err = io.Copy(ioutil.Discard, r) - if err != errUnexpectedEOF { - t.Fatalf("%d: io.Copy() returned %v, want %v", n, err, errUnexpectedEOF) - } - _, _, err = rc.NextReader() - if err != errUnexpectedEOF { - t.Fatalf("%d: NextReader() returned %v, want %v", n, err, errUnexpectedEOF) - } - } -} - -func TestEOFBeforeFinalFrame(t *testing.T) { - const bufSize = 512 - - var b1, b2 bytes.Buffer - wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, 1024, bufSize) - rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, 1024, 1024) - - w, _ := wc.NextWriter(BinaryMessage) - w.Write(make([]byte, bufSize+bufSize/2)) - - op, r, err := rc.NextReader() - if op != BinaryMessage || err != nil { - t.Fatalf("NextReader() returned %d, %v", op, err) - } - _, err = io.Copy(ioutil.Discard, r) - if err != errUnexpectedEOF { - t.Fatalf("io.Copy() returned %v, want %v", err, errUnexpectedEOF) - } - _, _, err = rc.NextReader() - if err != errUnexpectedEOF { - t.Fatalf("NextReader() returned %v, want %v", err, errUnexpectedEOF) - } -} - -func TestReadLimit(t *testing.T) { - - const readLimit = 512 - message := make([]byte, readLimit+1) - - var b1, b2 bytes.Buffer - wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, 1024, readLimit-2) - rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, 1024, 1024) - rc.SetReadLimit(readLimit) - - // Send message at the limit with interleaved pong. - w, _ := wc.NextWriter(BinaryMessage) - w.Write(message[:readLimit-1]) - wc.WriteControl(PongMessage, []byte("this is a pong"), time.Now().Add(10*time.Second)) - w.Write(message[:1]) - w.Close() - - // Send message larger than the limit. - wc.WriteMessage(BinaryMessage, message[:readLimit+1]) - - op, _, err := rc.NextReader() - if op != BinaryMessage || err != nil { - t.Fatalf("1: NextReader() returned %d, %v", op, err) - } - op, r, err := rc.NextReader() - if op != BinaryMessage || err != nil { - t.Fatalf("2: NextReader() returned %d, %v", op, err) - } - _, err = io.Copy(ioutil.Discard, r) - if err != ErrReadLimit { - t.Fatalf("io.Copy() returned %v", err) - } -} - -func TestUnderlyingConn(t *testing.T) { - var b1, b2 bytes.Buffer - fc := fakeNetConn{Reader: &b1, Writer: &b2} - c := newConn(fc, true, 1024, 1024) - ul := c.UnderlyingConn() - if ul != fc { - t.Fatalf("Underlying conn is not what it should be.") - } -} - -func TestBufioReadBytes(t *testing.T) { - - // Test calling bufio.ReadBytes for value longer than read buffer size. - - m := make([]byte, 512) - m[len(m)-1] = '\n' - - var b1, b2 bytes.Buffer - wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, len(m)+64, len(m)+64) - rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, len(m)-64, len(m)-64) - - w, _ := wc.NextWriter(BinaryMessage) - w.Write(m) - w.Close() - - op, r, err := rc.NextReader() - if op != BinaryMessage || err != nil { - t.Fatalf("NextReader() returned %d, %v", op, err) - } - - br := bufio.NewReader(r) - p, err := br.ReadBytes('\n') - if err != nil { - t.Fatalf("ReadBytes() returned %v", err) - } - if len(p) != len(m) { - t.Fatalf("read returnd %d bytes, want %d bytes", len(p), len(m)) - } -} - -var closeErrorTests = []struct { - err error - codes []int - ok bool -}{ - {&CloseError{Code: CloseNormalClosure}, []int{CloseNormalClosure}, true}, - {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived}, false}, - {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived, CloseNormalClosure}, true}, - {errors.New("hello"), []int{CloseNormalClosure}, false}, -} - -func TestCloseError(t *testing.T) { - for _, tt := range closeErrorTests { - ok := IsCloseError(tt.err, tt.codes...) - if ok != tt.ok { - t.Errorf("IsCloseError(%#v, %#v) returned %v, want %v", tt.err, tt.codes, ok, tt.ok) - } - } -} - -var unexpectedCloseErrorTests = []struct { - err error - codes []int - ok bool -}{ - {&CloseError{Code: CloseNormalClosure}, []int{CloseNormalClosure}, false}, - {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived}, true}, - {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived, CloseNormalClosure}, false}, - {errors.New("hello"), []int{CloseNormalClosure}, false}, -} - -func TestUnexpectedCloseErrors(t *testing.T) { - for _, tt := range unexpectedCloseErrorTests { - ok := IsUnexpectedCloseError(tt.err, tt.codes...) - if ok != tt.ok { - t.Errorf("IsUnexpectedCloseError(%#v, %#v) returned %v, want %v", tt.err, tt.codes, ok, tt.ok) - } - } -} - -type blockingWriter struct { - c1, c2 chan struct{} -} - -func (w blockingWriter) Write(p []byte) (int, error) { - // Allow main to continue - close(w.c1) - // Wait for panic in main - <-w.c2 - return len(p), nil -} - -func TestConcurrentWritePanic(t *testing.T) { - w := blockingWriter{make(chan struct{}), make(chan struct{})} - c := newConn(fakeNetConn{Reader: nil, Writer: w}, false, 1024, 1024) - go func() { - c.WriteMessage(TextMessage, []byte{}) - }() - - // wait for goroutine to block in write. - <-w.c1 - - defer func() { - close(w.c2) - if v := recover(); v != nil { - return - } - }() - - c.WriteMessage(TextMessage, []byte{}) - t.Fatal("should not get here") -} - -type failingReader struct{} - -func (r failingReader) Read(p []byte) (int, error) { - return 0, io.EOF -} - -func TestFailedConnectionReadPanic(t *testing.T) { - c := newConn(fakeNetConn{Reader: failingReader{}, Writer: nil}, false, 1024, 1024) - - defer func() { - if v := recover(); v != nil { - return - } - }() - - for i := 0; i < 20000; i++ { - c.ReadMessage() - } - t.Fatal("should not get here") -} diff --git a/vendor/github.com/gorilla/websocket/example_test.go b/vendor/github.com/gorilla/websocket/example_test.go deleted file mode 100644 index 96449eac..00000000 --- a/vendor/github.com/gorilla/websocket/example_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2015 The Gorilla WebSocket 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 websocket_test - -import ( - "log" - "net/http" - "testing" - - "github.com/gorilla/websocket" -) - -var ( - c *websocket.Conn - req *http.Request -) - -// The websocket.IsUnexpectedCloseError function is useful for identifying -// application and protocol errors. -// -// This server application works with a client application running in the -// browser. The client application does not explicitly close the websocket. The -// only expected close message from the client has the code -// websocket.CloseGoingAway. All other other close messages are likely the -// result of an application or protocol error and are logged to aid debugging. -func ExampleIsUnexpectedCloseError() { - - for { - messageType, p, err := c.ReadMessage() - if err != nil { - if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) { - log.Printf("error: %v, user-agent: %v", err, req.Header.Get("User-Agent")) - } - return - } - processMesage(messageType, p) - } -} - -func processMesage(mt int, p []byte) {} - -// TestX prevents godoc from showing this entire file in the example. Remove -// this function when a second example is added. -func TestX(t *testing.T) {} diff --git a/vendor/github.com/gorilla/websocket/examples/autobahn/README.md b/vendor/github.com/gorilla/websocket/examples/autobahn/README.md deleted file mode 100644 index 075ac153..00000000 --- a/vendor/github.com/gorilla/websocket/examples/autobahn/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Test Server - -This package contains a server for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite). - -To test the server, run - - go run server.go - -and start the client test driver - - wstest -m fuzzingclient -s fuzzingclient.json - -When the client completes, it writes a report to reports/clients/index.html. diff --git a/vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json b/vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json deleted file mode 100644 index 27d5a5b1..00000000 --- a/vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json +++ /dev/null @@ -1,14 +0,0 @@ - -{ - "options": {"failByDrop": false}, - "outdir": "./reports/clients", - "servers": [ - {"agent": "ReadAllWriteMessage", "url": "ws://localhost:9000/m", "options": {"version": 18}}, - {"agent": "ReadAllWrite", "url": "ws://localhost:9000/r", "options": {"version": 18}}, - {"agent": "CopyFull", "url": "ws://localhost:9000/f", "options": {"version": 18}}, - {"agent": "CopyWriterOnly", "url": "ws://localhost:9000/c", "options": {"version": 18}} - ], - "cases": ["*"], - "exclude-cases": [], - "exclude-agent-cases": {} -} diff --git a/vendor/github.com/gorilla/websocket/examples/autobahn/server.go b/vendor/github.com/gorilla/websocket/examples/autobahn/server.go deleted file mode 100644 index d96ac84d..00000000 --- a/vendor/github.com/gorilla/websocket/examples/autobahn/server.go +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Command server is a test server for the Autobahn WebSockets Test Suite. -package main - -import ( - "errors" - "flag" - "github.com/gorilla/websocket" - "io" - "log" - "net/http" - "time" - "unicode/utf8" -) - -var upgrader = websocket.Upgrader{ - ReadBufferSize: 4096, - WriteBufferSize: 4096, - CheckOrigin: func(r *http.Request) bool { - return true - }, -} - -// echoCopy echoes messages from the client using io.Copy. -func echoCopy(w http.ResponseWriter, r *http.Request, writerOnly bool) { - conn, err := upgrader.Upgrade(w, r, nil) - if err != nil { - log.Println("Upgrade:", err) - return - } - defer conn.Close() - for { - mt, r, err := conn.NextReader() - if err != nil { - if err != io.EOF { - log.Println("NextReader:", err) - } - return - } - if mt == websocket.TextMessage { - r = &validator{r: r} - } - w, err := conn.NextWriter(mt) - if err != nil { - log.Println("NextWriter:", err) - return - } - if mt == websocket.TextMessage { - r = &validator{r: r} - } - if writerOnly { - _, err = io.Copy(struct{ io.Writer }{w}, r) - } else { - _, err = io.Copy(w, r) - } - if err != nil { - if err == errInvalidUTF8 { - conn.WriteControl(websocket.CloseMessage, - websocket.FormatCloseMessage(websocket.CloseInvalidFramePayloadData, ""), - time.Time{}) - } - log.Println("Copy:", err) - return - } - err = w.Close() - if err != nil { - log.Println("Close:", err) - return - } - } -} - -func echoCopyWriterOnly(w http.ResponseWriter, r *http.Request) { - echoCopy(w, r, true) -} - -func echoCopyFull(w http.ResponseWriter, r *http.Request) { - echoCopy(w, r, false) -} - -// echoReadAll echoes messages from the client by reading the entire message -// with ioutil.ReadAll. -func echoReadAll(w http.ResponseWriter, r *http.Request, writeMessage bool) { - conn, err := upgrader.Upgrade(w, r, nil) - if err != nil { - log.Println("Upgrade:", err) - return - } - defer conn.Close() - for { - mt, b, err := conn.ReadMessage() - if err != nil { - if err != io.EOF { - log.Println("NextReader:", err) - } - return - } - if mt == websocket.TextMessage { - if !utf8.Valid(b) { - conn.WriteControl(websocket.CloseMessage, - websocket.FormatCloseMessage(websocket.CloseInvalidFramePayloadData, ""), - time.Time{}) - log.Println("ReadAll: invalid utf8") - } - } - if writeMessage { - err = conn.WriteMessage(mt, b) - if err != nil { - log.Println("WriteMessage:", err) - } - } else { - w, err := conn.NextWriter(mt) - if err != nil { - log.Println("NextWriter:", err) - return - } - if _, err := w.Write(b); err != nil { - log.Println("Writer:", err) - return - } - if err := w.Close(); err != nil { - log.Println("Close:", err) - return - } - } - } -} - -func echoReadAllWriter(w http.ResponseWriter, r *http.Request) { - echoReadAll(w, r, false) -} - -func echoReadAllWriteMessage(w http.ResponseWriter, r *http.Request) { - echoReadAll(w, r, true) -} - -func serveHome(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/" { - http.Error(w, "Not found.", 404) - return - } - if r.Method != "GET" { - http.Error(w, "Method not allowed", 405) - return - } - w.Header().Set("Content-Type", "text/html; charset=utf-8") - io.WriteString(w, "Echo Server") -} - -var addr = flag.String("addr", ":9000", "http service address") - -func main() { - flag.Parse() - http.HandleFunc("/", serveHome) - http.HandleFunc("/c", echoCopyWriterOnly) - http.HandleFunc("/f", echoCopyFull) - http.HandleFunc("/r", echoReadAllWriter) - http.HandleFunc("/m", echoReadAllWriteMessage) - err := http.ListenAndServe(*addr, nil) - if err != nil { - log.Fatal("ListenAndServe: ", err) - } -} - -type validator struct { - state int - x rune - r io.Reader -} - -var errInvalidUTF8 = errors.New("invalid utf8") - -func (r *validator) Read(p []byte) (int, error) { - n, err := r.r.Read(p) - state := r.state - x := r.x - for _, b := range p[:n] { - state, x = decode(state, x, b) - if state == utf8Reject { - break - } - } - r.state = state - r.x = x - if state == utf8Reject || (err == io.EOF && state != utf8Accept) { - return n, errInvalidUTF8 - } - return n, err -} - -// UTF-8 decoder from http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ -// -// Copyright (c) 2008-2009 Bjoern Hoehrmann -// -// 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. -var utf8d = [...]byte{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1f - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 - 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // s7..s8 -} - -const ( - utf8Accept = 0 - utf8Reject = 1 -) - -func decode(state int, x rune, b byte) (int, rune) { - t := utf8d[b] - if state != utf8Accept { - x = rune(b&0x3f) | (x << 6) - } else { - x = rune((0xff >> t) & b) - } - state = int(utf8d[256+state*16+int(t)]) - return state, x -} diff --git a/vendor/github.com/gorilla/websocket/examples/chat/README.md b/vendor/github.com/gorilla/websocket/examples/chat/README.md deleted file mode 100644 index f0c365c4..00000000 --- a/vendor/github.com/gorilla/websocket/examples/chat/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# Chat Example - -This application shows how to use use the -[websocket](https://github.com/gorilla/websocket) package to implement a simple -web chat application. - -## Running the example - -The example requires a working Go development environment. The [Getting -Started](http://golang.org/doc/install) page describes how to install the -development environment. - -Once you have Go up and running, you can download, build and run the example -using the following commands. - - $ go get github.com/gorilla/websocket - $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/chat` - $ go run *.go - -To use the chat example, open http://localhost:8080/ in your browser. - -## Server - -The server application defines two types, `Client` and `Hub`. The server -creates an instance of the `Client` type for each websocket connection. A -`Client` acts as an intermediary between the websocket connection and a single -instance of the `Hub` type. The `Hub` maintains a set of registered clients and -broadcasts messages to the clients. - -The application runs one goroutine for the `Hub` and two goroutines for each -`Client`. The goroutines communicate with each other using channels. The `Hub` -has channels for registering clients, unregistering clients and broadcasting -messages. A `Client` has a buffered channel of outbound messages. One of the -client's goroutines reads messages from this channel and writes the messages to -the websocket. The other client goroutine reads messages from the websocket and -sends them to the hub. - -### Hub - -The code for the `Hub` type is in -[hub.go](https://github.com/gorilla/websocket/blob/master/examples/chat/hub.go). -The application's `main` function starts the hub's `run` method as a goroutine. -Clients send requests to the hub using the `register`, `unregister` and -`broadcast` channels. - -The hub registers clients by adding the client pointer as a key in the -`clients` map. The map value is always true. - -The unregister code is a little more complicated. In addition to deleting the -client pointer from the `clients` map, the hub closes the clients's `send` -channel to signal the client that no more messages will be sent to the client. - -The hub handles messages by looping over the registered clients and sending the -message to the client's `send` channel. If the client's `send` buffer is full, -then the hub assumes that the client is dead or stuck. In this case, the hub -unregisters the client and closes the websocket. - -### Client - -The code for the `Client` type is in [client.go](https://github.com/gorilla/websocket/blob/master/examples/chat/client.go). - -The `wsHandler` function is registered by the application's `main` function as -an HTTP handler. The handler upgrades the HTTP connection to the WebSocket -protocol, creates a client, registers the client with the hub and schedules the -client to be unregistered using a defer statement. - -Next, the HTTP handler starts the client's `writePump` method as a goroutine. -This method transfers messages from the client's send channel to the websocket -connection. The writer method exits when the channel is closed by the hub or -there's an error writing to the websocket connection. - -Finally, the HTTP handler calls the client's `readPump` method. This method -transfers inbound messages from the websocket to the hub. - -## Frontend - -The frontend code is in [home.html](https://github.com/gorilla/websocket/blob/master/examples/chat/home.html). - -On document load, the script checks for websocket functionality in the browser. -If websocket functionality is available, then the script opens a connection to -the server and registers a callback to handle messages from the server. The -callback appends the message to the chat log using the appendLog function. - -To allow the user to manually scroll through the chat log without interruption -from new messages, the `appendLog` function checks the scroll position before -adding new content. If the chat log is scrolled to the bottom, then the -function scrolls new content into view after adding the content. Otherwise, the -scroll position is not changed. - -The form handler writes the user input to the websocket and clears the input -field. diff --git a/vendor/github.com/gorilla/websocket/examples/chat/client.go b/vendor/github.com/gorilla/websocket/examples/chat/client.go deleted file mode 100644 index c3c518d1..00000000 --- a/vendor/github.com/gorilla/websocket/examples/chat/client.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 main - -import ( - "bytes" - "log" - "net/http" - "time" - - "github.com/gorilla/websocket" -) - -const ( - // Time allowed to write a message to the peer. - writeWait = 10 * time.Second - - // Time allowed to read the next pong message from the peer. - pongWait = 60 * time.Second - - // Send pings to peer with this period. Must be less than pongWait. - pingPeriod = (pongWait * 9) / 10 - - // Maximum message size allowed from peer. - maxMessageSize = 512 -) - -var ( - newline = []byte{'\n'} - space = []byte{' '} -) - -var upgrader = websocket.Upgrader{ - ReadBufferSize: 1024, - WriteBufferSize: 1024, -} - -// Client is an middleman between the websocket connection and the hub. -type Client struct { - hub *Hub - - // The websocket connection. - conn *websocket.Conn - - // Buffered channel of outbound messages. - send chan []byte -} - -// readPump pumps messages from the websocket connection to the hub. -func (c *Client) readPump() { - defer func() { - c.hub.unregister <- c - c.conn.Close() - }() - c.conn.SetReadLimit(maxMessageSize) - c.conn.SetReadDeadline(time.Now().Add(pongWait)) - c.conn.SetPongHandler(func(string) error { c.conn.SetReadDeadline(time.Now().Add(pongWait)); return nil }) - for { - _, message, err := c.conn.ReadMessage() - if err != nil { - if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) { - log.Printf("error: %v", err) - } - break - } - message = bytes.TrimSpace(bytes.Replace(message, newline, space, -1)) - c.hub.broadcast <- message - } -} - -// write writes a message with the given message type and payload. -func (c *Client) write(mt int, payload []byte) error { - c.conn.SetWriteDeadline(time.Now().Add(writeWait)) - return c.conn.WriteMessage(mt, payload) -} - -// writePump pumps messages from the hub to the websocket connection. -func (c *Client) writePump() { - ticker := time.NewTicker(pingPeriod) - defer func() { - ticker.Stop() - c.conn.Close() - }() - for { - select { - case message, ok := <-c.send: - if !ok { - // The hub closed the channel. - c.write(websocket.CloseMessage, []byte{}) - return - } - - c.conn.SetWriteDeadline(time.Now().Add(writeWait)) - w, err := c.conn.NextWriter(websocket.TextMessage) - if err != nil { - return - } - w.Write(message) - - // Add queued chat messages to the current websocket message. - n := len(c.send) - for i := 0; i < n; i++ { - w.Write(newline) - w.Write(<-c.send) - } - - if err := w.Close(); err != nil { - return - } - case <-ticker.C: - if err := c.write(websocket.PingMessage, []byte{}); err != nil { - return - } - } - } -} - -// serveWs handles websocket requests from the peer. -func serveWs(hub *Hub, w http.ResponseWriter, r *http.Request) { - conn, err := upgrader.Upgrade(w, r, nil) - if err != nil { - log.Println(err) - return - } - client := &Client{hub: hub, conn: conn, send: make(chan []byte, 256)} - client.hub.register <- client - go client.writePump() - client.readPump() -} diff --git a/vendor/github.com/gorilla/websocket/examples/chat/home.html b/vendor/github.com/gorilla/websocket/examples/chat/home.html deleted file mode 100644 index 7262918e..00000000 --- a/vendor/github.com/gorilla/websocket/examples/chat/home.html +++ /dev/null @@ -1,98 +0,0 @@ - - - -Chat Example - - - - -
-
- - -
- - diff --git a/vendor/github.com/gorilla/websocket/examples/chat/hub.go b/vendor/github.com/gorilla/websocket/examples/chat/hub.go deleted file mode 100644 index 7f07ea07..00000000 --- a/vendor/github.com/gorilla/websocket/examples/chat/hub.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 main - -// hub maintains the set of active clients and broadcasts messages to the -// clients. -type Hub struct { - // Registered clients. - clients map[*Client]bool - - // Inbound messages from the clients. - broadcast chan []byte - - // Register requests from the clients. - register chan *Client - - // Unregister requests from clients. - unregister chan *Client -} - -func newHub() *Hub { - return &Hub{ - broadcast: make(chan []byte), - register: make(chan *Client), - unregister: make(chan *Client), - clients: make(map[*Client]bool), - } -} - -func (h *Hub) run() { - for { - select { - case client := <-h.register: - h.clients[client] = true - case client := <-h.unregister: - if _, ok := h.clients[client]; ok { - delete(h.clients, client) - close(client.send) - } - case message := <-h.broadcast: - for client := range h.clients { - select { - case client.send <- message: - default: - close(client.send) - delete(h.clients, client) - } - } - } - } -} diff --git a/vendor/github.com/gorilla/websocket/examples/chat/main.go b/vendor/github.com/gorilla/websocket/examples/chat/main.go deleted file mode 100644 index a865ffec..00000000 --- a/vendor/github.com/gorilla/websocket/examples/chat/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 main - -import ( - "flag" - "log" - "net/http" - "text/template" -) - -var addr = flag.String("addr", ":8080", "http service address") -var homeTemplate = template.Must(template.ParseFiles("home.html")) - -func serveHome(w http.ResponseWriter, r *http.Request) { - log.Println(r.URL) - if r.URL.Path != "/" { - http.Error(w, "Not found", 404) - return - } - if r.Method != "GET" { - http.Error(w, "Method not allowed", 405) - return - } - w.Header().Set("Content-Type", "text/html; charset=utf-8") - homeTemplate.Execute(w, r.Host) -} - -func main() { - flag.Parse() - hub := newHub() - go hub.run() - http.HandleFunc("/", serveHome) - http.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) { - serveWs(hub, w, r) - }) - err := http.ListenAndServe(*addr, nil) - if err != nil { - log.Fatal("ListenAndServe: ", err) - } -} diff --git a/vendor/github.com/gorilla/websocket/examples/command/README.md b/vendor/github.com/gorilla/websocket/examples/command/README.md deleted file mode 100644 index c30d3979..00000000 --- a/vendor/github.com/gorilla/websocket/examples/command/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Command example - -This example connects a websocket connection to stdin and stdout of a command. -Received messages are written to stdin followed by a `\n`. Each line read from -from standard out is sent as a message to the client. - - $ go get github.com/gorilla/websocket - $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/command` - $ go run main.go - # Open http://localhost:8080/ . - -Try the following commands. - - # Echo sent messages to the output area. - $ go run main.go cat - - # Run a shell.Try sending "ls" and "cat main.go". - $ go run main.go sh - diff --git a/vendor/github.com/gorilla/websocket/examples/command/home.html b/vendor/github.com/gorilla/websocket/examples/command/home.html deleted file mode 100644 index 72fd02b2..00000000 --- a/vendor/github.com/gorilla/websocket/examples/command/home.html +++ /dev/null @@ -1,96 +0,0 @@ - - - -Command Example - - - - - -
-
- - -
- - diff --git a/vendor/github.com/gorilla/websocket/examples/command/main.go b/vendor/github.com/gorilla/websocket/examples/command/main.go deleted file mode 100644 index f3f022ed..00000000 --- a/vendor/github.com/gorilla/websocket/examples/command/main.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2015 The Gorilla WebSocket 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 main - -import ( - "bufio" - "flag" - "io" - "log" - "net/http" - "os" - "os/exec" - "text/template" - "time" - - "github.com/gorilla/websocket" -) - -var ( - addr = flag.String("addr", "127.0.0.1:8080", "http service address") - cmdPath string - homeTempl = template.Must(template.ParseFiles("home.html")) -) - -const ( - // Time allowed to write a message to the peer. - writeWait = 10 * time.Second - - // Maximum message size allowed from peer. - maxMessageSize = 8192 - - // Time allowed to read the next pong message from the peer. - pongWait = 60 * time.Second - - // Send pings to peer with this period. Must be less than pongWait. - pingPeriod = (pongWait * 9) / 10 -) - -func pumpStdin(ws *websocket.Conn, w io.Writer) { - defer ws.Close() - ws.SetReadLimit(maxMessageSize) - ws.SetReadDeadline(time.Now().Add(pongWait)) - ws.SetPongHandler(func(string) error { ws.SetReadDeadline(time.Now().Add(pongWait)); return nil }) - for { - _, message, err := ws.ReadMessage() - if err != nil { - break - } - message = append(message, '\n') - if _, err := w.Write(message); err != nil { - break - } - } -} - -func pumpStdout(ws *websocket.Conn, r io.Reader, done chan struct{}) { - defer func() { - ws.Close() - close(done) - }() - s := bufio.NewScanner(r) - for s.Scan() { - ws.SetWriteDeadline(time.Now().Add(writeWait)) - if err := ws.WriteMessage(websocket.TextMessage, s.Bytes()); err != nil { - break - } - } - if s.Err() != nil { - log.Println("scan:", s.Err()) - } -} - -func ping(ws *websocket.Conn, done chan struct{}) { - ticker := time.NewTicker(pingPeriod) - defer ticker.Stop() - for { - select { - case <-ticker.C: - if err := ws.WriteControl(websocket.PingMessage, []byte{}, time.Now().Add(writeWait)); err != nil { - log.Println("ping:", err) - } - case <-done: - return - } - } -} - -func internalError(ws *websocket.Conn, msg string, err error) { - log.Println(msg, err) - ws.WriteMessage(websocket.TextMessage, []byte("Internal server error.")) -} - -var upgrader = websocket.Upgrader{} - -func serveWs(w http.ResponseWriter, r *http.Request) { - ws, err := upgrader.Upgrade(w, r, nil) - if err != nil { - log.Println("upgrade:", err) - return - } - - defer ws.Close() - - outr, outw, err := os.Pipe() - if err != nil { - internalError(ws, "stdout:", err) - return - } - defer outr.Close() - defer outw.Close() - - inr, inw, err := os.Pipe() - if err != nil { - internalError(ws, "stdin:", err) - return - } - defer inr.Close() - defer inw.Close() - - proc, err := os.StartProcess(cmdPath, flag.Args(), &os.ProcAttr{ - Files: []*os.File{inr, outw, outw}, - }) - if err != nil { - internalError(ws, "start:", err) - return - } - - inr.Close() - outw.Close() - - stdoutDone := make(chan struct{}) - go pumpStdout(ws, outr, stdoutDone) - go ping(ws, stdoutDone) - - pumpStdin(ws, inw) - - // Some commands will exit when stdin is closed. - inw.Close() - - // Other commands need a bonk on the head. - if err := proc.Signal(os.Interrupt); err != nil { - log.Println("inter:", err) - } - - select { - case <-stdoutDone: - case <-time.After(time.Second): - // A bigger bonk on the head. - if err := proc.Signal(os.Kill); err != nil { - log.Println("term:", err) - } - <-stdoutDone - } - - if _, err := proc.Wait(); err != nil { - log.Println("wait:", err) - } -} - -func serveHome(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/" { - http.Error(w, "Not found", 404) - return - } - if r.Method != "GET" { - http.Error(w, "Method not allowed", 405) - return - } - w.Header().Set("Content-Type", "text/html; charset=utf-8") - homeTempl.Execute(w, r.Host) -} - -func main() { - flag.Parse() - if len(flag.Args()) < 1 { - log.Fatal("must specify at least one argument") - } - var err error - cmdPath, err = exec.LookPath(flag.Args()[0]) - if err != nil { - log.Fatal(err) - } - http.HandleFunc("/", serveHome) - http.HandleFunc("/ws", serveWs) - log.Fatal(http.ListenAndServe(*addr, nil)) -} diff --git a/vendor/github.com/gorilla/websocket/examples/echo/README.md b/vendor/github.com/gorilla/websocket/examples/echo/README.md deleted file mode 100644 index 6ad79ed7..00000000 --- a/vendor/github.com/gorilla/websocket/examples/echo/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Client and server example - -This example shows a simple client and server. - -The server echoes messages sent to it. The client sends a message every second -and prints all messages received. - -To run the example, start the server: - - $ go run server.go - -Next, start the client: - - $ go run client.go - -The server includes a simple web client. To use the client, open -http://127.0.0.1:8080 in the browser and follow the instructions on the page. diff --git a/vendor/github.com/gorilla/websocket/examples/echo/client.go b/vendor/github.com/gorilla/websocket/examples/echo/client.go deleted file mode 100644 index 6578094e..00000000 --- a/vendor/github.com/gorilla/websocket/examples/echo/client.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2015 The Gorilla WebSocket 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 - -package main - -import ( - "flag" - "log" - "net/url" - "os" - "os/signal" - "time" - - "github.com/gorilla/websocket" -) - -var addr = flag.String("addr", "localhost:8080", "http service address") - -func main() { - flag.Parse() - log.SetFlags(0) - - interrupt := make(chan os.Signal, 1) - signal.Notify(interrupt, os.Interrupt) - - u := url.URL{Scheme: "ws", Host: *addr, Path: "/echo"} - log.Printf("connecting to %s", u.String()) - - c, _, err := websocket.DefaultDialer.Dial(u.String(), nil) - if err != nil { - log.Fatal("dial:", err) - } - defer c.Close() - - done := make(chan struct{}) - - go func() { - defer c.Close() - defer close(done) - for { - _, message, err := c.ReadMessage() - if err != nil { - log.Println("read:", err) - return - } - log.Printf("recv: %s", message) - } - }() - - ticker := time.NewTicker(time.Second) - defer ticker.Stop() - - for { - select { - case t := <-ticker.C: - err := c.WriteMessage(websocket.TextMessage, []byte(t.String())) - if err != nil { - log.Println("write:", err) - return - } - case <-interrupt: - log.Println("interrupt") - // To cleanly close a connection, a client should send a close - // frame and wait for the server to close the connection. - err := c.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) - if err != nil { - log.Println("write close:", err) - return - } - select { - case <-done: - case <-time.After(time.Second): - } - c.Close() - return - } - } -} diff --git a/vendor/github.com/gorilla/websocket/examples/echo/server.go b/vendor/github.com/gorilla/websocket/examples/echo/server.go deleted file mode 100644 index a685b097..00000000 --- a/vendor/github.com/gorilla/websocket/examples/echo/server.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2015 The Gorilla WebSocket 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 - -package main - -import ( - "flag" - "html/template" - "log" - "net/http" - - "github.com/gorilla/websocket" -) - -var addr = flag.String("addr", "localhost:8080", "http service address") - -var upgrader = websocket.Upgrader{} // use default options - -func echo(w http.ResponseWriter, r *http.Request) { - c, err := upgrader.Upgrade(w, r, nil) - if err != nil { - log.Print("upgrade:", err) - return - } - defer c.Close() - for { - mt, message, err := c.ReadMessage() - if err != nil { - log.Println("read:", err) - break - } - log.Printf("recv: %s", message) - err = c.WriteMessage(mt, message) - if err != nil { - log.Println("write:", err) - break - } - } -} - -func home(w http.ResponseWriter, r *http.Request) { - homeTemplate.Execute(w, "ws://"+r.Host+"/echo") -} - -func main() { - flag.Parse() - log.SetFlags(0) - http.HandleFunc("/echo", echo) - http.HandleFunc("/", home) - log.Fatal(http.ListenAndServe(*addr, nil)) -} - -var homeTemplate = template.Must(template.New("").Parse(` - - - - - - - -
-

Click "Open" to create a connection to the server, -"Send" to send a message to the server and "Close" to close the connection. -You can change the message and send multiple times. -

-

- - -

- -

-
-
-
- - -`)) diff --git a/vendor/github.com/gorilla/websocket/examples/filewatch/README.md b/vendor/github.com/gorilla/websocket/examples/filewatch/README.md deleted file mode 100644 index ca4931f3..00000000 --- a/vendor/github.com/gorilla/websocket/examples/filewatch/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# File Watch example. - -This example sends a file to the browser client for display whenever the file is modified. - - $ go get github.com/gorilla/websocket - $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch` - $ go run main.go - # Open http://localhost:8080/ . - # Modify the file to see it update in the browser. diff --git a/vendor/github.com/gorilla/websocket/examples/filewatch/main.go b/vendor/github.com/gorilla/websocket/examples/filewatch/main.go deleted file mode 100644 index 2ac2b324..00000000 --- a/vendor/github.com/gorilla/websocket/examples/filewatch/main.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 main - -import ( - "flag" - "io/ioutil" - "log" - "net/http" - "os" - "strconv" - "text/template" - "time" - - "github.com/gorilla/websocket" -) - -const ( - // Time allowed to write the file to the client. - writeWait = 10 * time.Second - - // Time allowed to read the next pong message from the client. - pongWait = 60 * time.Second - - // Send pings to client with this period. Must be less than pongWait. - pingPeriod = (pongWait * 9) / 10 - - // Poll file for changes with this period. - filePeriod = 10 * time.Second -) - -var ( - addr = flag.String("addr", ":8080", "http service address") - homeTempl = template.Must(template.New("").Parse(homeHTML)) - filename string - upgrader = websocket.Upgrader{ - ReadBufferSize: 1024, - WriteBufferSize: 1024, - } -) - -func readFileIfModified(lastMod time.Time) ([]byte, time.Time, error) { - fi, err := os.Stat(filename) - if err != nil { - return nil, lastMod, err - } - if !fi.ModTime().After(lastMod) { - return nil, lastMod, nil - } - p, err := ioutil.ReadFile(filename) - if err != nil { - return nil, fi.ModTime(), err - } - return p, fi.ModTime(), nil -} - -func reader(ws *websocket.Conn) { - defer ws.Close() - ws.SetReadLimit(512) - ws.SetReadDeadline(time.Now().Add(pongWait)) - ws.SetPongHandler(func(string) error { ws.SetReadDeadline(time.Now().Add(pongWait)); return nil }) - for { - _, _, err := ws.ReadMessage() - if err != nil { - break - } - } -} - -func writer(ws *websocket.Conn, lastMod time.Time) { - lastError := "" - pingTicker := time.NewTicker(pingPeriod) - fileTicker := time.NewTicker(filePeriod) - defer func() { - pingTicker.Stop() - fileTicker.Stop() - ws.Close() - }() - for { - select { - case <-fileTicker.C: - var p []byte - var err error - - p, lastMod, err = readFileIfModified(lastMod) - - if err != nil { - if s := err.Error(); s != lastError { - lastError = s - p = []byte(lastError) - } - } else { - lastError = "" - } - - if p != nil { - ws.SetWriteDeadline(time.Now().Add(writeWait)) - if err := ws.WriteMessage(websocket.TextMessage, p); err != nil { - return - } - } - case <-pingTicker.C: - ws.SetWriteDeadline(time.Now().Add(writeWait)) - if err := ws.WriteMessage(websocket.PingMessage, []byte{}); err != nil { - return - } - } - } -} - -func serveWs(w http.ResponseWriter, r *http.Request) { - ws, err := upgrader.Upgrade(w, r, nil) - if err != nil { - if _, ok := err.(websocket.HandshakeError); !ok { - log.Println(err) - } - return - } - - var lastMod time.Time - if n, err := strconv.ParseInt(r.FormValue("lastMod"), 16, 64); err == nil { - lastMod = time.Unix(0, n) - } - - go writer(ws, lastMod) - reader(ws) -} - -func serveHome(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/" { - http.Error(w, "Not found", 404) - return - } - if r.Method != "GET" { - http.Error(w, "Method not allowed", 405) - return - } - w.Header().Set("Content-Type", "text/html; charset=utf-8") - p, lastMod, err := readFileIfModified(time.Time{}) - if err != nil { - p = []byte(err.Error()) - lastMod = time.Unix(0, 0) - } - var v = struct { - Host string - Data string - LastMod string - }{ - r.Host, - string(p), - strconv.FormatInt(lastMod.UnixNano(), 16), - } - homeTempl.Execute(w, &v) -} - -func main() { - flag.Parse() - if flag.NArg() != 1 { - log.Fatal("filename not specified") - } - filename = flag.Args()[0] - http.HandleFunc("/", serveHome) - http.HandleFunc("/ws", serveWs) - if err := http.ListenAndServe(*addr, nil); err != nil { - log.Fatal(err) - } -} - -const homeHTML = ` - - - WebSocket Example - - -
{{.Data}}
- - - -` diff --git a/vendor/github.com/gorilla/websocket/json_test.go b/vendor/github.com/gorilla/websocket/json_test.go deleted file mode 100644 index 61100e48..00000000 --- a/vendor/github.com/gorilla/websocket/json_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "bytes" - "encoding/json" - "io" - "reflect" - "testing" -) - -func TestJSON(t *testing.T) { - var buf bytes.Buffer - c := fakeNetConn{&buf, &buf} - wc := newConn(c, true, 1024, 1024) - rc := newConn(c, false, 1024, 1024) - - var actual, expect struct { - A int - B string - } - expect.A = 1 - expect.B = "hello" - - if err := wc.WriteJSON(&expect); err != nil { - t.Fatal("write", err) - } - - if err := rc.ReadJSON(&actual); err != nil { - t.Fatal("read", err) - } - - if !reflect.DeepEqual(&actual, &expect) { - t.Fatal("equal", actual, expect) - } -} - -func TestPartialJSONRead(t *testing.T) { - var buf bytes.Buffer - c := fakeNetConn{&buf, &buf} - wc := newConn(c, true, 1024, 1024) - rc := newConn(c, false, 1024, 1024) - - var v struct { - A int - B string - } - v.A = 1 - v.B = "hello" - - messageCount := 0 - - // Partial JSON values. - - data, err := json.Marshal(v) - if err != nil { - t.Fatal(err) - } - for i := len(data) - 1; i >= 0; i-- { - if err := wc.WriteMessage(TextMessage, data[:i]); err != nil { - t.Fatal(err) - } - messageCount++ - } - - // Whitespace. - - if err := wc.WriteMessage(TextMessage, []byte(" ")); err != nil { - t.Fatal(err) - } - messageCount++ - - // Close. - - if err := wc.WriteMessage(CloseMessage, FormatCloseMessage(CloseNormalClosure, "")); err != nil { - t.Fatal(err) - } - - for i := 0; i < messageCount; i++ { - err := rc.ReadJSON(&v) - if err != io.ErrUnexpectedEOF { - t.Error("read", i, err) - } - } - - err = rc.ReadJSON(&v) - if _, ok := err.(*CloseError); !ok { - t.Error("final", err) - } -} - -func TestDeprecatedJSON(t *testing.T) { - var buf bytes.Buffer - c := fakeNetConn{&buf, &buf} - wc := newConn(c, true, 1024, 1024) - rc := newConn(c, false, 1024, 1024) - - var actual, expect struct { - A int - B string - } - expect.A = 1 - expect.B = "hello" - - if err := WriteJSON(wc, &expect); err != nil { - t.Fatal("write", err) - } - - if err := ReadJSON(rc, &actual); err != nil { - t.Fatal("read", err) - } - - if !reflect.DeepEqual(&actual, &expect) { - t.Fatal("equal", actual, expect) - } -} diff --git a/vendor/github.com/gorilla/websocket/server_test.go b/vendor/github.com/gorilla/websocket/server_test.go deleted file mode 100644 index 0a28141d..00000000 --- a/vendor/github.com/gorilla/websocket/server_test.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "net/http" - "reflect" - "testing" -) - -var subprotocolTests = []struct { - h string - protocols []string -}{ - {"", nil}, - {"foo", []string{"foo"}}, - {"foo,bar", []string{"foo", "bar"}}, - {"foo, bar", []string{"foo", "bar"}}, - {" foo, bar", []string{"foo", "bar"}}, - {" foo, bar ", []string{"foo", "bar"}}, -} - -func TestSubprotocols(t *testing.T) { - for _, st := range subprotocolTests { - r := http.Request{Header: http.Header{"Sec-Websocket-Protocol": {st.h}}} - protocols := Subprotocols(&r) - if !reflect.DeepEqual(st.protocols, protocols) { - t.Errorf("SubProtocols(%q) returned %#v, want %#v", st.h, protocols, st.protocols) - } - } -} - -var isWebSocketUpgradeTests = []struct { - ok bool - h http.Header -}{ - {false, http.Header{"Upgrade": {"websocket"}}}, - {false, http.Header{"Connection": {"upgrade"}}}, - {true, http.Header{"Connection": {"upgRade"}, "Upgrade": {"WebSocket"}}}, -} - -func TestIsWebSocketUpgrade(t *testing.T) { - for _, tt := range isWebSocketUpgradeTests { - ok := IsWebSocketUpgrade(&http.Request{Header: tt.h}) - if tt.ok != ok { - t.Errorf("IsWebSocketUpgrade(%v) returned %v, want %v", tt.h, ok, tt.ok) - } - } -} diff --git a/vendor/github.com/gorilla/websocket/util_test.go b/vendor/github.com/gorilla/websocket/util_test.go deleted file mode 100644 index 610e613c..00000000 --- a/vendor/github.com/gorilla/websocket/util_test.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2014 The Gorilla WebSocket 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 websocket - -import ( - "net/http" - "reflect" - "testing" -) - -var tokenListContainsValueTests = []struct { - value string - ok bool -}{ - {"WebSocket", true}, - {"WEBSOCKET", true}, - {"websocket", true}, - {"websockets", false}, - {"x websocket", false}, - {"websocket x", false}, - {"other,websocket,more", true}, - {"other, websocket, more", true}, -} - -func TestTokenListContainsValue(t *testing.T) { - for _, tt := range tokenListContainsValueTests { - h := http.Header{"Upgrade": {tt.value}} - ok := tokenListContainsValue(h, "Upgrade", "websocket") - if ok != tt.ok { - t.Errorf("tokenListContainsValue(h, n, %q) = %v, want %v", tt.value, ok, tt.ok) - } - } -} - -var parseExtensionTests = []struct { - value string - extensions []map[string]string -}{ - {`foo`, []map[string]string{map[string]string{"": "foo"}}}, - {`foo, bar; baz=2`, []map[string]string{ - map[string]string{"": "foo"}, - map[string]string{"": "bar", "baz": "2"}}}, - {`foo; bar="b,a;z"`, []map[string]string{ - map[string]string{"": "foo", "bar": "b,a;z"}}}, - {`foo , bar; baz = 2`, []map[string]string{ - map[string]string{"": "foo"}, - map[string]string{"": "bar", "baz": "2"}}}, - {`foo, bar; baz=2 junk`, []map[string]string{ - map[string]string{"": "foo"}}}, - {`foo junk, bar; baz=2 junk`, nil}, - {`mux; max-channels=4; flow-control, deflate-stream`, []map[string]string{ - map[string]string{"": "mux", "max-channels": "4", "flow-control": ""}, - map[string]string{"": "deflate-stream"}}}, - {`permessage-foo; x="10"`, []map[string]string{ - map[string]string{"": "permessage-foo", "x": "10"}}}, - {`permessage-foo; use_y, permessage-foo`, []map[string]string{ - map[string]string{"": "permessage-foo", "use_y": ""}, - map[string]string{"": "permessage-foo"}}}, - {`permessage-deflate; client_max_window_bits; server_max_window_bits=10 , permessage-deflate; client_max_window_bits`, []map[string]string{ - map[string]string{"": "permessage-deflate", "client_max_window_bits": "", "server_max_window_bits": "10"}, - map[string]string{"": "permessage-deflate", "client_max_window_bits": ""}}}, -} - -func TestParseExtensions(t *testing.T) { - for _, tt := range parseExtensionTests { - h := http.Header{http.CanonicalHeaderKey("Sec-WebSocket-Extensions"): {tt.value}} - extensions := parseExtensions(h) - if !reflect.DeepEqual(extensions, tt.extensions) { - t.Errorf("parseExtensions(%q)\n = %v,\nwant %v", tt.value, extensions, tt.extensions) - } - } -} diff --git a/vendor/github.com/hpcloud/tail/.gitignore b/vendor/github.com/hpcloud/tail/.gitignore new file mode 100644 index 00000000..6d9953c3 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/.gitignore @@ -0,0 +1,3 @@ +.test +.go + diff --git a/vendor/github.com/hpcloud/tail/.travis.yml b/vendor/github.com/hpcloud/tail/.travis.yml new file mode 100644 index 00000000..9cf8bb7f --- /dev/null +++ b/vendor/github.com/hpcloud/tail/.travis.yml @@ -0,0 +1,18 @@ +language: go + +script: + - go test -race -v ./... + +go: + - 1.4 + - 1.5 + - 1.6 + - tip + +matrix: + allow_failures: + - go: tip + +install: + - go get gopkg.in/fsnotify.v1 + - go get gopkg.in/tomb.v1 diff --git a/vendor/github.com/hpcloud/tail/CHANGES.md b/vendor/github.com/hpcloud/tail/CHANGES.md new file mode 100644 index 00000000..422790c0 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/CHANGES.md @@ -0,0 +1,63 @@ +# API v1 (gopkg.in/hpcloud/tail.v1) + +## April, 2016 + +* Migrated to godep, as depman is not longer supported +* Introduced golang vendoring feature +* Fixed issue [#57](https://github.com/hpcloud/tail/issues/57) related to reopen deleted file + +## July, 2015 + +* Fix inotify watcher leak; remove `Cleanup` (#51) + +# API v0 (gopkg.in/hpcloud/tail.v0) + +## June, 2015 + +* Don't return partial lines (PR #40) +* Use stable version of fsnotify (#46) + +## July, 2014 + +* Fix tail for Windows (PR #36) + +## May, 2014 + +* Improved rate limiting using leaky bucket (PR #29) +* Fix odd line splitting (PR #30) + +## Apr, 2014 + +* LimitRate now discards read buffer (PR #28) +* allow reading of longer lines if MaxLineSize is unset (PR #24) +* updated deps.json to latest fsnotify (441bbc86b1) + +## Feb, 2014 + +* added `Config.Logger` to suppress library logging + +## Nov, 2013 + +* add Cleanup to remove leaky inotify watches (PR #20) + +## Aug, 2013 + +* redesigned Location field (PR #12) +* add tail.Tell (PR #14) + +## July, 2013 + +* Rate limiting (PR #10) + +## May, 2013 + +* Detect file deletions/renames in polling file watcher (PR #1) +* Detect file truncation +* Fix potential race condition when reopening the file (issue 5) +* Fix potential blocking of `tail.Stop` (issue 4) +* Fix uncleaned up ChangeEvents goroutines after calling tail.Stop +* Support Follow=false + +## Feb, 2013 + +* Initial open source release diff --git a/vendor/github.com/hpcloud/tail/Dockerfile b/vendor/github.com/hpcloud/tail/Dockerfile new file mode 100644 index 00000000..cd297b94 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/Dockerfile @@ -0,0 +1,19 @@ +FROM golang + +RUN mkdir -p $GOPATH/src/github.com/hpcloud/tail/ +ADD . $GOPATH/src/github.com/hpcloud/tail/ + +# expecting to fetch dependencies successfully. +RUN go get -v github.com/hpcloud/tail + +# expecting to run the test successfully. +RUN go test -v github.com/hpcloud/tail + +# expecting to install successfully +RUN go install -v github.com/hpcloud/tail +RUN go install -v github.com/hpcloud/tail/cmd/gotail + +RUN $GOPATH/bin/gotail -h || true + +ENV PATH $GOPATH/bin:$PATH +CMD ["gotail"] diff --git a/vendor/github.com/hpcloud/tail/LICENSE.txt b/vendor/github.com/hpcloud/tail/LICENSE.txt new file mode 100644 index 00000000..818d802a --- /dev/null +++ b/vendor/github.com/hpcloud/tail/LICENSE.txt @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +# © Copyright 2015 Hewlett Packard Enterprise Development LP +Copyright (c) 2014 ActiveState + +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/hpcloud/tail/Makefile b/vendor/github.com/hpcloud/tail/Makefile new file mode 100644 index 00000000..6591b24f --- /dev/null +++ b/vendor/github.com/hpcloud/tail/Makefile @@ -0,0 +1,11 @@ +default: test + +test: *.go + go test -v -race ./... + +fmt: + gofmt -w . + +# Run the test in an isolated environment. +fulltest: + docker build -t hpcloud/tail . diff --git a/vendor/github.com/hpcloud/tail/README.md b/vendor/github.com/hpcloud/tail/README.md new file mode 100644 index 00000000..fb7fbc26 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/README.md @@ -0,0 +1,28 @@ +[![Build Status](https://travis-ci.org/hpcloud/tail.svg)](https://travis-ci.org/hpcloud/tail) +[![Build status](https://ci.appveyor.com/api/projects/status/kohpsf3rvhjhrox6?svg=true)](https://ci.appveyor.com/project/HelionCloudFoundry/tail) + +# Go package for tail-ing files + +A Go package striving to emulate the features of the BSD `tail` program. + +```Go +t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true}) +for line := range t.Lines { + fmt.Println(line.Text) +} +``` + +See [API documentation](http://godoc.org/github.com/hpcloud/tail). + +## Log rotation + +Tail comes with full support for truncation/move detection as it is +designed to work with log rotation tools. + +## Installing + + go get github.com/hpcloud/tail/... + +## Windows support + +This package [needs assistance](https://github.com/hpcloud/tail/labels/Windows) for full Windows support. diff --git a/vendor/github.com/hpcloud/tail/appveyor.yml b/vendor/github.com/hpcloud/tail/appveyor.yml new file mode 100644 index 00000000..d370055b --- /dev/null +++ b/vendor/github.com/hpcloud/tail/appveyor.yml @@ -0,0 +1,11 @@ +version: 0.{build} +skip_tags: true +cache: C:\Users\appveyor\AppData\Local\NuGet\Cache +build_script: +- SET GOPATH=c:\workspace +- go test -v -race ./... +test: off +clone_folder: c:\workspace\src\github.com\hpcloud\tail +branches: + only: + - master diff --git a/vendor/github.com/hpcloud/tail/ratelimiter/Licence b/vendor/github.com/hpcloud/tail/ratelimiter/Licence new file mode 100644 index 00000000..434aab19 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/ratelimiter/Licence @@ -0,0 +1,7 @@ +Copyright (C) 2013 99designs + +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/hpcloud/tail/ratelimiter/leakybucket.go b/vendor/github.com/hpcloud/tail/ratelimiter/leakybucket.go new file mode 100644 index 00000000..358b69e7 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/ratelimiter/leakybucket.go @@ -0,0 +1,97 @@ +// Package ratelimiter implements the Leaky Bucket ratelimiting algorithm with memcached and in-memory backends. +package ratelimiter + +import ( + "time" +) + +type LeakyBucket struct { + Size uint16 + Fill float64 + LeakInterval time.Duration // time.Duration for 1 unit of size to leak + Lastupdate time.Time + Now func() time.Time +} + +func NewLeakyBucket(size uint16, leakInterval time.Duration) *LeakyBucket { + bucket := LeakyBucket{ + Size: size, + Fill: 0, + LeakInterval: leakInterval, + Now: time.Now, + Lastupdate: time.Now(), + } + + return &bucket +} + +func (b *LeakyBucket) updateFill() { + now := b.Now() + if b.Fill > 0 { + elapsed := now.Sub(b.Lastupdate) + + b.Fill -= float64(elapsed) / float64(b.LeakInterval) + if b.Fill < 0 { + b.Fill = 0 + } + } + b.Lastupdate = now +} + +func (b *LeakyBucket) Pour(amount uint16) bool { + b.updateFill() + + var newfill float64 = b.Fill + float64(amount) + + if newfill > float64(b.Size) { + return false + } + + b.Fill = newfill + + return true +} + +// The time at which this bucket will be completely drained +func (b *LeakyBucket) DrainedAt() time.Time { + return b.Lastupdate.Add(time.Duration(b.Fill * float64(b.LeakInterval))) +} + +// The duration until this bucket is completely drained +func (b *LeakyBucket) TimeToDrain() time.Duration { + return b.DrainedAt().Sub(b.Now()) +} + +func (b *LeakyBucket) TimeSinceLastUpdate() time.Duration { + return b.Now().Sub(b.Lastupdate) +} + +type LeakyBucketSer struct { + Size uint16 + Fill float64 + LeakInterval time.Duration // time.Duration for 1 unit of size to leak + Lastupdate time.Time +} + +func (b *LeakyBucket) Serialise() *LeakyBucketSer { + bucket := LeakyBucketSer{ + Size: b.Size, + Fill: b.Fill, + LeakInterval: b.LeakInterval, + Lastupdate: b.Lastupdate, + } + + return &bucket +} + +func (b *LeakyBucketSer) DeSerialise() *LeakyBucket { + bucket := LeakyBucket{ + Size: b.Size, + Fill: b.Fill, + LeakInterval: b.LeakInterval, + Lastupdate: b.Lastupdate, + Now: time.Now, + } + + return &bucket +} diff --git a/vendor/github.com/hpcloud/tail/ratelimiter/memory.go b/vendor/github.com/hpcloud/tail/ratelimiter/memory.go new file mode 100644 index 00000000..8f6a5784 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/ratelimiter/memory.go @@ -0,0 +1,58 @@ +package ratelimiter + +import ( + "errors" + "time" +) + +const GC_SIZE int = 100 + +type Memory struct { + store map[string]LeakyBucket + lastGCCollected time.Time +} + +func NewMemory() *Memory { + m := new(Memory) + m.store = make(map[string]LeakyBucket) + m.lastGCCollected = time.Now() + return m +} + +func (m *Memory) GetBucketFor(key string) (*LeakyBucket, error) { + + bucket, ok := m.store[key] + if !ok { + return nil, errors.New("miss") + } + + return &bucket, nil +} + +func (m *Memory) SetBucketFor(key string, bucket LeakyBucket) error { + + if len(m.store) > GC_SIZE { + m.GarbageCollect() + } + + m.store[key] = bucket + + return nil +} + +func (m *Memory) GarbageCollect() { + now := time.Now() + + // rate limit GC to once per minute + if now.Add(60*time.Second).Unix() > m.lastGCCollected.Unix() { + + for key, bucket := range m.store { + // if the bucket is drained, then GC + if bucket.DrainedAt().Unix() > now.Unix() { + delete(m.store, key) + } + } + + m.lastGCCollected = now + } +} diff --git a/vendor/github.com/hpcloud/tail/ratelimiter/storage.go b/vendor/github.com/hpcloud/tail/ratelimiter/storage.go new file mode 100644 index 00000000..89b2fe88 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/ratelimiter/storage.go @@ -0,0 +1,6 @@ +package ratelimiter + +type Storage interface { + GetBucketFor(string) (*LeakyBucket, error) + SetBucketFor(string, LeakyBucket) error +} diff --git a/vendor/github.com/hpcloud/tail/tail.go b/vendor/github.com/hpcloud/tail/tail.go new file mode 100644 index 00000000..2d252d60 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/tail.go @@ -0,0 +1,438 @@ +// Copyright (c) 2015 HPE Software Inc. All rights reserved. +// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. + +package tail + +import ( + "bufio" + "errors" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "strings" + "sync" + "time" + + "github.com/hpcloud/tail/ratelimiter" + "github.com/hpcloud/tail/util" + "github.com/hpcloud/tail/watch" + "gopkg.in/tomb.v1" +) + +var ( + ErrStop = fmt.Errorf("tail should now stop") +) + +type Line struct { + Text string + Time time.Time + Err error // Error from tail +} + +// NewLine returns a Line with present time. +func NewLine(text string) *Line { + return &Line{text, time.Now(), nil} +} + +// SeekInfo represents arguments to `os.Seek` +type SeekInfo struct { + Offset int64 + Whence int // os.SEEK_* +} + +type logger interface { + Fatal(v ...interface{}) + Fatalf(format string, v ...interface{}) + Fatalln(v ...interface{}) + Panic(v ...interface{}) + Panicf(format string, v ...interface{}) + Panicln(v ...interface{}) + Print(v ...interface{}) + Printf(format string, v ...interface{}) + Println(v ...interface{}) +} + +// Config is used to specify how a file must be tailed. +type Config struct { + // File-specifc + Location *SeekInfo // Seek to this location before tailing + ReOpen bool // Reopen recreated files (tail -F) + MustExist bool // Fail early if the file does not exist + Poll bool // Poll for file changes instead of using inotify + Pipe bool // Is a named pipe (mkfifo) + RateLimiter *ratelimiter.LeakyBucket + + // Generic IO + Follow bool // Continue looking for new lines (tail -f) + MaxLineSize int // If non-zero, split longer lines into multiple lines + + // Logger, when nil, is set to tail.DefaultLogger + // To disable logging: set field to tail.DiscardingLogger + Logger logger +} + +type Tail struct { + Filename string + Lines chan *Line + Config + + file *os.File + reader *bufio.Reader + + watcher watch.FileWatcher + changes *watch.FileChanges + + tomb.Tomb // provides: Done, Kill, Dying + + lk sync.Mutex +} + +var ( + // DefaultLogger is used when Config.Logger == nil + DefaultLogger = log.New(os.Stderr, "", log.LstdFlags) + // DiscardingLogger can be used to disable logging output + DiscardingLogger = log.New(ioutil.Discard, "", 0) +) + +// TailFile begins tailing the file. Output stream is made available +// via the `Tail.Lines` channel. To handle errors during tailing, +// invoke the `Wait` or `Err` method after finishing reading from the +// `Lines` channel. +func TailFile(filename string, config Config) (*Tail, error) { + if config.ReOpen && !config.Follow { + util.Fatal("cannot set ReOpen without Follow.") + } + + t := &Tail{ + Filename: filename, + Lines: make(chan *Line), + Config: config, + } + + // when Logger was not specified in config, use default logger + if t.Logger == nil { + t.Logger = log.New(os.Stderr, "", log.LstdFlags) + } + + if t.Poll { + t.watcher = watch.NewPollingFileWatcher(filename) + } else { + t.watcher = watch.NewInotifyFileWatcher(filename) + } + + if t.MustExist { + var err error + t.file, err = OpenFile(t.Filename) + if err != nil { + return nil, err + } + } + + go t.tailFileSync() + + return t, nil +} + +// Return the file's current position, like stdio's ftell(). +// But this value is not very accurate. +// it may readed one line in the chan(tail.Lines), +// so it may lost one line. +func (tail *Tail) Tell() (offset int64, err error) { + if tail.file == nil { + return + } + offset, err = tail.file.Seek(0, os.SEEK_CUR) + if err != nil { + return + } + + tail.lk.Lock() + defer tail.lk.Unlock() + if tail.reader == nil { + return + } + + offset -= int64(tail.reader.Buffered()) + return +} + +// Stop stops the tailing activity. +func (tail *Tail) Stop() error { + tail.Kill(nil) + return tail.Wait() +} + +// StopAtEOF stops tailing as soon as the end of the file is reached. +func (tail *Tail) StopAtEOF() error { + tail.Kill(errStopAtEOF) + return tail.Wait() +} + +var errStopAtEOF = errors.New("tail: stop at eof") + +func (tail *Tail) close() { + close(tail.Lines) + tail.closeFile() +} + +func (tail *Tail) closeFile() { + if tail.file != nil { + tail.file.Close() + tail.file = nil + } +} + +func (tail *Tail) reopen() error { + tail.closeFile() + for { + var err error + tail.file, err = OpenFile(tail.Filename) + if err != nil { + if os.IsNotExist(err) { + tail.Logger.Printf("Waiting for %s to appear...", tail.Filename) + if err := tail.watcher.BlockUntilExists(&tail.Tomb); err != nil { + if err == tomb.ErrDying { + return err + } + return fmt.Errorf("Failed to detect creation of %s: %s", tail.Filename, err) + } + continue + } + return fmt.Errorf("Unable to open file %s: %s", tail.Filename, err) + } + break + } + return nil +} + +func (tail *Tail) readLine() (string, error) { + tail.lk.Lock() + line, err := tail.reader.ReadString('\n') + tail.lk.Unlock() + if err != nil { + // Note ReadString "returns the data read before the error" in + // case of an error, including EOF, so we return it as is. The + // caller is expected to process it if err is EOF. + return line, err + } + + line = strings.TrimRight(line, "\n") + + return line, err +} + +func (tail *Tail) tailFileSync() { + defer tail.Done() + defer tail.close() + + if !tail.MustExist { + // deferred first open. + err := tail.reopen() + if err != nil { + if err != tomb.ErrDying { + tail.Kill(err) + } + return + } + } + + // Seek to requested location on first open of the file. + if tail.Location != nil { + _, err := tail.file.Seek(tail.Location.Offset, tail.Location.Whence) + tail.Logger.Printf("Seeked %s - %+v\n", tail.Filename, tail.Location) + if err != nil { + tail.Killf("Seek error on %s: %s", tail.Filename, err) + return + } + } + + tail.openReader() + + var offset int64 = 0 + var err error + + // Read line by line. + for { + // do not seek in named pipes + if !tail.Pipe { + // grab the position in case we need to back up in the event of a half-line + offset, err = tail.Tell() + if err != nil { + tail.Kill(err) + return + } + } + + line, err := tail.readLine() + + // Process `line` even if err is EOF. + if err == nil { + cooloff := !tail.sendLine(line) + if cooloff { + // Wait a second before seeking till the end of + // file when rate limit is reached. + msg := fmt.Sprintf( + "Too much log activity; waiting a second " + + "before resuming tailing") + tail.Lines <- &Line{msg, time.Now(), fmt.Errorf(msg)} + select { + case <-time.After(time.Second): + case <-tail.Dying(): + return + } + if err := tail.seekEnd(); err != nil { + tail.Kill(err) + return + } + } + } else if err == io.EOF { + if !tail.Follow { + if line != "" { + tail.sendLine(line) + } + return + } + + if tail.Follow && line != "" { + // this has the potential to never return the last line if + // it's not followed by a newline; seems a fair trade here + err := tail.seekTo(SeekInfo{Offset: offset, Whence: 0}) + if err != nil { + tail.Kill(err) + return + } + } + + // When EOF is reached, wait for more data to become + // available. Wait strategy is based on the `tail.watcher` + // implementation (inotify or polling). + err := tail.waitForChanges() + if err != nil { + if err != ErrStop { + tail.Kill(err) + } + return + } + } else { + // non-EOF error + tail.Killf("Error reading %s: %s", tail.Filename, err) + return + } + + select { + case <-tail.Dying(): + if tail.Err() == errStopAtEOF { + continue + } + return + default: + } + } +} + +// waitForChanges waits until the file has been appended, deleted, +// moved or truncated. When moved or deleted - the file will be +// reopened if ReOpen is true. Truncated files are always reopened. +func (tail *Tail) waitForChanges() error { + if tail.changes == nil { + pos, err := tail.file.Seek(0, os.SEEK_CUR) + if err != nil { + return err + } + tail.changes, err = tail.watcher.ChangeEvents(&tail.Tomb, pos) + if err != nil { + return err + } + } + + select { + case <-tail.changes.Modified: + return nil + case <-tail.changes.Deleted: + tail.changes = nil + if tail.ReOpen { + // XXX: we must not log from a library. + tail.Logger.Printf("Re-opening moved/deleted file %s ...", tail.Filename) + if err := tail.reopen(); err != nil { + return err + } + tail.Logger.Printf("Successfully reopened %s", tail.Filename) + tail.openReader() + return nil + } else { + tail.Logger.Printf("Stopping tail as file no longer exists: %s", tail.Filename) + return ErrStop + } + case <-tail.changes.Truncated: + // Always reopen truncated files (Follow is true) + tail.Logger.Printf("Re-opening truncated file %s ...", tail.Filename) + if err := tail.reopen(); err != nil { + return err + } + tail.Logger.Printf("Successfully reopened truncated %s", tail.Filename) + tail.openReader() + return nil + case <-tail.Dying(): + return ErrStop + } + panic("unreachable") +} + +func (tail *Tail) openReader() { + if tail.MaxLineSize > 0 { + // add 2 to account for newline characters + tail.reader = bufio.NewReaderSize(tail.file, tail.MaxLineSize+2) + } else { + tail.reader = bufio.NewReader(tail.file) + } +} + +func (tail *Tail) seekEnd() error { + return tail.seekTo(SeekInfo{Offset: 0, Whence: os.SEEK_END}) +} + +func (tail *Tail) seekTo(pos SeekInfo) error { + _, err := tail.file.Seek(pos.Offset, pos.Whence) + if err != nil { + return fmt.Errorf("Seek error on %s: %s", tail.Filename, err) + } + // Reset the read buffer whenever the file is re-seek'ed + tail.reader.Reset(tail.file) + return nil +} + +// sendLine sends the line(s) to Lines channel, splitting longer lines +// if necessary. Return false if rate limit is reached. +func (tail *Tail) sendLine(line string) bool { + now := time.Now() + lines := []string{line} + + // Split longer lines + if tail.MaxLineSize > 0 && len(line) > tail.MaxLineSize { + lines = util.PartitionString(line, tail.MaxLineSize) + } + + for _, line := range lines { + tail.Lines <- &Line{line, now, nil} + } + + if tail.Config.RateLimiter != nil { + ok := tail.Config.RateLimiter.Pour(uint16(len(lines))) + if !ok { + tail.Logger.Printf("Leaky bucket full (%v); entering 1s cooloff period.\n", + tail.Filename) + return false + } + } + + return true +} + +// Cleanup removes inotify watches added by the tail package. This function is +// meant to be invoked from a process's exit handler. Linux kernel may not +// automatically remove inotify watches after the process exits. +func (tail *Tail) Cleanup() { + watch.Cleanup(tail.Filename) +} diff --git a/vendor/github.com/hpcloud/tail/tail_posix.go b/vendor/github.com/hpcloud/tail/tail_posix.go new file mode 100644 index 00000000..bc4dc335 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/tail_posix.go @@ -0,0 +1,11 @@ +// +build linux darwin freebsd netbsd openbsd + +package tail + +import ( + "os" +) + +func OpenFile(name string) (file *os.File, err error) { + return os.Open(name) +} diff --git a/vendor/github.com/hpcloud/tail/tail_windows.go b/vendor/github.com/hpcloud/tail/tail_windows.go new file mode 100644 index 00000000..ef2cfca1 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/tail_windows.go @@ -0,0 +1,12 @@ +// +build windows + +package tail + +import ( + "github.com/hpcloud/tail/winfile" + "os" +) + +func OpenFile(name string) (file *os.File, err error) { + return winfile.OpenFile(name, os.O_RDONLY, 0) +} diff --git a/vendor/github.com/hpcloud/tail/util/util.go b/vendor/github.com/hpcloud/tail/util/util.go new file mode 100644 index 00000000..54151fe3 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/util/util.go @@ -0,0 +1,48 @@ +// Copyright (c) 2015 HPE Software Inc. All rights reserved. +// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. + +package util + +import ( + "fmt" + "log" + "os" + "runtime/debug" +) + +type Logger struct { + *log.Logger +} + +var LOGGER = &Logger{log.New(os.Stderr, "", log.LstdFlags)} + +// fatal is like panic except it displays only the current goroutine's stack. +func Fatal(format string, v ...interface{}) { + // https://github.com/hpcloud/log/blob/master/log.go#L45 + LOGGER.Output(2, fmt.Sprintf("FATAL -- "+format, v...)+"\n"+string(debug.Stack())) + os.Exit(1) +} + +// partitionString partitions the string into chunks of given size, +// with the last chunk of variable size. +func PartitionString(s string, chunkSize int) []string { + if chunkSize <= 0 { + panic("invalid chunkSize") + } + length := len(s) + chunks := 1 + length/chunkSize + start := 0 + end := chunkSize + parts := make([]string, 0, chunks) + for { + if end > length { + end = length + } + parts = append(parts, s[start:end]) + if end == length { + break + } + start, end = end, end+chunkSize + } + return parts +} diff --git a/vendor/github.com/hpcloud/tail/watch/filechanges.go b/vendor/github.com/hpcloud/tail/watch/filechanges.go new file mode 100644 index 00000000..3ce5dcec --- /dev/null +++ b/vendor/github.com/hpcloud/tail/watch/filechanges.go @@ -0,0 +1,36 @@ +package watch + +type FileChanges struct { + Modified chan bool // Channel to get notified of modifications + Truncated chan bool // Channel to get notified of truncations + Deleted chan bool // Channel to get notified of deletions/renames +} + +func NewFileChanges() *FileChanges { + return &FileChanges{ + make(chan bool), make(chan bool), make(chan bool)} +} + +func (fc *FileChanges) NotifyModified() { + sendOnlyIfEmpty(fc.Modified) +} + +func (fc *FileChanges) NotifyTruncated() { + sendOnlyIfEmpty(fc.Truncated) +} + +func (fc *FileChanges) NotifyDeleted() { + sendOnlyIfEmpty(fc.Deleted) +} + +// sendOnlyIfEmpty sends on a bool channel only if the channel has no +// backlog to be read by other goroutines. This concurrency pattern +// can be used to notify other goroutines if and only if they are +// looking for it (i.e., subsequent notifications can be compressed +// into one). +func sendOnlyIfEmpty(ch chan bool) { + select { + case ch <- true: + default: + } +} diff --git a/vendor/github.com/hpcloud/tail/watch/inotify.go b/vendor/github.com/hpcloud/tail/watch/inotify.go new file mode 100644 index 00000000..4478f1e1 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/watch/inotify.go @@ -0,0 +1,128 @@ +// Copyright (c) 2015 HPE Software Inc. All rights reserved. +// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. + +package watch + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/hpcloud/tail/util" + + "gopkg.in/fsnotify.v1" + "gopkg.in/tomb.v1" +) + +// InotifyFileWatcher uses inotify to monitor file changes. +type InotifyFileWatcher struct { + Filename string + Size int64 +} + +func NewInotifyFileWatcher(filename string) *InotifyFileWatcher { + fw := &InotifyFileWatcher{filepath.Clean(filename), 0} + return fw +} + +func (fw *InotifyFileWatcher) BlockUntilExists(t *tomb.Tomb) error { + err := WatchCreate(fw.Filename) + if err != nil { + return err + } + defer RemoveWatchCreate(fw.Filename) + + // Do a real check now as the file might have been created before + // calling `WatchFlags` above. + if _, err = os.Stat(fw.Filename); !os.IsNotExist(err) { + // file exists, or stat returned an error. + return err + } + + events := Events(fw.Filename) + + for { + select { + case evt, ok := <-events: + if !ok { + return fmt.Errorf("inotify watcher has been closed") + } + evtName, err := filepath.Abs(evt.Name) + if err != nil { + return err + } + fwFilename, err := filepath.Abs(fw.Filename) + if err != nil { + return err + } + if evtName == fwFilename { + return nil + } + case <-t.Dying(): + return tomb.ErrDying + } + } + panic("unreachable") +} + +func (fw *InotifyFileWatcher) ChangeEvents(t *tomb.Tomb, pos int64) (*FileChanges, error) { + err := Watch(fw.Filename) + if err != nil { + return nil, err + } + + changes := NewFileChanges() + fw.Size = pos + + go func() { + defer RemoveWatch(fw.Filename) + + events := Events(fw.Filename) + + for { + prevSize := fw.Size + + var evt fsnotify.Event + var ok bool + + select { + case evt, ok = <-events: + if !ok { + return + } + case <-t.Dying(): + return + } + + switch { + case evt.Op&fsnotify.Remove == fsnotify.Remove: + fallthrough + + case evt.Op&fsnotify.Rename == fsnotify.Rename: + changes.NotifyDeleted() + return + + case evt.Op&fsnotify.Write == fsnotify.Write: + fi, err := os.Stat(fw.Filename) + if err != nil { + if os.IsNotExist(err) { + changes.NotifyDeleted() + return + } + // XXX: report this error back to the user + util.Fatal("Failed to stat file %v: %v", fw.Filename, err) + } + fw.Size = fi.Size() + + if prevSize > 0 && prevSize > fw.Size { + changes.NotifyTruncated() + } else { + changes.NotifyModified() + } + prevSize = fw.Size + } + } + }() + + return changes, nil +} diff --git a/vendor/github.com/hpcloud/tail/watch/inotify_tracker.go b/vendor/github.com/hpcloud/tail/watch/inotify_tracker.go new file mode 100644 index 00000000..03be4275 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/watch/inotify_tracker.go @@ -0,0 +1,260 @@ +// Copyright (c) 2015 HPE Software Inc. All rights reserved. +// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. + +package watch + +import ( + "log" + "os" + "path/filepath" + "sync" + "syscall" + + "github.com/hpcloud/tail/util" + + "gopkg.in/fsnotify.v1" +) + +type InotifyTracker struct { + mux sync.Mutex + watcher *fsnotify.Watcher + chans map[string]chan fsnotify.Event + done map[string]chan bool + watchNums map[string]int + watch chan *watchInfo + remove chan *watchInfo + error chan error +} + +type watchInfo struct { + op fsnotify.Op + fname string +} + +func (this *watchInfo) isCreate() bool { + return this.op == fsnotify.Create +} + +var ( + // globally shared InotifyTracker; ensures only one fsnotify.Watcher is used + shared *InotifyTracker + + // these are used to ensure the shared InotifyTracker is run exactly once + once = sync.Once{} + goRun = func() { + shared = &InotifyTracker{ + mux: sync.Mutex{}, + chans: make(map[string]chan fsnotify.Event), + done: make(map[string]chan bool), + watchNums: make(map[string]int), + watch: make(chan *watchInfo), + remove: make(chan *watchInfo), + error: make(chan error), + } + go shared.run() + } + + logger = log.New(os.Stderr, "", log.LstdFlags) +) + +// Watch signals the run goroutine to begin watching the input filename +func Watch(fname string) error { + return watch(&watchInfo{ + fname: fname, + }) +} + +// Watch create signals the run goroutine to begin watching the input filename +// if call the WatchCreate function, don't call the Cleanup, call the RemoveWatchCreate +func WatchCreate(fname string) error { + return watch(&watchInfo{ + op: fsnotify.Create, + fname: fname, + }) +} + +func watch(winfo *watchInfo) error { + // start running the shared InotifyTracker if not already running + once.Do(goRun) + + winfo.fname = filepath.Clean(winfo.fname) + shared.watch <- winfo + return <-shared.error +} + +// RemoveWatch signals the run goroutine to remove the watch for the input filename +func RemoveWatch(fname string) { + remove(&watchInfo{ + fname: fname, + }) +} + +// RemoveWatch create signals the run goroutine to remove the watch for the input filename +func RemoveWatchCreate(fname string) { + remove(&watchInfo{ + op: fsnotify.Create, + fname: fname, + }) +} + +func remove(winfo *watchInfo) { + // start running the shared InotifyTracker if not already running + once.Do(goRun) + + winfo.fname = filepath.Clean(winfo.fname) + shared.mux.Lock() + done := shared.done[winfo.fname] + if done != nil { + delete(shared.done, winfo.fname) + close(done) + } + + fname := winfo.fname + if winfo.isCreate() { + // Watch for new files to be created in the parent directory. + fname = filepath.Dir(fname) + } + shared.watchNums[fname]-- + watchNum := shared.watchNums[fname] + if watchNum == 0 { + delete(shared.watchNums, fname) + } + shared.mux.Unlock() + + // If we were the last ones to watch this file, unsubscribe from inotify. + // This needs to happen after releasing the lock because fsnotify waits + // synchronously for the kernel to acknowledge the removal of the watch + // for this file, which causes us to deadlock if we still held the lock. + if watchNum == 0 { + shared.watcher.Remove(fname) + } + shared.remove <- winfo +} + +// Events returns a channel to which FileEvents corresponding to the input filename +// will be sent. This channel will be closed when removeWatch is called on this +// filename. +func Events(fname string) <-chan fsnotify.Event { + shared.mux.Lock() + defer shared.mux.Unlock() + + return shared.chans[fname] +} + +// Cleanup removes the watch for the input filename if necessary. +func Cleanup(fname string) { + RemoveWatch(fname) +} + +// watchFlags calls fsnotify.WatchFlags for the input filename and flags, creating +// a new Watcher if the previous Watcher was closed. +func (shared *InotifyTracker) addWatch(winfo *watchInfo) error { + shared.mux.Lock() + defer shared.mux.Unlock() + + if shared.chans[winfo.fname] == nil { + shared.chans[winfo.fname] = make(chan fsnotify.Event) + shared.done[winfo.fname] = make(chan bool) + } + + fname := winfo.fname + if winfo.isCreate() { + // Watch for new files to be created in the parent directory. + fname = filepath.Dir(fname) + } + + // already in inotify watch + if shared.watchNums[fname] > 0 { + shared.watchNums[fname]++ + if winfo.isCreate() { + shared.watchNums[winfo.fname]++ + } + return nil + } + + err := shared.watcher.Add(fname) + if err == nil { + shared.watchNums[fname]++ + if winfo.isCreate() { + shared.watchNums[winfo.fname]++ + } + } + return err +} + +// removeWatch calls fsnotify.RemoveWatch for the input filename and closes the +// corresponding events channel. +func (shared *InotifyTracker) removeWatch(winfo *watchInfo) { + shared.mux.Lock() + defer shared.mux.Unlock() + + ch := shared.chans[winfo.fname] + if ch == nil { + return + } + + delete(shared.chans, winfo.fname) + close(ch) + + if !winfo.isCreate() { + return + } + + shared.watchNums[winfo.fname]-- + if shared.watchNums[winfo.fname] == 0 { + delete(shared.watchNums, winfo.fname) + } +} + +// sendEvent sends the input event to the appropriate Tail. +func (shared *InotifyTracker) sendEvent(event fsnotify.Event) { + name := filepath.Clean(event.Name) + + shared.mux.Lock() + ch := shared.chans[name] + done := shared.done[name] + shared.mux.Unlock() + + if ch != nil && done != nil { + select { + case ch <- event: + case <-done: + } + } +} + +// run starts the goroutine in which the shared struct reads events from its +// Watcher's Event channel and sends the events to the appropriate Tail. +func (shared *InotifyTracker) run() { + watcher, err := fsnotify.NewWatcher() + if err != nil { + util.Fatal("failed to create Watcher") + } + shared.watcher = watcher + + for { + select { + case winfo := <-shared.watch: + shared.error <- shared.addWatch(winfo) + + case winfo := <-shared.remove: + shared.removeWatch(winfo) + + case event, open := <-shared.watcher.Events: + if !open { + return + } + shared.sendEvent(event) + + case err, open := <-shared.watcher.Errors: + if !open { + return + } else if err != nil { + sysErr, ok := err.(*os.SyscallError) + if !ok || sysErr.Err != syscall.EINTR { + logger.Printf("Error in Watcher Error channel: %s", err) + } + } + } + } +} diff --git a/vendor/github.com/hpcloud/tail/watch/polling.go b/vendor/github.com/hpcloud/tail/watch/polling.go new file mode 100644 index 00000000..49491f21 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/watch/polling.go @@ -0,0 +1,118 @@ +// Copyright (c) 2015 HPE Software Inc. All rights reserved. +// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. + +package watch + +import ( + "os" + "runtime" + "time" + + "github.com/hpcloud/tail/util" + "gopkg.in/tomb.v1" +) + +// PollingFileWatcher polls the file for changes. +type PollingFileWatcher struct { + Filename string + Size int64 +} + +func NewPollingFileWatcher(filename string) *PollingFileWatcher { + fw := &PollingFileWatcher{filename, 0} + return fw +} + +var POLL_DURATION time.Duration + +func (fw *PollingFileWatcher) BlockUntilExists(t *tomb.Tomb) error { + for { + if _, err := os.Stat(fw.Filename); err == nil { + return nil + } else if !os.IsNotExist(err) { + return err + } + select { + case <-time.After(POLL_DURATION): + continue + case <-t.Dying(): + return tomb.ErrDying + } + } + panic("unreachable") +} + +func (fw *PollingFileWatcher) ChangeEvents(t *tomb.Tomb, pos int64) (*FileChanges, error) { + origFi, err := os.Stat(fw.Filename) + if err != nil { + return nil, err + } + + changes := NewFileChanges() + var prevModTime time.Time + + // XXX: use tomb.Tomb to cleanly manage these goroutines. replace + // the fatal (below) with tomb's Kill. + + fw.Size = pos + + go func() { + prevSize := fw.Size + for { + select { + case <-t.Dying(): + return + default: + } + + time.Sleep(POLL_DURATION) + fi, err := os.Stat(fw.Filename) + if err != nil { + // Windows cannot delete a file if a handle is still open (tail keeps one open) + // so it gives access denied to anything trying to read it until all handles are released. + if os.IsNotExist(err) || (runtime.GOOS == "windows" && os.IsPermission(err)) { + // File does not exist (has been deleted). + changes.NotifyDeleted() + return + } + + // XXX: report this error back to the user + util.Fatal("Failed to stat file %v: %v", fw.Filename, err) + } + + // File got moved/renamed? + if !os.SameFile(origFi, fi) { + changes.NotifyDeleted() + return + } + + // File got truncated? + fw.Size = fi.Size() + if prevSize > 0 && prevSize > fw.Size { + changes.NotifyTruncated() + prevSize = fw.Size + continue + } + // File got bigger? + if prevSize > 0 && prevSize < fw.Size { + changes.NotifyModified() + prevSize = fw.Size + continue + } + prevSize = fw.Size + + // File was appended to (changed)? + modTime := fi.ModTime() + if modTime != prevModTime { + prevModTime = modTime + changes.NotifyModified() + } + } + }() + + return changes, nil +} + +func init() { + POLL_DURATION = 250 * time.Millisecond +} diff --git a/vendor/github.com/hpcloud/tail/watch/watch.go b/vendor/github.com/hpcloud/tail/watch/watch.go new file mode 100644 index 00000000..2e1783ef --- /dev/null +++ b/vendor/github.com/hpcloud/tail/watch/watch.go @@ -0,0 +1,20 @@ +// Copyright (c) 2015 HPE Software Inc. All rights reserved. +// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. + +package watch + +import "gopkg.in/tomb.v1" + +// FileWatcher monitors file-level events. +type FileWatcher interface { + // BlockUntilExists blocks until the file comes into existence. + BlockUntilExists(*tomb.Tomb) error + + // ChangeEvents reports on changes to a file, be it modification, + // deletion, renames or truncations. Returned FileChanges group of + // channels will be closed, thus become unusable, after a deletion + // or truncation event. + // In order to properly report truncations, ChangeEvents requires + // the caller to pass their current offset in the file. + ChangeEvents(*tomb.Tomb, int64) (*FileChanges, error) +} diff --git a/vendor/github.com/hpcloud/tail/winfile/winfile.go b/vendor/github.com/hpcloud/tail/winfile/winfile.go new file mode 100644 index 00000000..aa7e7bc5 --- /dev/null +++ b/vendor/github.com/hpcloud/tail/winfile/winfile.go @@ -0,0 +1,92 @@ +// +build windows + +package winfile + +import ( + "os" + "syscall" + "unsafe" +) + +// issue also described here +//https://codereview.appspot.com/8203043/ + +// https://github.com/jnwhiteh/golang/blob/master/src/pkg/syscall/syscall_windows.go#L218 +func Open(path string, mode int, perm uint32) (fd syscall.Handle, err error) { + if len(path) == 0 { + return syscall.InvalidHandle, syscall.ERROR_FILE_NOT_FOUND + } + pathp, err := syscall.UTF16PtrFromString(path) + if err != nil { + return syscall.InvalidHandle, err + } + var access uint32 + switch mode & (syscall.O_RDONLY | syscall.O_WRONLY | syscall.O_RDWR) { + case syscall.O_RDONLY: + access = syscall.GENERIC_READ + case syscall.O_WRONLY: + access = syscall.GENERIC_WRITE + case syscall.O_RDWR: + access = syscall.GENERIC_READ | syscall.GENERIC_WRITE + } + if mode&syscall.O_CREAT != 0 { + access |= syscall.GENERIC_WRITE + } + if mode&syscall.O_APPEND != 0 { + access &^= syscall.GENERIC_WRITE + access |= syscall.FILE_APPEND_DATA + } + sharemode := uint32(syscall.FILE_SHARE_READ | syscall.FILE_SHARE_WRITE | syscall.FILE_SHARE_DELETE) + var sa *syscall.SecurityAttributes + if mode&syscall.O_CLOEXEC == 0 { + sa = makeInheritSa() + } + var createmode uint32 + switch { + case mode&(syscall.O_CREAT|syscall.O_EXCL) == (syscall.O_CREAT | syscall.O_EXCL): + createmode = syscall.CREATE_NEW + case mode&(syscall.O_CREAT|syscall.O_TRUNC) == (syscall.O_CREAT | syscall.O_TRUNC): + createmode = syscall.CREATE_ALWAYS + case mode&syscall.O_CREAT == syscall.O_CREAT: + createmode = syscall.OPEN_ALWAYS + case mode&syscall.O_TRUNC == syscall.O_TRUNC: + createmode = syscall.TRUNCATE_EXISTING + default: + createmode = syscall.OPEN_EXISTING + } + h, e := syscall.CreateFile(pathp, access, sharemode, sa, createmode, syscall.FILE_ATTRIBUTE_NORMAL, 0) + return h, e +} + +// https://github.com/jnwhiteh/golang/blob/master/src/pkg/syscall/syscall_windows.go#L211 +func makeInheritSa() *syscall.SecurityAttributes { + var sa syscall.SecurityAttributes + sa.Length = uint32(unsafe.Sizeof(sa)) + sa.InheritHandle = 1 + return &sa +} + +// https://github.com/jnwhiteh/golang/blob/master/src/pkg/os/file_windows.go#L133 +func OpenFile(name string, flag int, perm os.FileMode) (file *os.File, err error) { + r, e := Open(name, flag|syscall.O_CLOEXEC, syscallMode(perm)) + if e != nil { + return nil, e + } + return os.NewFile(uintptr(r), name), nil +} + +// https://github.com/jnwhiteh/golang/blob/master/src/pkg/os/file_posix.go#L61 +func syscallMode(i os.FileMode) (o uint32) { + o |= uint32(i.Perm()) + if i&os.ModeSetuid != 0 { + o |= syscall.S_ISUID + } + if i&os.ModeSetgid != 0 { + o |= syscall.S_ISGID + } + if i&os.ModeSticky != 0 { + o |= syscall.S_ISVTX + } + // No mapping for Go's ModeTemporary (plan9 only). + return +} diff --git a/vendor/github.com/kelseyhightower/envconfig/.travis.yml b/vendor/github.com/kelseyhightower/envconfig/.travis.yml deleted file mode 100644 index e15301a5..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go - -go: - - 1.4 - - 1.5 - - 1.6 - - tip diff --git a/vendor/github.com/kelseyhightower/envconfig/MAINTAINERS b/vendor/github.com/kelseyhightower/envconfig/MAINTAINERS deleted file mode 100644 index 6527a9f2..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/MAINTAINERS +++ /dev/null @@ -1,2 +0,0 @@ -Kelsey Hightower kelsey.hightower@gmail.com github.com/kelseyhightower -Travis Parker travis.parker@gmail.com github.com/teepark diff --git a/vendor/github.com/kelseyhightower/envconfig/README.md b/vendor/github.com/kelseyhightower/envconfig/README.md deleted file mode 100644 index 05e6900c..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# envconfig - -[![Build Status](https://travis-ci.org/kelseyhightower/envconfig.png)](https://travis-ci.org/kelseyhightower/envconfig) - -```Go -import "github.com/kelseyhightower/envconfig" -``` - -## Documentation - -See [godoc](http://godoc.org/github.com/kelseyhightower/envconfig) - -## Usage - -Set some environment variables: - -```Bash -export MYAPP_DEBUG=false -export MYAPP_PORT=8080 -export MYAPP_USER=Kelsey -export MYAPP_RATE="0.5" -export MYAPP_TIMEOUT="3m" -export MYAPP_USERS="rob,ken,robert" -``` - -Write some code: - -```Go -package main - -import ( - "fmt" - "log" - "time" - - "github.com/kelseyhightower/envconfig" -) - -type Specification struct { - Debug bool - Port int - User string - Users []string - Rate float32 - Timeout time.Duration -} - -func main() { - var s Specification - err := envconfig.Process("myapp", &s) - if err != nil { - log.Fatal(err.Error()) - } - format := "Debug: %v\nPort: %d\nUser: %s\nRate: %f\nTimeout: %s\n" - _, err = fmt.Printf(format, s.Debug, s.Port, s.User, s.Rate) - if err != nil { - log.Fatal(err.Error()) - } - - fmt.Println("Users:") - for _, u := range s.Users { - fmt.Printf(" %s\n", u) - } -} -``` - -Results: - -```Bash -Debug: false -Port: 8080 -User: Kelsey -Rate: 0.500000 -Timeout: 3m0s -Users: - rob - ken - robert -``` - -## Struct Tag Support - -Envconfig supports the use of struct tags to specify alternate, default, and required -environment variables. - -For example, consider the following struct: - -```Go -type Specification struct { - MultiWordVar string `envconfig:"multi_word_var"` - DefaultVar string `default:"foobar"` - RequiredVar string `required:"true"` - IgnoredVar string `ignored:"true"` -} -``` - -Envconfig will process value for `MultiWordVar` by populating it with the -value for `MYAPP_MULTI_WORD_VAR`. - -```Bash -export MYAPP_MULTI_WORD_VAR="this will be the value" - -# export MYAPP_MULTIWORDVAR="and this will not" -``` - -If envconfig can't find an environment variable value for `MYAPP_DEFAULTVAR`, -it will populate it with "foobar" as a default value. - -If envconfig can't find an environment variable value for `MYAPP_REQUIREDVAR`, -it will return an error when asked to process the struct. - -If envconfig can't find an environment variable in the form `PREFIX_MYVAR`, and there -is a struct tag defined, it will try to populate your variable with an environment -variable that directly matches the envconfig tag in your struct definition: - -```shell -export SERVICE_HOST=127.0.0.1 -export MYAPP_DEBUG=true -``` -```Go -type Specification struct { - ServiceHost string `envconfig:"SERVICE_HOST"` - Debug bool -} -``` - -Envconfig won't process a field with the "ignored" tag set to "true", even if a corresponding -environment variable is set. - -## Supported Struct Field Types - -envconfig supports supports these struct field types: - - * string - * int8, int16, int32, int64 - * bool - * float32, float64 - * [encoding.TextUnmarshaler](https://golang.org/pkg/encoding/#TextUnmarshaler) - -Embedded structs using these fields are also supported. - -## Custom Decoders - -Any field whose type (or pointer-to-type) implements `envconfig.Decoder` can -control its own deserialization: - -```Bash -export DNS_SERVER=8.8.8.8 -``` - -```Go -type IPDecoder net.IP - -func (ipd *IPDecoder) Decode(value string) error { - *ipd = IPDecoder(net.ParseIP(value)) - return nil -} - -type DNSConfig struct { - Address IPDecoder `envconfig:"DNS_SERVER"` -} -``` - -Also, envconfig will use a `Set(string) error` method like from the -[flag.Value](https://godoc.org/flag#Value) interface if implemented. diff --git a/vendor/github.com/kelseyhightower/envconfig/doc.go b/vendor/github.com/kelseyhightower/envconfig/doc.go deleted file mode 100644 index f28561cd..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2013 Kelsey Hightower. All rights reserved. -// Use of this source code is governed by the MIT License that can be found in -// the LICENSE file. - -// Package envconfig implements decoding of environment variables based on a user -// defined specification. A typical use is using environment variables for -// configuration settings. -package envconfig diff --git a/vendor/github.com/kelseyhightower/envconfig/env_os.go b/vendor/github.com/kelseyhightower/envconfig/env_os.go deleted file mode 100644 index a6a014a2..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/env_os.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build appengine - -package envconfig - -import "os" - -var lookupEnv = os.LookupEnv diff --git a/vendor/github.com/kelseyhightower/envconfig/env_syscall.go b/vendor/github.com/kelseyhightower/envconfig/env_syscall.go deleted file mode 100644 index 9d98085b..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/env_syscall.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build !appengine - -package envconfig - -import "syscall" - -var lookupEnv = syscall.Getenv diff --git a/vendor/github.com/kelseyhightower/envconfig/envconfig.go b/vendor/github.com/kelseyhightower/envconfig/envconfig.go deleted file mode 100644 index e362fdde..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/envconfig.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) 2013 Kelsey Hightower. All rights reserved. -// Use of this source code is governed by the MIT License that can be found in -// the LICENSE file. - -package envconfig - -import ( - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "time" -) - -// ErrInvalidSpecification indicates that a specification is of the wrong type. -var ErrInvalidSpecification = errors.New("specification must be a struct pointer") - -// A ParseError occurs when an environment variable cannot be converted to -// the type required by a struct field during assignment. -type ParseError struct { - KeyName string - FieldName string - TypeName string - Value string - Err error -} - -// Decoder has the same semantics as Setter, but takes higher precedence. -// It is provided for historical compatibility. -type Decoder interface { - Decode(value string) error -} - -// Setter is implemented by types can self-deserialize values. -// Any type that implements flag.Value also implements Setter. -type Setter interface { - Set(value string) error -} - -func (e *ParseError) Error() string { - return fmt.Sprintf("envconfig.Process: assigning %[1]s to %[2]s: converting '%[3]s' to type %[4]s. details: %[5]s", e.KeyName, e.FieldName, e.Value, e.TypeName, e.Err) -} - -// Process populates the specified struct based on environment variables -func Process(prefix string, spec interface{}) error { - s := reflect.ValueOf(spec) - - if s.Kind() != reflect.Ptr { - return ErrInvalidSpecification - } - s = s.Elem() - if s.Kind() != reflect.Struct { - return ErrInvalidSpecification - } - typeOfSpec := s.Type() - for i := 0; i < s.NumField(); i++ { - f := s.Field(i) - ftype := typeOfSpec.Field(i) - if !f.CanSet() || ftype.Tag.Get("ignored") == "true" { - continue - } - - for f.Kind() == reflect.Ptr { - if f.IsNil() { - if f.Type().Elem().Kind() != reflect.Struct { - // nil pointer to a non-struct: leave it alone - break - } - // nil pointer to struct: create a zero instance - f.Set(reflect.New(f.Type().Elem())) - } - f = f.Elem() - } - - alt := ftype.Tag.Get("envconfig") - fieldName := ftype.Name - if alt != "" { - fieldName = alt - } - - key := fieldName - if prefix != "" { - key = fmt.Sprintf("%s_%s", prefix, key) - } - key = strings.ToUpper(key) - - if f.Kind() == reflect.Struct { - // honor Decode if present - if decoderFrom(f) == nil && setterFrom(f) == nil && textUnmarshaler(f) == nil { - innerPrefix := prefix - if !ftype.Anonymous { - innerPrefix = key - } - - embeddedPtr := f.Addr().Interface() - if err := Process(innerPrefix, embeddedPtr); err != nil { - return err - } - f.Set(reflect.ValueOf(embeddedPtr).Elem()) - - continue - } - } - - // `os.Getenv` cannot differentiate between an explicitly set empty value - // and an unset value. `os.LookupEnv` is preferred to `syscall.Getenv`, - // but it is only available in go1.5 or newer. We're using Go build tags - // here to use os.LookupEnv for >=go1.5 - value, ok := lookupEnv(key) - if !ok && alt != "" { - key := strings.ToUpper(fieldName) - value, ok = lookupEnv(key) - } - - def := ftype.Tag.Get("default") - if def != "" && !ok { - value = def - } - - req := ftype.Tag.Get("required") - if !ok && def == "" { - if req == "true" { - return fmt.Errorf("required key %s missing value", key) - } - continue - } - - err := processField(value, f) - if err != nil { - return &ParseError{ - KeyName: key, - FieldName: fieldName, - TypeName: f.Type().String(), - Value: value, - Err: err, - } - } - } - return nil -} - -// MustProcess is the same as Process but panics if an error occurs -func MustProcess(prefix string, spec interface{}) { - if err := Process(prefix, spec); err != nil { - panic(err) - } -} - -func processField(value string, field reflect.Value) error { - typ := field.Type() - - decoder := decoderFrom(field) - if decoder != nil { - return decoder.Decode(value) - } - // look for Set method if Decode not defined - setter := setterFrom(field) - if setter != nil { - return setter.Set(value) - } - - if t := textUnmarshaler(field); t != nil { - return t.UnmarshalText([]byte(value)) - } - - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - if field.IsNil() { - field.Set(reflect.New(typ)) - } - field = field.Elem() - } - - switch typ.Kind() { - case reflect.String: - field.SetString(value) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - var ( - val int64 - err error - ) - if field.Kind() == reflect.Int64 && typ.PkgPath() == "time" && typ.Name() == "Duration" { - var d time.Duration - d, err = time.ParseDuration(value) - val = int64(d) - } else { - val, err = strconv.ParseInt(value, 0, typ.Bits()) - } - if err != nil { - return err - } - - field.SetInt(val) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - val, err := strconv.ParseUint(value, 0, typ.Bits()) - if err != nil { - return err - } - field.SetUint(val) - case reflect.Bool: - val, err := strconv.ParseBool(value) - if err != nil { - return err - } - field.SetBool(val) - case reflect.Float32, reflect.Float64: - val, err := strconv.ParseFloat(value, typ.Bits()) - if err != nil { - return err - } - field.SetFloat(val) - case reflect.Slice: - vals := strings.Split(value, ",") - sl := reflect.MakeSlice(typ, len(vals), len(vals)) - for i, val := range vals { - err := processField(val, sl.Index(i)) - if err != nil { - return err - } - } - field.Set(sl) - } - - return nil -} - -func interfaceFrom(field reflect.Value, fn func(interface{}, *bool)) { - // it may be impossible for a struct field to fail this check - if !field.CanInterface() { - return - } - var ok bool - fn(field.Interface(), &ok) - if !ok && field.CanAddr() { - fn(field.Addr().Interface(), &ok) - } -} - -func decoderFrom(field reflect.Value) (d Decoder) { - interfaceFrom(field, func(v interface{}, ok *bool) { d, *ok = v.(Decoder) }) - return d -} - -func setterFrom(field reflect.Value) (s Setter) { - interfaceFrom(field, func(v interface{}, ok *bool) { s, *ok = v.(Setter) }) - return s -} - -func textUnmarshaler(field reflect.Value) (t encoding.TextUnmarshaler) { - interfaceFrom(field, func(v interface{}, ok *bool) { t, *ok = v.(encoding.TextUnmarshaler) }) - return t -} diff --git a/vendor/github.com/kelseyhightower/envconfig/envconfig_test.go b/vendor/github.com/kelseyhightower/envconfig/envconfig_test.go deleted file mode 100644 index 5a420eb0..00000000 --- a/vendor/github.com/kelseyhightower/envconfig/envconfig_test.go +++ /dev/null @@ -1,648 +0,0 @@ -// Copyright (c) 2013 Kelsey Hightower. All rights reserved. -// Use of this source code is governed by the MIT License that can be found in -// the LICENSE file. - -package envconfig - -import ( - "flag" - "fmt" - "os" - "testing" - "time" -) - -type HonorDecodeInStruct struct { - Value string -} - -func (h *HonorDecodeInStruct) Decode(env string) error { - h.Value = "decoded" - return nil -} - -type Specification struct { - Embedded - EmbeddedButIgnored `ignored:"true"` - Debug bool - Port int - Rate float32 - User string - TTL uint32 - Timeout time.Duration - AdminUsers []string - MagicNumbers []int - MultiWordVar string - SomePointer *string - SomePointerWithDefault *string `default:"foo2baz"` - MultiWordVarWithAlt string `envconfig:"MULTI_WORD_VAR_WITH_ALT"` - MultiWordVarWithLowerCaseAlt string `envconfig:"multi_word_var_with_lower_case_alt"` - NoPrefixWithAlt string `envconfig:"SERVICE_HOST"` - DefaultVar string `default:"foobar"` - RequiredVar string `required:"true"` - NoPrefixDefault string `envconfig:"BROKER" default:"127.0.0.1"` - RequiredDefault string `required:"true" default:"foo2bar"` - Ignored string `ignored:"true"` - NestedSpecification struct { - Property string `envconfig:"inner"` - PropertyWithDefault string `default:"fuzzybydefault"` - } `envconfig:"outer"` - AfterNested string - DecodeStruct HonorDecodeInStruct `envconfig:"honor"` - Datetime time.Time -} - -type Embedded struct { - Enabled bool - EmbeddedPort int - MultiWordVar string - MultiWordVarWithAlt string `envconfig:"MULTI_WITH_DIFFERENT_ALT"` - EmbeddedAlt string `envconfig:"EMBEDDED_WITH_ALT"` - EmbeddedIgnored string `ignored:"true"` -} - -type EmbeddedButIgnored struct { - FirstEmbeddedButIgnored string - SecondEmbeddedButIgnored string -} - -func TestProcess(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_DEBUG", "true") - os.Setenv("ENV_CONFIG_PORT", "8080") - os.Setenv("ENV_CONFIG_RATE", "0.5") - os.Setenv("ENV_CONFIG_USER", "Kelsey") - os.Setenv("ENV_CONFIG_TIMEOUT", "2m") - os.Setenv("ENV_CONFIG_ADMINUSERS", "John,Adam,Will") - os.Setenv("ENV_CONFIG_MAGICNUMBERS", "5,10,20") - os.Setenv("SERVICE_HOST", "127.0.0.1") - os.Setenv("ENV_CONFIG_TTL", "30") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - os.Setenv("ENV_CONFIG_IGNORED", "was-not-ignored") - os.Setenv("ENV_CONFIG_OUTER_INNER", "iamnested") - os.Setenv("ENV_CONFIG_AFTERNESTED", "after") - os.Setenv("ENV_CONFIG_HONOR", "honor") - os.Setenv("ENV_CONFIG_DATETIME", "2016-08-16T18:57:05Z") - err := Process("env_config", &s) - if err != nil { - t.Error(err.Error()) - } - if s.NoPrefixWithAlt != "127.0.0.1" { - t.Errorf("expected %v, got %v", "127.0.0.1", s.NoPrefixWithAlt) - } - if !s.Debug { - t.Errorf("expected %v, got %v", true, s.Debug) - } - if s.Port != 8080 { - t.Errorf("expected %d, got %v", 8080, s.Port) - } - if s.Rate != 0.5 { - t.Errorf("expected %f, got %v", 0.5, s.Rate) - } - if s.TTL != 30 { - t.Errorf("expected %d, got %v", 30, s.TTL) - } - if s.User != "Kelsey" { - t.Errorf("expected %s, got %s", "Kelsey", s.User) - } - if s.Timeout != 2*time.Minute { - t.Errorf("expected %s, got %s", 2*time.Minute, s.Timeout) - } - if s.RequiredVar != "foo" { - t.Errorf("expected %s, got %s", "foo", s.RequiredVar) - } - if len(s.AdminUsers) != 3 || - s.AdminUsers[0] != "John" || - s.AdminUsers[1] != "Adam" || - s.AdminUsers[2] != "Will" { - t.Errorf("expected %#v, got %#v", []string{"John", "Adam", "Will"}, s.AdminUsers) - } - if len(s.MagicNumbers) != 3 || - s.MagicNumbers[0] != 5 || - s.MagicNumbers[1] != 10 || - s.MagicNumbers[2] != 20 { - t.Errorf("expected %#v, got %#v", []int{5, 10, 20}, s.MagicNumbers) - } - if s.Ignored != "" { - t.Errorf("expected empty string, got %#v", s.Ignored) - } - - if s.NestedSpecification.Property != "iamnested" { - t.Errorf("expected '%s' string, got %#v", "iamnested", s.NestedSpecification.Property) - } - - if s.NestedSpecification.PropertyWithDefault != "fuzzybydefault" { - t.Errorf("expected default '%s' string, got %#v", "fuzzybydefault", s.NestedSpecification.PropertyWithDefault) - } - - if s.AfterNested != "after" { - t.Errorf("expected default '%s' string, got %#v", "after", s.AfterNested) - } - - if s.DecodeStruct.Value != "decoded" { - t.Errorf("expected default '%s' string, got %#v", "decoded", s.DecodeStruct.Value) - } - - if expected := time.Date(2016, 8, 16, 18, 57, 05, 0, time.UTC); !s.Datetime.Equal(expected) { - t.Errorf("expected %s, got %s", expected.Format(time.RFC3339), s.Datetime.Format(time.RFC3339)) - } -} - -func TestParseErrorBool(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_DEBUG", "string") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - err := Process("env_config", &s) - v, ok := err.(*ParseError) - if !ok { - t.Errorf("expected ParseError, got %v", v) - } - if v.FieldName != "Debug" { - t.Errorf("expected %s, got %v", "Debug", v.FieldName) - } - if s.Debug != false { - t.Errorf("expected %v, got %v", false, s.Debug) - } -} - -func TestParseErrorFloat32(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_RATE", "string") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - err := Process("env_config", &s) - v, ok := err.(*ParseError) - if !ok { - t.Errorf("expected ParseError, got %v", v) - } - if v.FieldName != "Rate" { - t.Errorf("expected %s, got %v", "Rate", v.FieldName) - } - if s.Rate != 0 { - t.Errorf("expected %v, got %v", 0, s.Rate) - } -} - -func TestParseErrorInt(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_PORT", "string") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - err := Process("env_config", &s) - v, ok := err.(*ParseError) - if !ok { - t.Errorf("expected ParseError, got %v", v) - } - if v.FieldName != "Port" { - t.Errorf("expected %s, got %v", "Port", v.FieldName) - } - if s.Port != 0 { - t.Errorf("expected %v, got %v", 0, s.Port) - } -} - -func TestParseErrorUint(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_TTL", "-30") - err := Process("env_config", &s) - v, ok := err.(*ParseError) - if !ok { - t.Errorf("expected ParseError, got %v", v) - } - if v.FieldName != "TTL" { - t.Errorf("expected %s, got %v", "TTL", v.FieldName) - } - if s.TTL != 0 { - t.Errorf("expected %v, got %v", 0, s.TTL) - } -} - -func TestErrInvalidSpecification(t *testing.T) { - m := make(map[string]string) - err := Process("env_config", &m) - if err != ErrInvalidSpecification { - t.Errorf("expected %v, got %v", ErrInvalidSpecification, err) - } -} - -func TestUnsetVars(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("USER", "foo") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - // If the var is not defined the non-prefixed version should not be used - // unless the struct tag says so - if s.User != "" { - t.Errorf("expected %q, got %q", "", s.User) - } -} - -func TestAlternateVarNames(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_MULTI_WORD_VAR", "foo") - os.Setenv("ENV_CONFIG_MULTI_WORD_VAR_WITH_ALT", "bar") - os.Setenv("ENV_CONFIG_MULTI_WORD_VAR_WITH_LOWER_CASE_ALT", "baz") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - // Setting the alt version of the var in the environment has no effect if - // the struct tag is not supplied - if s.MultiWordVar != "" { - t.Errorf("expected %q, got %q", "", s.MultiWordVar) - } - - // Setting the alt version of the var in the environment correctly sets - // the value if the struct tag IS supplied - if s.MultiWordVarWithAlt != "bar" { - t.Errorf("expected %q, got %q", "bar", s.MultiWordVarWithAlt) - } - - // Alt value is not case sensitive and is treated as all uppercase - if s.MultiWordVarWithLowerCaseAlt != "baz" { - t.Errorf("expected %q, got %q", "baz", s.MultiWordVarWithLowerCaseAlt) - } -} - -func TestRequiredVar(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foobar") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.RequiredVar != "foobar" { - t.Errorf("expected %s, got %s", "foobar", s.RequiredVar) - } -} - -func TestBlankDefaultVar(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "requiredvalue") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.DefaultVar != "foobar" { - t.Errorf("expected %s, got %s", "foobar", s.DefaultVar) - } - - if *s.SomePointerWithDefault != "foo2baz" { - t.Errorf("expected %s, got %s", "foo2baz", *s.SomePointerWithDefault) - } -} - -func TestNonBlankDefaultVar(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_DEFAULTVAR", "nondefaultval") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "requiredvalue") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.DefaultVar != "nondefaultval" { - t.Errorf("expected %s, got %s", "nondefaultval", s.DefaultVar) - } -} - -func TestExplicitBlankDefaultVar(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_DEFAULTVAR", "") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "") - - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.DefaultVar != "" { - t.Errorf("expected %s, got %s", "\"\"", s.DefaultVar) - } -} - -func TestAlternateNameDefaultVar(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("BROKER", "betterbroker") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.NoPrefixDefault != "betterbroker" { - t.Errorf("expected %q, got %q", "betterbroker", s.NoPrefixDefault) - } - - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.NoPrefixDefault != "127.0.0.1" { - t.Errorf("expected %q, got %q", "127.0.0.1", s.NoPrefixDefault) - } -} - -func TestRequiredDefault(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.RequiredDefault != "foo2bar" { - t.Errorf("expected %q, got %q", "foo2bar", s.RequiredDefault) - } -} - -func TestPointerFieldBlank(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if s.SomePointer != nil { - t.Errorf("expected , got %q", *s.SomePointer) - } -} - -func TestMustProcess(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_DEBUG", "true") - os.Setenv("ENV_CONFIG_PORT", "8080") - os.Setenv("ENV_CONFIG_RATE", "0.5") - os.Setenv("ENV_CONFIG_USER", "Kelsey") - os.Setenv("SERVICE_HOST", "127.0.0.1") - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - MustProcess("env_config", &s) - - defer func() { - if err := recover(); err != nil { - return - } - - t.Error("expected panic") - }() - m := make(map[string]string) - MustProcess("env_config", &m) -} - -func TestEmbeddedStruct(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "required") - os.Setenv("ENV_CONFIG_ENABLED", "true") - os.Setenv("ENV_CONFIG_EMBEDDEDPORT", "1234") - os.Setenv("ENV_CONFIG_MULTIWORDVAR", "foo") - os.Setenv("ENV_CONFIG_MULTI_WORD_VAR_WITH_ALT", "bar") - os.Setenv("ENV_CONFIG_MULTI_WITH_DIFFERENT_ALT", "baz") - os.Setenv("ENV_CONFIG_EMBEDDED_WITH_ALT", "foobar") - os.Setenv("ENV_CONFIG_SOMEPOINTER", "foobaz") - os.Setenv("ENV_CONFIG_EMBEDDED_IGNORED", "was-not-ignored") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - if !s.Enabled { - t.Errorf("expected %v, got %v", true, s.Enabled) - } - if s.EmbeddedPort != 1234 { - t.Errorf("expected %d, got %v", 1234, s.EmbeddedPort) - } - if s.MultiWordVar != "foo" { - t.Errorf("expected %s, got %s", "foo", s.MultiWordVar) - } - if s.Embedded.MultiWordVar != "foo" { - t.Errorf("expected %s, got %s", "foo", s.Embedded.MultiWordVar) - } - if s.MultiWordVarWithAlt != "bar" { - t.Errorf("expected %s, got %s", "bar", s.MultiWordVarWithAlt) - } - if s.Embedded.MultiWordVarWithAlt != "baz" { - t.Errorf("expected %s, got %s", "baz", s.Embedded.MultiWordVarWithAlt) - } - if s.EmbeddedAlt != "foobar" { - t.Errorf("expected %s, got %s", "foobar", s.EmbeddedAlt) - } - if *s.SomePointer != "foobaz" { - t.Errorf("expected %s, got %s", "foobaz", *s.SomePointer) - } - if s.EmbeddedIgnored != "" { - t.Errorf("expected empty string, got %#v", s.Ignored) - } -} - -func TestEmbeddedButIgnoredStruct(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "required") - os.Setenv("ENV_CONFIG_FIRSTEMBEDDEDBUTIGNORED", "was-not-ignored") - os.Setenv("ENV_CONFIG_SECONDEMBEDDEDBUTIGNORED", "was-not-ignored") - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - if s.FirstEmbeddedButIgnored != "" { - t.Errorf("expected empty string, got %#v", s.Ignored) - } - if s.SecondEmbeddedButIgnored != "" { - t.Errorf("expected empty string, got %#v", s.Ignored) - } -} - -func TestNonPointerFailsProperly(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "snap") - - err := Process("env_config", s) - if err != ErrInvalidSpecification { - t.Errorf("non-pointer should fail with ErrInvalidSpecification, was instead %s", err) - } -} - -func TestCustomValueFields(t *testing.T) { - var s struct { - Foo string - Bar bracketed - Baz quoted - Struct setterStruct - } - - // Set would panic when the receiver is nil, - // so make sure it has an initial value to replace. - s.Baz = quoted{new(bracketed)} - - os.Clearenv() - os.Setenv("ENV_CONFIG_FOO", "foo") - os.Setenv("ENV_CONFIG_BAR", "bar") - os.Setenv("ENV_CONFIG_BAZ", "baz") - os.Setenv("ENV_CONFIG_STRUCT", "inner") - - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if want := "foo"; s.Foo != want { - t.Errorf("foo: got %#q, want %#q", s.Foo, want) - } - - if want := "[bar]"; s.Bar.String() != want { - t.Errorf("bar: got %#q, want %#q", s.Bar, want) - } - - if want := `["baz"]`; s.Baz.String() != want { - t.Errorf(`baz: got %#q, want %#q`, s.Baz, want) - } - - if want := `setterstruct{"inner"}`; s.Struct.Inner != want { - t.Errorf(`Struct.Inner: got %#q, want %#q`, s.Struct.Inner, want) - } -} - -func TestCustomPointerFields(t *testing.T) { - var s struct { - Foo string - Bar *bracketed - Baz *quoted - Struct *setterStruct - } - - // Set would panic when the receiver is nil, - // so make sure they have initial values to replace. - s.Bar = new(bracketed) - s.Baz = "ed{new(bracketed)} - - os.Clearenv() - os.Setenv("ENV_CONFIG_FOO", "foo") - os.Setenv("ENV_CONFIG_BAR", "bar") - os.Setenv("ENV_CONFIG_BAZ", "baz") - os.Setenv("ENV_CONFIG_STRUCT", "inner") - - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - - if want := "foo"; s.Foo != want { - t.Errorf("foo: got %#q, want %#q", s.Foo, want) - } - - if want := "[bar]"; s.Bar.String() != want { - t.Errorf("bar: got %#q, want %#q", s.Bar, want) - } - - if want := `["baz"]`; s.Baz.String() != want { - t.Errorf(`baz: got %#q, want %#q`, s.Baz, want) - } - - if want := `setterstruct{"inner"}`; s.Struct.Inner != want { - t.Errorf(`Struct.Inner: got %#q, want %#q`, s.Struct.Inner, want) - } -} - -func TestEmptyPrefixUsesFieldNames(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("REQUIREDVAR", "foo") - - err := Process("", &s) - if err != nil { - t.Errorf("Process failed: %s", err) - } - - if s.RequiredVar != "foo" { - t.Errorf( - `RequiredVar not populated correctly: expected "foo", got %q`, - s.RequiredVar, - ) - } -} - -func TestNestedStructVarName(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "required") - val := "found with only short name" - os.Setenv("INNER", val) - if err := Process("env_config", &s); err != nil { - t.Error(err.Error()) - } - if s.NestedSpecification.Property != val { - t.Errorf("expected %s, got %s", val, s.NestedSpecification.Property) - } -} - -func TestTextUnmarshalerError(t *testing.T) { - var s Specification - os.Clearenv() - os.Setenv("ENV_CONFIG_REQUIREDVAR", "foo") - os.Setenv("ENV_CONFIG_DATETIME", "I'M NOT A DATE") - - err := Process("env_config", &s) - - v, ok := err.(*ParseError) - if !ok { - t.Errorf("expected ParseError, got %v", v) - } - if v.FieldName != "Datetime" { - t.Errorf("expected %s, got %v", "Debug", v.FieldName) - } - - expectedLowLevelError := time.ParseError{ - Layout: time.RFC3339, - Value: "I'M NOT A DATE", - LayoutElem: "2006", - ValueElem: "I'M NOT A DATE", - } - - if v.Err.Error() != expectedLowLevelError.Error() { - t.Errorf("expected %s, got %s", expectedLowLevelError, v.Err) - } - if s.Debug != false { - t.Errorf("expected %v, got %v", false, s.Debug) - } -} - -type bracketed string - -func (b *bracketed) Set(value string) error { - *b = bracketed("[" + value + "]") - return nil -} - -func (b bracketed) String() string { - return string(b) -} - -// quoted is used to test the precedence of Decode over Set. -// The sole field is a flag.Value rather than a setter to validate that -// all flag.Value implementations are also Setter implementations. -type quoted struct{ flag.Value } - -func (d quoted) Decode(value string) error { - return d.Set(`"` + value + `"`) -} - -type setterStruct struct { - Inner string -} - -func (ss *setterStruct) Set(value string) error { - ss.Inner = fmt.Sprintf("setterstruct{%q}", value) - return nil -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/codec_test.go b/vendor/github.com/mailru/easyjson/benchmark/codec_test.go deleted file mode 100644 index 5c77072e..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/codec_test.go +++ /dev/null @@ -1,279 +0,0 @@ -// +build use_codec - -package benchmark - -import ( - "testing" - - "github.com/ugorji/go/codec" -) - -func BenchmarkCodec_Unmarshal_M(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - dec := codec.NewDecoderBytes(nil, h) - - b.SetBytes(int64(len(largeStructText))) - for i := 0; i < b.N; i++ { - var s LargeStruct - dec.ResetBytes(largeStructText) - if err := dec.Decode(&s); err != nil { - b.Error(err) - } - } -} - -func BenchmarkCodec_Unmarshal_S(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - dec := codec.NewDecoderBytes(nil, h) - - b.SetBytes(int64(len(smallStructText))) - for i := 0; i < b.N; i++ { - var s LargeStruct - dec.ResetBytes(smallStructText) - if err := dec.Decode(&s); err != nil { - b.Error(err) - } - } -} - -func BenchmarkCodec_Marshal_S(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - var l int64 - for i := 0; i < b.N; i++ { - enc.ResetBytes(&out) - if err := enc.Encode(&smallStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = nil - } - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_M(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - var l int64 - for i := 0; i < b.N; i++ { - enc.ResetBytes(&out) - if err := enc.Encode(&largeStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = nil - } - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_L(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - var l int64 - for i := 0; i < b.N; i++ { - enc.ResetBytes(&out) - if err := enc.Encode(&xlStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = nil - } - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_S_Reuse(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - var l int64 - for i := 0; i < b.N; i++ { - enc.ResetBytes(&out) - if err := enc.Encode(&smallStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = out[:0] - } - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_M_Reuse(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - var l int64 - for i := 0; i < b.N; i++ { - enc.ResetBytes(&out) - if err := enc.Encode(&largeStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = out[:0] - } - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_L_Reuse(b *testing.B) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - var l int64 - for i := 0; i < b.N; i++ { - enc.ResetBytes(&out) - if err := enc.Encode(&xlStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = out[:0] - } - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_S_Parallel(b *testing.B) { - var l int64 - - b.RunParallel(func(pb *testing.PB) { - var out []byte - - var h codec.Handle = new(codec.JsonHandle) - enc := codec.NewEncoderBytes(&out, h) - - for pb.Next() { - enc.ResetBytes(&out) - if err := enc.Encode(&smallStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = nil - } - }) - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_M_Parallel(b *testing.B) { - var l int64 - - b.RunParallel(func(pb *testing.PB) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - for pb.Next() { - enc.ResetBytes(&out) - if err := enc.Encode(&largeStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = nil - } - }) - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_L_Parallel(b *testing.B) { - var l int64 - - b.RunParallel(func(pb *testing.PB) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - for pb.Next() { - enc.ResetBytes(&out) - if err := enc.Encode(&xlStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = nil - } - }) - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_S_Parallel_Reuse(b *testing.B) { - var l int64 - - b.RunParallel(func(pb *testing.PB) { - var out []byte - - var h codec.Handle = new(codec.JsonHandle) - enc := codec.NewEncoderBytes(&out, h) - - for pb.Next() { - enc.ResetBytes(&out) - if err := enc.Encode(&smallStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = out[:0] - } - }) - - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_M_Parallel_Reuse(b *testing.B) { - var l int64 - - b.RunParallel(func(pb *testing.PB) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - for pb.Next() { - enc.ResetBytes(&out) - if err := enc.Encode(&largeStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = out[:0] - } - }) - b.SetBytes(l) -} - -func BenchmarkCodec_Marshal_L_Parallel_Reuse(b *testing.B) { - var l int64 - - b.RunParallel(func(pb *testing.PB) { - var h codec.Handle = new(codec.JsonHandle) - - var out []byte - enc := codec.NewEncoderBytes(&out, h) - - for pb.Next() { - enc.ResetBytes(&out) - if err := enc.Encode(&xlStructData); err != nil { - b.Error(err) - } - l = int64(len(out)) - out = out[:0] - } - }) - b.SetBytes(l) -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/data.go b/vendor/github.com/mailru/easyjson/benchmark/data.go deleted file mode 100644 index d2c689cd..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/data.go +++ /dev/null @@ -1,148 +0,0 @@ -// Package benchmark provides a simple benchmark for easyjson against default serialization and ffjson. -// The data example is taken from https://dev.twitter.com/rest/reference/get/search/tweets -package benchmark - -import ( - "io/ioutil" -) - -var largeStructText, _ = ioutil.ReadFile("example.json") -var xlStructData XLStruct - -func init() { - for i := 0; i < 50; i++ { - xlStructData.Data = append(xlStructData.Data, largeStructData) - } -} - -var smallStructText = []byte(`{"hashtags":[{"indices":[5, 10],"text":"some-text"}],"urls":[],"user_mentions":[]}`) -var smallStructData = Entities{ - Hashtags: []Hashtag{{Indices: []int{5, 10}, Text: "some-text"}}, - Urls: []*string{}, - UserMentions: []*string{}, -} - -type SearchMetadata struct { - CompletedIn float64 `json:"completed_in"` - Count int `json:"count"` - MaxID int `json:"max_id"` - MaxIDStr string `json:"max_id_str"` - NextResults string `json:"next_results"` - Query string `json:"query"` - RefreshURL string `json:"refresh_url"` - SinceID int `json:"since_id"` - SinceIDStr string `json:"since_id_str"` -} - -type Hashtag struct { - Indices []int `json:"indices"` - Text string `json:"text"` -} - -//easyjson:json -type Entities struct { - Hashtags []Hashtag `json:"hashtags"` - Urls []*string `json:"urls"` - UserMentions []*string `json:"user_mentions"` -} - -type UserEntityDescription struct { - Urls []*string `json:"urls"` -} - -type URL struct { - ExpandedURL *string `json:"expanded_url"` - Indices []int `json:"indices"` - URL string `json:"url"` -} - -type UserEntityURL struct { - Urls []URL `json:"urls"` -} - -type UserEntities struct { - Description UserEntityDescription `json:"description"` - URL UserEntityURL `json:"url"` -} - -type User struct { - ContributorsEnabled bool `json:"contributors_enabled"` - CreatedAt string `json:"created_at"` - DefaultProfile bool `json:"default_profile"` - DefaultProfileImage bool `json:"default_profile_image"` - Description string `json:"description"` - Entities UserEntities `json:"entities"` - FavouritesCount int `json:"favourites_count"` - FollowRequestSent *string `json:"follow_request_sent"` - FollowersCount int `json:"followers_count"` - Following *string `json:"following"` - FriendsCount int `json:"friends_count"` - GeoEnabled bool `json:"geo_enabled"` - ID int `json:"id"` - IDStr string `json:"id_str"` - IsTranslator bool `json:"is_translator"` - Lang string `json:"lang"` - ListedCount int `json:"listed_count"` - Location string `json:"location"` - Name string `json:"name"` - Notifications *string `json:"notifications"` - ProfileBackgroundColor string `json:"profile_background_color"` - ProfileBackgroundImageURL string `json:"profile_background_image_url"` - ProfileBackgroundImageURLHTTPS string `json:"profile_background_image_url_https"` - ProfileBackgroundTile bool `json:"profile_background_tile"` - ProfileImageURL string `json:"profile_image_url"` - ProfileImageURLHTTPS string `json:"profile_image_url_https"` - ProfileLinkColor string `json:"profile_link_color"` - ProfileSidebarBorderColor string `json:"profile_sidebar_border_color"` - ProfileSidebarFillColor string `json:"profile_sidebar_fill_color"` - ProfileTextColor string `json:"profile_text_color"` - ProfileUseBackgroundImage bool `json:"profile_use_background_image"` - Protected bool `json:"protected"` - ScreenName string `json:"screen_name"` - ShowAllInlineMedia bool `json:"show_all_inline_media"` - StatusesCount int `json:"statuses_count"` - TimeZone string `json:"time_zone"` - URL *string `json:"url"` - UtcOffset int `json:"utc_offset"` - Verified bool `json:"verified"` -} - -type StatusMetadata struct { - IsoLanguageCode string `json:"iso_language_code"` - ResultType string `json:"result_type"` -} - -type Status struct { - Contributors *string `json:"contributors"` - Coordinates *string `json:"coordinates"` - CreatedAt string `json:"created_at"` - Entities Entities `json:"entities"` - Favorited bool `json:"favorited"` - Geo *string `json:"geo"` - ID int64 `json:"id"` - IDStr string `json:"id_str"` - InReplyToScreenName *string `json:"in_reply_to_screen_name"` - InReplyToStatusID *string `json:"in_reply_to_status_id"` - InReplyToStatusIDStr *string `json:"in_reply_to_status_id_str"` - InReplyToUserID *string `json:"in_reply_to_user_id"` - InReplyToUserIDStr *string `json:"in_reply_to_user_id_str"` - Metadata StatusMetadata `json:"metadata"` - Place *string `json:"place"` - RetweetCount int `json:"retweet_count"` - Retweeted bool `json:"retweeted"` - Source string `json:"source"` - Text string `json:"text"` - Truncated bool `json:"truncated"` - User User `json:"user"` -} - -//easyjson:json -type LargeStruct struct { - SearchMetadata SearchMetadata `json:"search_metadata"` - Statuses []Status `json:"statuses"` -} - -//easyjson:json -type XLStruct struct { - Data []LargeStruct -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_codec.go b/vendor/github.com/mailru/easyjson/benchmark/data_codec.go deleted file mode 100644 index 0bb8c4c5..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/data_codec.go +++ /dev/null @@ -1,6911 +0,0 @@ -//+build use_codec - -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED BY codecgen. -// ************************************************************ - -package benchmark - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - "reflect" - "runtime" - "unsafe" -) - -const ( - // ----- content types ---- - codecSelferC_UTF89225 = 1 - codecSelferC_RAW9225 = 0 - // ----- value types used ---- - codecSelferValueTypeArray9225 = 10 - codecSelferValueTypeMap9225 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey9225 = 2 - codecSelfer_containerMapValue9225 = 3 - codecSelfer_containerMapEnd9225 = 4 - codecSelfer_containerArrayElem9225 = 6 - codecSelfer_containerArrayEnd9225 = 7 -) - -var ( - codecSelferBitsize9225 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr9225 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelferUnsafeString9225 struct { - Data uintptr - Len int -} - -type codecSelfer9225 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 unsafe.Pointer - _ = v0 - } -} - -func (x *SearchMetadata) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [9]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(9) - } else { - yynn2 = 9 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeFloat64(float64(x.CompletedIn)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("completed_in")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeFloat64(float64(x.CompletedIn)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("count")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - r.EncodeInt(int64(x.MaxID)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("max_id")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym11 := z.EncBinary() - _ = yym11 - if false { - } else { - r.EncodeInt(int64(x.MaxID)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.MaxIDStr)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("max_id_str")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.MaxIDStr)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.NextResults)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("next_results")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym17 := z.EncBinary() - _ = yym17 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.NextResults)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Query)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("query")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym20 := z.EncBinary() - _ = yym20 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Query)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym22 := z.EncBinary() - _ = yym22 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.RefreshURL)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("refresh_url")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym23 := z.EncBinary() - _ = yym23 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.RefreshURL)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym25 := z.EncBinary() - _ = yym25 - if false { - } else { - r.EncodeInt(int64(x.SinceID)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("since_id")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym26 := z.EncBinary() - _ = yym26 - if false { - } else { - r.EncodeInt(int64(x.SinceID)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym28 := z.EncBinary() - _ = yym28 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.SinceIDStr)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("since_id_str")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym29 := z.EncBinary() - _ = yym29 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.SinceIDStr)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *SearchMetadata) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *SearchMetadata) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "completed_in": - if r.TryDecodeAsNil() { - x.CompletedIn = 0 - } else { - yyv4 := &x.CompletedIn - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - *((*float64)(yyv4)) = float64(r.DecodeFloat(false)) - } - } - case "count": - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - yyv6 := &x.Count - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - *((*int)(yyv6)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "max_id": - if r.TryDecodeAsNil() { - x.MaxID = 0 - } else { - yyv8 := &x.MaxID - yym9 := z.DecBinary() - _ = yym9 - if false { - } else { - *((*int)(yyv8)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "max_id_str": - if r.TryDecodeAsNil() { - x.MaxIDStr = "" - } else { - yyv10 := &x.MaxIDStr - yym11 := z.DecBinary() - _ = yym11 - if false { - } else { - *((*string)(yyv10)) = r.DecodeString() - } - } - case "next_results": - if r.TryDecodeAsNil() { - x.NextResults = "" - } else { - yyv12 := &x.NextResults - yym13 := z.DecBinary() - _ = yym13 - if false { - } else { - *((*string)(yyv12)) = r.DecodeString() - } - } - case "query": - if r.TryDecodeAsNil() { - x.Query = "" - } else { - yyv14 := &x.Query - yym15 := z.DecBinary() - _ = yym15 - if false { - } else { - *((*string)(yyv14)) = r.DecodeString() - } - } - case "refresh_url": - if r.TryDecodeAsNil() { - x.RefreshURL = "" - } else { - yyv16 := &x.RefreshURL - yym17 := z.DecBinary() - _ = yym17 - if false { - } else { - *((*string)(yyv16)) = r.DecodeString() - } - } - case "since_id": - if r.TryDecodeAsNil() { - x.SinceID = 0 - } else { - yyv18 := &x.SinceID - yym19 := z.DecBinary() - _ = yym19 - if false { - } else { - *((*int)(yyv18)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "since_id_str": - if r.TryDecodeAsNil() { - x.SinceIDStr = "" - } else { - yyv20 := &x.SinceIDStr - yym21 := z.DecBinary() - _ = yym21 - if false { - } else { - *((*string)(yyv20)) = r.DecodeString() - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *SearchMetadata) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj22 int - var yyb22 bool - var yyhl22 bool = l >= 0 - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.CompletedIn = 0 - } else { - yyv23 := &x.CompletedIn - yym24 := z.DecBinary() - _ = yym24 - if false { - } else { - *((*float64)(yyv23)) = float64(r.DecodeFloat(false)) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - yyv25 := &x.Count - yym26 := z.DecBinary() - _ = yym26 - if false { - } else { - *((*int)(yyv25)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.MaxID = 0 - } else { - yyv27 := &x.MaxID - yym28 := z.DecBinary() - _ = yym28 - if false { - } else { - *((*int)(yyv27)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.MaxIDStr = "" - } else { - yyv29 := &x.MaxIDStr - yym30 := z.DecBinary() - _ = yym30 - if false { - } else { - *((*string)(yyv29)) = r.DecodeString() - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.NextResults = "" - } else { - yyv31 := &x.NextResults - yym32 := z.DecBinary() - _ = yym32 - if false { - } else { - *((*string)(yyv31)) = r.DecodeString() - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Query = "" - } else { - yyv33 := &x.Query - yym34 := z.DecBinary() - _ = yym34 - if false { - } else { - *((*string)(yyv33)) = r.DecodeString() - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.RefreshURL = "" - } else { - yyv35 := &x.RefreshURL - yym36 := z.DecBinary() - _ = yym36 - if false { - } else { - *((*string)(yyv35)) = r.DecodeString() - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.SinceID = 0 - } else { - yyv37 := &x.SinceID - yym38 := z.DecBinary() - _ = yym38 - if false { - } else { - *((*int)(yyv37)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.SinceIDStr = "" - } else { - yyv39 := &x.SinceIDStr - yym40 := z.DecBinary() - _ = yym40 - if false { - } else { - *((*string)(yyv39)) = r.DecodeString() - } - } - for { - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj22-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *Hashtag) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) - } else { - yynn2 = 2 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Indices == nil { - r.EncodeNil() - } else { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - z.F.EncSliceIntV(x.Indices, false, e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("indices")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Indices == nil { - r.EncodeNil() - } else { - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - z.F.EncSliceIntV(x.Indices, false, e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Text)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("text")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Text)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *Hashtag) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *Hashtag) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "indices": - if r.TryDecodeAsNil() { - x.Indices = nil - } else { - yyv4 := &x.Indices - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - z.F.DecSliceIntX(yyv4, false, d) - } - } - case "text": - if r.TryDecodeAsNil() { - x.Text = "" - } else { - yyv6 := &x.Text - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - *((*string)(yyv6)) = r.DecodeString() - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *Hashtag) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Indices = nil - } else { - yyv9 := &x.Indices - yym10 := z.DecBinary() - _ = yym10 - if false { - } else { - z.F.DecSliceIntX(yyv9, false, d) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Text = "" - } else { - yyv11 := &x.Text - yym12 := z.DecBinary() - _ = yym12 - if false { - } else { - *((*string)(yyv11)) = r.DecodeString() - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj8-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *Entities) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [3]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(3) - } else { - yynn2 = 3 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Hashtags == nil { - r.EncodeNil() - } else { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - h.encSliceHashtag(([]Hashtag)(x.Hashtags), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("hashtags")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Hashtags == nil { - r.EncodeNil() - } else { - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - h.encSliceHashtag(([]Hashtag)(x.Hashtags), e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Urls == nil { - r.EncodeNil() - } else { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - h.encSlicePtrtostring(([]*string)(x.Urls), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("urls")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Urls == nil { - r.EncodeNil() - } else { - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - h.encSlicePtrtostring(([]*string)(x.Urls), e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.UserMentions == nil { - r.EncodeNil() - } else { - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - h.encSlicePtrtostring(([]*string)(x.UserMentions), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("user_mentions")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.UserMentions == nil { - r.EncodeNil() - } else { - yym11 := z.EncBinary() - _ = yym11 - if false { - } else { - h.encSlicePtrtostring(([]*string)(x.UserMentions), e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *Entities) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *Entities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "hashtags": - if r.TryDecodeAsNil() { - x.Hashtags = nil - } else { - yyv4 := &x.Hashtags - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - h.decSliceHashtag((*[]Hashtag)(yyv4), d) - } - } - case "urls": - if r.TryDecodeAsNil() { - x.Urls = nil - } else { - yyv6 := &x.Urls - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - h.decSlicePtrtostring((*[]*string)(yyv6), d) - } - } - case "user_mentions": - if r.TryDecodeAsNil() { - x.UserMentions = nil - } else { - yyv8 := &x.UserMentions - yym9 := z.DecBinary() - _ = yym9 - if false { - } else { - h.decSlicePtrtostring((*[]*string)(yyv8), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *Entities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Hashtags = nil - } else { - yyv11 := &x.Hashtags - yym12 := z.DecBinary() - _ = yym12 - if false { - } else { - h.decSliceHashtag((*[]Hashtag)(yyv11), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Urls = nil - } else { - yyv13 := &x.Urls - yym14 := z.DecBinary() - _ = yym14 - if false { - } else { - h.decSlicePtrtostring((*[]*string)(yyv13), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.UserMentions = nil - } else { - yyv15 := &x.UserMentions - yym16 := z.DecBinary() - _ = yym16 - if false { - } else { - h.decSlicePtrtostring((*[]*string)(yyv15), d) - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj10-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *UserEntityDescription) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [1]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(1) - } else { - yynn2 = 1 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Urls == nil { - r.EncodeNil() - } else { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - h.encSlicePtrtostring(([]*string)(x.Urls), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("urls")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Urls == nil { - r.EncodeNil() - } else { - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - h.encSlicePtrtostring(([]*string)(x.Urls), e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *UserEntityDescription) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *UserEntityDescription) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "urls": - if r.TryDecodeAsNil() { - x.Urls = nil - } else { - yyv4 := &x.Urls - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - h.decSlicePtrtostring((*[]*string)(yyv4), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *UserEntityDescription) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Urls = nil - } else { - yyv7 := &x.Urls - yym8 := z.DecBinary() - _ = yym8 - if false { - } else { - h.decSlicePtrtostring((*[]*string)(yyv7), d) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj6-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *URL) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [3]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(3) - } else { - yynn2 = 3 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.ExpandedURL == nil { - r.EncodeNil() - } else { - yy4 := *x.ExpandedURL - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy4)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("expanded_url")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.ExpandedURL == nil { - r.EncodeNil() - } else { - yy6 := *x.ExpandedURL - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy6)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Indices == nil { - r.EncodeNil() - } else { - yym9 := z.EncBinary() - _ = yym9 - if false { - } else { - z.F.EncSliceIntV(x.Indices, false, e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("indices")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Indices == nil { - r.EncodeNil() - } else { - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - z.F.EncSliceIntV(x.Indices, false, e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym12 := z.EncBinary() - _ = yym12 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.URL)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("url")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.URL)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *URL) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *URL) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "expanded_url": - if r.TryDecodeAsNil() { - if x.ExpandedURL != nil { - x.ExpandedURL = nil - } - } else { - if x.ExpandedURL == nil { - x.ExpandedURL = new(string) - } - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - *((*string)(x.ExpandedURL)) = r.DecodeString() - } - } - case "indices": - if r.TryDecodeAsNil() { - x.Indices = nil - } else { - yyv6 := &x.Indices - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - z.F.DecSliceIntX(yyv6, false, d) - } - } - case "url": - if r.TryDecodeAsNil() { - x.URL = "" - } else { - yyv8 := &x.URL - yym9 := z.DecBinary() - _ = yym9 - if false { - } else { - *((*string)(yyv8)) = r.DecodeString() - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *URL) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.ExpandedURL != nil { - x.ExpandedURL = nil - } - } else { - if x.ExpandedURL == nil { - x.ExpandedURL = new(string) - } - yym12 := z.DecBinary() - _ = yym12 - if false { - } else { - *((*string)(x.ExpandedURL)) = r.DecodeString() - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Indices = nil - } else { - yyv13 := &x.Indices - yym14 := z.DecBinary() - _ = yym14 - if false { - } else { - z.F.DecSliceIntX(yyv13, false, d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.URL = "" - } else { - yyv15 := &x.URL - yym16 := z.DecBinary() - _ = yym16 - if false { - } else { - *((*string)(yyv15)) = r.DecodeString() - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj10-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *UserEntityURL) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [1]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(1) - } else { - yynn2 = 1 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Urls == nil { - r.EncodeNil() - } else { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - h.encSliceURL(([]URL)(x.Urls), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("urls")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Urls == nil { - r.EncodeNil() - } else { - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - h.encSliceURL(([]URL)(x.Urls), e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *UserEntityURL) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *UserEntityURL) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "urls": - if r.TryDecodeAsNil() { - x.Urls = nil - } else { - yyv4 := &x.Urls - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - h.decSliceURL((*[]URL)(yyv4), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *UserEntityURL) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Urls = nil - } else { - yyv7 := &x.Urls - yym8 := z.DecBinary() - _ = yym8 - if false { - } else { - h.decSliceURL((*[]URL)(yyv7), d) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj6-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *UserEntities) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) - } else { - yynn2 = 2 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy4 := &x.Description - yy4.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("description")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yy6 := &x.Description - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy9 := &x.URL - yy9.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("url")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yy11 := &x.URL - yy11.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *UserEntities) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *UserEntities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "description": - if r.TryDecodeAsNil() { - x.Description = UserEntityDescription{} - } else { - yyv4 := &x.Description - yyv4.CodecDecodeSelf(d) - } - case "url": - if r.TryDecodeAsNil() { - x.URL = UserEntityURL{} - } else { - yyv5 := &x.URL - yyv5.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *UserEntities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Description = UserEntityDescription{} - } else { - yyv7 := &x.Description - yyv7.CodecDecodeSelf(d) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.URL = UserEntityURL{} - } else { - yyv8 := &x.URL - yyv8.CodecDecodeSelf(d) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj6-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *User) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [39]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(39) - } else { - yynn2 = 39 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeBool(bool(x.ContributorsEnabled)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("contributors_enabled")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeBool(bool(x.ContributorsEnabled)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("created_at")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - r.EncodeBool(bool(x.DefaultProfile)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("default_profile")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym11 := z.EncBinary() - _ = yym11 - if false { - } else { - r.EncodeBool(bool(x.DefaultProfile)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - r.EncodeBool(bool(x.DefaultProfileImage)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("default_profile_image")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeBool(bool(x.DefaultProfileImage)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Description)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("description")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym17 := z.EncBinary() - _ = yym17 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Description)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy19 := &x.Entities - yy19.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("entities")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yy21 := &x.Entities - yy21.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym24 := z.EncBinary() - _ = yym24 - if false { - } else { - r.EncodeInt(int64(x.FavouritesCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("favourites_count")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym25 := z.EncBinary() - _ = yym25 - if false { - } else { - r.EncodeInt(int64(x.FavouritesCount)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.FollowRequestSent == nil { - r.EncodeNil() - } else { - yy27 := *x.FollowRequestSent - yym28 := z.EncBinary() - _ = yym28 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy27)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("follow_request_sent")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.FollowRequestSent == nil { - r.EncodeNil() - } else { - yy29 := *x.FollowRequestSent - yym30 := z.EncBinary() - _ = yym30 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy29)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym32 := z.EncBinary() - _ = yym32 - if false { - } else { - r.EncodeInt(int64(x.FollowersCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("followers_count")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym33 := z.EncBinary() - _ = yym33 - if false { - } else { - r.EncodeInt(int64(x.FollowersCount)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Following == nil { - r.EncodeNil() - } else { - yy35 := *x.Following - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy35)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("following")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Following == nil { - r.EncodeNil() - } else { - yy37 := *x.Following - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy37)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym40 := z.EncBinary() - _ = yym40 - if false { - } else { - r.EncodeInt(int64(x.FriendsCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("friends_count")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym41 := z.EncBinary() - _ = yym41 - if false { - } else { - r.EncodeInt(int64(x.FriendsCount)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym43 := z.EncBinary() - _ = yym43 - if false { - } else { - r.EncodeBool(bool(x.GeoEnabled)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("geo_enabled")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - r.EncodeBool(bool(x.GeoEnabled)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym46 := z.EncBinary() - _ = yym46 - if false { - } else { - r.EncodeInt(int64(x.ID)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("id")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - r.EncodeInt(int64(x.ID)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym49 := z.EncBinary() - _ = yym49 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.IDStr)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("id_str")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym50 := z.EncBinary() - _ = yym50 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.IDStr)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym52 := z.EncBinary() - _ = yym52 - if false { - } else { - r.EncodeBool(bool(x.IsTranslator)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("is_translator")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym53 := z.EncBinary() - _ = yym53 - if false { - } else { - r.EncodeBool(bool(x.IsTranslator)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym55 := z.EncBinary() - _ = yym55 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Lang)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("lang")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym56 := z.EncBinary() - _ = yym56 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Lang)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym58 := z.EncBinary() - _ = yym58 - if false { - } else { - r.EncodeInt(int64(x.ListedCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("listed_count")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym59 := z.EncBinary() - _ = yym59 - if false { - } else { - r.EncodeInt(int64(x.ListedCount)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym61 := z.EncBinary() - _ = yym61 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Location)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("location")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym62 := z.EncBinary() - _ = yym62 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Location)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym64 := z.EncBinary() - _ = yym64 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Name)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("name")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym65 := z.EncBinary() - _ = yym65 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Name)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Notifications == nil { - r.EncodeNil() - } else { - yy67 := *x.Notifications - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy67)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("notifications")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Notifications == nil { - r.EncodeNil() - } else { - yy69 := *x.Notifications - yym70 := z.EncBinary() - _ = yym70 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy69)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym72 := z.EncBinary() - _ = yym72 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundColor)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_background_color")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym73 := z.EncBinary() - _ = yym73 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundColor)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym75 := z.EncBinary() - _ = yym75 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURL)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_background_image_url")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym76 := z.EncBinary() - _ = yym76 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURL)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym78 := z.EncBinary() - _ = yym78 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURLHTTPS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_background_image_url_https")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym79 := z.EncBinary() - _ = yym79 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURLHTTPS)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym81 := z.EncBinary() - _ = yym81 - if false { - } else { - r.EncodeBool(bool(x.ProfileBackgroundTile)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_background_tile")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym82 := z.EncBinary() - _ = yym82 - if false { - } else { - r.EncodeBool(bool(x.ProfileBackgroundTile)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym84 := z.EncBinary() - _ = yym84 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURL)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_image_url")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym85 := z.EncBinary() - _ = yym85 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURL)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym87 := z.EncBinary() - _ = yym87 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURLHTTPS)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_image_url_https")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym88 := z.EncBinary() - _ = yym88 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURLHTTPS)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym90 := z.EncBinary() - _ = yym90 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileLinkColor)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_link_color")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym91 := z.EncBinary() - _ = yym91 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileLinkColor)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym93 := z.EncBinary() - _ = yym93 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarBorderColor)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_sidebar_border_color")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym94 := z.EncBinary() - _ = yym94 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarBorderColor)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym96 := z.EncBinary() - _ = yym96 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarFillColor)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_sidebar_fill_color")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym97 := z.EncBinary() - _ = yym97 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarFillColor)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym99 := z.EncBinary() - _ = yym99 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileTextColor)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_text_color")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym100 := z.EncBinary() - _ = yym100 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ProfileTextColor)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym102 := z.EncBinary() - _ = yym102 - if false { - } else { - r.EncodeBool(bool(x.ProfileUseBackgroundImage)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("profile_use_background_image")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym103 := z.EncBinary() - _ = yym103 - if false { - } else { - r.EncodeBool(bool(x.ProfileUseBackgroundImage)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym105 := z.EncBinary() - _ = yym105 - if false { - } else { - r.EncodeBool(bool(x.Protected)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("protected")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym106 := z.EncBinary() - _ = yym106 - if false { - } else { - r.EncodeBool(bool(x.Protected)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym108 := z.EncBinary() - _ = yym108 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ScreenName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("screen_name")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym109 := z.EncBinary() - _ = yym109 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ScreenName)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym111 := z.EncBinary() - _ = yym111 - if false { - } else { - r.EncodeBool(bool(x.ShowAllInlineMedia)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("show_all_inline_media")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym112 := z.EncBinary() - _ = yym112 - if false { - } else { - r.EncodeBool(bool(x.ShowAllInlineMedia)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym114 := z.EncBinary() - _ = yym114 - if false { - } else { - r.EncodeInt(int64(x.StatusesCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("statuses_count")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym115 := z.EncBinary() - _ = yym115 - if false { - } else { - r.EncodeInt(int64(x.StatusesCount)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym117 := z.EncBinary() - _ = yym117 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.TimeZone)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("time_zone")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym118 := z.EncBinary() - _ = yym118 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.TimeZone)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.URL == nil { - r.EncodeNil() - } else { - yy120 := *x.URL - yym121 := z.EncBinary() - _ = yym121 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy120)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("url")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.URL == nil { - r.EncodeNil() - } else { - yy122 := *x.URL - yym123 := z.EncBinary() - _ = yym123 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy122)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym125 := z.EncBinary() - _ = yym125 - if false { - } else { - r.EncodeInt(int64(x.UtcOffset)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("utc_offset")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - r.EncodeInt(int64(x.UtcOffset)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym128 := z.EncBinary() - _ = yym128 - if false { - } else { - r.EncodeBool(bool(x.Verified)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("verified")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym129 := z.EncBinary() - _ = yym129 - if false { - } else { - r.EncodeBool(bool(x.Verified)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *User) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *User) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "contributors_enabled": - if r.TryDecodeAsNil() { - x.ContributorsEnabled = false - } else { - yyv4 := &x.ContributorsEnabled - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - *((*bool)(yyv4)) = r.DecodeBool() - } - } - case "created_at": - if r.TryDecodeAsNil() { - x.CreatedAt = "" - } else { - yyv6 := &x.CreatedAt - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - *((*string)(yyv6)) = r.DecodeString() - } - } - case "default_profile": - if r.TryDecodeAsNil() { - x.DefaultProfile = false - } else { - yyv8 := &x.DefaultProfile - yym9 := z.DecBinary() - _ = yym9 - if false { - } else { - *((*bool)(yyv8)) = r.DecodeBool() - } - } - case "default_profile_image": - if r.TryDecodeAsNil() { - x.DefaultProfileImage = false - } else { - yyv10 := &x.DefaultProfileImage - yym11 := z.DecBinary() - _ = yym11 - if false { - } else { - *((*bool)(yyv10)) = r.DecodeBool() - } - } - case "description": - if r.TryDecodeAsNil() { - x.Description = "" - } else { - yyv12 := &x.Description - yym13 := z.DecBinary() - _ = yym13 - if false { - } else { - *((*string)(yyv12)) = r.DecodeString() - } - } - case "entities": - if r.TryDecodeAsNil() { - x.Entities = UserEntities{} - } else { - yyv14 := &x.Entities - yyv14.CodecDecodeSelf(d) - } - case "favourites_count": - if r.TryDecodeAsNil() { - x.FavouritesCount = 0 - } else { - yyv15 := &x.FavouritesCount - yym16 := z.DecBinary() - _ = yym16 - if false { - } else { - *((*int)(yyv15)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "follow_request_sent": - if r.TryDecodeAsNil() { - if x.FollowRequestSent != nil { - x.FollowRequestSent = nil - } - } else { - if x.FollowRequestSent == nil { - x.FollowRequestSent = new(string) - } - yym18 := z.DecBinary() - _ = yym18 - if false { - } else { - *((*string)(x.FollowRequestSent)) = r.DecodeString() - } - } - case "followers_count": - if r.TryDecodeAsNil() { - x.FollowersCount = 0 - } else { - yyv19 := &x.FollowersCount - yym20 := z.DecBinary() - _ = yym20 - if false { - } else { - *((*int)(yyv19)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "following": - if r.TryDecodeAsNil() { - if x.Following != nil { - x.Following = nil - } - } else { - if x.Following == nil { - x.Following = new(string) - } - yym22 := z.DecBinary() - _ = yym22 - if false { - } else { - *((*string)(x.Following)) = r.DecodeString() - } - } - case "friends_count": - if r.TryDecodeAsNil() { - x.FriendsCount = 0 - } else { - yyv23 := &x.FriendsCount - yym24 := z.DecBinary() - _ = yym24 - if false { - } else { - *((*int)(yyv23)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "geo_enabled": - if r.TryDecodeAsNil() { - x.GeoEnabled = false - } else { - yyv25 := &x.GeoEnabled - yym26 := z.DecBinary() - _ = yym26 - if false { - } else { - *((*bool)(yyv25)) = r.DecodeBool() - } - } - case "id": - if r.TryDecodeAsNil() { - x.ID = 0 - } else { - yyv27 := &x.ID - yym28 := z.DecBinary() - _ = yym28 - if false { - } else { - *((*int)(yyv27)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "id_str": - if r.TryDecodeAsNil() { - x.IDStr = "" - } else { - yyv29 := &x.IDStr - yym30 := z.DecBinary() - _ = yym30 - if false { - } else { - *((*string)(yyv29)) = r.DecodeString() - } - } - case "is_translator": - if r.TryDecodeAsNil() { - x.IsTranslator = false - } else { - yyv31 := &x.IsTranslator - yym32 := z.DecBinary() - _ = yym32 - if false { - } else { - *((*bool)(yyv31)) = r.DecodeBool() - } - } - case "lang": - if r.TryDecodeAsNil() { - x.Lang = "" - } else { - yyv33 := &x.Lang - yym34 := z.DecBinary() - _ = yym34 - if false { - } else { - *((*string)(yyv33)) = r.DecodeString() - } - } - case "listed_count": - if r.TryDecodeAsNil() { - x.ListedCount = 0 - } else { - yyv35 := &x.ListedCount - yym36 := z.DecBinary() - _ = yym36 - if false { - } else { - *((*int)(yyv35)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "location": - if r.TryDecodeAsNil() { - x.Location = "" - } else { - yyv37 := &x.Location - yym38 := z.DecBinary() - _ = yym38 - if false { - } else { - *((*string)(yyv37)) = r.DecodeString() - } - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - yyv39 := &x.Name - yym40 := z.DecBinary() - _ = yym40 - if false { - } else { - *((*string)(yyv39)) = r.DecodeString() - } - } - case "notifications": - if r.TryDecodeAsNil() { - if x.Notifications != nil { - x.Notifications = nil - } - } else { - if x.Notifications == nil { - x.Notifications = new(string) - } - yym42 := z.DecBinary() - _ = yym42 - if false { - } else { - *((*string)(x.Notifications)) = r.DecodeString() - } - } - case "profile_background_color": - if r.TryDecodeAsNil() { - x.ProfileBackgroundColor = "" - } else { - yyv43 := &x.ProfileBackgroundColor - yym44 := z.DecBinary() - _ = yym44 - if false { - } else { - *((*string)(yyv43)) = r.DecodeString() - } - } - case "profile_background_image_url": - if r.TryDecodeAsNil() { - x.ProfileBackgroundImageURL = "" - } else { - yyv45 := &x.ProfileBackgroundImageURL - yym46 := z.DecBinary() - _ = yym46 - if false { - } else { - *((*string)(yyv45)) = r.DecodeString() - } - } - case "profile_background_image_url_https": - if r.TryDecodeAsNil() { - x.ProfileBackgroundImageURLHTTPS = "" - } else { - yyv47 := &x.ProfileBackgroundImageURLHTTPS - yym48 := z.DecBinary() - _ = yym48 - if false { - } else { - *((*string)(yyv47)) = r.DecodeString() - } - } - case "profile_background_tile": - if r.TryDecodeAsNil() { - x.ProfileBackgroundTile = false - } else { - yyv49 := &x.ProfileBackgroundTile - yym50 := z.DecBinary() - _ = yym50 - if false { - } else { - *((*bool)(yyv49)) = r.DecodeBool() - } - } - case "profile_image_url": - if r.TryDecodeAsNil() { - x.ProfileImageURL = "" - } else { - yyv51 := &x.ProfileImageURL - yym52 := z.DecBinary() - _ = yym52 - if false { - } else { - *((*string)(yyv51)) = r.DecodeString() - } - } - case "profile_image_url_https": - if r.TryDecodeAsNil() { - x.ProfileImageURLHTTPS = "" - } else { - yyv53 := &x.ProfileImageURLHTTPS - yym54 := z.DecBinary() - _ = yym54 - if false { - } else { - *((*string)(yyv53)) = r.DecodeString() - } - } - case "profile_link_color": - if r.TryDecodeAsNil() { - x.ProfileLinkColor = "" - } else { - yyv55 := &x.ProfileLinkColor - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - *((*string)(yyv55)) = r.DecodeString() - } - } - case "profile_sidebar_border_color": - if r.TryDecodeAsNil() { - x.ProfileSidebarBorderColor = "" - } else { - yyv57 := &x.ProfileSidebarBorderColor - yym58 := z.DecBinary() - _ = yym58 - if false { - } else { - *((*string)(yyv57)) = r.DecodeString() - } - } - case "profile_sidebar_fill_color": - if r.TryDecodeAsNil() { - x.ProfileSidebarFillColor = "" - } else { - yyv59 := &x.ProfileSidebarFillColor - yym60 := z.DecBinary() - _ = yym60 - if false { - } else { - *((*string)(yyv59)) = r.DecodeString() - } - } - case "profile_text_color": - if r.TryDecodeAsNil() { - x.ProfileTextColor = "" - } else { - yyv61 := &x.ProfileTextColor - yym62 := z.DecBinary() - _ = yym62 - if false { - } else { - *((*string)(yyv61)) = r.DecodeString() - } - } - case "profile_use_background_image": - if r.TryDecodeAsNil() { - x.ProfileUseBackgroundImage = false - } else { - yyv63 := &x.ProfileUseBackgroundImage - yym64 := z.DecBinary() - _ = yym64 - if false { - } else { - *((*bool)(yyv63)) = r.DecodeBool() - } - } - case "protected": - if r.TryDecodeAsNil() { - x.Protected = false - } else { - yyv65 := &x.Protected - yym66 := z.DecBinary() - _ = yym66 - if false { - } else { - *((*bool)(yyv65)) = r.DecodeBool() - } - } - case "screen_name": - if r.TryDecodeAsNil() { - x.ScreenName = "" - } else { - yyv67 := &x.ScreenName - yym68 := z.DecBinary() - _ = yym68 - if false { - } else { - *((*string)(yyv67)) = r.DecodeString() - } - } - case "show_all_inline_media": - if r.TryDecodeAsNil() { - x.ShowAllInlineMedia = false - } else { - yyv69 := &x.ShowAllInlineMedia - yym70 := z.DecBinary() - _ = yym70 - if false { - } else { - *((*bool)(yyv69)) = r.DecodeBool() - } - } - case "statuses_count": - if r.TryDecodeAsNil() { - x.StatusesCount = 0 - } else { - yyv71 := &x.StatusesCount - yym72 := z.DecBinary() - _ = yym72 - if false { - } else { - *((*int)(yyv71)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "time_zone": - if r.TryDecodeAsNil() { - x.TimeZone = "" - } else { - yyv73 := &x.TimeZone - yym74 := z.DecBinary() - _ = yym74 - if false { - } else { - *((*string)(yyv73)) = r.DecodeString() - } - } - case "url": - if r.TryDecodeAsNil() { - if x.URL != nil { - x.URL = nil - } - } else { - if x.URL == nil { - x.URL = new(string) - } - yym76 := z.DecBinary() - _ = yym76 - if false { - } else { - *((*string)(x.URL)) = r.DecodeString() - } - } - case "utc_offset": - if r.TryDecodeAsNil() { - x.UtcOffset = 0 - } else { - yyv77 := &x.UtcOffset - yym78 := z.DecBinary() - _ = yym78 - if false { - } else { - *((*int)(yyv77)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "verified": - if r.TryDecodeAsNil() { - x.Verified = false - } else { - yyv79 := &x.Verified - yym80 := z.DecBinary() - _ = yym80 - if false { - } else { - *((*bool)(yyv79)) = r.DecodeBool() - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *User) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj81 int - var yyb81 bool - var yyhl81 bool = l >= 0 - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ContributorsEnabled = false - } else { - yyv82 := &x.ContributorsEnabled - yym83 := z.DecBinary() - _ = yym83 - if false { - } else { - *((*bool)(yyv82)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.CreatedAt = "" - } else { - yyv84 := &x.CreatedAt - yym85 := z.DecBinary() - _ = yym85 - if false { - } else { - *((*string)(yyv84)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.DefaultProfile = false - } else { - yyv86 := &x.DefaultProfile - yym87 := z.DecBinary() - _ = yym87 - if false { - } else { - *((*bool)(yyv86)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.DefaultProfileImage = false - } else { - yyv88 := &x.DefaultProfileImage - yym89 := z.DecBinary() - _ = yym89 - if false { - } else { - *((*bool)(yyv88)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Description = "" - } else { - yyv90 := &x.Description - yym91 := z.DecBinary() - _ = yym91 - if false { - } else { - *((*string)(yyv90)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Entities = UserEntities{} - } else { - yyv92 := &x.Entities - yyv92.CodecDecodeSelf(d) - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.FavouritesCount = 0 - } else { - yyv93 := &x.FavouritesCount - yym94 := z.DecBinary() - _ = yym94 - if false { - } else { - *((*int)(yyv93)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.FollowRequestSent != nil { - x.FollowRequestSent = nil - } - } else { - if x.FollowRequestSent == nil { - x.FollowRequestSent = new(string) - } - yym96 := z.DecBinary() - _ = yym96 - if false { - } else { - *((*string)(x.FollowRequestSent)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.FollowersCount = 0 - } else { - yyv97 := &x.FollowersCount - yym98 := z.DecBinary() - _ = yym98 - if false { - } else { - *((*int)(yyv97)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.Following != nil { - x.Following = nil - } - } else { - if x.Following == nil { - x.Following = new(string) - } - yym100 := z.DecBinary() - _ = yym100 - if false { - } else { - *((*string)(x.Following)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.FriendsCount = 0 - } else { - yyv101 := &x.FriendsCount - yym102 := z.DecBinary() - _ = yym102 - if false { - } else { - *((*int)(yyv101)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.GeoEnabled = false - } else { - yyv103 := &x.GeoEnabled - yym104 := z.DecBinary() - _ = yym104 - if false { - } else { - *((*bool)(yyv103)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ID = 0 - } else { - yyv105 := &x.ID - yym106 := z.DecBinary() - _ = yym106 - if false { - } else { - *((*int)(yyv105)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.IDStr = "" - } else { - yyv107 := &x.IDStr - yym108 := z.DecBinary() - _ = yym108 - if false { - } else { - *((*string)(yyv107)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.IsTranslator = false - } else { - yyv109 := &x.IsTranslator - yym110 := z.DecBinary() - _ = yym110 - if false { - } else { - *((*bool)(yyv109)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Lang = "" - } else { - yyv111 := &x.Lang - yym112 := z.DecBinary() - _ = yym112 - if false { - } else { - *((*string)(yyv111)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ListedCount = 0 - } else { - yyv113 := &x.ListedCount - yym114 := z.DecBinary() - _ = yym114 - if false { - } else { - *((*int)(yyv113)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Location = "" - } else { - yyv115 := &x.Location - yym116 := z.DecBinary() - _ = yym116 - if false { - } else { - *((*string)(yyv115)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - yyv117 := &x.Name - yym118 := z.DecBinary() - _ = yym118 - if false { - } else { - *((*string)(yyv117)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.Notifications != nil { - x.Notifications = nil - } - } else { - if x.Notifications == nil { - x.Notifications = new(string) - } - yym120 := z.DecBinary() - _ = yym120 - if false { - } else { - *((*string)(x.Notifications)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileBackgroundColor = "" - } else { - yyv121 := &x.ProfileBackgroundColor - yym122 := z.DecBinary() - _ = yym122 - if false { - } else { - *((*string)(yyv121)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileBackgroundImageURL = "" - } else { - yyv123 := &x.ProfileBackgroundImageURL - yym124 := z.DecBinary() - _ = yym124 - if false { - } else { - *((*string)(yyv123)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileBackgroundImageURLHTTPS = "" - } else { - yyv125 := &x.ProfileBackgroundImageURLHTTPS - yym126 := z.DecBinary() - _ = yym126 - if false { - } else { - *((*string)(yyv125)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileBackgroundTile = false - } else { - yyv127 := &x.ProfileBackgroundTile - yym128 := z.DecBinary() - _ = yym128 - if false { - } else { - *((*bool)(yyv127)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileImageURL = "" - } else { - yyv129 := &x.ProfileImageURL - yym130 := z.DecBinary() - _ = yym130 - if false { - } else { - *((*string)(yyv129)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileImageURLHTTPS = "" - } else { - yyv131 := &x.ProfileImageURLHTTPS - yym132 := z.DecBinary() - _ = yym132 - if false { - } else { - *((*string)(yyv131)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileLinkColor = "" - } else { - yyv133 := &x.ProfileLinkColor - yym134 := z.DecBinary() - _ = yym134 - if false { - } else { - *((*string)(yyv133)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileSidebarBorderColor = "" - } else { - yyv135 := &x.ProfileSidebarBorderColor - yym136 := z.DecBinary() - _ = yym136 - if false { - } else { - *((*string)(yyv135)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileSidebarFillColor = "" - } else { - yyv137 := &x.ProfileSidebarFillColor - yym138 := z.DecBinary() - _ = yym138 - if false { - } else { - *((*string)(yyv137)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileTextColor = "" - } else { - yyv139 := &x.ProfileTextColor - yym140 := z.DecBinary() - _ = yym140 - if false { - } else { - *((*string)(yyv139)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ProfileUseBackgroundImage = false - } else { - yyv141 := &x.ProfileUseBackgroundImage - yym142 := z.DecBinary() - _ = yym142 - if false { - } else { - *((*bool)(yyv141)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Protected = false - } else { - yyv143 := &x.Protected - yym144 := z.DecBinary() - _ = yym144 - if false { - } else { - *((*bool)(yyv143)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ScreenName = "" - } else { - yyv145 := &x.ScreenName - yym146 := z.DecBinary() - _ = yym146 - if false { - } else { - *((*string)(yyv145)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ShowAllInlineMedia = false - } else { - yyv147 := &x.ShowAllInlineMedia - yym148 := z.DecBinary() - _ = yym148 - if false { - } else { - *((*bool)(yyv147)) = r.DecodeBool() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.StatusesCount = 0 - } else { - yyv149 := &x.StatusesCount - yym150 := z.DecBinary() - _ = yym150 - if false { - } else { - *((*int)(yyv149)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.TimeZone = "" - } else { - yyv151 := &x.TimeZone - yym152 := z.DecBinary() - _ = yym152 - if false { - } else { - *((*string)(yyv151)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.URL != nil { - x.URL = nil - } - } else { - if x.URL == nil { - x.URL = new(string) - } - yym154 := z.DecBinary() - _ = yym154 - if false { - } else { - *((*string)(x.URL)) = r.DecodeString() - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.UtcOffset = 0 - } else { - yyv155 := &x.UtcOffset - yym156 := z.DecBinary() - _ = yym156 - if false { - } else { - *((*int)(yyv155)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Verified = false - } else { - yyv157 := &x.Verified - yym158 := z.DecBinary() - _ = yym158 - if false { - } else { - *((*bool)(yyv157)) = r.DecodeBool() - } - } - for { - yyj81++ - if yyhl81 { - yyb81 = yyj81 > l - } else { - yyb81 = r.CheckBreak() - } - if yyb81 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj81-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *StatusMetadata) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) - } else { - yynn2 = 2 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.IsoLanguageCode)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("iso_language_code")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.IsoLanguageCode)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ResultType)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("result_type")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.ResultType)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *StatusMetadata) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *StatusMetadata) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "iso_language_code": - if r.TryDecodeAsNil() { - x.IsoLanguageCode = "" - } else { - yyv4 := &x.IsoLanguageCode - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - *((*string)(yyv4)) = r.DecodeString() - } - } - case "result_type": - if r.TryDecodeAsNil() { - x.ResultType = "" - } else { - yyv6 := &x.ResultType - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - *((*string)(yyv6)) = r.DecodeString() - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *StatusMetadata) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.IsoLanguageCode = "" - } else { - yyv9 := &x.IsoLanguageCode - yym10 := z.DecBinary() - _ = yym10 - if false { - } else { - *((*string)(yyv9)) = r.DecodeString() - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ResultType = "" - } else { - yyv11 := &x.ResultType - yym12 := z.DecBinary() - _ = yym12 - if false { - } else { - *((*string)(yyv11)) = r.DecodeString() - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj8-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *Status) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [21]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(21) - } else { - yynn2 = 21 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Contributors == nil { - r.EncodeNil() - } else { - yy4 := *x.Contributors - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy4)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("contributors")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Contributors == nil { - r.EncodeNil() - } else { - yy6 := *x.Contributors - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy6)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Coordinates == nil { - r.EncodeNil() - } else { - yy9 := *x.Coordinates - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy9)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("coordinates")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Coordinates == nil { - r.EncodeNil() - } else { - yy11 := *x.Coordinates - yym12 := z.EncBinary() - _ = yym12 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy11)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("created_at")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym15 := z.EncBinary() - _ = yym15 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy17 := &x.Entities - yy17.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("entities")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yy19 := &x.Entities - yy19.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym22 := z.EncBinary() - _ = yym22 - if false { - } else { - r.EncodeBool(bool(x.Favorited)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("favorited")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym23 := z.EncBinary() - _ = yym23 - if false { - } else { - r.EncodeBool(bool(x.Favorited)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Geo == nil { - r.EncodeNil() - } else { - yy25 := *x.Geo - yym26 := z.EncBinary() - _ = yym26 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy25)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("geo")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Geo == nil { - r.EncodeNil() - } else { - yy27 := *x.Geo - yym28 := z.EncBinary() - _ = yym28 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy27)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym30 := z.EncBinary() - _ = yym30 - if false { - } else { - r.EncodeInt(int64(x.ID)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("id")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym31 := z.EncBinary() - _ = yym31 - if false { - } else { - r.EncodeInt(int64(x.ID)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym33 := z.EncBinary() - _ = yym33 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.IDStr)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("id_str")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym34 := z.EncBinary() - _ = yym34 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.IDStr)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.InReplyToScreenName == nil { - r.EncodeNil() - } else { - yy36 := *x.InReplyToScreenName - yym37 := z.EncBinary() - _ = yym37 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy36)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_screen_name")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.InReplyToScreenName == nil { - r.EncodeNil() - } else { - yy38 := *x.InReplyToScreenName - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy38)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.InReplyToStatusID == nil { - r.EncodeNil() - } else { - yy41 := *x.InReplyToStatusID - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy41)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_status_id")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.InReplyToStatusID == nil { - r.EncodeNil() - } else { - yy43 := *x.InReplyToStatusID - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy43)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.InReplyToStatusIDStr == nil { - r.EncodeNil() - } else { - yy46 := *x.InReplyToStatusIDStr - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy46)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_status_id_str")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.InReplyToStatusIDStr == nil { - r.EncodeNil() - } else { - yy48 := *x.InReplyToStatusIDStr - yym49 := z.EncBinary() - _ = yym49 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy48)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.InReplyToUserID == nil { - r.EncodeNil() - } else { - yy51 := *x.InReplyToUserID - yym52 := z.EncBinary() - _ = yym52 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy51)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_user_id")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.InReplyToUserID == nil { - r.EncodeNil() - } else { - yy53 := *x.InReplyToUserID - yym54 := z.EncBinary() - _ = yym54 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy53)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.InReplyToUserIDStr == nil { - r.EncodeNil() - } else { - yy56 := *x.InReplyToUserIDStr - yym57 := z.EncBinary() - _ = yym57 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy56)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_user_id_str")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.InReplyToUserIDStr == nil { - r.EncodeNil() - } else { - yy58 := *x.InReplyToUserIDStr - yym59 := z.EncBinary() - _ = yym59 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy58)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy61 := &x.Metadata - yy61.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yy63 := &x.Metadata - yy63.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Place == nil { - r.EncodeNil() - } else { - yy66 := *x.Place - yym67 := z.EncBinary() - _ = yym67 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy66)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("place")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Place == nil { - r.EncodeNil() - } else { - yy68 := *x.Place - yym69 := z.EncBinary() - _ = yym69 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy68)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym71 := z.EncBinary() - _ = yym71 - if false { - } else { - r.EncodeInt(int64(x.RetweetCount)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("retweet_count")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym72 := z.EncBinary() - _ = yym72 - if false { - } else { - r.EncodeInt(int64(x.RetweetCount)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym74 := z.EncBinary() - _ = yym74 - if false { - } else { - r.EncodeBool(bool(x.Retweeted)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("retweeted")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym75 := z.EncBinary() - _ = yym75 - if false { - } else { - r.EncodeBool(bool(x.Retweeted)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym77 := z.EncBinary() - _ = yym77 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Source)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("source")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym78 := z.EncBinary() - _ = yym78 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Source)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym80 := z.EncBinary() - _ = yym80 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Text)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("text")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym81 := z.EncBinary() - _ = yym81 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(x.Text)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yym83 := z.EncBinary() - _ = yym83 - if false { - } else { - r.EncodeBool(bool(x.Truncated)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("truncated")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yym84 := z.EncBinary() - _ = yym84 - if false { - } else { - r.EncodeBool(bool(x.Truncated)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy86 := &x.User - yy86.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("user")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yy88 := &x.User - yy88.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *Status) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *Status) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "contributors": - if r.TryDecodeAsNil() { - if x.Contributors != nil { - x.Contributors = nil - } - } else { - if x.Contributors == nil { - x.Contributors = new(string) - } - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - *((*string)(x.Contributors)) = r.DecodeString() - } - } - case "coordinates": - if r.TryDecodeAsNil() { - if x.Coordinates != nil { - x.Coordinates = nil - } - } else { - if x.Coordinates == nil { - x.Coordinates = new(string) - } - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - *((*string)(x.Coordinates)) = r.DecodeString() - } - } - case "created_at": - if r.TryDecodeAsNil() { - x.CreatedAt = "" - } else { - yyv8 := &x.CreatedAt - yym9 := z.DecBinary() - _ = yym9 - if false { - } else { - *((*string)(yyv8)) = r.DecodeString() - } - } - case "entities": - if r.TryDecodeAsNil() { - x.Entities = Entities{} - } else { - yyv10 := &x.Entities - yyv10.CodecDecodeSelf(d) - } - case "favorited": - if r.TryDecodeAsNil() { - x.Favorited = false - } else { - yyv11 := &x.Favorited - yym12 := z.DecBinary() - _ = yym12 - if false { - } else { - *((*bool)(yyv11)) = r.DecodeBool() - } - } - case "geo": - if r.TryDecodeAsNil() { - if x.Geo != nil { - x.Geo = nil - } - } else { - if x.Geo == nil { - x.Geo = new(string) - } - yym14 := z.DecBinary() - _ = yym14 - if false { - } else { - *((*string)(x.Geo)) = r.DecodeString() - } - } - case "id": - if r.TryDecodeAsNil() { - x.ID = 0 - } else { - yyv15 := &x.ID - yym16 := z.DecBinary() - _ = yym16 - if false { - } else { - *((*int64)(yyv15)) = int64(r.DecodeInt(64)) - } - } - case "id_str": - if r.TryDecodeAsNil() { - x.IDStr = "" - } else { - yyv17 := &x.IDStr - yym18 := z.DecBinary() - _ = yym18 - if false { - } else { - *((*string)(yyv17)) = r.DecodeString() - } - } - case "in_reply_to_screen_name": - if r.TryDecodeAsNil() { - if x.InReplyToScreenName != nil { - x.InReplyToScreenName = nil - } - } else { - if x.InReplyToScreenName == nil { - x.InReplyToScreenName = new(string) - } - yym20 := z.DecBinary() - _ = yym20 - if false { - } else { - *((*string)(x.InReplyToScreenName)) = r.DecodeString() - } - } - case "in_reply_to_status_id": - if r.TryDecodeAsNil() { - if x.InReplyToStatusID != nil { - x.InReplyToStatusID = nil - } - } else { - if x.InReplyToStatusID == nil { - x.InReplyToStatusID = new(string) - } - yym22 := z.DecBinary() - _ = yym22 - if false { - } else { - *((*string)(x.InReplyToStatusID)) = r.DecodeString() - } - } - case "in_reply_to_status_id_str": - if r.TryDecodeAsNil() { - if x.InReplyToStatusIDStr != nil { - x.InReplyToStatusIDStr = nil - } - } else { - if x.InReplyToStatusIDStr == nil { - x.InReplyToStatusIDStr = new(string) - } - yym24 := z.DecBinary() - _ = yym24 - if false { - } else { - *((*string)(x.InReplyToStatusIDStr)) = r.DecodeString() - } - } - case "in_reply_to_user_id": - if r.TryDecodeAsNil() { - if x.InReplyToUserID != nil { - x.InReplyToUserID = nil - } - } else { - if x.InReplyToUserID == nil { - x.InReplyToUserID = new(string) - } - yym26 := z.DecBinary() - _ = yym26 - if false { - } else { - *((*string)(x.InReplyToUserID)) = r.DecodeString() - } - } - case "in_reply_to_user_id_str": - if r.TryDecodeAsNil() { - if x.InReplyToUserIDStr != nil { - x.InReplyToUserIDStr = nil - } - } else { - if x.InReplyToUserIDStr == nil { - x.InReplyToUserIDStr = new(string) - } - yym28 := z.DecBinary() - _ = yym28 - if false { - } else { - *((*string)(x.InReplyToUserIDStr)) = r.DecodeString() - } - } - case "metadata": - if r.TryDecodeAsNil() { - x.Metadata = StatusMetadata{} - } else { - yyv29 := &x.Metadata - yyv29.CodecDecodeSelf(d) - } - case "place": - if r.TryDecodeAsNil() { - if x.Place != nil { - x.Place = nil - } - } else { - if x.Place == nil { - x.Place = new(string) - } - yym31 := z.DecBinary() - _ = yym31 - if false { - } else { - *((*string)(x.Place)) = r.DecodeString() - } - } - case "retweet_count": - if r.TryDecodeAsNil() { - x.RetweetCount = 0 - } else { - yyv32 := &x.RetweetCount - yym33 := z.DecBinary() - _ = yym33 - if false { - } else { - *((*int)(yyv32)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - case "retweeted": - if r.TryDecodeAsNil() { - x.Retweeted = false - } else { - yyv34 := &x.Retweeted - yym35 := z.DecBinary() - _ = yym35 - if false { - } else { - *((*bool)(yyv34)) = r.DecodeBool() - } - } - case "source": - if r.TryDecodeAsNil() { - x.Source = "" - } else { - yyv36 := &x.Source - yym37 := z.DecBinary() - _ = yym37 - if false { - } else { - *((*string)(yyv36)) = r.DecodeString() - } - } - case "text": - if r.TryDecodeAsNil() { - x.Text = "" - } else { - yyv38 := &x.Text - yym39 := z.DecBinary() - _ = yym39 - if false { - } else { - *((*string)(yyv38)) = r.DecodeString() - } - } - case "truncated": - if r.TryDecodeAsNil() { - x.Truncated = false - } else { - yyv40 := &x.Truncated - yym41 := z.DecBinary() - _ = yym41 - if false { - } else { - *((*bool)(yyv40)) = r.DecodeBool() - } - } - case "user": - if r.TryDecodeAsNil() { - x.User = User{} - } else { - yyv42 := &x.User - yyv42.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *Status) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj43 int - var yyb43 bool - var yyhl43 bool = l >= 0 - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.Contributors != nil { - x.Contributors = nil - } - } else { - if x.Contributors == nil { - x.Contributors = new(string) - } - yym45 := z.DecBinary() - _ = yym45 - if false { - } else { - *((*string)(x.Contributors)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.Coordinates != nil { - x.Coordinates = nil - } - } else { - if x.Coordinates == nil { - x.Coordinates = new(string) - } - yym47 := z.DecBinary() - _ = yym47 - if false { - } else { - *((*string)(x.Coordinates)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.CreatedAt = "" - } else { - yyv48 := &x.CreatedAt - yym49 := z.DecBinary() - _ = yym49 - if false { - } else { - *((*string)(yyv48)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Entities = Entities{} - } else { - yyv50 := &x.Entities - yyv50.CodecDecodeSelf(d) - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Favorited = false - } else { - yyv51 := &x.Favorited - yym52 := z.DecBinary() - _ = yym52 - if false { - } else { - *((*bool)(yyv51)) = r.DecodeBool() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.Geo != nil { - x.Geo = nil - } - } else { - if x.Geo == nil { - x.Geo = new(string) - } - yym54 := z.DecBinary() - _ = yym54 - if false { - } else { - *((*string)(x.Geo)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.ID = 0 - } else { - yyv55 := &x.ID - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - *((*int64)(yyv55)) = int64(r.DecodeInt(64)) - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.IDStr = "" - } else { - yyv57 := &x.IDStr - yym58 := z.DecBinary() - _ = yym58 - if false { - } else { - *((*string)(yyv57)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.InReplyToScreenName != nil { - x.InReplyToScreenName = nil - } - } else { - if x.InReplyToScreenName == nil { - x.InReplyToScreenName = new(string) - } - yym60 := z.DecBinary() - _ = yym60 - if false { - } else { - *((*string)(x.InReplyToScreenName)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.InReplyToStatusID != nil { - x.InReplyToStatusID = nil - } - } else { - if x.InReplyToStatusID == nil { - x.InReplyToStatusID = new(string) - } - yym62 := z.DecBinary() - _ = yym62 - if false { - } else { - *((*string)(x.InReplyToStatusID)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.InReplyToStatusIDStr != nil { - x.InReplyToStatusIDStr = nil - } - } else { - if x.InReplyToStatusIDStr == nil { - x.InReplyToStatusIDStr = new(string) - } - yym64 := z.DecBinary() - _ = yym64 - if false { - } else { - *((*string)(x.InReplyToStatusIDStr)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.InReplyToUserID != nil { - x.InReplyToUserID = nil - } - } else { - if x.InReplyToUserID == nil { - x.InReplyToUserID = new(string) - } - yym66 := z.DecBinary() - _ = yym66 - if false { - } else { - *((*string)(x.InReplyToUserID)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.InReplyToUserIDStr != nil { - x.InReplyToUserIDStr = nil - } - } else { - if x.InReplyToUserIDStr == nil { - x.InReplyToUserIDStr = new(string) - } - yym68 := z.DecBinary() - _ = yym68 - if false { - } else { - *((*string)(x.InReplyToUserIDStr)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Metadata = StatusMetadata{} - } else { - yyv69 := &x.Metadata - yyv69.CodecDecodeSelf(d) - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - if x.Place != nil { - x.Place = nil - } - } else { - if x.Place == nil { - x.Place = new(string) - } - yym71 := z.DecBinary() - _ = yym71 - if false { - } else { - *((*string)(x.Place)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.RetweetCount = 0 - } else { - yyv72 := &x.RetweetCount - yym73 := z.DecBinary() - _ = yym73 - if false { - } else { - *((*int)(yyv72)) = int(r.DecodeInt(codecSelferBitsize9225)) - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Retweeted = false - } else { - yyv74 := &x.Retweeted - yym75 := z.DecBinary() - _ = yym75 - if false { - } else { - *((*bool)(yyv74)) = r.DecodeBool() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Source = "" - } else { - yyv76 := &x.Source - yym77 := z.DecBinary() - _ = yym77 - if false { - } else { - *((*string)(yyv76)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Text = "" - } else { - yyv78 := &x.Text - yym79 := z.DecBinary() - _ = yym79 - if false { - } else { - *((*string)(yyv78)) = r.DecodeString() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Truncated = false - } else { - yyv80 := &x.Truncated - yym81 := z.DecBinary() - _ = yym81 - if false { - } else { - *((*bool)(yyv80)) = r.DecodeBool() - } - } - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.User = User{} - } else { - yyv82 := &x.User - yyv82.CodecDecodeSelf(d) - } - for { - yyj43++ - if yyhl43 { - yyb43 = yyj43 > l - } else { - yyb43 = r.CheckBreak() - } - if yyb43 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj43-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *LargeStruct) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) - } else { - yynn2 = 2 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy4 := &x.SearchMetadata - yy4.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("search_metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - yy6 := &x.SearchMetadata - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Statuses == nil { - r.EncodeNil() - } else { - yym9 := z.EncBinary() - _ = yym9 - if false { - } else { - h.encSliceStatus(([]Status)(x.Statuses), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("statuses")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Statuses == nil { - r.EncodeNil() - } else { - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - h.encSliceStatus(([]Status)(x.Statuses), e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *LargeStruct) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *LargeStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "search_metadata": - if r.TryDecodeAsNil() { - x.SearchMetadata = SearchMetadata{} - } else { - yyv4 := &x.SearchMetadata - yyv4.CodecDecodeSelf(d) - } - case "statuses": - if r.TryDecodeAsNil() { - x.Statuses = nil - } else { - yyv5 := &x.Statuses - yym6 := z.DecBinary() - _ = yym6 - if false { - } else { - h.decSliceStatus((*[]Status)(yyv5), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *LargeStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.SearchMetadata = SearchMetadata{} - } else { - yyv8 := &x.SearchMetadata - yyv8.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Statuses = nil - } else { - yyv9 := &x.Statuses - yym10 := z.DecBinary() - _ = yym10 - if false { - } else { - h.decSliceStatus((*[]Status)(yyv9), d) - } - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj7-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x *XLStruct) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [1]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(1) - } else { - yynn2 = 1 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if x.Data == nil { - r.EncodeNil() - } else { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - h.encSliceLargeStruct(([]LargeStruct)(x.Data), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey9225) - r.EncodeString(codecSelferC_UTF89225, string("Data")) - z.EncSendContainerState(codecSelfer_containerMapValue9225) - if x.Data == nil { - r.EncodeNil() - } else { - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - h.encSliceLargeStruct(([]LargeStruct)(x.Data), e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd9225) - } - } - } -} - -func (x *XLStruct) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap9225 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd9225) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray9225 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225) - } - } -} - -func (x *XLStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey9225) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)} - yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr)) - z.DecSendContainerState(codecSelfer_containerMapValue9225) - switch yys3 { - case "Data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv4 := &x.Data - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - h.decSliceLargeStruct((*[]LargeStruct)(yyv4), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd9225) -} - -func (x *XLStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv7 := &x.Data - yym8 := z.DecBinary() - _ = yym8 - if false { - } else { - h.decSliceLargeStruct((*[]LargeStruct)(yyv7), d) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem9225) - z.DecStructFieldNotFound(yyj6-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x codecSelfer9225) encSliceHashtag(v []Hashtag, e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy2 := &yyv1 - yy2.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x codecSelfer9225) decSliceHashtag(v *[]Hashtag, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []Hashtag{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else if yyl1 > 0 { - var yyrr1, yyrl1 int - var yyrt1 bool - _, _ = yyrl1, yyrt1 - yyrr1 = yyl1 // len(yyv1) - if yyl1 > cap(yyv1) { - - yyrg1 := len(yyv1) > 0 - yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 40) - if yyrt1 { - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]Hashtag, yyrl1) - } - } else { - yyv1 = make([]Hashtag, yyrl1) - } - yyc1 = true - yyrr1 = len(yyv1) - if yyrg1 { - copy(yyv1, yyv21) - } - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - yyj1 := 0 - for ; yyj1 < yyrr1; yyj1++ { - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = Hashtag{} - } else { - yyv2 := &yyv1[yyj1] - yyv2.CodecDecodeSelf(d) - } - - } - if yyrt1 { - for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, Hashtag{}) - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = Hashtag{} - } else { - yyv3 := &yyv1[yyj1] - yyv3.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1 := 0 - for ; !r.CheckBreak(); yyj1++ { - - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, Hashtag{}) // var yyz1 Hashtag - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - if yyj1 < len(yyv1) { - if r.TryDecodeAsNil() { - yyv1[yyj1] = Hashtag{} - } else { - yyv4 := &yyv1[yyj1] - yyv4.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []Hashtag{} - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer9225) encSlicePtrtostring(v []*string, e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - if yyv1 == nil { - r.EncodeNil() - } else { - yy2 := *yyv1 - yym3 := z.EncBinary() - _ = yym3 - if false { - } else { - r.EncodeString(codecSelferC_UTF89225, string(yy2)) - } - } - } - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x codecSelfer9225) decSlicePtrtostring(v *[]*string, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*string{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else if yyl1 > 0 { - var yyrr1, yyrl1 int - var yyrt1 bool - _, _ = yyrl1, yyrt1 - yyrr1 = yyl1 // len(yyv1) - if yyl1 > cap(yyv1) { - - yyrg1 := len(yyv1) > 0 - yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrt1 { - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*string, yyrl1) - } - } else { - yyv1 = make([]*string, yyrl1) - } - yyc1 = true - yyrr1 = len(yyv1) - if yyrg1 { - copy(yyv1, yyv21) - } - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - yyj1 := 0 - for ; yyj1 < yyrr1; yyj1++ { - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - if yyv1[yyj1] != nil { - *yyv1[yyj1] = "" - } - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(string) - } - yyw2 := yyv1[yyj1] - yym3 := z.DecBinary() - _ = yym3 - if false { - } else { - *((*string)(yyw2)) = r.DecodeString() - } - } - - } - if yyrt1 { - for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, nil) - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - if yyv1[yyj1] != nil { - *yyv1[yyj1] = "" - } - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(string) - } - yyw4 := yyv1[yyj1] - yym5 := z.DecBinary() - _ = yym5 - if false { - } else { - *((*string)(yyw4)) = r.DecodeString() - } - } - - } - } - - } else { - yyj1 := 0 - for ; !r.CheckBreak(); yyj1++ { - - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) // var yyz1 *string - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - if yyj1 < len(yyv1) { - if r.TryDecodeAsNil() { - if yyv1[yyj1] != nil { - *yyv1[yyj1] = "" - } - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(string) - } - yyw6 := yyv1[yyj1] - yym7 := z.DecBinary() - _ = yym7 - if false { - } else { - *((*string)(yyw6)) = r.DecodeString() - } - } - - } else { - z.DecSwallow() - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []*string{} - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer9225) encSliceURL(v []URL, e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy2 := &yyv1 - yy2.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x codecSelfer9225) decSliceURL(v *[]URL, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []URL{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else if yyl1 > 0 { - var yyrr1, yyrl1 int - var yyrt1 bool - _, _ = yyrl1, yyrt1 - yyrr1 = yyl1 // len(yyv1) - if yyl1 > cap(yyv1) { - - yyrg1 := len(yyv1) > 0 - yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 48) - if yyrt1 { - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]URL, yyrl1) - } - } else { - yyv1 = make([]URL, yyrl1) - } - yyc1 = true - yyrr1 = len(yyv1) - if yyrg1 { - copy(yyv1, yyv21) - } - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - yyj1 := 0 - for ; yyj1 < yyrr1; yyj1++ { - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = URL{} - } else { - yyv2 := &yyv1[yyj1] - yyv2.CodecDecodeSelf(d) - } - - } - if yyrt1 { - for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, URL{}) - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = URL{} - } else { - yyv3 := &yyv1[yyj1] - yyv3.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1 := 0 - for ; !r.CheckBreak(); yyj1++ { - - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, URL{}) // var yyz1 URL - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - if yyj1 < len(yyv1) { - if r.TryDecodeAsNil() { - yyv1[yyj1] = URL{} - } else { - yyv4 := &yyv1[yyj1] - yyv4.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []URL{} - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer9225) encSliceStatus(v []Status, e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy2 := &yyv1 - yy2.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x codecSelfer9225) decSliceStatus(v *[]Status, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []Status{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else if yyl1 > 0 { - var yyrr1, yyrl1 int - var yyrt1 bool - _, _ = yyrl1, yyrt1 - yyrr1 = yyl1 // len(yyv1) - if yyl1 > cap(yyv1) { - - yyrg1 := len(yyv1) > 0 - yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 752) - if yyrt1 { - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]Status, yyrl1) - } - } else { - yyv1 = make([]Status, yyrl1) - } - yyc1 = true - yyrr1 = len(yyv1) - if yyrg1 { - copy(yyv1, yyv21) - } - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - yyj1 := 0 - for ; yyj1 < yyrr1; yyj1++ { - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = Status{} - } else { - yyv2 := &yyv1[yyj1] - yyv2.CodecDecodeSelf(d) - } - - } - if yyrt1 { - for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, Status{}) - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = Status{} - } else { - yyv3 := &yyv1[yyj1] - yyv3.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1 := 0 - for ; !r.CheckBreak(); yyj1++ { - - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, Status{}) // var yyz1 Status - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - if yyj1 < len(yyv1) { - if r.TryDecodeAsNil() { - yyv1[yyj1] = Status{} - } else { - yyv4 := &yyv1[yyj1] - yyv4.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []Status{} - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer9225) encSliceLargeStruct(v []LargeStruct, e *codec1978.Encoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem9225) - yy2 := &yyv1 - yy2.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd9225) -} - -func (x codecSelfer9225) decSliceLargeStruct(v *[]LargeStruct, d *codec1978.Decoder) { - var h codecSelfer9225 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []LargeStruct{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else if yyl1 > 0 { - var yyrr1, yyrl1 int - var yyrt1 bool - _, _ = yyrl1, yyrt1 - yyrr1 = yyl1 // len(yyv1) - if yyl1 > cap(yyv1) { - - yyrg1 := len(yyv1) > 0 - yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 136) - if yyrt1 { - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]LargeStruct, yyrl1) - } - } else { - yyv1 = make([]LargeStruct, yyrl1) - } - yyc1 = true - yyrr1 = len(yyv1) - if yyrg1 { - copy(yyv1, yyv21) - } - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - yyj1 := 0 - for ; yyj1 < yyrr1; yyj1++ { - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = LargeStruct{} - } else { - yyv2 := &yyv1[yyj1] - yyv2.CodecDecodeSelf(d) - } - - } - if yyrt1 { - for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, LargeStruct{}) - yyh1.ElemContainerState(yyj1) - if r.TryDecodeAsNil() { - yyv1[yyj1] = LargeStruct{} - } else { - yyv3 := &yyv1[yyj1] - yyv3.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1 := 0 - for ; !r.CheckBreak(); yyj1++ { - - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, LargeStruct{}) // var yyz1 LargeStruct - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - if yyj1 < len(yyv1) { - if r.TryDecodeAsNil() { - yyv1[yyj1] = LargeStruct{} - } else { - yyv4 := &yyv1[yyj1] - yyv4.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []LargeStruct{} - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go b/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go deleted file mode 100644 index 9f000d3a..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go +++ /dev/null @@ -1,6723 +0,0 @@ -// +build use_ffjson - -// DO NOT EDIT! -// Code generated by ffjson -// source: .root/src/github.com/mailru/easyjson/benchmark/data.go -// DO NOT EDIT! - -package benchmark - -import ( - "bytes" - "errors" - "fmt" - fflib "github.com/pquerna/ffjson/fflib/v1" -) - -func (mj *Entities) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *Entities) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"hashtags":`) - if mj.Hashtags != nil { - buf.WriteString(`[`) - for i, v := range mj.Hashtags { - if i != 0 { - buf.WriteString(`,`) - } - - { - - err = v.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteString(`,"urls":`) - if mj.Urls != nil { - buf.WriteString(`[`) - for i, v := range mj.Urls { - if i != 0 { - buf.WriteString(`,`) - } - if v != nil { - fflib.WriteJsonString(buf, string(*v)) - } else { - buf.WriteString(`null`) - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteString(`,"user_mentions":`) - if mj.UserMentions != nil { - buf.WriteString(`[`) - for i, v := range mj.UserMentions { - if i != 0 { - buf.WriteString(`,`) - } - if v != nil { - fflib.WriteJsonString(buf, string(*v)) - } else { - buf.WriteString(`null`) - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_Entitiesbase = iota - ffj_t_Entitiesno_such_key - - ffj_t_Entities_Hashtags - - ffj_t_Entities_Urls - - ffj_t_Entities_UserMentions -) - -var ffj_key_Entities_Hashtags = []byte("hashtags") - -var ffj_key_Entities_Urls = []byte("urls") - -var ffj_key_Entities_UserMentions = []byte("user_mentions") - -func (uj *Entities) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *Entities) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_Entitiesbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_Entitiesno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'h': - - if bytes.Equal(ffj_key_Entities_Hashtags, kn) { - currentKey = ffj_t_Entities_Hashtags - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'u': - - if bytes.Equal(ffj_key_Entities_Urls, kn) { - currentKey = ffj_t_Entities_Urls - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Entities_UserMentions, kn) { - currentKey = ffj_t_Entities_UserMentions - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.EqualFoldRight(ffj_key_Entities_UserMentions, kn) { - currentKey = ffj_t_Entities_UserMentions - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Entities_Urls, kn) { - currentKey = ffj_t_Entities_Urls - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Entities_Hashtags, kn) { - currentKey = ffj_t_Entities_Hashtags - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_Entitiesno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_Entities_Hashtags: - goto handle_Hashtags - - case ffj_t_Entities_Urls: - goto handle_Urls - - case ffj_t_Entities_UserMentions: - goto handle_UserMentions - - case ffj_t_Entitiesno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_Hashtags: - - /* handler: uj.Hashtags type=[]benchmark.Hashtag kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Hashtags = nil - } else { - - uj.Hashtags = make([]Hashtag, 0) - - wantVal := true - - for { - - var tmp_uj__Hashtags Hashtag - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Hashtags type=benchmark.Hashtag kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = tmp_uj__Hashtags.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - uj.Hashtags = append(uj.Hashtags, tmp_uj__Hashtags) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Urls: - - /* handler: uj.Urls type=[]*string kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Urls = nil - } else { - - uj.Urls = make([]*string, 0) - - wantVal := true - - for { - - var tmp_uj__Urls *string - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Urls type=*string kind=ptr quoted=false*/ - - { - - if tok == fflib.FFTok_null { - tmp_uj__Urls = nil - } else { - if tmp_uj__Urls == nil { - tmp_uj__Urls = new(string) - } - - /* handler: tmp_uj__Urls type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - tmp_uj__Urls = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - tmp_uj__Urls = &tval - - } - } - - } - } - - uj.Urls = append(uj.Urls, tmp_uj__Urls) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_UserMentions: - - /* handler: uj.UserMentions type=[]*string kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.UserMentions = nil - } else { - - uj.UserMentions = make([]*string, 0) - - wantVal := true - - for { - - var tmp_uj__UserMentions *string - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__UserMentions type=*string kind=ptr quoted=false*/ - - { - - if tok == fflib.FFTok_null { - tmp_uj__UserMentions = nil - } else { - if tmp_uj__UserMentions == nil { - tmp_uj__UserMentions = new(string) - } - - /* handler: tmp_uj__UserMentions type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - tmp_uj__UserMentions = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - tmp_uj__UserMentions = &tval - - } - } - - } - } - - uj.UserMentions = append(uj.UserMentions, tmp_uj__UserMentions) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *Hashtag) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *Hashtag) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"indices":`) - if mj.Indices != nil { - buf.WriteString(`[`) - for i, v := range mj.Indices { - if i != 0 { - buf.WriteString(`,`) - } - fflib.FormatBits2(buf, uint64(v), 10, v < 0) - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteString(`,"text":`) - fflib.WriteJsonString(buf, string(mj.Text)) - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_Hashtagbase = iota - ffj_t_Hashtagno_such_key - - ffj_t_Hashtag_Indices - - ffj_t_Hashtag_Text -) - -var ffj_key_Hashtag_Indices = []byte("indices") - -var ffj_key_Hashtag_Text = []byte("text") - -func (uj *Hashtag) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *Hashtag) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_Hashtagbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_Hashtagno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'i': - - if bytes.Equal(ffj_key_Hashtag_Indices, kn) { - currentKey = ffj_t_Hashtag_Indices - state = fflib.FFParse_want_colon - goto mainparse - } - - case 't': - - if bytes.Equal(ffj_key_Hashtag_Text, kn) { - currentKey = ffj_t_Hashtag_Text - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.SimpleLetterEqualFold(ffj_key_Hashtag_Text, kn) { - currentKey = ffj_t_Hashtag_Text - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Hashtag_Indices, kn) { - currentKey = ffj_t_Hashtag_Indices - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_Hashtagno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_Hashtag_Indices: - goto handle_Indices - - case ffj_t_Hashtag_Text: - goto handle_Text - - case ffj_t_Hashtagno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_Indices: - - /* handler: uj.Indices type=[]int kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Indices = nil - } else { - - uj.Indices = make([]int, 0) - - wantVal := true - - for { - - var tmp_uj__Indices int - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Indices type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - tmp_uj__Indices = int(tval) - - } - } - - uj.Indices = append(uj.Indices, tmp_uj__Indices) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Text: - - /* handler: uj.Text type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Text = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *LargeStruct) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *LargeStruct) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"search_metadata":`) - - { - - err = mj.SearchMetadata.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteString(`,"statuses":`) - if mj.Statuses != nil { - buf.WriteString(`[`) - for i, v := range mj.Statuses { - if i != 0 { - buf.WriteString(`,`) - } - - { - - err = v.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_LargeStructbase = iota - ffj_t_LargeStructno_such_key - - ffj_t_LargeStruct_SearchMetadata - - ffj_t_LargeStruct_Statuses -) - -var ffj_key_LargeStruct_SearchMetadata = []byte("search_metadata") - -var ffj_key_LargeStruct_Statuses = []byte("statuses") - -func (uj *LargeStruct) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *LargeStruct) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_LargeStructbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_LargeStructno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 's': - - if bytes.Equal(ffj_key_LargeStruct_SearchMetadata, kn) { - currentKey = ffj_t_LargeStruct_SearchMetadata - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_LargeStruct_Statuses, kn) { - currentKey = ffj_t_LargeStruct_Statuses - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.EqualFoldRight(ffj_key_LargeStruct_Statuses, kn) { - currentKey = ffj_t_LargeStruct_Statuses - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_LargeStruct_SearchMetadata, kn) { - currentKey = ffj_t_LargeStruct_SearchMetadata - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_LargeStructno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_LargeStruct_SearchMetadata: - goto handle_SearchMetadata - - case ffj_t_LargeStruct_Statuses: - goto handle_Statuses - - case ffj_t_LargeStructno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_SearchMetadata: - - /* handler: uj.SearchMetadata type=benchmark.SearchMetadata kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = uj.SearchMetadata.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Statuses: - - /* handler: uj.Statuses type=[]benchmark.Status kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Statuses = nil - } else { - - uj.Statuses = make([]Status, 0) - - wantVal := true - - for { - - var tmp_uj__Statuses Status - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Statuses type=benchmark.Status kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = tmp_uj__Statuses.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - uj.Statuses = append(uj.Statuses, tmp_uj__Statuses) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *SearchMetadata) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *SearchMetadata) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"completed_in":`) - fflib.AppendFloat(buf, float64(mj.CompletedIn), 'g', -1, 64) - buf.WriteString(`,"count":`) - fflib.FormatBits2(buf, uint64(mj.Count), 10, mj.Count < 0) - buf.WriteString(`,"max_id":`) - fflib.FormatBits2(buf, uint64(mj.MaxID), 10, mj.MaxID < 0) - buf.WriteString(`,"max_id_str":`) - fflib.WriteJsonString(buf, string(mj.MaxIDStr)) - buf.WriteString(`,"next_results":`) - fflib.WriteJsonString(buf, string(mj.NextResults)) - buf.WriteString(`,"query":`) - fflib.WriteJsonString(buf, string(mj.Query)) - buf.WriteString(`,"refresh_url":`) - fflib.WriteJsonString(buf, string(mj.RefreshURL)) - buf.WriteString(`,"since_id":`) - fflib.FormatBits2(buf, uint64(mj.SinceID), 10, mj.SinceID < 0) - buf.WriteString(`,"since_id_str":`) - fflib.WriteJsonString(buf, string(mj.SinceIDStr)) - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_SearchMetadatabase = iota - ffj_t_SearchMetadatano_such_key - - ffj_t_SearchMetadata_CompletedIn - - ffj_t_SearchMetadata_Count - - ffj_t_SearchMetadata_MaxID - - ffj_t_SearchMetadata_MaxIDStr - - ffj_t_SearchMetadata_NextResults - - ffj_t_SearchMetadata_Query - - ffj_t_SearchMetadata_RefreshURL - - ffj_t_SearchMetadata_SinceID - - ffj_t_SearchMetadata_SinceIDStr -) - -var ffj_key_SearchMetadata_CompletedIn = []byte("completed_in") - -var ffj_key_SearchMetadata_Count = []byte("count") - -var ffj_key_SearchMetadata_MaxID = []byte("max_id") - -var ffj_key_SearchMetadata_MaxIDStr = []byte("max_id_str") - -var ffj_key_SearchMetadata_NextResults = []byte("next_results") - -var ffj_key_SearchMetadata_Query = []byte("query") - -var ffj_key_SearchMetadata_RefreshURL = []byte("refresh_url") - -var ffj_key_SearchMetadata_SinceID = []byte("since_id") - -var ffj_key_SearchMetadata_SinceIDStr = []byte("since_id_str") - -func (uj *SearchMetadata) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *SearchMetadata) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_SearchMetadatabase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_SearchMetadatano_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'c': - - if bytes.Equal(ffj_key_SearchMetadata_CompletedIn, kn) { - currentKey = ffj_t_SearchMetadata_CompletedIn - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_SearchMetadata_Count, kn) { - currentKey = ffj_t_SearchMetadata_Count - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'm': - - if bytes.Equal(ffj_key_SearchMetadata_MaxID, kn) { - currentKey = ffj_t_SearchMetadata_MaxID - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_SearchMetadata_MaxIDStr, kn) { - currentKey = ffj_t_SearchMetadata_MaxIDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'n': - - if bytes.Equal(ffj_key_SearchMetadata_NextResults, kn) { - currentKey = ffj_t_SearchMetadata_NextResults - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'q': - - if bytes.Equal(ffj_key_SearchMetadata_Query, kn) { - currentKey = ffj_t_SearchMetadata_Query - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'r': - - if bytes.Equal(ffj_key_SearchMetadata_RefreshURL, kn) { - currentKey = ffj_t_SearchMetadata_RefreshURL - state = fflib.FFParse_want_colon - goto mainparse - } - - case 's': - - if bytes.Equal(ffj_key_SearchMetadata_SinceID, kn) { - currentKey = ffj_t_SearchMetadata_SinceID - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_SearchMetadata_SinceIDStr, kn) { - currentKey = ffj_t_SearchMetadata_SinceIDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.EqualFoldRight(ffj_key_SearchMetadata_SinceIDStr, kn) { - currentKey = ffj_t_SearchMetadata_SinceIDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_SearchMetadata_SinceID, kn) { - currentKey = ffj_t_SearchMetadata_SinceID - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_SearchMetadata_RefreshURL, kn) { - currentKey = ffj_t_SearchMetadata_RefreshURL - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_SearchMetadata_Query, kn) { - currentKey = ffj_t_SearchMetadata_Query - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_SearchMetadata_NextResults, kn) { - currentKey = ffj_t_SearchMetadata_NextResults - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_SearchMetadata_MaxIDStr, kn) { - currentKey = ffj_t_SearchMetadata_MaxIDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_SearchMetadata_MaxID, kn) { - currentKey = ffj_t_SearchMetadata_MaxID - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_SearchMetadata_Count, kn) { - currentKey = ffj_t_SearchMetadata_Count - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_SearchMetadata_CompletedIn, kn) { - currentKey = ffj_t_SearchMetadata_CompletedIn - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_SearchMetadatano_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_SearchMetadata_CompletedIn: - goto handle_CompletedIn - - case ffj_t_SearchMetadata_Count: - goto handle_Count - - case ffj_t_SearchMetadata_MaxID: - goto handle_MaxID - - case ffj_t_SearchMetadata_MaxIDStr: - goto handle_MaxIDStr - - case ffj_t_SearchMetadata_NextResults: - goto handle_NextResults - - case ffj_t_SearchMetadata_Query: - goto handle_Query - - case ffj_t_SearchMetadata_RefreshURL: - goto handle_RefreshURL - - case ffj_t_SearchMetadata_SinceID: - goto handle_SinceID - - case ffj_t_SearchMetadata_SinceIDStr: - goto handle_SinceIDStr - - case ffj_t_SearchMetadatano_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_CompletedIn: - - /* handler: uj.CompletedIn type=float64 kind=float64 quoted=false*/ - - { - if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.CompletedIn = float64(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Count: - - /* handler: uj.Count type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.Count = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_MaxID: - - /* handler: uj.MaxID type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.MaxID = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_MaxIDStr: - - /* handler: uj.MaxIDStr type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.MaxIDStr = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_NextResults: - - /* handler: uj.NextResults type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.NextResults = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Query: - - /* handler: uj.Query type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Query = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_RefreshURL: - - /* handler: uj.RefreshURL type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.RefreshURL = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_SinceID: - - /* handler: uj.SinceID type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.SinceID = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_SinceIDStr: - - /* handler: uj.SinceIDStr type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.SinceIDStr = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *Status) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *Status) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - if mj.Contributors != nil { - buf.WriteString(`{"contributors":`) - fflib.WriteJsonString(buf, string(*mj.Contributors)) - } else { - buf.WriteString(`{"contributors":null`) - } - if mj.Coordinates != nil { - buf.WriteString(`,"coordinates":`) - fflib.WriteJsonString(buf, string(*mj.Coordinates)) - } else { - buf.WriteString(`,"coordinates":null`) - } - buf.WriteString(`,"created_at":`) - fflib.WriteJsonString(buf, string(mj.CreatedAt)) - buf.WriteString(`,"entities":`) - - { - - err = mj.Entities.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - if mj.Favorited { - buf.WriteString(`,"favorited":true`) - } else { - buf.WriteString(`,"favorited":false`) - } - if mj.Geo != nil { - buf.WriteString(`,"geo":`) - fflib.WriteJsonString(buf, string(*mj.Geo)) - } else { - buf.WriteString(`,"geo":null`) - } - buf.WriteString(`,"id":`) - fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0) - buf.WriteString(`,"id_str":`) - fflib.WriteJsonString(buf, string(mj.IDStr)) - if mj.InReplyToScreenName != nil { - buf.WriteString(`,"in_reply_to_screen_name":`) - fflib.WriteJsonString(buf, string(*mj.InReplyToScreenName)) - } else { - buf.WriteString(`,"in_reply_to_screen_name":null`) - } - if mj.InReplyToStatusID != nil { - buf.WriteString(`,"in_reply_to_status_id":`) - fflib.WriteJsonString(buf, string(*mj.InReplyToStatusID)) - } else { - buf.WriteString(`,"in_reply_to_status_id":null`) - } - if mj.InReplyToStatusIDStr != nil { - buf.WriteString(`,"in_reply_to_status_id_str":`) - fflib.WriteJsonString(buf, string(*mj.InReplyToStatusIDStr)) - } else { - buf.WriteString(`,"in_reply_to_status_id_str":null`) - } - if mj.InReplyToUserID != nil { - buf.WriteString(`,"in_reply_to_user_id":`) - fflib.WriteJsonString(buf, string(*mj.InReplyToUserID)) - } else { - buf.WriteString(`,"in_reply_to_user_id":null`) - } - if mj.InReplyToUserIDStr != nil { - buf.WriteString(`,"in_reply_to_user_id_str":`) - fflib.WriteJsonString(buf, string(*mj.InReplyToUserIDStr)) - } else { - buf.WriteString(`,"in_reply_to_user_id_str":null`) - } - buf.WriteString(`,"metadata":`) - - { - - err = mj.Metadata.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - if mj.Place != nil { - buf.WriteString(`,"place":`) - fflib.WriteJsonString(buf, string(*mj.Place)) - } else { - buf.WriteString(`,"place":null`) - } - buf.WriteString(`,"retweet_count":`) - fflib.FormatBits2(buf, uint64(mj.RetweetCount), 10, mj.RetweetCount < 0) - if mj.Retweeted { - buf.WriteString(`,"retweeted":true`) - } else { - buf.WriteString(`,"retweeted":false`) - } - buf.WriteString(`,"source":`) - fflib.WriteJsonString(buf, string(mj.Source)) - buf.WriteString(`,"text":`) - fflib.WriteJsonString(buf, string(mj.Text)) - if mj.Truncated { - buf.WriteString(`,"truncated":true`) - } else { - buf.WriteString(`,"truncated":false`) - } - buf.WriteString(`,"user":`) - - { - - err = mj.User.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_Statusbase = iota - ffj_t_Statusno_such_key - - ffj_t_Status_Contributors - - ffj_t_Status_Coordinates - - ffj_t_Status_CreatedAt - - ffj_t_Status_Entities - - ffj_t_Status_Favorited - - ffj_t_Status_Geo - - ffj_t_Status_ID - - ffj_t_Status_IDStr - - ffj_t_Status_InReplyToScreenName - - ffj_t_Status_InReplyToStatusID - - ffj_t_Status_InReplyToStatusIDStr - - ffj_t_Status_InReplyToUserID - - ffj_t_Status_InReplyToUserIDStr - - ffj_t_Status_Metadata - - ffj_t_Status_Place - - ffj_t_Status_RetweetCount - - ffj_t_Status_Retweeted - - ffj_t_Status_Source - - ffj_t_Status_Text - - ffj_t_Status_Truncated - - ffj_t_Status_User -) - -var ffj_key_Status_Contributors = []byte("contributors") - -var ffj_key_Status_Coordinates = []byte("coordinates") - -var ffj_key_Status_CreatedAt = []byte("created_at") - -var ffj_key_Status_Entities = []byte("entities") - -var ffj_key_Status_Favorited = []byte("favorited") - -var ffj_key_Status_Geo = []byte("geo") - -var ffj_key_Status_ID = []byte("id") - -var ffj_key_Status_IDStr = []byte("id_str") - -var ffj_key_Status_InReplyToScreenName = []byte("in_reply_to_screen_name") - -var ffj_key_Status_InReplyToStatusID = []byte("in_reply_to_status_id") - -var ffj_key_Status_InReplyToStatusIDStr = []byte("in_reply_to_status_id_str") - -var ffj_key_Status_InReplyToUserID = []byte("in_reply_to_user_id") - -var ffj_key_Status_InReplyToUserIDStr = []byte("in_reply_to_user_id_str") - -var ffj_key_Status_Metadata = []byte("metadata") - -var ffj_key_Status_Place = []byte("place") - -var ffj_key_Status_RetweetCount = []byte("retweet_count") - -var ffj_key_Status_Retweeted = []byte("retweeted") - -var ffj_key_Status_Source = []byte("source") - -var ffj_key_Status_Text = []byte("text") - -var ffj_key_Status_Truncated = []byte("truncated") - -var ffj_key_Status_User = []byte("user") - -func (uj *Status) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *Status) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_Statusbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_Statusno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'c': - - if bytes.Equal(ffj_key_Status_Contributors, kn) { - currentKey = ffj_t_Status_Contributors - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_Coordinates, kn) { - currentKey = ffj_t_Status_Coordinates - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_CreatedAt, kn) { - currentKey = ffj_t_Status_CreatedAt - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'e': - - if bytes.Equal(ffj_key_Status_Entities, kn) { - currentKey = ffj_t_Status_Entities - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'f': - - if bytes.Equal(ffj_key_Status_Favorited, kn) { - currentKey = ffj_t_Status_Favorited - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'g': - - if bytes.Equal(ffj_key_Status_Geo, kn) { - currentKey = ffj_t_Status_Geo - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'i': - - if bytes.Equal(ffj_key_Status_ID, kn) { - currentKey = ffj_t_Status_ID - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_IDStr, kn) { - currentKey = ffj_t_Status_IDStr - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_InReplyToScreenName, kn) { - currentKey = ffj_t_Status_InReplyToScreenName - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_InReplyToStatusID, kn) { - currentKey = ffj_t_Status_InReplyToStatusID - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_InReplyToStatusIDStr, kn) { - currentKey = ffj_t_Status_InReplyToStatusIDStr - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_InReplyToUserID, kn) { - currentKey = ffj_t_Status_InReplyToUserID - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_InReplyToUserIDStr, kn) { - currentKey = ffj_t_Status_InReplyToUserIDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'm': - - if bytes.Equal(ffj_key_Status_Metadata, kn) { - currentKey = ffj_t_Status_Metadata - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'p': - - if bytes.Equal(ffj_key_Status_Place, kn) { - currentKey = ffj_t_Status_Place - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'r': - - if bytes.Equal(ffj_key_Status_RetweetCount, kn) { - currentKey = ffj_t_Status_RetweetCount - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_Retweeted, kn) { - currentKey = ffj_t_Status_Retweeted - state = fflib.FFParse_want_colon - goto mainparse - } - - case 's': - - if bytes.Equal(ffj_key_Status_Source, kn) { - currentKey = ffj_t_Status_Source - state = fflib.FFParse_want_colon - goto mainparse - } - - case 't': - - if bytes.Equal(ffj_key_Status_Text, kn) { - currentKey = ffj_t_Status_Text - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_Status_Truncated, kn) { - currentKey = ffj_t_Status_Truncated - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'u': - - if bytes.Equal(ffj_key_Status_User, kn) { - currentKey = ffj_t_Status_User - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.EqualFoldRight(ffj_key_Status_User, kn) { - currentKey = ffj_t_Status_User - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_Truncated, kn) { - currentKey = ffj_t_Status_Truncated - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_Text, kn) { - currentKey = ffj_t_Status_Text - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_Source, kn) { - currentKey = ffj_t_Status_Source - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_Retweeted, kn) { - currentKey = ffj_t_Status_Retweeted - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_Status_RetweetCount, kn) { - currentKey = ffj_t_Status_RetweetCount - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_Place, kn) { - currentKey = ffj_t_Status_Place - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_Metadata, kn) { - currentKey = ffj_t_Status_Metadata - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_InReplyToUserIDStr, kn) { - currentKey = ffj_t_Status_InReplyToUserIDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_InReplyToUserID, kn) { - currentKey = ffj_t_Status_InReplyToUserID - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_InReplyToStatusIDStr, kn) { - currentKey = ffj_t_Status_InReplyToStatusIDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_InReplyToStatusID, kn) { - currentKey = ffj_t_Status_InReplyToStatusID - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_InReplyToScreenName, kn) { - currentKey = ffj_t_Status_InReplyToScreenName - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_IDStr, kn) { - currentKey = ffj_t_Status_IDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_ID, kn) { - currentKey = ffj_t_Status_ID - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_Geo, kn) { - currentKey = ffj_t_Status_Geo - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_Status_Favorited, kn) { - currentKey = ffj_t_Status_Favorited - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_Entities, kn) { - currentKey = ffj_t_Status_Entities - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_Status_CreatedAt, kn) { - currentKey = ffj_t_Status_CreatedAt - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_Coordinates, kn) { - currentKey = ffj_t_Status_Coordinates - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_Status_Contributors, kn) { - currentKey = ffj_t_Status_Contributors - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_Statusno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_Status_Contributors: - goto handle_Contributors - - case ffj_t_Status_Coordinates: - goto handle_Coordinates - - case ffj_t_Status_CreatedAt: - goto handle_CreatedAt - - case ffj_t_Status_Entities: - goto handle_Entities - - case ffj_t_Status_Favorited: - goto handle_Favorited - - case ffj_t_Status_Geo: - goto handle_Geo - - case ffj_t_Status_ID: - goto handle_ID - - case ffj_t_Status_IDStr: - goto handle_IDStr - - case ffj_t_Status_InReplyToScreenName: - goto handle_InReplyToScreenName - - case ffj_t_Status_InReplyToStatusID: - goto handle_InReplyToStatusID - - case ffj_t_Status_InReplyToStatusIDStr: - goto handle_InReplyToStatusIDStr - - case ffj_t_Status_InReplyToUserID: - goto handle_InReplyToUserID - - case ffj_t_Status_InReplyToUserIDStr: - goto handle_InReplyToUserIDStr - - case ffj_t_Status_Metadata: - goto handle_Metadata - - case ffj_t_Status_Place: - goto handle_Place - - case ffj_t_Status_RetweetCount: - goto handle_RetweetCount - - case ffj_t_Status_Retweeted: - goto handle_Retweeted - - case ffj_t_Status_Source: - goto handle_Source - - case ffj_t_Status_Text: - goto handle_Text - - case ffj_t_Status_Truncated: - goto handle_Truncated - - case ffj_t_Status_User: - goto handle_User - - case ffj_t_Statusno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_Contributors: - - /* handler: uj.Contributors type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.Contributors = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.Contributors = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Coordinates: - - /* handler: uj.Coordinates type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.Coordinates = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.Coordinates = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_CreatedAt: - - /* handler: uj.CreatedAt type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.CreatedAt = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Entities: - - /* handler: uj.Entities type=benchmark.Entities kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = uj.Entities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Favorited: - - /* handler: uj.Favorited type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.Favorited = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.Favorited = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Geo: - - /* handler: uj.Geo type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.Geo = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.Geo = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ID: - - /* handler: uj.ID type=int64 kind=int64 quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.ID = int64(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_IDStr: - - /* handler: uj.IDStr type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.IDStr = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_InReplyToScreenName: - - /* handler: uj.InReplyToScreenName type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.InReplyToScreenName = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.InReplyToScreenName = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_InReplyToStatusID: - - /* handler: uj.InReplyToStatusID type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.InReplyToStatusID = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.InReplyToStatusID = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_InReplyToStatusIDStr: - - /* handler: uj.InReplyToStatusIDStr type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.InReplyToStatusIDStr = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.InReplyToStatusIDStr = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_InReplyToUserID: - - /* handler: uj.InReplyToUserID type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.InReplyToUserID = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.InReplyToUserID = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_InReplyToUserIDStr: - - /* handler: uj.InReplyToUserIDStr type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.InReplyToUserIDStr = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.InReplyToUserIDStr = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Metadata: - - /* handler: uj.Metadata type=benchmark.StatusMetadata kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = uj.Metadata.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Place: - - /* handler: uj.Place type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.Place = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.Place = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_RetweetCount: - - /* handler: uj.RetweetCount type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.RetweetCount = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Retweeted: - - /* handler: uj.Retweeted type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.Retweeted = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.Retweeted = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Source: - - /* handler: uj.Source type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Source = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Text: - - /* handler: uj.Text type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Text = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Truncated: - - /* handler: uj.Truncated type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.Truncated = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.Truncated = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_User: - - /* handler: uj.User type=benchmark.User kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = uj.User.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *StatusMetadata) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *StatusMetadata) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"iso_language_code":`) - fflib.WriteJsonString(buf, string(mj.IsoLanguageCode)) - buf.WriteString(`,"result_type":`) - fflib.WriteJsonString(buf, string(mj.ResultType)) - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_StatusMetadatabase = iota - ffj_t_StatusMetadatano_such_key - - ffj_t_StatusMetadata_IsoLanguageCode - - ffj_t_StatusMetadata_ResultType -) - -var ffj_key_StatusMetadata_IsoLanguageCode = []byte("iso_language_code") - -var ffj_key_StatusMetadata_ResultType = []byte("result_type") - -func (uj *StatusMetadata) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *StatusMetadata) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_StatusMetadatabase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_StatusMetadatano_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'i': - - if bytes.Equal(ffj_key_StatusMetadata_IsoLanguageCode, kn) { - currentKey = ffj_t_StatusMetadata_IsoLanguageCode - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'r': - - if bytes.Equal(ffj_key_StatusMetadata_ResultType, kn) { - currentKey = ffj_t_StatusMetadata_ResultType - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.EqualFoldRight(ffj_key_StatusMetadata_ResultType, kn) { - currentKey = ffj_t_StatusMetadata_ResultType - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_StatusMetadata_IsoLanguageCode, kn) { - currentKey = ffj_t_StatusMetadata_IsoLanguageCode - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_StatusMetadatano_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_StatusMetadata_IsoLanguageCode: - goto handle_IsoLanguageCode - - case ffj_t_StatusMetadata_ResultType: - goto handle_ResultType - - case ffj_t_StatusMetadatano_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_IsoLanguageCode: - - /* handler: uj.IsoLanguageCode type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.IsoLanguageCode = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ResultType: - - /* handler: uj.ResultType type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ResultType = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *URL) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *URL) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - if mj.ExpandedURL != nil { - buf.WriteString(`{"expanded_url":`) - fflib.WriteJsonString(buf, string(*mj.ExpandedURL)) - } else { - buf.WriteString(`{"expanded_url":null`) - } - buf.WriteString(`,"indices":`) - if mj.Indices != nil { - buf.WriteString(`[`) - for i, v := range mj.Indices { - if i != 0 { - buf.WriteString(`,`) - } - fflib.FormatBits2(buf, uint64(v), 10, v < 0) - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteString(`,"url":`) - fflib.WriteJsonString(buf, string(mj.URL)) - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_URLbase = iota - ffj_t_URLno_such_key - - ffj_t_URL_ExpandedURL - - ffj_t_URL_Indices - - ffj_t_URL_URL -) - -var ffj_key_URL_ExpandedURL = []byte("expanded_url") - -var ffj_key_URL_Indices = []byte("indices") - -var ffj_key_URL_URL = []byte("url") - -func (uj *URL) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *URL) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_URLbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_URLno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'e': - - if bytes.Equal(ffj_key_URL_ExpandedURL, kn) { - currentKey = ffj_t_URL_ExpandedURL - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'i': - - if bytes.Equal(ffj_key_URL_Indices, kn) { - currentKey = ffj_t_URL_Indices - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'u': - - if bytes.Equal(ffj_key_URL_URL, kn) { - currentKey = ffj_t_URL_URL - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.SimpleLetterEqualFold(ffj_key_URL_URL, kn) { - currentKey = ffj_t_URL_URL - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_URL_Indices, kn) { - currentKey = ffj_t_URL_Indices - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_URL_ExpandedURL, kn) { - currentKey = ffj_t_URL_ExpandedURL - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_URLno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_URL_ExpandedURL: - goto handle_ExpandedURL - - case ffj_t_URL_Indices: - goto handle_Indices - - case ffj_t_URL_URL: - goto handle_URL - - case ffj_t_URLno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_ExpandedURL: - - /* handler: uj.ExpandedURL type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.ExpandedURL = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.ExpandedURL = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Indices: - - /* handler: uj.Indices type=[]int kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Indices = nil - } else { - - uj.Indices = make([]int, 0) - - wantVal := true - - for { - - var tmp_uj__Indices int - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Indices type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - tmp_uj__Indices = int(tval) - - } - } - - uj.Indices = append(uj.Indices, tmp_uj__Indices) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_URL: - - /* handler: uj.URL type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.URL = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *User) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *User) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - if mj.ContributorsEnabled { - buf.WriteString(`{"contributors_enabled":true`) - } else { - buf.WriteString(`{"contributors_enabled":false`) - } - buf.WriteString(`,"created_at":`) - fflib.WriteJsonString(buf, string(mj.CreatedAt)) - if mj.DefaultProfile { - buf.WriteString(`,"default_profile":true`) - } else { - buf.WriteString(`,"default_profile":false`) - } - if mj.DefaultProfileImage { - buf.WriteString(`,"default_profile_image":true`) - } else { - buf.WriteString(`,"default_profile_image":false`) - } - buf.WriteString(`,"description":`) - fflib.WriteJsonString(buf, string(mj.Description)) - buf.WriteString(`,"entities":`) - - { - - err = mj.Entities.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteString(`,"favourites_count":`) - fflib.FormatBits2(buf, uint64(mj.FavouritesCount), 10, mj.FavouritesCount < 0) - if mj.FollowRequestSent != nil { - buf.WriteString(`,"follow_request_sent":`) - fflib.WriteJsonString(buf, string(*mj.FollowRequestSent)) - } else { - buf.WriteString(`,"follow_request_sent":null`) - } - buf.WriteString(`,"followers_count":`) - fflib.FormatBits2(buf, uint64(mj.FollowersCount), 10, mj.FollowersCount < 0) - if mj.Following != nil { - buf.WriteString(`,"following":`) - fflib.WriteJsonString(buf, string(*mj.Following)) - } else { - buf.WriteString(`,"following":null`) - } - buf.WriteString(`,"friends_count":`) - fflib.FormatBits2(buf, uint64(mj.FriendsCount), 10, mj.FriendsCount < 0) - if mj.GeoEnabled { - buf.WriteString(`,"geo_enabled":true`) - } else { - buf.WriteString(`,"geo_enabled":false`) - } - buf.WriteString(`,"id":`) - fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0) - buf.WriteString(`,"id_str":`) - fflib.WriteJsonString(buf, string(mj.IDStr)) - if mj.IsTranslator { - buf.WriteString(`,"is_translator":true`) - } else { - buf.WriteString(`,"is_translator":false`) - } - buf.WriteString(`,"lang":`) - fflib.WriteJsonString(buf, string(mj.Lang)) - buf.WriteString(`,"listed_count":`) - fflib.FormatBits2(buf, uint64(mj.ListedCount), 10, mj.ListedCount < 0) - buf.WriteString(`,"location":`) - fflib.WriteJsonString(buf, string(mj.Location)) - buf.WriteString(`,"name":`) - fflib.WriteJsonString(buf, string(mj.Name)) - if mj.Notifications != nil { - buf.WriteString(`,"notifications":`) - fflib.WriteJsonString(buf, string(*mj.Notifications)) - } else { - buf.WriteString(`,"notifications":null`) - } - buf.WriteString(`,"profile_background_color":`) - fflib.WriteJsonString(buf, string(mj.ProfileBackgroundColor)) - buf.WriteString(`,"profile_background_image_url":`) - fflib.WriteJsonString(buf, string(mj.ProfileBackgroundImageURL)) - buf.WriteString(`,"profile_background_image_url_https":`) - fflib.WriteJsonString(buf, string(mj.ProfileBackgroundImageURLHTTPS)) - if mj.ProfileBackgroundTile { - buf.WriteString(`,"profile_background_tile":true`) - } else { - buf.WriteString(`,"profile_background_tile":false`) - } - buf.WriteString(`,"profile_image_url":`) - fflib.WriteJsonString(buf, string(mj.ProfileImageURL)) - buf.WriteString(`,"profile_image_url_https":`) - fflib.WriteJsonString(buf, string(mj.ProfileImageURLHTTPS)) - buf.WriteString(`,"profile_link_color":`) - fflib.WriteJsonString(buf, string(mj.ProfileLinkColor)) - buf.WriteString(`,"profile_sidebar_border_color":`) - fflib.WriteJsonString(buf, string(mj.ProfileSidebarBorderColor)) - buf.WriteString(`,"profile_sidebar_fill_color":`) - fflib.WriteJsonString(buf, string(mj.ProfileSidebarFillColor)) - buf.WriteString(`,"profile_text_color":`) - fflib.WriteJsonString(buf, string(mj.ProfileTextColor)) - if mj.ProfileUseBackgroundImage { - buf.WriteString(`,"profile_use_background_image":true`) - } else { - buf.WriteString(`,"profile_use_background_image":false`) - } - if mj.Protected { - buf.WriteString(`,"protected":true`) - } else { - buf.WriteString(`,"protected":false`) - } - buf.WriteString(`,"screen_name":`) - fflib.WriteJsonString(buf, string(mj.ScreenName)) - if mj.ShowAllInlineMedia { - buf.WriteString(`,"show_all_inline_media":true`) - } else { - buf.WriteString(`,"show_all_inline_media":false`) - } - buf.WriteString(`,"statuses_count":`) - fflib.FormatBits2(buf, uint64(mj.StatusesCount), 10, mj.StatusesCount < 0) - buf.WriteString(`,"time_zone":`) - fflib.WriteJsonString(buf, string(mj.TimeZone)) - if mj.URL != nil { - buf.WriteString(`,"url":`) - fflib.WriteJsonString(buf, string(*mj.URL)) - } else { - buf.WriteString(`,"url":null`) - } - buf.WriteString(`,"utc_offset":`) - fflib.FormatBits2(buf, uint64(mj.UtcOffset), 10, mj.UtcOffset < 0) - if mj.Verified { - buf.WriteString(`,"verified":true`) - } else { - buf.WriteString(`,"verified":false`) - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_Userbase = iota - ffj_t_Userno_such_key - - ffj_t_User_ContributorsEnabled - - ffj_t_User_CreatedAt - - ffj_t_User_DefaultProfile - - ffj_t_User_DefaultProfileImage - - ffj_t_User_Description - - ffj_t_User_Entities - - ffj_t_User_FavouritesCount - - ffj_t_User_FollowRequestSent - - ffj_t_User_FollowersCount - - ffj_t_User_Following - - ffj_t_User_FriendsCount - - ffj_t_User_GeoEnabled - - ffj_t_User_ID - - ffj_t_User_IDStr - - ffj_t_User_IsTranslator - - ffj_t_User_Lang - - ffj_t_User_ListedCount - - ffj_t_User_Location - - ffj_t_User_Name - - ffj_t_User_Notifications - - ffj_t_User_ProfileBackgroundColor - - ffj_t_User_ProfileBackgroundImageURL - - ffj_t_User_ProfileBackgroundImageURLHTTPS - - ffj_t_User_ProfileBackgroundTile - - ffj_t_User_ProfileImageURL - - ffj_t_User_ProfileImageURLHTTPS - - ffj_t_User_ProfileLinkColor - - ffj_t_User_ProfileSidebarBorderColor - - ffj_t_User_ProfileSidebarFillColor - - ffj_t_User_ProfileTextColor - - ffj_t_User_ProfileUseBackgroundImage - - ffj_t_User_Protected - - ffj_t_User_ScreenName - - ffj_t_User_ShowAllInlineMedia - - ffj_t_User_StatusesCount - - ffj_t_User_TimeZone - - ffj_t_User_URL - - ffj_t_User_UtcOffset - - ffj_t_User_Verified -) - -var ffj_key_User_ContributorsEnabled = []byte("contributors_enabled") - -var ffj_key_User_CreatedAt = []byte("created_at") - -var ffj_key_User_DefaultProfile = []byte("default_profile") - -var ffj_key_User_DefaultProfileImage = []byte("default_profile_image") - -var ffj_key_User_Description = []byte("description") - -var ffj_key_User_Entities = []byte("entities") - -var ffj_key_User_FavouritesCount = []byte("favourites_count") - -var ffj_key_User_FollowRequestSent = []byte("follow_request_sent") - -var ffj_key_User_FollowersCount = []byte("followers_count") - -var ffj_key_User_Following = []byte("following") - -var ffj_key_User_FriendsCount = []byte("friends_count") - -var ffj_key_User_GeoEnabled = []byte("geo_enabled") - -var ffj_key_User_ID = []byte("id") - -var ffj_key_User_IDStr = []byte("id_str") - -var ffj_key_User_IsTranslator = []byte("is_translator") - -var ffj_key_User_Lang = []byte("lang") - -var ffj_key_User_ListedCount = []byte("listed_count") - -var ffj_key_User_Location = []byte("location") - -var ffj_key_User_Name = []byte("name") - -var ffj_key_User_Notifications = []byte("notifications") - -var ffj_key_User_ProfileBackgroundColor = []byte("profile_background_color") - -var ffj_key_User_ProfileBackgroundImageURL = []byte("profile_background_image_url") - -var ffj_key_User_ProfileBackgroundImageURLHTTPS = []byte("profile_background_image_url_https") - -var ffj_key_User_ProfileBackgroundTile = []byte("profile_background_tile") - -var ffj_key_User_ProfileImageURL = []byte("profile_image_url") - -var ffj_key_User_ProfileImageURLHTTPS = []byte("profile_image_url_https") - -var ffj_key_User_ProfileLinkColor = []byte("profile_link_color") - -var ffj_key_User_ProfileSidebarBorderColor = []byte("profile_sidebar_border_color") - -var ffj_key_User_ProfileSidebarFillColor = []byte("profile_sidebar_fill_color") - -var ffj_key_User_ProfileTextColor = []byte("profile_text_color") - -var ffj_key_User_ProfileUseBackgroundImage = []byte("profile_use_background_image") - -var ffj_key_User_Protected = []byte("protected") - -var ffj_key_User_ScreenName = []byte("screen_name") - -var ffj_key_User_ShowAllInlineMedia = []byte("show_all_inline_media") - -var ffj_key_User_StatusesCount = []byte("statuses_count") - -var ffj_key_User_TimeZone = []byte("time_zone") - -var ffj_key_User_URL = []byte("url") - -var ffj_key_User_UtcOffset = []byte("utc_offset") - -var ffj_key_User_Verified = []byte("verified") - -func (uj *User) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *User) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_Userbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_Userno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'c': - - if bytes.Equal(ffj_key_User_ContributorsEnabled, kn) { - currentKey = ffj_t_User_ContributorsEnabled - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_CreatedAt, kn) { - currentKey = ffj_t_User_CreatedAt - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'd': - - if bytes.Equal(ffj_key_User_DefaultProfile, kn) { - currentKey = ffj_t_User_DefaultProfile - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_DefaultProfileImage, kn) { - currentKey = ffj_t_User_DefaultProfileImage - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_Description, kn) { - currentKey = ffj_t_User_Description - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'e': - - if bytes.Equal(ffj_key_User_Entities, kn) { - currentKey = ffj_t_User_Entities - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'f': - - if bytes.Equal(ffj_key_User_FavouritesCount, kn) { - currentKey = ffj_t_User_FavouritesCount - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_FollowRequestSent, kn) { - currentKey = ffj_t_User_FollowRequestSent - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_FollowersCount, kn) { - currentKey = ffj_t_User_FollowersCount - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_Following, kn) { - currentKey = ffj_t_User_Following - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_FriendsCount, kn) { - currentKey = ffj_t_User_FriendsCount - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'g': - - if bytes.Equal(ffj_key_User_GeoEnabled, kn) { - currentKey = ffj_t_User_GeoEnabled - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'i': - - if bytes.Equal(ffj_key_User_ID, kn) { - currentKey = ffj_t_User_ID - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_IDStr, kn) { - currentKey = ffj_t_User_IDStr - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_IsTranslator, kn) { - currentKey = ffj_t_User_IsTranslator - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'l': - - if bytes.Equal(ffj_key_User_Lang, kn) { - currentKey = ffj_t_User_Lang - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ListedCount, kn) { - currentKey = ffj_t_User_ListedCount - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_Location, kn) { - currentKey = ffj_t_User_Location - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'n': - - if bytes.Equal(ffj_key_User_Name, kn) { - currentKey = ffj_t_User_Name - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_Notifications, kn) { - currentKey = ffj_t_User_Notifications - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'p': - - if bytes.Equal(ffj_key_User_ProfileBackgroundColor, kn) { - currentKey = ffj_t_User_ProfileBackgroundColor - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileBackgroundImageURL, kn) { - currentKey = ffj_t_User_ProfileBackgroundImageURL - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileBackgroundImageURLHTTPS, kn) { - currentKey = ffj_t_User_ProfileBackgroundImageURLHTTPS - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileBackgroundTile, kn) { - currentKey = ffj_t_User_ProfileBackgroundTile - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileImageURL, kn) { - currentKey = ffj_t_User_ProfileImageURL - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileImageURLHTTPS, kn) { - currentKey = ffj_t_User_ProfileImageURLHTTPS - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileLinkColor, kn) { - currentKey = ffj_t_User_ProfileLinkColor - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileSidebarBorderColor, kn) { - currentKey = ffj_t_User_ProfileSidebarBorderColor - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileSidebarFillColor, kn) { - currentKey = ffj_t_User_ProfileSidebarFillColor - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileTextColor, kn) { - currentKey = ffj_t_User_ProfileTextColor - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ProfileUseBackgroundImage, kn) { - currentKey = ffj_t_User_ProfileUseBackgroundImage - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_Protected, kn) { - currentKey = ffj_t_User_Protected - state = fflib.FFParse_want_colon - goto mainparse - } - - case 's': - - if bytes.Equal(ffj_key_User_ScreenName, kn) { - currentKey = ffj_t_User_ScreenName - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_ShowAllInlineMedia, kn) { - currentKey = ffj_t_User_ShowAllInlineMedia - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_StatusesCount, kn) { - currentKey = ffj_t_User_StatusesCount - state = fflib.FFParse_want_colon - goto mainparse - } - - case 't': - - if bytes.Equal(ffj_key_User_TimeZone, kn) { - currentKey = ffj_t_User_TimeZone - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'u': - - if bytes.Equal(ffj_key_User_URL, kn) { - currentKey = ffj_t_User_URL - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_User_UtcOffset, kn) { - currentKey = ffj_t_User_UtcOffset - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'v': - - if bytes.Equal(ffj_key_User_Verified, kn) { - currentKey = ffj_t_User_Verified - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_Verified, kn) { - currentKey = ffj_t_User_Verified - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_UtcOffset, kn) { - currentKey = ffj_t_User_UtcOffset - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_URL, kn) { - currentKey = ffj_t_User_URL - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_User_TimeZone, kn) { - currentKey = ffj_t_User_TimeZone - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_StatusesCount, kn) { - currentKey = ffj_t_User_StatusesCount - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ShowAllInlineMedia, kn) { - currentKey = ffj_t_User_ShowAllInlineMedia - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ScreenName, kn) { - currentKey = ffj_t_User_ScreenName - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_Protected, kn) { - currentKey = ffj_t_User_Protected - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileUseBackgroundImage, kn) { - currentKey = ffj_t_User_ProfileUseBackgroundImage - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_User_ProfileTextColor, kn) { - currentKey = ffj_t_User_ProfileTextColor - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileSidebarFillColor, kn) { - currentKey = ffj_t_User_ProfileSidebarFillColor - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileSidebarBorderColor, kn) { - currentKey = ffj_t_User_ProfileSidebarBorderColor - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileLinkColor, kn) { - currentKey = ffj_t_User_ProfileLinkColor - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileImageURLHTTPS, kn) { - currentKey = ffj_t_User_ProfileImageURLHTTPS - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_User_ProfileImageURL, kn) { - currentKey = ffj_t_User_ProfileImageURL - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundTile, kn) { - currentKey = ffj_t_User_ProfileBackgroundTile - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundImageURLHTTPS, kn) { - currentKey = ffj_t_User_ProfileBackgroundImageURLHTTPS - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundImageURL, kn) { - currentKey = ffj_t_User_ProfileBackgroundImageURL - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundColor, kn) { - currentKey = ffj_t_User_ProfileBackgroundColor - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_Notifications, kn) { - currentKey = ffj_t_User_Notifications - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_Name, kn) { - currentKey = ffj_t_User_Name - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_Location, kn) { - currentKey = ffj_t_User_Location - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ListedCount, kn) { - currentKey = ffj_t_User_ListedCount - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_Lang, kn) { - currentKey = ffj_t_User_Lang - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_IsTranslator, kn) { - currentKey = ffj_t_User_IsTranslator - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_IDStr, kn) { - currentKey = ffj_t_User_IDStr - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_ID, kn) { - currentKey = ffj_t_User_ID - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_User_GeoEnabled, kn) { - currentKey = ffj_t_User_GeoEnabled - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_FriendsCount, kn) { - currentKey = ffj_t_User_FriendsCount - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_User_Following, kn) { - currentKey = ffj_t_User_Following - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_FollowersCount, kn) { - currentKey = ffj_t_User_FollowersCount - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_FollowRequestSent, kn) { - currentKey = ffj_t_User_FollowRequestSent - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_FavouritesCount, kn) { - currentKey = ffj_t_User_FavouritesCount - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_Entities, kn) { - currentKey = ffj_t_User_Entities - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_Description, kn) { - currentKey = ffj_t_User_Description - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_User_DefaultProfileImage, kn) { - currentKey = ffj_t_User_DefaultProfileImage - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_User_DefaultProfile, kn) { - currentKey = ffj_t_User_DefaultProfile - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.AsciiEqualFold(ffj_key_User_CreatedAt, kn) { - currentKey = ffj_t_User_CreatedAt - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_User_ContributorsEnabled, kn) { - currentKey = ffj_t_User_ContributorsEnabled - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_Userno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_User_ContributorsEnabled: - goto handle_ContributorsEnabled - - case ffj_t_User_CreatedAt: - goto handle_CreatedAt - - case ffj_t_User_DefaultProfile: - goto handle_DefaultProfile - - case ffj_t_User_DefaultProfileImage: - goto handle_DefaultProfileImage - - case ffj_t_User_Description: - goto handle_Description - - case ffj_t_User_Entities: - goto handle_Entities - - case ffj_t_User_FavouritesCount: - goto handle_FavouritesCount - - case ffj_t_User_FollowRequestSent: - goto handle_FollowRequestSent - - case ffj_t_User_FollowersCount: - goto handle_FollowersCount - - case ffj_t_User_Following: - goto handle_Following - - case ffj_t_User_FriendsCount: - goto handle_FriendsCount - - case ffj_t_User_GeoEnabled: - goto handle_GeoEnabled - - case ffj_t_User_ID: - goto handle_ID - - case ffj_t_User_IDStr: - goto handle_IDStr - - case ffj_t_User_IsTranslator: - goto handle_IsTranslator - - case ffj_t_User_Lang: - goto handle_Lang - - case ffj_t_User_ListedCount: - goto handle_ListedCount - - case ffj_t_User_Location: - goto handle_Location - - case ffj_t_User_Name: - goto handle_Name - - case ffj_t_User_Notifications: - goto handle_Notifications - - case ffj_t_User_ProfileBackgroundColor: - goto handle_ProfileBackgroundColor - - case ffj_t_User_ProfileBackgroundImageURL: - goto handle_ProfileBackgroundImageURL - - case ffj_t_User_ProfileBackgroundImageURLHTTPS: - goto handle_ProfileBackgroundImageURLHTTPS - - case ffj_t_User_ProfileBackgroundTile: - goto handle_ProfileBackgroundTile - - case ffj_t_User_ProfileImageURL: - goto handle_ProfileImageURL - - case ffj_t_User_ProfileImageURLHTTPS: - goto handle_ProfileImageURLHTTPS - - case ffj_t_User_ProfileLinkColor: - goto handle_ProfileLinkColor - - case ffj_t_User_ProfileSidebarBorderColor: - goto handle_ProfileSidebarBorderColor - - case ffj_t_User_ProfileSidebarFillColor: - goto handle_ProfileSidebarFillColor - - case ffj_t_User_ProfileTextColor: - goto handle_ProfileTextColor - - case ffj_t_User_ProfileUseBackgroundImage: - goto handle_ProfileUseBackgroundImage - - case ffj_t_User_Protected: - goto handle_Protected - - case ffj_t_User_ScreenName: - goto handle_ScreenName - - case ffj_t_User_ShowAllInlineMedia: - goto handle_ShowAllInlineMedia - - case ffj_t_User_StatusesCount: - goto handle_StatusesCount - - case ffj_t_User_TimeZone: - goto handle_TimeZone - - case ffj_t_User_URL: - goto handle_URL - - case ffj_t_User_UtcOffset: - goto handle_UtcOffset - - case ffj_t_User_Verified: - goto handle_Verified - - case ffj_t_Userno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_ContributorsEnabled: - - /* handler: uj.ContributorsEnabled type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.ContributorsEnabled = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.ContributorsEnabled = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_CreatedAt: - - /* handler: uj.CreatedAt type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.CreatedAt = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_DefaultProfile: - - /* handler: uj.DefaultProfile type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.DefaultProfile = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.DefaultProfile = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_DefaultProfileImage: - - /* handler: uj.DefaultProfileImage type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.DefaultProfileImage = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.DefaultProfileImage = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Description: - - /* handler: uj.Description type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Description = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Entities: - - /* handler: uj.Entities type=benchmark.UserEntities kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = uj.Entities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_FavouritesCount: - - /* handler: uj.FavouritesCount type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.FavouritesCount = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_FollowRequestSent: - - /* handler: uj.FollowRequestSent type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.FollowRequestSent = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.FollowRequestSent = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_FollowersCount: - - /* handler: uj.FollowersCount type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.FollowersCount = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Following: - - /* handler: uj.Following type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.Following = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.Following = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_FriendsCount: - - /* handler: uj.FriendsCount type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.FriendsCount = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_GeoEnabled: - - /* handler: uj.GeoEnabled type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.GeoEnabled = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.GeoEnabled = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ID: - - /* handler: uj.ID type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.ID = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_IDStr: - - /* handler: uj.IDStr type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.IDStr = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_IsTranslator: - - /* handler: uj.IsTranslator type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.IsTranslator = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.IsTranslator = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Lang: - - /* handler: uj.Lang type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Lang = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ListedCount: - - /* handler: uj.ListedCount type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.ListedCount = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Location: - - /* handler: uj.Location type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Location = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Name: - - /* handler: uj.Name type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.Name = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Notifications: - - /* handler: uj.Notifications type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.Notifications = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.Notifications = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileBackgroundColor: - - /* handler: uj.ProfileBackgroundColor type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileBackgroundColor = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileBackgroundImageURL: - - /* handler: uj.ProfileBackgroundImageURL type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileBackgroundImageURL = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileBackgroundImageURLHTTPS: - - /* handler: uj.ProfileBackgroundImageURLHTTPS type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileBackgroundImageURLHTTPS = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileBackgroundTile: - - /* handler: uj.ProfileBackgroundTile type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.ProfileBackgroundTile = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.ProfileBackgroundTile = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileImageURL: - - /* handler: uj.ProfileImageURL type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileImageURL = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileImageURLHTTPS: - - /* handler: uj.ProfileImageURLHTTPS type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileImageURLHTTPS = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileLinkColor: - - /* handler: uj.ProfileLinkColor type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileLinkColor = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileSidebarBorderColor: - - /* handler: uj.ProfileSidebarBorderColor type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileSidebarBorderColor = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileSidebarFillColor: - - /* handler: uj.ProfileSidebarFillColor type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileSidebarFillColor = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileTextColor: - - /* handler: uj.ProfileTextColor type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ProfileTextColor = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ProfileUseBackgroundImage: - - /* handler: uj.ProfileUseBackgroundImage type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.ProfileUseBackgroundImage = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.ProfileUseBackgroundImage = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Protected: - - /* handler: uj.Protected type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.Protected = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.Protected = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ScreenName: - - /* handler: uj.ScreenName type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.ScreenName = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_ShowAllInlineMedia: - - /* handler: uj.ShowAllInlineMedia type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.ShowAllInlineMedia = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.ShowAllInlineMedia = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_StatusesCount: - - /* handler: uj.StatusesCount type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.StatusesCount = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_TimeZone: - - /* handler: uj.TimeZone type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - } else { - - outBuf := fs.Output.Bytes() - - uj.TimeZone = string(string(outBuf)) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_URL: - - /* handler: uj.URL type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.URL = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.URL = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_UtcOffset: - - /* handler: uj.UtcOffset type=int kind=int quoted=false*/ - - { - if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok)) - } - } - - { - - if tok == fflib.FFTok_null { - - } else { - - tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) - - if err != nil { - return fs.WrapErr(err) - } - - uj.UtcOffset = int(tval) - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Verified: - - /* handler: uj.Verified type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - } else { - tmpb := fs.Output.Bytes() - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - uj.Verified = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - uj.Verified = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *UserEntities) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *UserEntities) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"description":`) - - { - - err = mj.Description.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteString(`,"url":`) - - { - - err = mj.URL.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_UserEntitiesbase = iota - ffj_t_UserEntitiesno_such_key - - ffj_t_UserEntities_Description - - ffj_t_UserEntities_URL -) - -var ffj_key_UserEntities_Description = []byte("description") - -var ffj_key_UserEntities_URL = []byte("url") - -func (uj *UserEntities) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *UserEntities) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_UserEntitiesbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_UserEntitiesno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'd': - - if bytes.Equal(ffj_key_UserEntities_Description, kn) { - currentKey = ffj_t_UserEntities_Description - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'u': - - if bytes.Equal(ffj_key_UserEntities_URL, kn) { - currentKey = ffj_t_UserEntities_URL - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.SimpleLetterEqualFold(ffj_key_UserEntities_URL, kn) { - currentKey = ffj_t_UserEntities_URL - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_UserEntities_Description, kn) { - currentKey = ffj_t_UserEntities_Description - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_UserEntitiesno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_UserEntities_Description: - goto handle_Description - - case ffj_t_UserEntities_URL: - goto handle_URL - - case ffj_t_UserEntitiesno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_Description: - - /* handler: uj.Description type=benchmark.UserEntityDescription kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = uj.Description.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_URL: - - /* handler: uj.URL type=benchmark.UserEntityURL kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = uj.URL.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *UserEntityDescription) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *UserEntityDescription) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"urls":`) - if mj.Urls != nil { - buf.WriteString(`[`) - for i, v := range mj.Urls { - if i != 0 { - buf.WriteString(`,`) - } - if v != nil { - fflib.WriteJsonString(buf, string(*v)) - } else { - buf.WriteString(`null`) - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_UserEntityDescriptionbase = iota - ffj_t_UserEntityDescriptionno_such_key - - ffj_t_UserEntityDescription_Urls -) - -var ffj_key_UserEntityDescription_Urls = []byte("urls") - -func (uj *UserEntityDescription) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *UserEntityDescription) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_UserEntityDescriptionbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_UserEntityDescriptionno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'u': - - if bytes.Equal(ffj_key_UserEntityDescription_Urls, kn) { - currentKey = ffj_t_UserEntityDescription_Urls - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.EqualFoldRight(ffj_key_UserEntityDescription_Urls, kn) { - currentKey = ffj_t_UserEntityDescription_Urls - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_UserEntityDescriptionno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_UserEntityDescription_Urls: - goto handle_Urls - - case ffj_t_UserEntityDescriptionno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_Urls: - - /* handler: uj.Urls type=[]*string kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Urls = nil - } else { - - uj.Urls = make([]*string, 0) - - wantVal := true - - for { - - var tmp_uj__Urls *string - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Urls type=*string kind=ptr quoted=false*/ - - { - - if tok == fflib.FFTok_null { - tmp_uj__Urls = nil - } else { - if tmp_uj__Urls == nil { - tmp_uj__Urls = new(string) - } - - /* handler: tmp_uj__Urls type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - tmp_uj__Urls = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - tmp_uj__Urls = &tval - - } - } - - } - } - - uj.Urls = append(uj.Urls, tmp_uj__Urls) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *UserEntityURL) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *UserEntityURL) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"urls":`) - if mj.Urls != nil { - buf.WriteString(`[`) - for i, v := range mj.Urls { - if i != 0 { - buf.WriteString(`,`) - } - - { - - err = v.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_UserEntityURLbase = iota - ffj_t_UserEntityURLno_such_key - - ffj_t_UserEntityURL_Urls -) - -var ffj_key_UserEntityURL_Urls = []byte("urls") - -func (uj *UserEntityURL) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *UserEntityURL) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_UserEntityURLbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_UserEntityURLno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'u': - - if bytes.Equal(ffj_key_UserEntityURL_Urls, kn) { - currentKey = ffj_t_UserEntityURL_Urls - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.EqualFoldRight(ffj_key_UserEntityURL_Urls, kn) { - currentKey = ffj_t_UserEntityURL_Urls - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_UserEntityURLno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_UserEntityURL_Urls: - goto handle_Urls - - case ffj_t_UserEntityURLno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_Urls: - - /* handler: uj.Urls type=[]benchmark.URL kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Urls = nil - } else { - - uj.Urls = make([]URL, 0) - - wantVal := true - - for { - - var tmp_uj__Urls URL - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Urls type=benchmark.URL kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = tmp_uj__Urls.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - uj.Urls = append(uj.Urls, tmp_uj__Urls) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} - -func (mj *XLStruct) MarshalJSON() ([]byte, error) { - var buf fflib.Buffer - if mj == nil { - buf.WriteString("null") - return buf.Bytes(), nil - } - err := mj.MarshalJSONBuf(&buf) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} -func (mj *XLStruct) MarshalJSONBuf(buf fflib.EncodingBuffer) error { - if mj == nil { - buf.WriteString("null") - return nil - } - var err error - var obj []byte - _ = obj - _ = err - buf.WriteString(`{"Data":`) - if mj.Data != nil { - buf.WriteString(`[`) - for i, v := range mj.Data { - if i != 0 { - buf.WriteString(`,`) - } - - { - - err = v.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte('}') - return nil -} - -const ( - ffj_t_XLStructbase = iota - ffj_t_XLStructno_such_key - - ffj_t_XLStruct_Data -) - -var ffj_key_XLStruct_Data = []byte("Data") - -func (uj *XLStruct) UnmarshalJSON(input []byte) error { - fs := fflib.NewFFLexer(input) - return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) -} - -func (uj *XLStruct) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { - var err error = nil - currentKey := ffj_t_XLStructbase - _ = currentKey - tok := fflib.FFTok_init - wantedTok := fflib.FFTok_init - -mainparse: - for { - tok = fs.Scan() - // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) - if tok == fflib.FFTok_error { - goto tokerror - } - - switch state { - - case fflib.FFParse_map_start: - if tok != fflib.FFTok_left_bracket { - wantedTok = fflib.FFTok_left_bracket - goto wrongtokenerror - } - state = fflib.FFParse_want_key - continue - - case fflib.FFParse_after_value: - if tok == fflib.FFTok_comma { - state = fflib.FFParse_want_key - } else if tok == fflib.FFTok_right_bracket { - goto done - } else { - wantedTok = fflib.FFTok_comma - goto wrongtokenerror - } - - case fflib.FFParse_want_key: - // json {} ended. goto exit. woo. - if tok == fflib.FFTok_right_bracket { - goto done - } - if tok != fflib.FFTok_string { - wantedTok = fflib.FFTok_string - goto wrongtokenerror - } - - kn := fs.Output.Bytes() - if len(kn) <= 0 { - // "" case. hrm. - currentKey = ffj_t_XLStructno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } else { - switch kn[0] { - - case 'D': - - if bytes.Equal(ffj_key_XLStruct_Data, kn) { - currentKey = ffj_t_XLStruct_Data - state = fflib.FFParse_want_colon - goto mainparse - } - - } - - if fflib.SimpleLetterEqualFold(ffj_key_XLStruct_Data, kn) { - currentKey = ffj_t_XLStruct_Data - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_XLStructno_such_key - state = fflib.FFParse_want_colon - goto mainparse - } - - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: - - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { - - case ffj_t_XLStruct_Data: - goto handle_Data - - case ffj_t_XLStructno_such_key: - err = fs.SkipField(tok) - if err != nil { - return fs.WrapErr(err) - } - state = fflib.FFParse_after_value - goto mainparse - } - } else { - goto wantedvalue - } - } - } - -handle_Data: - - /* handler: uj.Data type=[]benchmark.LargeStruct kind=slice quoted=false*/ - - { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - - if tok == fflib.FFTok_null { - uj.Data = nil - } else { - - uj.Data = make([]LargeStruct, 0) - - wantVal := true - - for { - - var tmp_uj__Data LargeStruct - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Data type=benchmark.LargeStruct kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - - state = fflib.FFParse_after_value - goto mainparse - } - - err = tmp_uj__Data.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } - - uj.Data = append(uj.Data, tmp_uj__Data) - wantVal = false - } - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) - } - panic("ffjson-generated: unreachable, please report bug.") -done: - return nil -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_var.go b/vendor/github.com/mailru/easyjson/benchmark/data_var.go deleted file mode 100644 index ea4202db..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/data_var.go +++ /dev/null @@ -1,350 +0,0 @@ -package benchmark - -var largeStructData = LargeStruct{ - SearchMetadata: SearchMetadata{ - CompletedIn: 0.035, - Count: 4, - MaxID: 250126199840518145, - MaxIDStr: "250126199840518145", - NextResults: "?max_id=249279667666817023&q=%23freebandnames&count=4&include_entities=1&result_type=mixed", - Query: "%23freebandnames", - RefreshURL: "?since_id=250126199840518145&q=%23freebandnames&result_type=mixed&include_entities=1", - SinceID: 24012619984051000, - SinceIDStr: "24012619984051000", - }, - Statuses: []Status{ - { - Contributors: nil, - Coordinates: nil, - CreatedAt: "Mon Sep 24 03:35:21 +0000 2012", - Entities: Entities{ - Hashtags: []Hashtag{{ - Indices: []int{20, 34}, - Text: "freebandnames"}, - }, - Urls: []*string{}, - UserMentions: []*string{}, - }, - Favorited: false, - Geo: nil, - ID: 250075927172759552, - IDStr: "250075927172759552", - InReplyToScreenName: nil, - InReplyToStatusID: nil, - InReplyToStatusIDStr: nil, - InReplyToUserID: nil, - InReplyToUserIDStr: nil, - Metadata: StatusMetadata{ - IsoLanguageCode: "en", - ResultType: "recent", - }, - Place: nil, - RetweetCount: 0, - Retweeted: false, - Source: "Twitter for Mac", - Text: "Aggressive Ponytail #freebandnames", - Truncated: false, - User: User{ - ContributorsEnabled: false, - CreatedAt: "Mon Apr 26 06:01:55 +0000 2010", - DefaultProfile: true, - DefaultProfileImage: false, - Description: "Born 330 Live 310", - Entities: UserEntities{ - Description: UserEntityDescription{ - Urls: []*string{}, - }, - URL: UserEntityURL{ - Urls: []URL{{ - ExpandedURL: nil, - Indices: []int{0, 0}, - URL: "", - }}, - }, - }, - FavouritesCount: 0, - FollowRequestSent: nil, - FollowersCount: 70, - Following: nil, - FriendsCount: 110, - GeoEnabled: true, - ID: 137238150, - IDStr: "137238150", - IsTranslator: false, - Lang: "en", - ListedCount: 2, - Location: "LA, CA", - Name: "Sean Cummings", - Notifications: nil, - ProfileBackgroundColor: "C0DEED", - ProfileBackgroundImageURL: "http://a0.twimg.com/images/themes/theme1/bg.png", - ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/images/themes/theme1/bg.png", - ProfileBackgroundTile: false, - ProfileImageURL: "http://a0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg", - ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg", - ProfileLinkColor: "0084B4", - ProfileSidebarBorderColor: "C0DEED", - ProfileSidebarFillColor: "DDEEF6", - ProfileTextColor: "333333", - ProfileUseBackgroundImage: true, - Protected: false, - ScreenName: "sean_cummings", - ShowAllInlineMedia: false, - StatusesCount: 579, - TimeZone: "Pacific Time (US & Canada)", - URL: nil, - UtcOffset: -28800, - Verified: false, - }, - }, - { - Contributors: nil, - Coordinates: nil, - CreatedAt: "Fri Sep 21 23:40:54 +0000 2012", - Entities: Entities{ - Hashtags: []Hashtag{{ - Indices: []int{20, 34}, - Text: "FreeBandNames", - }}, - Urls: []*string{}, - UserMentions: []*string{}, - }, - Favorited: false, - Geo: nil, - ID: 249292149810667520, - IDStr: "249292149810667520", - InReplyToScreenName: nil, - InReplyToStatusID: nil, - InReplyToStatusIDStr: nil, - InReplyToUserID: nil, - InReplyToUserIDStr: nil, - Metadata: StatusMetadata{ - IsoLanguageCode: "pl", - ResultType: "recent", - }, - Place: nil, - RetweetCount: 0, - Retweeted: false, - Source: "web", - Text: "Thee Namaste Nerdz. #FreeBandNames", - Truncated: false, - User: User{ - ContributorsEnabled: false, - CreatedAt: "Tue Apr 07 19:05:07 +0000 2009", - DefaultProfile: false, - DefaultProfileImage: false, - Description: "You will come to Durham, North Carolina. I will sell you some records then, here in Durham, North Carolina. Fun will happen.", - Entities: UserEntities{ - Description: UserEntityDescription{Urls: []*string{}}, - URL: UserEntityURL{ - Urls: []URL{{ - ExpandedURL: nil, - Indices: []int{0, 32}, - URL: "http://bullcityrecords.com/wnng/"}}, - }, - }, - FavouritesCount: 8, - FollowRequestSent: nil, - FollowersCount: 2052, - Following: nil, - FriendsCount: 348, - GeoEnabled: false, - ID: 29516238, - IDStr: "29516238", - IsTranslator: false, - Lang: "en", - ListedCount: 118, - Location: "Durham, NC", - Name: "Chaz Martenstein", - Notifications: nil, - ProfileBackgroundColor: "9AE4E8", - ProfileBackgroundImageURL: "http://a0.twimg.com/profile_background_images/9423277/background_tile.bmp", - ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/profile_background_images/9423277/background_tile.bmp", - ProfileBackgroundTile: true, - ProfileImageURL: "http://a0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg", - ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg", - ProfileLinkColor: "0084B4", - ProfileSidebarBorderColor: "BDDCAD", - ProfileSidebarFillColor: "DDFFCC", - ProfileTextColor: "333333", - ProfileUseBackgroundImage: true, - Protected: false, - ScreenName: "bullcityrecords", - ShowAllInlineMedia: true, - StatusesCount: 7579, - TimeZone: "Eastern Time (US & Canada)", - URL: nil, - UtcOffset: -18000, - Verified: false, - }, - }, - Status{ - Contributors: nil, - Coordinates: nil, - CreatedAt: "Fri Sep 21 23:30:20 +0000 2012", - Entities: Entities{ - Hashtags: []Hashtag{{ - Indices: []int{29, 43}, - Text: "freebandnames", - }}, - Urls: []*string{}, - UserMentions: []*string{}, - }, - Favorited: false, - Geo: nil, - ID: 249289491129438208, - IDStr: "249289491129438208", - InReplyToScreenName: nil, - InReplyToStatusID: nil, - InReplyToStatusIDStr: nil, - InReplyToUserID: nil, - InReplyToUserIDStr: nil, - Metadata: StatusMetadata{ - IsoLanguageCode: "en", - ResultType: "recent", - }, - Place: nil, - RetweetCount: 0, - Retweeted: false, - Source: "web", - Text: "Mexican Heaven, Mexican Hell #freebandnames", - Truncated: false, - User: User{ - ContributorsEnabled: false, - CreatedAt: "Tue Sep 01 21:21:35 +0000 2009", - DefaultProfile: false, - DefaultProfileImage: false, - Description: "Science Fiction Writer, sort of. Likes Superheroes, Mole People, Alt. Timelines.", - Entities: UserEntities{ - Description: UserEntityDescription{ - Urls: nil, - }, - URL: UserEntityURL{ - Urls: []URL{{ - ExpandedURL: nil, - Indices: []int{0, 0}, - URL: "", - }}, - }, - }, - FavouritesCount: 19, - FollowRequestSent: nil, - FollowersCount: 63, - Following: nil, - FriendsCount: 63, - GeoEnabled: false, - ID: 70789458, - IDStr: "70789458", - IsTranslator: false, - Lang: "en", - ListedCount: 1, - Location: "Kingston New York", - Name: "Thomas John Wakeman", - Notifications: nil, - ProfileBackgroundColor: "352726", - ProfileBackgroundImageURL: "http://a0.twimg.com/images/themes/theme5/bg.gif", - ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/images/themes/theme5/bg.gif", - ProfileBackgroundTile: false, - ProfileImageURL: "http://a0.twimg.com/profile_images/2219333930/Froggystyle_normal.png", - ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/2219333930/Froggystyle_normal.png", - ProfileLinkColor: "D02B55", - ProfileSidebarBorderColor: "829D5E", - ProfileSidebarFillColor: "99CC33", - ProfileTextColor: "3E4415", - ProfileUseBackgroundImage: true, - Protected: false, - ScreenName: "MonkiesFist", - ShowAllInlineMedia: false, - StatusesCount: 1048, - TimeZone: "Eastern Time (US & Canada)", - URL: nil, - UtcOffset: -18000, - Verified: false, - }, - }, - Status{ - Contributors: nil, - Coordinates: nil, - CreatedAt: "Fri Sep 21 22:51:18 +0000 2012", - Entities: Entities{ - Hashtags: []Hashtag{{ - Indices: []int{20, 34}, - Text: "freebandnames", - }}, - Urls: []*string{}, - UserMentions: []*string{}, - }, - Favorited: false, - Geo: nil, - ID: 249279667666817024, - IDStr: "249279667666817024", - InReplyToScreenName: nil, - InReplyToStatusID: nil, - InReplyToStatusIDStr: nil, - InReplyToUserID: nil, - InReplyToUserIDStr: nil, - Metadata: StatusMetadata{ - IsoLanguageCode: "en", - ResultType: "recent", - }, - Place: nil, - RetweetCount: 0, - Retweeted: false, - Source: "Twitter for iPhone", - Text: "The Foolish Mortals #freebandnames", - Truncated: false, - User: User{ - ContributorsEnabled: false, - CreatedAt: "Mon May 04 00:05:00 +0000 2009", - DefaultProfile: false, - DefaultProfileImage: false, - Description: "Cartoonist, Illustrator, and T-Shirt connoisseur", - Entities: UserEntities{ - Description: UserEntityDescription{ - Urls: []*string{}, - }, - URL: UserEntityURL{ - Urls: []URL{{ - ExpandedURL: nil, - Indices: []int{0, 24}, - URL: "http://www.omnitarian.me", - }}, - }, - }, - FavouritesCount: 647, - FollowRequestSent: nil, - FollowersCount: 608, - Following: nil, - FriendsCount: 249, - GeoEnabled: false, - ID: 37539828, - IDStr: "37539828", - IsTranslator: false, - Lang: "en", - ListedCount: 52, - Location: "Wisconsin, USA", - Name: "Marty Elmer", - Notifications: nil, - ProfileBackgroundColor: "EEE3C4", - ProfileBackgroundImageURL: "http://a0.twimg.com/profile_background_images/106455659/rect6056-9.png", - ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/profile_background_images/106455659/rect6056-9.png", - ProfileBackgroundTile: true, - ProfileImageURL: "http://a0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png", - ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png", - ProfileLinkColor: "3B2A26", - ProfileSidebarBorderColor: "615A44", - ProfileSidebarFillColor: "BFAC83", - ProfileTextColor: "000000", - ProfileUseBackgroundImage: true, - Protected: false, - ScreenName: "Omnitarian", - ShowAllInlineMedia: true, - StatusesCount: 3575, - TimeZone: "Central Time (US & Canada)", - URL: nil, - UtcOffset: -21600, - Verified: false, - }, - }, - }, -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/default_test.go b/vendor/github.com/mailru/easyjson/benchmark/default_test.go deleted file mode 100644 index b647bef2..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/default_test.go +++ /dev/null @@ -1,118 +0,0 @@ -// +build !use_easyjson,!use_ffjson,!use_codec - -package benchmark - -import ( - "encoding/json" - "testing" -) - -func BenchmarkStd_Unmarshal_M(b *testing.B) { - b.SetBytes(int64(len(largeStructText))) - for i := 0; i < b.N; i++ { - var s LargeStruct - err := json.Unmarshal(largeStructText, &s) - if err != nil { - b.Error(err) - } - } -} - -func BenchmarkStd_Unmarshal_S(b *testing.B) { - for i := 0; i < b.N; i++ { - var s Entities - err := json.Unmarshal(smallStructText, &s) - if err != nil { - b.Error(err) - } - } - b.SetBytes(int64(len(smallStructText))) -} - -func BenchmarkStd_Marshal_M(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := json.Marshal(&largeStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkStd_Marshal_L(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := json.Marshal(&xlStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkStd_Marshal_M_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := json.Marshal(&largeStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} - -func BenchmarkStd_Marshal_L_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := json.Marshal(&xlStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} - -func BenchmarkStd_Marshal_S(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := json.Marshal(&smallStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkStd_Marshal_S_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := json.Marshal(&smallStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} - -func BenchmarkStd_Marshal_M_ToWriter(b *testing.B) { - enc := json.NewEncoder(&DummyWriter{}) - for i := 0; i < b.N; i++ { - err := enc.Encode(&largeStructData) - if err != nil { - b.Error(err) - } - } -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go b/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go deleted file mode 100644 index 3d928ca7..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package benchmark - -import ( - "testing" -) - -type DummyWriter struct{} - -func (w DummyWriter) Write(data []byte) (int, error) { return len(data), nil } - -func TestToSuppressNoTestsWarning(t *testing.T) {} diff --git a/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go b/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go deleted file mode 100644 index 16b670b2..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// +build use_easyjson - -package benchmark - -import ( - "testing" - - "github.com/mailru/easyjson" - "github.com/mailru/easyjson/jwriter" -) - -func BenchmarkEJ_Unmarshal_M(b *testing.B) { - b.SetBytes(int64(len(largeStructText))) - for i := 0; i < b.N; i++ { - var s LargeStruct - err := s.UnmarshalJSON(largeStructText) - if err != nil { - b.Error(err) - } - } -} - -func BenchmarkEJ_Unmarshal_S(b *testing.B) { - b.SetBytes(int64(len(smallStructText))) - - for i := 0; i < b.N; i++ { - var s Entities - err := s.UnmarshalJSON(smallStructText) - if err != nil { - b.Error(err) - } - } -} - -func BenchmarkEJ_Marshal_M(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := easyjson.Marshal(&largeStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkEJ_Marshal_L(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := easyjson.Marshal(&xlStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkEJ_Marshal_L_ToWriter(b *testing.B) { - var l int64 - out := &DummyWriter{} - for i := 0; i < b.N; i++ { - w := jwriter.Writer{} - xlStructData.MarshalEasyJSON(&w) - if w.Error != nil { - b.Error(w.Error) - } - - l = int64(w.Size()) - w.DumpTo(out) - } - b.SetBytes(l) - -} -func BenchmarkEJ_Marshal_M_Parallel(b *testing.B) { - b.SetBytes(int64(len(largeStructText))) - - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - _, err := largeStructData.MarshalJSON() - if err != nil { - b.Error(err) - } - } - }) -} - -func BenchmarkEJ_Marshal_M_ToWriter(b *testing.B) { - var l int64 - out := &DummyWriter{} - for i := 0; i < b.N; i++ { - w := jwriter.Writer{} - largeStructData.MarshalEasyJSON(&w) - if w.Error != nil { - b.Error(w.Error) - } - - l = int64(w.Size()) - w.DumpTo(out) - } - b.SetBytes(l) - -} -func BenchmarkEJ_Marshal_M_ToWriter_Parallel(b *testing.B) { - out := &DummyWriter{} - - b.RunParallel(func(pb *testing.PB) { - var l int64 - for pb.Next() { - w := jwriter.Writer{} - largeStructData.MarshalEasyJSON(&w) - if w.Error != nil { - b.Error(w.Error) - } - - l = int64(w.Size()) - w.DumpTo(out) - } - if l > 0 { - b.SetBytes(l) - } - }) - -} - -func BenchmarkEJ_Marshal_L_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := xlStructData.MarshalJSON() - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} - -func BenchmarkEJ_Marshal_L_ToWriter_Parallel(b *testing.B) { - out := &DummyWriter{} - b.RunParallel(func(pb *testing.PB) { - var l int64 - for pb.Next() { - w := jwriter.Writer{} - - xlStructData.MarshalEasyJSON(&w) - if w.Error != nil { - b.Error(w.Error) - } - l = int64(w.Size()) - w.DumpTo(out) - } - if l > 0 { - b.SetBytes(l) - } - }) -} - -func BenchmarkEJ_Marshal_S(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := smallStructData.MarshalJSON() - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkEJ_Marshal_S_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := smallStructData.MarshalJSON() - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/example.json b/vendor/github.com/mailru/easyjson/benchmark/example.json deleted file mode 100644 index 2405022c..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/example.json +++ /dev/null @@ -1,415 +0,0 @@ -{ - "statuses": [ - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Mon Sep 24 03:35:21 +0000 2012", - "id_str": "250075927172759552", - "entities": { - "urls": [ - - ], - "hashtags": [ - { - "text": "freebandnames", - "indices": [ - 20, - 34 - ] - } - ], - "user_mentions": [ - - ] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "Aggressive Ponytail #freebandnames", - "metadata": { - "iso_language_code": "en", - "result_type": "recent" - }, - "retweet_count": 0, - "in_reply_to_status_id_str": null, - "id": 250075927172759552, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "DDEEF6", - "profile_sidebar_border_color": "C0DEED", - "profile_background_tile": false, - "name": "Sean Cummings", - "profile_image_url": "http://a0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg", - "created_at": "Mon Apr 26 06:01:55 +0000 2010", - "location": "LA, CA", - "follow_request_sent": null, - "profile_link_color": "0084B4", - "is_translator": false, - "id_str": "137238150", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "", - "indices": [ - 0, - 0 - ] - } - ] - }, - "description": { - "urls": [ - - ] - } - }, - "default_profile": true, - "contributors_enabled": false, - "favourites_count": 0, - "url": null, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg", - "utc_offset": -28800, - "id": 137238150, - "profile_use_background_image": true, - "listed_count": 2, - "profile_text_color": "333333", - "lang": "en", - "followers_count": 70, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png", - "profile_background_color": "C0DEED", - "verified": false, - "geo_enabled": true, - "time_zone": "Pacific Time (US & Canada)", - "description": "Born 330 Live 310", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png", - "statuses_count": 579, - "friends_count": 110, - "following": null, - "show_all_inline_media": false, - "screen_name": "sean_cummings" - }, - "in_reply_to_screen_name": null, - "source": "Twitter for Mac", - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Fri Sep 21 23:40:54 +0000 2012", - "id_str": "249292149810667520", - "entities": { - "urls": [ - - ], - "hashtags": [ - { - "text": "FreeBandNames", - "indices": [ - 20, - 34 - ] - } - ], - "user_mentions": [ - - ] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "Thee Namaste Nerdz. #FreeBandNames", - "metadata": { - "iso_language_code": "pl", - "result_type": "recent" - }, - "retweet_count": 0, - "in_reply_to_status_id_str": null, - "id": 249292149810667520, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "DDFFCC", - "profile_sidebar_border_color": "BDDCAD", - "profile_background_tile": true, - "name": "Chaz Martenstein", - "profile_image_url": "http://a0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg", - "created_at": "Tue Apr 07 19:05:07 +0000 2009", - "location": "Durham, NC", - "follow_request_sent": null, - "profile_link_color": "0084B4", - "is_translator": false, - "id_str": "29516238", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://bullcityrecords.com/wnng/", - "indices": [ - 0, - 32 - ] - } - ] - }, - "description": { - "urls": [ - - ] - } - }, - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 8, - "url": "http://bullcityrecords.com/wnng/", - "profile_image_url_https": "https://si0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg", - "utc_offset": -18000, - "id": 29516238, - "profile_use_background_image": true, - "listed_count": 118, - "profile_text_color": "333333", - "lang": "en", - "followers_count": 2052, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/9423277/background_tile.bmp", - "profile_background_color": "9AE4E8", - "verified": false, - "geo_enabled": false, - "time_zone": "Eastern Time (US & Canada)", - "description": "You will come to Durham, North Carolina. I will sell you some records then, here in Durham, North Carolina. Fun will happen.", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/9423277/background_tile.bmp", - "statuses_count": 7579, - "friends_count": 348, - "following": null, - "show_all_inline_media": true, - "screen_name": "bullcityrecords" - }, - "in_reply_to_screen_name": null, - "source": "web", - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Fri Sep 21 23:30:20 +0000 2012", - "id_str": "249289491129438208", - "entities": { - "urls": [ - - ], - "hashtags": [ - { - "text": "freebandnames", - "indices": [ - 29, - 43 - ] - } - ], - "user_mentions": [ - - ] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "Mexican Heaven, Mexican Hell #freebandnames", - "metadata": { - "iso_language_code": "en", - "result_type": "recent" - }, - "retweet_count": 0, - "in_reply_to_status_id_str": null, - "id": 249289491129438208, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "99CC33", - "profile_sidebar_border_color": "829D5E", - "profile_background_tile": false, - "name": "Thomas John Wakeman", - "profile_image_url": "http://a0.twimg.com/profile_images/2219333930/Froggystyle_normal.png", - "created_at": "Tue Sep 01 21:21:35 +0000 2009", - "location": "Kingston New York", - "follow_request_sent": null, - "profile_link_color": "D02B55", - "is_translator": false, - "id_str": "70789458", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "", - "indices": [ - 0, - 0 - ] - } - ] - }, - "description": { - "urls": [ - - ] - } - }, - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 19, - "url": null, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2219333930/Froggystyle_normal.png", - "utc_offset": -18000, - "id": 70789458, - "profile_use_background_image": true, - "listed_count": 1, - "profile_text_color": "3E4415", - "lang": "en", - "followers_count": 63, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme5/bg.gif", - "profile_background_color": "352726", - "verified": false, - "geo_enabled": false, - "time_zone": "Eastern Time (US & Canada)", - "description": "Science Fiction Writer, sort of. Likes Superheroes, Mole People, Alt. Timelines.", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme5/bg.gif", - "statuses_count": 1048, - "friends_count": 63, - "following": null, - "show_all_inline_media": false, - "screen_name": "MonkiesFist" - }, - "in_reply_to_screen_name": null, - "source": "web", - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Fri Sep 21 22:51:18 +0000 2012", - "id_str": "249279667666817024", - "entities": { - "urls": [ - - ], - "hashtags": [ - { - "text": "freebandnames", - "indices": [ - 20, - 34 - ] - } - ], - "user_mentions": [ - - ] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "The Foolish Mortals #freebandnames", - "metadata": { - "iso_language_code": "en", - "result_type": "recent" - }, - "retweet_count": 0, - "in_reply_to_status_id_str": null, - "id": 249279667666817024, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "BFAC83", - "profile_sidebar_border_color": "615A44", - "profile_background_tile": true, - "name": "Marty Elmer", - "profile_image_url": "http://a0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png", - "created_at": "Mon May 04 00:05:00 +0000 2009", - "location": "Wisconsin, USA", - "follow_request_sent": null, - "profile_link_color": "3B2A26", - "is_translator": false, - "id_str": "37539828", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://www.omnitarian.me", - "indices": [ - 0, - 24 - ] - } - ] - }, - "description": { - "urls": [ - - ] - } - }, - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 647, - "url": "http://www.omnitarian.me", - "profile_image_url_https": "https://si0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png", - "utc_offset": -21600, - "id": 37539828, - "profile_use_background_image": true, - "listed_count": 52, - "profile_text_color": "000000", - "lang": "en", - "followers_count": 608, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/106455659/rect6056-9.png", - "profile_background_color": "EEE3C4", - "verified": false, - "geo_enabled": false, - "time_zone": "Central Time (US & Canada)", - "description": "Cartoonist, Illustrator, and T-Shirt connoisseur", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/106455659/rect6056-9.png", - "statuses_count": 3575, - "friends_count": 249, - "following": null, - "show_all_inline_media": true, - "screen_name": "Omnitarian" - }, - "in_reply_to_screen_name": null, - "source": "Twitter for iPhone", - "in_reply_to_status_id": null - } - ], - "search_metadata": { - "max_id": 250126199840518145, - "since_id": 24012619984051000, - "refresh_url": "?since_id=250126199840518145&q=%23freebandnames&result_type=mixed&include_entities=1", - "next_results": "?max_id=249279667666817023&q=%23freebandnames&count=4&include_entities=1&result_type=mixed", - "count": 4, - "completed_in": 0.035, - "since_id_str": "24012619984051000", - "query": "%23freebandnames", - "max_id_str": "250126199840518145" - } -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go b/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go deleted file mode 100644 index 03671827..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go +++ /dev/null @@ -1,190 +0,0 @@ -// +build use_ffjson - -package benchmark - -import ( - "testing" - - "github.com/pquerna/ffjson/ffjson" -) - -func BenchmarkFF_Unmarshal_M(b *testing.B) { - b.SetBytes(int64(len(largeStructText))) - for i := 0; i < b.N; i++ { - var s LargeStruct - err := ffjson.UnmarshalFast(largeStructText, &s) - if err != nil { - b.Error(err) - } - } -} - -func BenchmarkFF_Unmarshal_S(b *testing.B) { - for i := 0; i < b.N; i++ { - var s Entities - err := ffjson.UnmarshalFast(smallStructText, &s) - if err != nil { - b.Error(err) - } - } - b.SetBytes(int64(len(smallStructText))) -} - -func BenchmarkFF_Marshal_M(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := ffjson.MarshalFast(&largeStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_S(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := ffjson.MarshalFast(&smallStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_M_Pool(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := ffjson.MarshalFast(&largeStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - ffjson.Pool(data) - } - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_L(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := ffjson.MarshalFast(&xlStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_L_Pool(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := ffjson.MarshalFast(&xlStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - ffjson.Pool(data) - } - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_L_Pool_Parallel(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := ffjson.MarshalFast(&xlStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - ffjson.Pool(data) - } - b.SetBytes(l) -} -func BenchmarkFF_Marshal_M_Pool_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := ffjson.MarshalFast(&largeStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - ffjson.Pool(data) - } - }) - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_S_Pool(b *testing.B) { - var l int64 - for i := 0; i < b.N; i++ { - data, err := ffjson.MarshalFast(&smallStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - ffjson.Pool(data) - } - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_S_Pool_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := ffjson.MarshalFast(&smallStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - ffjson.Pool(data) - } - }) - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_S_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := ffjson.MarshalFast(&smallStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_M_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := ffjson.MarshalFast(&largeStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} - -func BenchmarkFF_Marshal_L_Parallel(b *testing.B) { - var l int64 - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - data, err := ffjson.MarshalFast(&xlStructData) - if err != nil { - b.Error(err) - } - l = int64(len(data)) - } - }) - b.SetBytes(l) -} diff --git a/vendor/github.com/mailru/easyjson/benchmark/ujson.sh b/vendor/github.com/mailru/easyjson/benchmark/ujson.sh deleted file mode 100755 index 378e7df4..00000000 --- a/vendor/github.com/mailru/easyjson/benchmark/ujson.sh +++ /dev/null @@ -1,7 +0,0 @@ -#/bin/bash - -echo -n "Python ujson module, DECODE: " -python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read()" 'ujson.loads(data)' - -echo -n "Python ujson module, ENCODE: " -python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read(); obj = ujson.loads(data)" 'ujson.dumps(obj)' diff --git a/vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go b/vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go deleted file mode 100644 index 04aaaad5..00000000 --- a/vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go +++ /dev/null @@ -1,180 +0,0 @@ -// Package bootstrap implements the bootstrapping logic: generation of a .go file to -// launch the actual generator and launching the generator itself. -// -// The package may be preferred to a command-line utility if generating the serializers -// from golang code is required. -package bootstrap - -import ( - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" -) - -const genPackage = "github.com/mailru/easyjson/gen" -const pkgWriter = "github.com/mailru/easyjson/jwriter" -const pkgLexer = "github.com/mailru/easyjson/jlexer" - -type Generator struct { - PkgPath, PkgName string - Types []string - - NoStdMarshalers bool - SnakeCase bool - OmitEmpty bool - - OutName string - BuildTags string - - StubsOnly bool - LeaveTemps bool - NoFormat bool -} - -// writeStub outputs an initial stubs for marshalers/unmarshalers so that the package -// using marshalers/unmarshales compiles correctly for boostrapping code. -func (g *Generator) writeStub() error { - f, err := os.Create(g.OutName) - if err != nil { - return err - } - defer f.Close() - - if g.BuildTags != "" { - fmt.Fprintln(f, "// +build ", g.BuildTags) - fmt.Fprintln(f) - } - fmt.Fprintln(f, "// TEMPORARY AUTOGENERATED FILE: easyjson stub code to make the package") - fmt.Fprintln(f, "// compilable during generation.") - fmt.Fprintln(f) - fmt.Fprintln(f, "package ", g.PkgName) - - if len(g.Types) > 0 { - fmt.Fprintln(f) - fmt.Fprintln(f, "import (") - fmt.Fprintln(f, ` "`+pkgWriter+`"`) - fmt.Fprintln(f, ` "`+pkgLexer+`"`) - fmt.Fprintln(f, ")") - } - - for _, t := range g.Types { - fmt.Fprintln(f) - if !g.NoStdMarshalers { - fmt.Fprintln(f, "func (", t, ") MarshalJSON() ([]byte, error) { return nil, nil }") - fmt.Fprintln(f, "func (*", t, ") UnmarshalJSON([]byte) error { return nil }") - } - - fmt.Fprintln(f, "func (", t, ") MarshalEasyJSON(w *jwriter.Writer) {}") - fmt.Fprintln(f, "func (*", t, ") UnmarshalEasyJSON(l *jlexer.Lexer) {}") - fmt.Fprintln(f) - fmt.Fprintln(f, "type EasyJSON_exporter_"+t+" *"+t) - } - return nil -} - -// writeMain creates a .go file that launches the generator if 'go run'. -func (g *Generator) writeMain() (path string, err error) { - f, err := ioutil.TempFile(filepath.Dir(g.OutName), "easyjson-bootstrap") - if err != nil { - return "", err - } - - fmt.Fprintln(f, "// +build ignore") - fmt.Fprintln(f) - fmt.Fprintln(f, "// TEMPORARY AUTOGENERATED FILE: easyjson bootstapping code to launch") - fmt.Fprintln(f, "// the actual generator.") - fmt.Fprintln(f) - fmt.Fprintln(f, "package main") - fmt.Fprintln(f) - fmt.Fprintln(f, "import (") - fmt.Fprintln(f, ` "fmt"`) - fmt.Fprintln(f, ` "os"`) - fmt.Fprintln(f) - fmt.Fprintf(f, " %q\n", genPackage) - if len(g.Types) > 0 { - fmt.Fprintln(f) - fmt.Fprintf(f, " pkg %q\n", g.PkgPath) - } - fmt.Fprintln(f, ")") - fmt.Fprintln(f) - fmt.Fprintln(f, "func main() {") - fmt.Fprintf(f, " g := gen.NewGenerator(%q)\n", filepath.Base(g.OutName)) - fmt.Fprintf(f, " g.SetPkg(%q, %q)\n", g.PkgName, g.PkgPath) - if g.BuildTags != "" { - fmt.Fprintf(f, " g.SetBuildTags(%q)\n", g.BuildTags) - } - if g.SnakeCase { - fmt.Fprintln(f, " g.UseSnakeCase()") - } - if g.OmitEmpty { - fmt.Fprintln(f, " g.OmitEmpty()") - } - if g.NoStdMarshalers { - fmt.Fprintln(f, " g.NoStdMarshalers()") - } - for _, v := range g.Types { - fmt.Fprintln(f, " g.Add(pkg.EasyJSON_exporter_"+v+"(nil))") - } - - fmt.Fprintln(f, " if err := g.Run(os.Stdout); err != nil {") - fmt.Fprintln(f, " fmt.Fprintln(os.Stderr, err)") - fmt.Fprintln(f, " os.Exit(1)") - fmt.Fprintln(f, " }") - fmt.Fprintln(f, "}") - - src := f.Name() - if err := f.Close(); err != nil { - return src, err - } - - dest := src + ".go" - return dest, os.Rename(src, dest) -} - -func (g *Generator) Run() error { - if err := g.writeStub(); err != nil { - return err - } - if g.StubsOnly { - return nil - } - - path, err := g.writeMain() - if err != nil { - return err - } - if !g.LeaveTemps { - defer os.Remove(path) - } - - f, err := os.Create(g.OutName + ".tmp") - if err != nil { - return err - } - if !g.LeaveTemps { - defer os.Remove(f.Name()) // will not remove after rename - } - - cmd := exec.Command("go", "run", "-tags", g.BuildTags, path) - cmd.Stdout = f - cmd.Stderr = os.Stderr - if err = cmd.Run(); err != nil { - return err - } - - f.Close() - - if !g.NoFormat { - cmd = exec.Command("gofmt", "-w", f.Name()) - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - - if err = cmd.Run(); err != nil { - return err - } - } - - return os.Rename(f.Name(), g.OutName) -} diff --git a/vendor/github.com/mailru/easyjson/buffer/pool_test.go b/vendor/github.com/mailru/easyjson/buffer/pool_test.go deleted file mode 100644 index 254ca6fe..00000000 --- a/vendor/github.com/mailru/easyjson/buffer/pool_test.go +++ /dev/null @@ -1,79 +0,0 @@ -package buffer - -import ( - "bytes" - "testing" -) - -func TestAppendByte(t *testing.T) { - var b Buffer - var want []byte - - for i := 0; i < 1000; i++ { - b.AppendByte(1) - b.AppendByte(2) - want = append(want, 1, 2) - } - - got := b.BuildBytes() - if !bytes.Equal(got, want) { - t.Errorf("BuildBytes() = %v; want %v", got, want) - } -} - -func TestAppendBytes(t *testing.T) { - var b Buffer - var want []byte - - for i := 0; i < 1000; i++ { - b.AppendBytes([]byte{1, 2}) - want = append(want, 1, 2) - } - - got := b.BuildBytes() - if !bytes.Equal(got, want) { - t.Errorf("BuildBytes() = %v; want %v", got, want) - } -} - -func TestAppendString(t *testing.T) { - var b Buffer - var want []byte - - s := "test" - for i := 0; i < 1000; i++ { - b.AppendBytes([]byte(s)) - want = append(want, s...) - } - - got := b.BuildBytes() - if !bytes.Equal(got, want) { - t.Errorf("BuildBytes() = %v; want %v", got, want) - } -} - -func TestDumpTo(t *testing.T) { - var b Buffer - var want []byte - - s := "test" - for i := 0; i < 1000; i++ { - b.AppendBytes([]byte(s)) - want = append(want, s...) - } - - out := &bytes.Buffer{} - n, err := b.DumpTo(out) - if err != nil { - t.Errorf("DumpTo() error: %v", err) - } - - got := out.Bytes() - if !bytes.Equal(got, want) { - t.Errorf("DumpTo(): got %v; want %v", got, want) - } - - if n != len(want) { - t.Errorf("DumpTo() = %v; want %v", n, len(want)) - } -} diff --git a/vendor/github.com/mailru/easyjson/easyjson/main.go b/vendor/github.com/mailru/easyjson/easyjson/main.go deleted file mode 100644 index 8ae9223b..00000000 --- a/vendor/github.com/mailru/easyjson/easyjson/main.go +++ /dev/null @@ -1,83 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "os" - "strings" - - "github.com/mailru/easyjson/bootstrap" - // Reference the gen package to be friendly to vendoring tools, - // as it is an indirect dependency. - // (The temporary bootstrapping code uses it.) - _ "github.com/mailru/easyjson/gen" - "github.com/mailru/easyjson/parser" -) - -var buildTags = flag.String("build_tags", "", "build tags to add to generated file") -var snakeCase = flag.Bool("snake_case", false, "use snake_case names instead of CamelCase by default") -var noStdMarshalers = flag.Bool("no_std_marshalers", false, "don't generate MarshalJSON/UnmarshalJSON methods") -var omitEmpty = flag.Bool("omit_empty", false, "omit empty fields by default") -var allStructs = flag.Bool("all", false, "generate un-/marshallers for all structs in a file") -var leaveTemps = flag.Bool("leave_temps", false, "do not delete temporary files") -var stubs = flag.Bool("stubs", false, "only generate stubs for marshallers/unmarshallers methods") -var noformat = flag.Bool("noformat", false, "do not run 'gofmt -w' on output file") -var specifiedName = flag.String("output_filename", "", "specify the filename of the output") - -func generate(fname string) (err error) { - p := parser.Parser{AllStructs: *allStructs} - if err := p.Parse(fname); err != nil { - return fmt.Errorf("Error parsing %v: %v", fname, err) - } - - var outName string - if s := strings.TrimSuffix(fname, ".go"); s == fname { - return fmt.Errorf("Filename must end in '.go'") - } else { - outName = s + "_easyjson.go" - } - - if *specifiedName != "" { - outName = *specifiedName - } - - g := bootstrap.Generator{ - BuildTags: *buildTags, - PkgPath: p.PkgPath, - PkgName: p.PkgName, - Types: p.StructNames, - SnakeCase: *snakeCase, - NoStdMarshalers: *noStdMarshalers, - OmitEmpty: *omitEmpty, - LeaveTemps: *leaveTemps, - OutName: outName, - StubsOnly: *stubs, - NoFormat: *noformat, - } - - if err := g.Run(); err != nil { - return fmt.Errorf("Bootstrap failed: %v", err) - } - return nil -} - -func main() { - flag.Parse() - - files := flag.Args() - - gofile := os.Getenv("GOFILE") - if len(files) == 0 && gofile != "" { - files = []string{gofile} - } else if len(files) == 0 { - flag.Usage() - os.Exit(1) - } - - for _, fname := range files { - if err := generate(fname); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - } -} diff --git a/vendor/github.com/mailru/easyjson/gen/decoder.go b/vendor/github.com/mailru/easyjson/gen/decoder.go deleted file mode 100644 index dd1187f6..00000000 --- a/vendor/github.com/mailru/easyjson/gen/decoder.go +++ /dev/null @@ -1,387 +0,0 @@ -package gen - -import ( - "encoding/json" - "fmt" - "reflect" - "strings" - "unicode" - - "github.com/mailru/easyjson" -) - -// Target this byte size for initial slice allocation to reduce garbage collection. -const minSliceBytes = 64 - -func (g *Generator) getDecoderName(t reflect.Type) string { - return g.functionName("decode", t) -} - -var primitiveDecoders = map[reflect.Kind]string{ - reflect.String: "in.String()", - reflect.Bool: "in.Bool()", - reflect.Int: "in.Int()", - reflect.Int8: "in.Int8()", - reflect.Int16: "in.Int16()", - reflect.Int32: "in.Int32()", - reflect.Int64: "in.Int64()", - reflect.Uint: "in.Uint()", - reflect.Uint8: "in.Uint8()", - reflect.Uint16: "in.Uint16()", - reflect.Uint32: "in.Uint32()", - reflect.Uint64: "in.Uint64()", - reflect.Float32: "in.Float32()", - reflect.Float64: "in.Float64()", -} - -var primitiveStringDecoders = map[reflect.Kind]string{ - reflect.Int: "in.IntStr()", - reflect.Int8: "in.Int8Str()", - reflect.Int16: "in.Int16Str()", - reflect.Int32: "in.Int32Str()", - reflect.Int64: "in.Int64Str()", - reflect.Uint: "in.UintStr()", - reflect.Uint8: "in.Uint8Str()", - reflect.Uint16: "in.Uint16Str()", - reflect.Uint32: "in.Uint32Str()", - reflect.Uint64: "in.Uint64Str()", -} - -// genTypeDecoder generates decoding code for the type t, but uses unmarshaler interface if implemented by t. -func (g *Generator) genTypeDecoder(t reflect.Type, out string, tags fieldTags, indent int) error { - ws := strings.Repeat(" ", indent) - - unmarshalerIface := reflect.TypeOf((*easyjson.Unmarshaler)(nil)).Elem() - if reflect.PtrTo(t).Implements(unmarshalerIface) { - fmt.Fprintln(g.out, ws+"("+out+").UnmarshalEasyJSON(in)") - return nil - } - - unmarshalerIface = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() - if reflect.PtrTo(t).Implements(unmarshalerIface) { - fmt.Fprintln(g.out, ws+"if data := in.Raw(); in.Ok() {") - fmt.Fprintln(g.out, ws+" in.AddError( ("+out+").UnmarshalJSON(data) )") - fmt.Fprintln(g.out, ws+"}") - return nil - } - - err := g.genTypeDecoderNoCheck(t, out, tags, indent) - return err -} - -// genTypeDecoderNoCheck generates decoding code for the type t. -func (g *Generator) genTypeDecoderNoCheck(t reflect.Type, out string, tags fieldTags, indent int) error { - ws := strings.Repeat(" ", indent) - // Check whether type is primitive, needs to be done after interface check. - if dec := primitiveStringDecoders[t.Kind()]; dec != "" && tags.asString { - fmt.Fprintln(g.out, ws+out+" = "+g.getType(t)+"("+dec+")") - return nil - } else if dec := primitiveDecoders[t.Kind()]; dec != "" { - fmt.Fprintln(g.out, ws+out+" = "+g.getType(t)+"("+dec+")") - return nil - } - - switch t.Kind() { - case reflect.Slice: - tmpVar := g.uniqueVarName() - elem := t.Elem() - - capacity := minSliceBytes / elem.Size() - if capacity == 0 { - capacity = 1 - } - - fmt.Fprintln(g.out, ws+"in.Delim('[')") - fmt.Fprintln(g.out, ws+"if !in.IsDelim(']') {") - fmt.Fprintln(g.out, ws+" "+out+" = make("+g.getType(t)+", 0, "+fmt.Sprint(capacity)+")") - fmt.Fprintln(g.out, ws+"} else {") - fmt.Fprintln(g.out, ws+" "+out+" = nil") - fmt.Fprintln(g.out, ws+"}") - fmt.Fprintln(g.out, ws+"for !in.IsDelim(']') {") - fmt.Fprintln(g.out, ws+" var "+tmpVar+" "+g.getType(elem)) - - g.genTypeDecoder(elem, tmpVar, tags, indent+1) - - fmt.Fprintln(g.out, ws+" "+out+" = append("+out+", "+tmpVar+")") - fmt.Fprintln(g.out, ws+" in.WantComma()") - fmt.Fprintln(g.out, ws+"}") - fmt.Fprintln(g.out, ws+"in.Delim(']')") - - case reflect.Struct: - dec := g.getDecoderName(t) - g.addType(t) - - fmt.Fprintln(g.out, ws+dec+"(in, &"+out+")") - - case reflect.Ptr: - fmt.Fprintln(g.out, ws+"if in.IsNull() {") - fmt.Fprintln(g.out, ws+" in.Skip()") - fmt.Fprintln(g.out, ws+" "+out+" = nil") - fmt.Fprintln(g.out, ws+"} else {") - fmt.Fprintln(g.out, ws+" if ("+out+") == nil {") - fmt.Fprintln(g.out, ws+" "+out+" = new("+g.getType(t.Elem())+")") - fmt.Fprintln(g.out, ws+" }") - - g.genTypeDecoder(t.Elem(), "*"+out, tags, indent+1) - - fmt.Fprintln(g.out, ws+"}") - - case reflect.Map: - key := t.Key() - if key.Kind() != reflect.String { - return fmt.Errorf("map type %v not supported: only string keys are allowed", key) - } - elem := t.Elem() - tmpVar := g.uniqueVarName() - - fmt.Fprintln(g.out, ws+"if in.IsNull() {") - fmt.Fprintln(g.out, ws+" in.Skip()") - fmt.Fprintln(g.out, ws+"} else {") - fmt.Fprintln(g.out, ws+" in.Delim('{')") - fmt.Fprintln(g.out, ws+" if !in.IsDelim('}') {") - fmt.Fprintln(g.out, ws+" "+out+" = make("+g.getType(t)+")") - fmt.Fprintln(g.out, ws+" } else {") - fmt.Fprintln(g.out, ws+" "+out+" = nil") - fmt.Fprintln(g.out, ws+" }") - - fmt.Fprintln(g.out, ws+" for !in.IsDelim('}') {") - fmt.Fprintln(g.out, ws+" key := "+g.getType(t.Key())+"(in.String())") - fmt.Fprintln(g.out, ws+" in.WantColon()") - fmt.Fprintln(g.out, ws+" var "+tmpVar+" "+g.getType(elem)) - - g.genTypeDecoder(elem, tmpVar, tags, indent+2) - - fmt.Fprintln(g.out, ws+" ("+out+")[key] = "+tmpVar) - fmt.Fprintln(g.out, ws+" in.WantComma()") - fmt.Fprintln(g.out, ws+" }") - fmt.Fprintln(g.out, ws+" in.Delim('}')") - fmt.Fprintln(g.out, ws+"}") - - case reflect.Interface: - if t.NumMethod() != 0 { - return fmt.Errorf("interface type %v not supported: only interface{} is allowed", t) - } - fmt.Fprintln(g.out, ws+out+" = in.Interface()") - - default: - return fmt.Errorf("don't know how to decode %v", t) - } - return nil - -} - -func (g *Generator) genStructFieldDecoder(t reflect.Type, f reflect.StructField) error { - jsonName := g.fieldNamer.GetJSONFieldName(t, f) - tags := parseFieldTags(f) - - if tags.omit { - return nil - } - - fmt.Fprintf(g.out, " case %q:\n", jsonName) - if err := g.genTypeDecoder(f.Type, "out."+f.Name, tags, 3); err != nil { - return err - } - - if tags.required { - fmt.Fprintf(g.out, "%sSet = true\n", f.Name) - } - - return nil -} - -func (g *Generator) genRequiredFieldSet(t reflect.Type, f reflect.StructField) { - tags := parseFieldTags(f) - - if !tags.required { - return - } - - fmt.Fprintf(g.out, "var %sSet bool\n", f.Name) -} - -func (g *Generator) genRequiredFieldCheck(t reflect.Type, f reflect.StructField) { - jsonName := g.fieldNamer.GetJSONFieldName(t, f) - tags := parseFieldTags(f) - - if !tags.required { - return - } - - g.imports["fmt"] = "fmt" - - fmt.Fprintf(g.out, "if !%sSet {\n", f.Name) - fmt.Fprintf(g.out, " in.AddError(fmt.Errorf(\"key '%s' is required\"))\n", jsonName) - fmt.Fprintf(g.out, "}\n") -} - -func mergeStructFields(fields1, fields2 []reflect.StructField) (fields []reflect.StructField) { - used := map[string]bool{} - for _, f := range fields2 { - used[f.Name] = true - fields = append(fields, f) - } - - for _, f := range fields1 { - if !used[f.Name] { - fields = append(fields, f) - } - } - return -} - -func getStructFields(t reflect.Type) ([]reflect.StructField, error) { - if t.Kind() != reflect.Struct { - return nil, fmt.Errorf("got %v; expected a struct", t) - } - - var efields []reflect.StructField - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if !f.Anonymous { - continue - } - - t1 := f.Type - if t1.Kind() == reflect.Ptr { - t1 = t1.Elem() - } - - fs, err := getStructFields(t1) - if err != nil { - return nil, fmt.Errorf("error processing embedded field: %v", err) - } - efields = mergeStructFields(efields, fs) - } - - var fields []reflect.StructField - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Anonymous { - continue - } - - c := []rune(f.Name)[0] - if unicode.IsUpper(c) { - fields = append(fields, f) - } - } - return mergeStructFields(efields, fields), nil -} - -func (g *Generator) genDecoder(t reflect.Type) error { - switch t.Kind() { - case reflect.Slice: - return g.genSliceDecoder(t) - default: - return g.genStructDecoder(t) - } -} - -func (g *Generator) genSliceDecoder(t reflect.Type) error { - if t.Kind() != reflect.Slice { - return fmt.Errorf("cannot generate encoder/decoder for %v, not a slice type", t) - } - - fname := g.getDecoderName(t) - typ := g.getType(t) - - fmt.Fprintln(g.out, "func "+fname+"(in *jlexer.Lexer, out *"+typ+") {") - err := g.genTypeDecoderNoCheck(t, "*out", fieldTags{}, 1) - if err != nil { - return err - } - fmt.Fprintln(g.out, "}") - - return nil -} - -func (g *Generator) genStructDecoder(t reflect.Type) error { - if t.Kind() != reflect.Struct { - return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct type", t) - } - - fname := g.getDecoderName(t) - typ := g.getType(t) - - fmt.Fprintln(g.out, "func "+fname+"(in *jlexer.Lexer, out *"+typ+") {") - fmt.Fprintln(g.out, " if in.IsNull() {") - fmt.Fprintln(g.out, " in.Skip()") - fmt.Fprintln(g.out, " return") - fmt.Fprintln(g.out, " }") - - // Init embedded pointer fields. - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if !f.Anonymous || f.Type.Kind() != reflect.Ptr { - continue - } - fmt.Fprintln(g.out, " out."+f.Name+" = new("+g.getType(f.Type.Elem())+")") - } - - fs, err := getStructFields(t) - if err != nil { - return fmt.Errorf("cannot generate decoder for %v: %v", t, err) - } - - for _, f := range fs { - g.genRequiredFieldSet(t, f) - } - - fmt.Fprintln(g.out, " in.Delim('{')") - fmt.Fprintln(g.out, " for !in.IsDelim('}') {") - fmt.Fprintln(g.out, " key := in.UnsafeString()") - fmt.Fprintln(g.out, " in.WantColon()") - fmt.Fprintln(g.out, " if in.IsNull() {") - fmt.Fprintln(g.out, " in.Skip()") - fmt.Fprintln(g.out, " in.WantComma()") - fmt.Fprintln(g.out, " continue") - fmt.Fprintln(g.out, " }") - - fmt.Fprintln(g.out, " switch key {") - for _, f := range fs { - if err := g.genStructFieldDecoder(t, f); err != nil { - return err - } - } - - fmt.Fprintln(g.out, " default:") - fmt.Fprintln(g.out, " in.SkipRecursive()") - fmt.Fprintln(g.out, " }") - fmt.Fprintln(g.out, " in.WantComma()") - fmt.Fprintln(g.out, " }") - fmt.Fprintln(g.out, " in.Delim('}')") - - for _, f := range fs { - g.genRequiredFieldCheck(t, f) - } - - fmt.Fprintln(g.out, "}") - - return nil -} - -func (g *Generator) genStructUnmarshaller(t reflect.Type) error { - if t.Kind() != reflect.Struct && t.Kind() != reflect.Slice { - return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct/slice type", t) - } - - fname := g.getDecoderName(t) - typ := g.getType(t) - - if !g.noStdMarshalers { - fmt.Fprintln(g.out, "// UnmarshalJSON supports json.Unmarshaler interface") - fmt.Fprintln(g.out, "func (v *"+typ+") UnmarshalJSON(data []byte) error {") - fmt.Fprintln(g.out, " r := jlexer.Lexer{Data: data}") - fmt.Fprintln(g.out, " "+fname+"(&r, v)") - fmt.Fprintln(g.out, " return r.Error()") - fmt.Fprintln(g.out, "}") - } - - fmt.Fprintln(g.out, "// UnmarshalEasyJSON supports easyjson.Unmarshaler interface") - fmt.Fprintln(g.out, "func (v *"+typ+") UnmarshalEasyJSON(l *jlexer.Lexer) {") - fmt.Fprintln(g.out, " "+fname+"(l, v)") - fmt.Fprintln(g.out, "}") - - return nil -} diff --git a/vendor/github.com/mailru/easyjson/gen/encoder.go b/vendor/github.com/mailru/easyjson/gen/encoder.go deleted file mode 100644 index e5b6ab35..00000000 --- a/vendor/github.com/mailru/easyjson/gen/encoder.go +++ /dev/null @@ -1,313 +0,0 @@ -package gen - -import ( - "encoding/json" - "fmt" - "reflect" - "strconv" - "strings" - - "github.com/mailru/easyjson" -) - -func (g *Generator) getEncoderName(t reflect.Type) string { - return g.functionName("encode", t) -} - -var primitiveEncoders = map[reflect.Kind]string{ - reflect.String: "out.String(string(%v))", - reflect.Bool: "out.Bool(bool(%v))", - reflect.Int: "out.Int(int(%v))", - reflect.Int8: "out.Int8(int8(%v))", - reflect.Int16: "out.Int16(int16(%v))", - reflect.Int32: "out.Int32(int32(%v))", - reflect.Int64: "out.Int64(int64(%v))", - reflect.Uint: "out.Uint(uint(%v))", - reflect.Uint8: "out.Uint8(uint8(%v))", - reflect.Uint16: "out.Uint16(uint16(%v))", - reflect.Uint32: "out.Uint32(uint32(%v))", - reflect.Uint64: "out.Uint64(uint64(%v))", - reflect.Float32: "out.Float32(float32(%v))", - reflect.Float64: "out.Float64(float64(%v))", -} - -var primitiveStringEncoders = map[reflect.Kind]string{ - reflect.Int: "out.IntStr(int(%v))", - reflect.Int8: "out.Int8Str(int8(%v))", - reflect.Int16: "out.Int16Str(int16(%v))", - reflect.Int32: "out.Int32Str(int32(%v))", - reflect.Int64: "out.Int64Str(int64(%v))", - reflect.Uint: "out.UintStr(uint(%v))", - reflect.Uint8: "out.Uint8Str(uint8(%v))", - reflect.Uint16: "out.Uint16Str(uint16(%v))", - reflect.Uint32: "out.Uint32Str(uint32(%v))", - reflect.Uint64: "out.Uint64Str(uint64(%v))", -} - -// fieldTags contains parsed version of json struct field tags. -type fieldTags struct { - name string - - omit bool - omitEmpty bool - noOmitEmpty bool - asString bool - required bool -} - -// parseFieldTags parses the json field tag into a structure. -func parseFieldTags(f reflect.StructField) fieldTags { - var ret fieldTags - - for i, s := range strings.Split(f.Tag.Get("json"), ",") { - switch { - case i == 0 && s == "-": - ret.omit = true - case i == 0: - ret.name = s - case s == "omitempty": - ret.omitEmpty = true - case s == "!omitempty": - ret.noOmitEmpty = true - case s == "string": - ret.asString = true - case s == "required": - ret.required = true - } - } - - return ret -} - -// genTypeEncoder generates code that encodes in of type t into the writer, but uses marshaler interface if implemented by t. -func (g *Generator) genTypeEncoder(t reflect.Type, in string, tags fieldTags, indent int) error { - ws := strings.Repeat(" ", indent) - - marshalerIface := reflect.TypeOf((*easyjson.Marshaler)(nil)).Elem() - if reflect.PtrTo(t).Implements(marshalerIface) { - fmt.Fprintln(g.out, ws+"("+in+").MarshalEasyJSON(out)") - return nil - } - - marshalerIface = reflect.TypeOf((*json.Marshaler)(nil)).Elem() - if reflect.PtrTo(t).Implements(marshalerIface) { - fmt.Fprintln(g.out, ws+"out.Raw( ("+in+").MarshalJSON() )") - return nil - } - - err := g.genTypeEncoderNoCheck(t, in, tags, indent) - return err -} - -// genTypeEncoderNoCheck generates code that encodes in of type t into the writer. -func (g *Generator) genTypeEncoderNoCheck(t reflect.Type, in string, tags fieldTags, indent int) error { - ws := strings.Repeat(" ", indent) - - // Check whether type is primitive, needs to be done after interface check. - if enc := primitiveStringEncoders[t.Kind()]; enc != "" && tags.asString { - fmt.Fprintf(g.out, ws+enc+"\n", in) - return nil - } else if enc := primitiveEncoders[t.Kind()]; enc != "" { - fmt.Fprintf(g.out, ws+enc+"\n", in) - return nil - } - - switch t.Kind() { - case reflect.Slice: - elem := t.Elem() - iVar := g.uniqueVarName() - vVar := g.uniqueVarName() - - fmt.Fprintln(g.out, ws+"out.RawByte('[')") - fmt.Fprintln(g.out, ws+"for "+iVar+", "+vVar+" := range "+in+" {") - fmt.Fprintln(g.out, ws+" if "+iVar+" > 0 {") - fmt.Fprintln(g.out, ws+" out.RawByte(',')") - fmt.Fprintln(g.out, ws+" }") - - g.genTypeEncoder(elem, vVar, tags, indent+1) - - fmt.Fprintln(g.out, ws+"}") - fmt.Fprintln(g.out, ws+"out.RawByte(']')") - - case reflect.Struct: - enc := g.getEncoderName(t) - g.addType(t) - - fmt.Fprintln(g.out, ws+enc+"(out, "+in+")") - - case reflect.Ptr: - fmt.Fprintln(g.out, ws+"if "+in+" == nil {") - fmt.Fprintln(g.out, ws+` out.RawString("null")`) - fmt.Fprintln(g.out, ws+"} else {") - - g.genTypeEncoder(t.Elem(), "*"+in, tags, indent+1) - - fmt.Fprintln(g.out, ws+"}") - - case reflect.Map: - key := t.Key() - if key.Kind() != reflect.String { - return fmt.Errorf("map type %v not supported: only string keys are allowed", key) - } - tmpVar := g.uniqueVarName() - - fmt.Fprintln(g.out, ws+"if "+in+" == nil {") - fmt.Fprintln(g.out, ws+" out.RawString(`null`)") - fmt.Fprintln(g.out, ws+"} else {") - fmt.Fprintln(g.out, ws+" out.RawByte('{')") - fmt.Fprintln(g.out, ws+" "+tmpVar+"First := true") - fmt.Fprintln(g.out, ws+" for "+tmpVar+"Name, "+tmpVar+"Value := range "+in+" {") - fmt.Fprintln(g.out, ws+" if !"+tmpVar+"First { out.RawByte(',') }") - fmt.Fprintln(g.out, ws+" "+tmpVar+"First = false") - fmt.Fprintln(g.out, ws+" out.String(string("+tmpVar+"Name))") - fmt.Fprintln(g.out, ws+" out.RawByte(':')") - - g.genTypeEncoder(t.Elem(), tmpVar+"Value", tags, indent+2) - - fmt.Fprintln(g.out, ws+" }") - fmt.Fprintln(g.out, ws+" out.RawByte('}')") - fmt.Fprintln(g.out, ws+"}") - - case reflect.Interface: - if t.NumMethod() != 0 { - return fmt.Errorf("interface type %v not supported: only interface{} is allowed", t) - } - fmt.Fprintln(g.out, ws+"out.Raw(json.Marshal("+in+"))") - - default: - return fmt.Errorf("don't know how to encode %v", t) - } - return nil -} - -func (g *Generator) notEmptyCheck(t reflect.Type, v string) string { - optionalIface := reflect.TypeOf((*easyjson.Optional)(nil)).Elem() - if reflect.PtrTo(t).Implements(optionalIface) { - return "(" + v + ").IsDefined()" - } - - switch t.Kind() { - case reflect.Slice, reflect.Map: - return "len(" + v + ") != 0" - case reflect.Interface, reflect.Ptr: - return v + " != nil" - case reflect.Bool: - return v - case reflect.String: - return v + ` != ""` - case reflect.Float32, reflect.Float64, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - - return v + " != 0" - - default: - return "true" - } -} - -func (g *Generator) genStructFieldEncoder(t reflect.Type, f reflect.StructField) error { - jsonName := g.fieldNamer.GetJSONFieldName(t, f) - tags := parseFieldTags(f) - - if tags.omit { - return nil - } - if !tags.omitEmpty && !g.omitEmpty || tags.noOmitEmpty { - fmt.Fprintln(g.out, " if !first { out.RawByte(',') }") - fmt.Fprintln(g.out, " first = false") - fmt.Fprintf(g.out, " out.RawString(%q)\n", strconv.Quote(jsonName)+":") - return g.genTypeEncoder(f.Type, "in."+f.Name, tags, 1) - } - - fmt.Fprintln(g.out, " if", g.notEmptyCheck(f.Type, "in."+f.Name), "{") - fmt.Fprintln(g.out, " if !first { out.RawByte(',') }") - fmt.Fprintln(g.out, " first = false") - - fmt.Fprintf(g.out, " out.RawString(%q)\n", strconv.Quote(jsonName)+":") - if err := g.genTypeEncoder(f.Type, "in."+f.Name, tags, 2); err != nil { - return err - } - fmt.Fprintln(g.out, " }") - return nil -} - -func (g *Generator) genEncoder(t reflect.Type) error { - switch t.Kind() { - case reflect.Slice: - return g.genSliceEncoder(t) - default: - return g.genStructEncoder(t) - } -} - -func (g *Generator) genSliceEncoder(t reflect.Type) error { - if t.Kind() != reflect.Slice { - return fmt.Errorf("cannot generate encoder/decoder for %v, not a slice type", t) - } - - fname := g.getEncoderName(t) - typ := g.getType(t) - - fmt.Fprintln(g.out, "func "+fname+"(out *jwriter.Writer, in "+typ+") {") - err := g.genTypeEncoderNoCheck(t, "in", fieldTags{}, 1) - if err != nil { - return err - } - fmt.Fprintln(g.out, "}") - return nil -} - -func (g *Generator) genStructEncoder(t reflect.Type) error { - if t.Kind() != reflect.Struct { - return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct type") - } - - fname := g.getEncoderName(t) - typ := g.getType(t) - - fmt.Fprintln(g.out, "func "+fname+"(out *jwriter.Writer, in "+typ+") {") - fmt.Fprintln(g.out, " out.RawByte('{')") - fmt.Fprintln(g.out, " first := true") - fmt.Fprintln(g.out, " _ = first") - - fs, err := getStructFields(t) - if err != nil { - return fmt.Errorf("cannot generate encoder for %v: %v", t, err) - } - for _, f := range fs { - if err := g.genStructFieldEncoder(t, f); err != nil { - return err - } - } - - fmt.Fprintln(g.out, " out.RawByte('}')") - fmt.Fprintln(g.out, "}") - - return nil -} - -func (g *Generator) genStructMarshaller(t reflect.Type) error { - if t.Kind() != reflect.Struct && t.Kind() != reflect.Slice { - return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct/slice type", t) - } - - fname := g.getEncoderName(t) - typ := g.getType(t) - - if !g.noStdMarshalers { - fmt.Fprintln(g.out, "// MarshalJSON supports json.Marshaler interface") - fmt.Fprintln(g.out, "func (v "+typ+") MarshalJSON() ([]byte, error) {") - fmt.Fprintln(g.out, " w := jwriter.Writer{}") - fmt.Fprintln(g.out, " "+fname+"(&w, v)") - fmt.Fprintln(g.out, " return w.Buffer.BuildBytes(), w.Error") - fmt.Fprintln(g.out, "}") - } - - fmt.Fprintln(g.out, "// MarshalEasyJSON supports easyjson.Marshaler interface") - fmt.Fprintln(g.out, "func (v "+typ+") MarshalEasyJSON(w *jwriter.Writer) {") - fmt.Fprintln(g.out, " "+fname+"(w, v)") - fmt.Fprintln(g.out, "}") - - return nil -} diff --git a/vendor/github.com/mailru/easyjson/gen/generator.go b/vendor/github.com/mailru/easyjson/gen/generator.go deleted file mode 100644 index 2a3ef9ce..00000000 --- a/vendor/github.com/mailru/easyjson/gen/generator.go +++ /dev/null @@ -1,395 +0,0 @@ -package gen - -import ( - "bytes" - "fmt" - "hash/fnv" - "io" - "path" - "reflect" - "sort" - "strings" - "unicode" -) - -const pkgWriter = "github.com/mailru/easyjson/jwriter" -const pkgLexer = "github.com/mailru/easyjson/jlexer" - -// FieldNamer defines a policy for generating names for struct fields. -type FieldNamer interface { - GetJSONFieldName(t reflect.Type, f reflect.StructField) string -} - -// Generator generates the requested marshallers/unmarshallers. -type Generator struct { - out *bytes.Buffer - - pkgName string - pkgPath string - buildTags string - hashString string - - varCounter int - - noStdMarshalers bool - omitEmpty bool - fieldNamer FieldNamer - - // package path to local alias map for tracking imports - imports map[string]string - - // types that marshallers were requested for by user - marshallers map[reflect.Type]bool - - // types that encoders were already generated for - typesSeen map[reflect.Type]bool - - // types that encoders were requested for (e.g. by encoders of other types) - typesUnseen []reflect.Type - - // function name to relevant type maps to track names of de-/encoders in - // case of a name clash or unnamed structs - functionNames map[string]reflect.Type -} - -// NewGenerator initializes and returns a Generator. -func NewGenerator(filename string) *Generator { - ret := &Generator{ - imports: map[string]string{ - pkgWriter: "jwriter", - pkgLexer: "jlexer", - "encoding/json": "json", - }, - fieldNamer: DefaultFieldNamer{}, - marshallers: make(map[reflect.Type]bool), - typesSeen: make(map[reflect.Type]bool), - functionNames: make(map[string]reflect.Type), - } - - // Use a file-unique prefix on all auxiliary functions to avoid - // name clashes. - hash := fnv.New32() - hash.Write([]byte(filename)) - ret.hashString = fmt.Sprintf("%x", hash.Sum32()) - - return ret -} - -// SetPkg sets the name and path of output package. -func (g *Generator) SetPkg(name, path string) { - g.pkgName = name - g.pkgPath = path -} - -// SetBuildTags sets build tags for the output file. -func (g *Generator) SetBuildTags(tags string) { - g.buildTags = tags -} - -// SetFieldNamer sets field naming strategy. -func (g *Generator) SetFieldNamer(n FieldNamer) { - g.fieldNamer = n -} - -// UseSnakeCase sets snake_case field naming strategy. -func (g *Generator) UseSnakeCase() { - g.fieldNamer = SnakeCaseFieldNamer{} -} - -// NoStdMarshalers instructs not to generate standard MarshalJSON/UnmarshalJSON -// methods (only the custom interface). -func (g *Generator) NoStdMarshalers() { - g.noStdMarshalers = true -} - -// OmitEmpty triggers `json=",omitempty"` behaviour by default. -func (g *Generator) OmitEmpty() { - g.omitEmpty = true -} - -// addTypes requests to generate en-/decoding functions for the given type. -func (g *Generator) addType(t reflect.Type) { - if g.typesSeen[t] { - return - } - for _, t1 := range g.typesUnseen { - if t1 == t { - return - } - } - g.typesUnseen = append(g.typesUnseen, t) -} - -// Add requests to generate (un-)marshallers and en-/decoding functions for the type of given object. -func (g *Generator) Add(obj interface{}) { - t := reflect.TypeOf(obj) - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - g.addType(t) - g.marshallers[t] = true -} - -// printHeader prints package declaration and imports. -func (g *Generator) printHeader() { - if g.buildTags != "" { - fmt.Println("// +build ", g.buildTags) - fmt.Println() - } - fmt.Println("// AUTOGENERATED FILE: easyjson marshaller/unmarshallers.") - fmt.Println() - fmt.Println("package ", g.pkgName) - fmt.Println() - - byAlias := map[string]string{} - var aliases []string - for path, alias := range g.imports { - aliases = append(aliases, alias) - byAlias[alias] = path - } - - sort.Strings(aliases) - fmt.Println("import (") - for _, alias := range g.imports { - fmt.Printf(" %s %q\n", alias, byAlias[alias]) - } - - fmt.Println(")") - fmt.Println("") - fmt.Println("// suppress unused package warning") - fmt.Println("var (") - fmt.Println(" _ = json.RawMessage{}") - fmt.Println(" _ = jlexer.Lexer{}") - fmt.Println(" _ = jwriter.Writer{}") - fmt.Println(")") - - fmt.Println() -} - -// Run runs the generator and outputs generated code to out. -func (g *Generator) Run(out io.Writer) error { - g.out = &bytes.Buffer{} - - for len(g.typesUnseen) > 0 { - t := g.typesUnseen[len(g.typesUnseen)-1] - g.typesUnseen = g.typesUnseen[:len(g.typesUnseen)-1] - g.typesSeen[t] = true - - if err := g.genDecoder(t); err != nil { - return err - } - if err := g.genEncoder(t); err != nil { - return err - } - - if !g.marshallers[t] { - continue - } - - if err := g.genStructMarshaller(t); err != nil { - return err - } - if err := g.genStructUnmarshaller(t); err != nil { - return err - } - } - g.printHeader() - _, err := out.Write(g.out.Bytes()) - return err -} - -// pkgAlias creates and returns and import alias for a given package. -func (g *Generator) pkgAlias(pkgPath string) string { - if alias := g.imports[pkgPath]; alias != "" { - return alias - } - - for i := 0; ; i++ { - alias := path.Base(pkgPath) - if i > 0 { - alias += fmt.Sprint(i) - } - - exists := false - for _, v := range g.imports { - if v == alias { - exists = true - break - } - } - - if !exists { - g.imports[pkgPath] = alias - return alias - } - } -} - -// getType return the textual type name of given type that can be used in generated code. -func (g *Generator) getType(t reflect.Type) string { - if t.Name() == "" { - switch t.Kind() { - case reflect.Ptr: - return "*" + g.getType(t.Elem()) - case reflect.Slice: - return "[]" + g.getType(t.Elem()) - case reflect.Map: - return "map[" + g.getType(t.Key()) + "]" + g.getType(t.Elem()) - } - } - - if t.Name() == "" || t.PkgPath() == "" { - return t.String() - } else if t.PkgPath() == g.pkgPath { - return t.Name() - } - // TODO: unnamed structs. - return g.pkgAlias(t.PkgPath()) + "." + t.Name() -} - -// uniqueVarName returns a file-unique name that can be used for generated variables. -func (g *Generator) uniqueVarName() string { - g.varCounter++ - return fmt.Sprint("v", g.varCounter) -} - -// safeName escapes unsafe characters in pkg/type name and returns a string that can be used -// in encoder/decoder names for the type. -func (g *Generator) safeName(t reflect.Type) string { - name := t.PkgPath() - if t.Name() == "" { - name += "anonymous" - } else { - name += "." + t.Name() - } - - parts := []string{} - part := []rune{} - for _, c := range name { - if unicode.IsLetter(c) || unicode.IsDigit(c) { - part = append(part, c) - } else if len(part) > 0 { - parts = append(parts, string(part)) - part = []rune{} - } - } - return joinFunctionNameParts(false, parts...) -} - -// functionName returns a function name for a given type with a given prefix. If a function -// with this prefix already exists for a type, it is returned. -// -// Method is used to track encoder/decoder names for the type. -func (g *Generator) functionName(prefix string, t reflect.Type) string { - prefix = joinFunctionNameParts(true, "easyjson", g.hashString, prefix) - name := joinFunctionNameParts(true, prefix, g.safeName(t)) - - // Most of the names will be unique, try a shortcut first. - if e, ok := g.functionNames[name]; !ok || e == t { - g.functionNames[name] = t - return name - } - - // Search if the function already exists. - for name1, t1 := range g.functionNames { - if t1 == t && strings.HasPrefix(name1, prefix) { - return name1 - } - } - - // Create a new name in the case of a clash. - for i := 1; ; i++ { - nm := fmt.Sprint(name, i) - if _, ok := g.functionNames[nm]; ok { - continue - } - g.functionNames[nm] = t - return nm - } -} - -// DefaultFieldsNamer implements trivial naming policy equivalent to encoding/json. -type DefaultFieldNamer struct{} - -func (DefaultFieldNamer) GetJSONFieldName(t reflect.Type, f reflect.StructField) string { - jsonName := strings.Split(f.Tag.Get("json"), ",")[0] - if jsonName != "" { - return jsonName - } else { - return f.Name - } -} - -// SnakeCaseFieldNamer implements CamelCase to snake_case conversion for fields names. -type SnakeCaseFieldNamer struct{} - -func camelToSnake(name string) string { - var ret bytes.Buffer - - multipleUpper := false - var lastUpper rune - var beforeUpper rune - - for _, c := range name { - // Non-lowercase character after uppercase is considered to be uppercase too. - isUpper := (unicode.IsUpper(c) || (lastUpper != 0 && !unicode.IsLower(c))) - - if lastUpper != 0 { - // Output a delimiter if last character was either the first uppercase character - // in a row, or the last one in a row (e.g. 'S' in "HTTPServer"). - // Do not output a delimiter at the beginning of the name. - - firstInRow := !multipleUpper - lastInRow := !isUpper - - if ret.Len() > 0 && (firstInRow || lastInRow) && beforeUpper != '_' { - ret.WriteByte('_') - } - ret.WriteRune(unicode.ToLower(lastUpper)) - } - - // Buffer uppercase char, do not output it yet as a delimiter may be required if the - // next character is lowercase. - if isUpper { - multipleUpper = (lastUpper != 0) - lastUpper = c - continue - } - - ret.WriteRune(c) - lastUpper = 0 - beforeUpper = c - multipleUpper = false - } - - if lastUpper != 0 { - ret.WriteRune(unicode.ToLower(lastUpper)) - } - return string(ret.Bytes()) -} - -func (SnakeCaseFieldNamer) GetJSONFieldName(t reflect.Type, f reflect.StructField) string { - jsonName := strings.Split(f.Tag.Get("json"), ",")[0] - if jsonName != "" { - return jsonName - } - - return camelToSnake(f.Name) -} - -func joinFunctionNameParts(keepFirst bool, parts ...string) string { - buf := bytes.NewBufferString("") - for i, part := range parts { - if i == 0 && keepFirst { - buf.WriteString(part) - } else { - if len(part) > 0 { - buf.WriteString(strings.ToUpper(string(part[0]))) - } - if len(part) > 1 { - buf.WriteString(part[1:]) - } - } - } - return buf.String() -} diff --git a/vendor/github.com/mailru/easyjson/gen/generator_test.go b/vendor/github.com/mailru/easyjson/gen/generator_test.go deleted file mode 100644 index d7b6b0fb..00000000 --- a/vendor/github.com/mailru/easyjson/gen/generator_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package gen - -import ( - "testing" -) - -func TestCamelToSnake(t *testing.T) { - for i, test := range []struct { - In, Out string - }{ - {"", ""}, - {"A", "a"}, - {"SimpleExample", "simple_example"}, - {"internalField", "internal_field"}, - - {"SomeHTTPStuff", "some_http_stuff"}, - {"WriteJSON", "write_json"}, - {"HTTP2Server", "http2_server"}, - {"Some_Mixed_Case", "some_mixed_case"}, - {"do_nothing", "do_nothing"}, - - {"JSONHTTPRPCServer", "jsonhttprpc_server"}, // nothing can be done here without a dictionary - } { - got := camelToSnake(test.In) - if got != test.Out { - t.Errorf("[%d] camelToSnake(%s) = %s; want %s", i, test.In, got, test.Out) - } - } -} - -func TestJoinFunctionNameParts(t *testing.T) { - for i, test := range []struct { - keepFirst bool - parts []string - out string - }{ - {false, []string{}, ""}, - {false, []string{"a"}, "A"}, - {false, []string{"simple", "example"}, "SimpleExample"}, - {true, []string{"first", "example"}, "firstExample"}, - {false, []string{"some", "UPPER", "case"}, "SomeUPPERCase"}, - {false, []string{"number", "123"}, "Number123"}, - } { - got := joinFunctionNameParts(test.keepFirst, test.parts...) - if got != test.out { - t.Errorf("[%d] joinFunctionNameParts(%v) = %s; want %s", i, test.parts, got, test.out) - } - } -} diff --git a/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go b/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go deleted file mode 100644 index 900ab617..00000000 --- a/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go +++ /dev/null @@ -1,192 +0,0 @@ -package jlexer - -import ( - "reflect" - "testing" -) - -func TestString(t *testing.T) { - for i, test := range []struct { - toParse string - want string - wantError bool - }{ - {toParse: `"simple string"`, want: "simple string"}, - {toParse: " \r\r\n\t " + `"test"`, want: "test"}, - {toParse: `"\n\t\"\/\\\f\r"`, want: "\n\t\"/\\\f\r"}, - {toParse: `"\u0020"`, want: " "}, - {toParse: `"\u0020-\t"`, want: " -\t"}, - {toParse: `"\ufffd\uFFFD"`, want: "\ufffd\ufffd"}, - - {toParse: `"test"junk`, want: "test"}, - - {toParse: `5`, wantError: true}, // not a string - {toParse: `"\x"`, wantError: true}, // invalid escape - {toParse: `"\ud800"`, wantError: true}, // invalid utf-8 char - } { - l := Lexer{Data: []byte(test.toParse)} - - got := l.String() - if got != test.want { - t.Errorf("[%d, %q] String() = %v; want %v", i, test.toParse, got, test.want) - } - err := l.Error() - if err != nil && !test.wantError { - t.Errorf("[%d, %q] String() error: %v", i, test.toParse, err) - } else if err == nil && test.wantError { - t.Errorf("[%d, %q] String() ok; want error", i, test.toParse) - } - } -} - -func TestNumber(t *testing.T) { - for i, test := range []struct { - toParse string - want string - wantError bool - }{ - {toParse: "123", want: "123"}, - {toParse: "-123", want: "-123"}, - {toParse: "\r\n12.35", want: "12.35"}, - {toParse: "12.35e+1", want: "12.35e+1"}, - {toParse: "12.35e-15", want: "12.35e-15"}, - {toParse: "12.35E-15", want: "12.35E-15"}, - {toParse: "12.35E15", want: "12.35E15"}, - - {toParse: `"a"`, wantError: true}, - {toParse: "123junk", wantError: true}, - {toParse: "1.2.3", wantError: true}, - {toParse: "1e2e3", wantError: true}, - {toParse: "1e2.3", wantError: true}, - } { - l := Lexer{Data: []byte(test.toParse)} - - got := l.number() - if got != test.want { - t.Errorf("[%d, %q] number() = %v; want %v", i, test.toParse, got, test.want) - } - err := l.Error() - if err != nil && !test.wantError { - t.Errorf("[%d, %q] number() error: %v", i, test.toParse, err) - } else if err == nil && test.wantError { - t.Errorf("[%d, %q] number() ok; want error", i, test.toParse) - } - } -} - -func TestBool(t *testing.T) { - for i, test := range []struct { - toParse string - want bool - wantError bool - }{ - {toParse: "true", want: true}, - {toParse: "false", want: false}, - - {toParse: "1", wantError: true}, - {toParse: "truejunk", wantError: true}, - {toParse: `false"junk"`, wantError: true}, - {toParse: "True", wantError: true}, - {toParse: "False", wantError: true}, - } { - l := Lexer{Data: []byte(test.toParse)} - - got := l.Bool() - if got != test.want { - t.Errorf("[%d, %q] Bool() = %v; want %v", i, test.toParse, got, test.want) - } - err := l.Error() - if err != nil && !test.wantError { - t.Errorf("[%d, %q] Bool() error: %v", i, test.toParse, err) - } else if err == nil && test.wantError { - t.Errorf("[%d, %q] Bool() ok; want error", i, test.toParse) - } - } -} - -func TestSkipRecursive(t *testing.T) { - for i, test := range []struct { - toParse string - left string - wantError bool - }{ - {toParse: "5, 4", left: ", 4"}, - {toParse: "[5, 6], 4", left: ", 4"}, - {toParse: "[5, [7,8]]: 4", left: ": 4"}, - - {toParse: `{"a":1}, 4`, left: ", 4"}, - {toParse: `{"a":1, "b":{"c": 5}, "e":[12,15]}, 4`, left: ", 4"}, - - // array start/end chars in a string - {toParse: `[5, "]"], 4`, left: ", 4"}, - {toParse: `[5, "\"]"], 4`, left: ", 4"}, - {toParse: `[5, "["], 4`, left: ", 4"}, - {toParse: `[5, "\"["], 4`, left: ", 4"}, - - // object start/end chars in a string - {toParse: `{"a}":1}, 4`, left: ", 4"}, - {toParse: `{"a\"}":1}, 4`, left: ", 4"}, - {toParse: `{"a{":1}, 4`, left: ", 4"}, - {toParse: `{"a\"{":1}, 4`, left: ", 4"}, - } { - l := Lexer{Data: []byte(test.toParse)} - - l.SkipRecursive() - - got := string(l.Data[l.pos:]) - if got != test.left { - t.Errorf("[%d, %q] SkipRecursive() left = %v; want %v", i, test.toParse, got, test.left) - } - err := l.Error() - if err != nil && !test.wantError { - t.Errorf("[%d, %q] SkipRecursive() error: %v", i, test.toParse, err) - } else if err == nil && test.wantError { - t.Errorf("[%d, %q] SkipRecursive() ok; want error", i, test.toParse) - } - } -} - -func TestInterface(t *testing.T) { - for i, test := range []struct { - toParse string - want interface{} - wantError bool - }{ - {toParse: "null", want: nil}, - {toParse: "true", want: true}, - {toParse: `"a"`, want: "a"}, - {toParse: "5", want: float64(5)}, - - {toParse: `{}`, want: map[string]interface{}{}}, - {toParse: `[]`, want: []interface{}(nil)}, - - {toParse: `{"a": "b"}`, want: map[string]interface{}{"a": "b"}}, - {toParse: `[5]`, want: []interface{}{float64(5)}}, - - {toParse: `{"a":5 , "b" : "string"}`, want: map[string]interface{}{"a": float64(5), "b": "string"}}, - {toParse: `["a", 5 , null, true]`, want: []interface{}{"a", float64(5), nil, true}}, - - {toParse: `{"a" "b"}`, wantError: true}, - {toParse: `{"a": "b",}`, wantError: true}, - {toParse: `{"a":"b","c" "b"}`, wantError: true}, - {toParse: `{"a": "b","c":"d",}`, wantError: true}, - {toParse: `{,}`, wantError: true}, - - {toParse: `[1, 2,]`, wantError: true}, - {toParse: `[1 2]`, wantError: true}, - {toParse: `[,]`, wantError: true}, - } { - l := Lexer{Data: []byte(test.toParse)} - - got := l.Interface() - if !reflect.DeepEqual(got, test.want) { - t.Errorf("[%d, %q] Interface() = %v; want %v", i, test.toParse, got, test.want) - } - err := l.Error() - if err != nil && !test.wantError { - t.Errorf("[%d, %q] Interface() error: %v", i, test.toParse, err) - } else if err == nil && test.wantError { - t.Errorf("[%d, %q] Interface() ok; want error", i, test.toParse) - } - } -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go deleted file mode 100644 index 89e61326..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Bool struct { - V bool - Defined bool -} - -// Creates an optional type with a given value. -func OBool(v bool) Bool { - return Bool{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Bool) Get(deflt bool) bool { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Bool) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Bool(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Bool{} - } else { - v.V = l.Bool() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Bool) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Bool) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Bool) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Bool) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go deleted file mode 100644 index 93ade1c7..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Float32 struct { - V float32 - Defined bool -} - -// Creates an optional type with a given value. -func OFloat32(v float32) Float32 { - return Float32{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Float32) Get(deflt float32) float32 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Float32) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Float32(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Float32) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Float32{} - } else { - v.V = l.Float32() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Float32) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Float32) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Float32) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Float32) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go deleted file mode 100644 index 90af91b0..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Float64 struct { - V float64 - Defined bool -} - -// Creates an optional type with a given value. -func OFloat64(v float64) Float64 { - return Float64{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Float64) Get(deflt float64) float64 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Float64) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Float64(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Float64{} - } else { - v.V = l.Float64() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Float64) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Float64) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Float64) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Float64) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go deleted file mode 100644 index 71e74e83..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Int struct { - V int - Defined bool -} - -// Creates an optional type with a given value. -func OInt(v int) Int { - return Int{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Int) Get(deflt int) int { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Int) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Int(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Int{} - } else { - v.V = l.Int() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Int) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Int) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go deleted file mode 100644 index 987e3df6..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Int16 struct { - V int16 - Defined bool -} - -// Creates an optional type with a given value. -func OInt16(v int16) Int16 { - return Int16{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Int16) Get(deflt int16) int16 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Int16) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Int16(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Int16{} - } else { - v.V = l.Int16() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int16) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int16) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Int16) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Int16) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go deleted file mode 100644 index e5f30d8c..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Int32 struct { - V int32 - Defined bool -} - -// Creates an optional type with a given value. -func OInt32(v int32) Int32 { - return Int32{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Int32) Get(deflt int32) int32 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Int32) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Int32(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Int32) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Int32{} - } else { - v.V = l.Int32() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int32) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int32) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Int32) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Int32) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go deleted file mode 100644 index ff67a335..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Int64 struct { - V int64 - Defined bool -} - -// Creates an optional type with a given value. -func OInt64(v int64) Int64 { - return Int64{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Int64) Get(deflt int64) int64 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Int64) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Int64(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Int64) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Int64{} - } else { - v.V = l.Int64() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int64) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int64) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Int64) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Int64) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go deleted file mode 100644 index 41312d17..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Int8 struct { - V int8 - Defined bool -} - -// Creates an optional type with a given value. -func OInt8(v int8) Int8 { - return Int8{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Int8) Get(deflt int8) int8 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Int8) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Int8(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Int8) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Int8{} - } else { - v.V = l.Int8() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int8) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Int8) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Int8) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Int8) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go deleted file mode 100644 index 3d818fa3..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type String struct { - V string - Defined bool -} - -// Creates an optional type with a given value. -func OString(v string) String { - return String{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v String) Get(deflt string) string { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v String) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.String(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = String{} - } else { - v.V = l.String() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *String) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *String) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v String) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v String) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go deleted file mode 100644 index 367db675..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Uint struct { - V uint - Defined bool -} - -// Creates an optional type with a given value. -func OUint(v uint) Uint { - return Uint{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Uint) Get(deflt uint) uint { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Uint) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Uint(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Uint) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Uint{} - } else { - v.V = l.Uint() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Uint) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Uint) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go deleted file mode 100644 index 6abc71dd..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Uint16 struct { - V uint16 - Defined bool -} - -// Creates an optional type with a given value. -func OUint16(v uint16) Uint16 { - return Uint16{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Uint16) Get(deflt uint16) uint16 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Uint16) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Uint16(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Uint16) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Uint16{} - } else { - v.V = l.Uint16() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint16) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint16) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Uint16) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Uint16) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go deleted file mode 100644 index 490945c2..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Uint32 struct { - V uint32 - Defined bool -} - -// Creates an optional type with a given value. -func OUint32(v uint32) Uint32 { - return Uint32{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Uint32) Get(deflt uint32) uint32 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Uint32) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Uint32(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Uint32) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Uint32{} - } else { - v.V = l.Uint32() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint32) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint32) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Uint32) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Uint32) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go deleted file mode 100644 index 37d2d418..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Uint64 struct { - V uint64 - Defined bool -} - -// Creates an optional type with a given value. -func OUint64(v uint64) Uint64 { - return Uint64{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Uint64) Get(deflt uint64) uint64 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Uint64) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Uint64(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Uint64) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Uint64{} - } else { - v.V = l.Uint64() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint64) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint64) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Uint64) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Uint64) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go deleted file mode 100644 index 55c4cdba..00000000 --- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go +++ /dev/null @@ -1,79 +0,0 @@ -// generated by gotemplate - -package opt - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Uint8 struct { - V uint8 - Defined bool -} - -// Creates an optional type with a given value. -func OUint8(v uint8) Uint8 { - return Uint8{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Uint8) Get(deflt uint8) uint8 { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Uint8) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Uint8(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Uint8) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Uint8{} - } else { - v.V = l.Uint8() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint8) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Uint8) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Uint8) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Uint8) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/optional/opt.go b/vendor/github.com/mailru/easyjson/opt/optional/opt.go deleted file mode 100644 index 6d3a0798..00000000 --- a/vendor/github.com/mailru/easyjson/opt/optional/opt.go +++ /dev/null @@ -1,80 +0,0 @@ -// +build none - -package optional - -import ( - "fmt" - - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// template type Optional(A) -type A int - -// A 'gotemplate'-based type for providing optional semantics without using pointers. -type Optional struct { - V A - Defined bool -} - -// Creates an optional type with a given value. -func OOptional(v A) Optional { - return Optional{V: v, Defined: true} -} - -// Get returns the value or given default in the case the value is undefined. -func (v Optional) Get(deflt A) A { - if !v.Defined { - return deflt - } - return v.V -} - -// MarshalEasyJSON does JSON marshaling using easyjson interface. -func (v Optional) MarshalEasyJSON(w *jwriter.Writer) { - if v.Defined { - w.Optional(v.V) - } else { - w.RawString("null") - } -} - -// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. -func (v *Optional) UnmarshalEasyJSON(l *jlexer.Lexer) { - if l.IsNull() { - l.Skip() - *v = Optional{} - } else { - v.V = l.Optional() - v.Defined = true - } -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Optional) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - v.MarshalEasyJSON(&w) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalJSON implements a standard json marshaler interface. -func (v *Optional) UnmarshalJSON(data []byte) error { - l := jlexer.Lexer{} - v.UnmarshalEasyJSON(&l) - return l.Error() -} - -// IsDefined returns whether the value is defined, a function is required so that it can -// be used in an interface. -func (v Optional) IsDefined() bool { - return v.Defined -} - -// String implements a stringer interface using fmt.Sprint for the value. -func (v Optional) String() string { - if !v.Defined { - return "" - } - return fmt.Sprint(v.V) -} diff --git a/vendor/github.com/mailru/easyjson/opt/opts.go b/vendor/github.com/mailru/easyjson/opt/opts.go deleted file mode 100644 index 3617f7f9..00000000 --- a/vendor/github.com/mailru/easyjson/opt/opts.go +++ /dev/null @@ -1,22 +0,0 @@ -package opt - -//go:generate sed -i "s/\\+build none/generated by gotemplate/" optional/opt.go -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int(int) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint(uint) - -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int8(int8) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int16(int16) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int32(int32) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int64(int64) - -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint8(uint8) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint16(uint16) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint32(uint32) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint64(uint64) - -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Float32(float32) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Float64(float64) - -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Bool(bool) -//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" String(string) -//go:generate sed -i "s/generated by gotemplate/+build none/" optional/opt.go diff --git a/vendor/github.com/mailru/easyjson/parser/parser.go b/vendor/github.com/mailru/easyjson/parser/parser.go deleted file mode 100644 index 69c098ba..00000000 --- a/vendor/github.com/mailru/easyjson/parser/parser.go +++ /dev/null @@ -1,78 +0,0 @@ -package parser - -import ( - "go/ast" - "go/parser" - "go/token" - "strings" -) - -const structComment = "easyjson:json" - -type Parser struct { - PkgPath string - PkgName string - StructNames []string - AllStructs bool -} - -type visitor struct { - *Parser - - name string - explicit bool -} - -func (p *Parser) needType(comments string) bool { - for _, v := range strings.Split(comments, "\n") { - if strings.HasPrefix(v, structComment) { - return true - } - } - return false -} - -func (v *visitor) Visit(n ast.Node) (w ast.Visitor) { - switch n := n.(type) { - case *ast.File: - v.PkgName = n.Name.String() - return v - - case *ast.GenDecl: - v.explicit = v.needType(n.Doc.Text()) - - if !v.explicit && !v.AllStructs { - return nil - } - return v - case *ast.TypeSpec: - v.name = n.Name.String() - - // Allow to specify non-structs explicitly independent of '-all' flag. - if v.explicit { - v.StructNames = append(v.StructNames, v.name) - return nil - } - return v - case *ast.StructType: - v.StructNames = append(v.StructNames, v.name) - return nil - } - return nil -} - -func (p *Parser) Parse(fname string) error { - var err error - if p.PkgPath, err = getPkgPath(fname); err != nil { - return err - } - - fset := token.NewFileSet() - f, err := parser.ParseFile(fset, fname, nil, parser.ParseComments) - if err != nil { - return err - } - - ast.Walk(&visitor{Parser: p}, f) - return nil -} diff --git a/vendor/github.com/mailru/easyjson/parser/parser_unix.go b/vendor/github.com/mailru/easyjson/parser/parser_unix.go deleted file mode 100644 index 2142aaa0..00000000 --- a/vendor/github.com/mailru/easyjson/parser/parser_unix.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build !windows - -package parser - -import ( - "fmt" - "os" - "path" - "strings" -) - -func getPkgPath(fname string) (string, error) { - if !path.IsAbs(fname) { - pwd, err := os.Getwd() - if err != nil { - return "", err - } - fname = path.Join(pwd, fname) - } - - for _, p := range strings.Split(os.Getenv("GOPATH"), ":") { - prefix := path.Join(p, "src") + "/" - if rel := strings.TrimPrefix(fname, prefix); rel != fname { - return path.Dir(rel), nil - } - } - - return "", fmt.Errorf("file '%v' is not in GOPATH", fname) -} diff --git a/vendor/github.com/mailru/easyjson/parser/parser_windows.go b/vendor/github.com/mailru/easyjson/parser/parser_windows.go deleted file mode 100644 index 76140a99..00000000 --- a/vendor/github.com/mailru/easyjson/parser/parser_windows.go +++ /dev/null @@ -1,33 +0,0 @@ -package parser - -import ( - "fmt" - "os" - "path" - "strings" -) - -func normalizePath(path string) string { - return strings.Replace(path, "\\", "/", -1) -} - -func getPkgPath(fname string) (string, error) { - if !path.IsAbs(fname) { - pwd, err := os.Getwd() - if err != nil { - return "", err - } - fname = path.Join(pwd, fname) - } - - fname = normalizePath(fname) - - for _, p := range strings.Split(os.Getenv("GOPATH"), ";") { - prefix := path.Join(normalizePath(p), "src") + "/" - if rel := strings.TrimPrefix(fname, prefix); rel != fname { - return path.Dir(rel), nil - } - } - - return "", fmt.Errorf("file '%v' is not in GOPATH", fname) -} diff --git a/vendor/github.com/mailru/easyjson/tests/basic_test.go b/vendor/github.com/mailru/easyjson/tests/basic_test.go deleted file mode 100644 index d2eac283..00000000 --- a/vendor/github.com/mailru/easyjson/tests/basic_test.go +++ /dev/null @@ -1,133 +0,0 @@ -package tests - -import ( - "reflect" - "testing" - - "encoding/json" - - "github.com/mailru/easyjson" - "github.com/mailru/easyjson/jwriter" -) - -type testType interface { - json.Marshaler - json.Unmarshaler -} - -var testCases = []struct { - Decoded testType - Encoded string -}{ - {&primitiveTypesValue, primitiveTypesString}, - {&namedPrimitiveTypesValue, namedPrimitiveTypesString}, - {&structsValue, structsString}, - {&omitEmptyValue, omitEmptyString}, - {&snakeStructValue, snakeStructString}, - {&omitEmptyDefaultValue, omitEmptyDefaultString}, - {&optsValue, optsString}, - {&rawValue, rawString}, - {&stdMarshalerValue, stdMarshalerString}, - {&unexportedStructValue, unexportedStructString}, - {&excludedFieldValue, excludedFieldString}, - {&mapsValue, mapsString}, - {&deepNestValue, deepNestString}, - {&IntsValue, IntsString}, -} - -func TestMarshal(t *testing.T) { - for i, test := range testCases { - data, err := test.Decoded.MarshalJSON() - if err != nil { - t.Errorf("[%d, %T] MarshalJSON() error: %v", i, test.Decoded, err) - } - - got := string(data) - if got != test.Encoded { - t.Errorf("[%d, %T] MarshalJSON(): got \n%v\n\t\t want \n%v", i, test.Decoded, got, test.Encoded) - } - } -} - -func TestUnmarshal(t *testing.T) { - for i, test := range testCases { - v1 := reflect.New(reflect.TypeOf(test.Decoded).Elem()).Interface() - v := v1.(testType) - - err := v.UnmarshalJSON([]byte(test.Encoded)) - if err != nil { - t.Errorf("[%d, %T] UnmarshalJSON() error: %v", i, test.Decoded, err) - } - - if !reflect.DeepEqual(v, test.Decoded) { - t.Errorf("[%d, %T] UnmarshalJSON(): got \n%+v\n\t\t want \n%+v", i, test.Decoded, v, test.Decoded) - } - } -} - -func TestRawMessageSTD(t *testing.T) { - type T struct { - F easyjson.RawMessage - Fnil easyjson.RawMessage - } - - val := T{F: easyjson.RawMessage([]byte(`"test"`))} - str := `{"F":"test","Fnil":null}` - - data, err := json.Marshal(val) - if err != nil { - t.Errorf("json.Marshal() error: %v", err) - } - got := string(data) - if got != str { - t.Errorf("json.Marshal() = %v; want %v", got, str) - } - - wantV := T{F: easyjson.RawMessage([]byte(`"test"`)), Fnil: easyjson.RawMessage([]byte("null"))} - var gotV T - - err = json.Unmarshal([]byte(str), &gotV) - if err != nil { - t.Errorf("json.Unmarshal() error: %v", err) - } - if !reflect.DeepEqual(gotV, wantV) { - t.Errorf("json.Unmarshal() = %v; want %v", gotV, wantV) - } -} - -func TestParseNull(t *testing.T) { - var got, want SubStruct - if err := easyjson.Unmarshal([]byte("null"), &got); err != nil { - t.Errorf("Unmarshal() error: %v", err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("Unmarshal() = %+v; want %+v", got, want) - } -} - -var testSpecialCases = []struct { - EncodedString string - Value string -}{ - {`"Username \u003cuser@example.com\u003e"`, `Username `}, - {`"Username\ufffd"`, "Username\xc5"}, - {`"тестzтест"`, "тестzтест"}, - {`"тест\ufffdтест"`, "тест\xc5тест"}, - {`"绿茶"`, "绿茶"}, - {`"绿\ufffd茶"`, "绿\xc5茶"}, - {`"тест\u2028"`, "тест\xE2\x80\xA8"}, - {`"\\\r\n\t\""`, "\\\r\n\t\""}, - {`"ü"`, "ü"}, -} - -func TestSpecialCases(t *testing.T) { - for i, test := range testSpecialCases { - w := jwriter.Writer{} - w.String(test.Value) - got := string(w.Buffer.BuildBytes()) - if got != test.EncodedString { - t.Errorf("[%d] Encoded() = %+v; want %+v", i, got, test.EncodedString) - } - } -} diff --git a/vendor/github.com/mailru/easyjson/tests/data.go b/vendor/github.com/mailru/easyjson/tests/data.go deleted file mode 100644 index faa3093a..00000000 --- a/vendor/github.com/mailru/easyjson/tests/data.go +++ /dev/null @@ -1,545 +0,0 @@ -package tests - -import ( - "fmt" - "math" - "time" - - "github.com/mailru/easyjson" - "github.com/mailru/easyjson/opt" -) - -type PrimitiveTypes struct { - String string - Bool bool - - Int int - Int8 int8 - Int16 int16 - Int32 int32 - Int64 int64 - - Uint uint - Uint8 uint8 - Uint16 uint16 - Uint32 uint32 - Uint64 uint64 - - IntString int `json:",string"` - Int8String int8 `json:",string"` - Int16String int16 `json:",string"` - Int32String int32 `json:",string"` - Int64String int64 `json:",string"` - - UintString uint `json:",string"` - Uint8String uint8 `json:",string"` - Uint16String uint16 `json:",string"` - Uint32String uint32 `json:",string"` - Uint64String uint64 `json:",string"` - - Float32 float32 - Float64 float64 - - Ptr *string - PtrNil *string -} - -var str = "bla" - -var primitiveTypesValue = PrimitiveTypes{ - String: "test", Bool: true, - - Int: math.MinInt32, - Int8: math.MinInt8, - Int16: math.MinInt16, - Int32: math.MinInt32, - Int64: math.MinInt64, - - Uint: math.MaxUint32, - Uint8: math.MaxUint8, - Uint16: math.MaxUint16, - Uint32: math.MaxUint32, - Uint64: math.MaxUint64, - - IntString: math.MinInt32, - Int8String: math.MinInt8, - Int16String: math.MinInt16, - Int32String: math.MinInt32, - Int64String: math.MinInt64, - - UintString: math.MaxUint32, - Uint8String: math.MaxUint8, - Uint16String: math.MaxUint16, - Uint32String: math.MaxUint32, - Uint64String: math.MaxUint64, - - Float32: 1.5, - Float64: math.MaxFloat64, - - Ptr: &str, -} - -var primitiveTypesString = "{" + - `"String":"test","Bool":true,` + - - `"Int":` + fmt.Sprint(math.MinInt32) + `,` + - `"Int8":` + fmt.Sprint(math.MinInt8) + `,` + - `"Int16":` + fmt.Sprint(math.MinInt16) + `,` + - `"Int32":` + fmt.Sprint(math.MinInt32) + `,` + - `"Int64":` + fmt.Sprint(int64(math.MinInt64)) + `,` + - - `"Uint":` + fmt.Sprint(math.MaxUint32) + `,` + - `"Uint8":` + fmt.Sprint(math.MaxUint8) + `,` + - `"Uint16":` + fmt.Sprint(math.MaxUint16) + `,` + - `"Uint32":` + fmt.Sprint(math.MaxUint32) + `,` + - `"Uint64":` + fmt.Sprint(uint64(math.MaxUint64)) + `,` + - - `"IntString":"` + fmt.Sprint(math.MinInt32) + `",` + - `"Int8String":"` + fmt.Sprint(math.MinInt8) + `",` + - `"Int16String":"` + fmt.Sprint(math.MinInt16) + `",` + - `"Int32String":"` + fmt.Sprint(math.MinInt32) + `",` + - `"Int64String":"` + fmt.Sprint(int64(math.MinInt64)) + `",` + - - `"UintString":"` + fmt.Sprint(math.MaxUint32) + `",` + - `"Uint8String":"` + fmt.Sprint(math.MaxUint8) + `",` + - `"Uint16String":"` + fmt.Sprint(math.MaxUint16) + `",` + - `"Uint32String":"` + fmt.Sprint(math.MaxUint32) + `",` + - `"Uint64String":"` + fmt.Sprint(uint64(math.MaxUint64)) + `",` + - - `"Float32":` + fmt.Sprint(1.5) + `,` + - `"Float64":` + fmt.Sprint(math.MaxFloat64) + `,` + - - `"Ptr":"bla",` + - `"PtrNil":null` + - - "}" - -type ( - NamedString string - NamedBool bool - - NamedInt int - NamedInt8 int8 - NamedInt16 int16 - NamedInt32 int32 - NamedInt64 int64 - - NamedUint uint - NamedUint8 uint8 - NamedUint16 uint16 - NamedUint32 uint32 - NamedUint64 uint64 - - NamedFloat32 float32 - NamedFloat64 float64 - - NamedStrPtr *string -) - -type NamedPrimitiveTypes struct { - String NamedString - Bool NamedBool - - Int NamedInt - Int8 NamedInt8 - Int16 NamedInt16 - Int32 NamedInt32 - Int64 NamedInt64 - - Uint NamedUint - Uint8 NamedUint8 - Uint16 NamedUint16 - Uint32 NamedUint32 - Uint64 NamedUint64 - - Float32 NamedFloat32 - Float64 NamedFloat64 - - Ptr NamedStrPtr - PtrNil NamedStrPtr -} - -var namedPrimitiveTypesValue = NamedPrimitiveTypes{ - String: "test", - Bool: true, - - Int: math.MinInt32, - Int8: math.MinInt8, - Int16: math.MinInt16, - Int32: math.MinInt32, - Int64: math.MinInt64, - - Uint: math.MaxUint32, - Uint8: math.MaxUint8, - Uint16: math.MaxUint16, - Uint32: math.MaxUint32, - Uint64: math.MaxUint64, - - Float32: 1.5, - Float64: math.MaxFloat64, - - Ptr: NamedStrPtr(&str), -} - -var namedPrimitiveTypesString = "{" + - `"String":"test",` + - `"Bool":true,` + - - `"Int":` + fmt.Sprint(math.MinInt32) + `,` + - `"Int8":` + fmt.Sprint(math.MinInt8) + `,` + - `"Int16":` + fmt.Sprint(math.MinInt16) + `,` + - `"Int32":` + fmt.Sprint(math.MinInt32) + `,` + - `"Int64":` + fmt.Sprint(int64(math.MinInt64)) + `,` + - - `"Uint":` + fmt.Sprint(math.MaxUint32) + `,` + - `"Uint8":` + fmt.Sprint(math.MaxUint8) + `,` + - `"Uint16":` + fmt.Sprint(math.MaxUint16) + `,` + - `"Uint32":` + fmt.Sprint(math.MaxUint32) + `,` + - `"Uint64":` + fmt.Sprint(uint64(math.MaxUint64)) + `,` + - - `"Float32":` + fmt.Sprint(1.5) + `,` + - `"Float64":` + fmt.Sprint(math.MaxFloat64) + `,` + - - `"Ptr":"bla",` + - `"PtrNil":null` + - "}" - -type SubStruct struct { - Value string - Value2 string - unexpored bool -} - -type SubP struct { - V string -} - -type SubStructAlias SubStruct - -type Structs struct { - SubStruct - *SubP - - Value2 int - - Sub1 SubStruct `json:"substruct"` - Sub2 *SubStruct - SubNil *SubStruct - - SubSlice []SubStruct - SubSliceNil []SubStruct - - SubPtrSlice []*SubStruct - SubPtrSliceNil []*SubStruct - - SubA1 SubStructAlias - SubA2 *SubStructAlias - - Anonymous struct { - V string - I int - } - Anonymous1 *struct { - V string - } - - AnonymousSlice []struct{ V int } - AnonymousPtrSlice []*struct{ V int } - - Slice []string - - unexported bool -} - -var structsValue = Structs{ - SubStruct: SubStruct{Value: "test"}, - SubP: &SubP{V: "subp"}, - - Value2: 5, - - Sub1: SubStruct{Value: "test1", Value2: "v"}, - Sub2: &SubStruct{Value: "test2", Value2: "v2"}, - - SubSlice: []SubStruct{ - {Value: "s1"}, - {Value: "s2"}, - }, - - SubPtrSlice: []*SubStruct{ - {Value: "p1"}, - {Value: "p2"}, - }, - - SubA1: SubStructAlias{Value: "test3", Value2: "v3"}, - SubA2: &SubStructAlias{Value: "test4", Value2: "v4"}, - - Anonymous: struct { - V string - I int - }{V: "bla", I: 5}, - - Anonymous1: &struct { - V string - }{V: "bla1"}, - - AnonymousSlice: []struct{ V int }{{1}, {2}}, - AnonymousPtrSlice: []*struct{ V int }{{3}, {4}}, - - Slice: []string{"test5", "test6"}, -} - -var structsString = "{" + - `"Value2":5,` + - - `"substruct":{"Value":"test1","Value2":"v"},` + - `"Sub2":{"Value":"test2","Value2":"v2"},` + - `"SubNil":null,` + - - `"SubSlice":[{"Value":"s1","Value2":""},{"Value":"s2","Value2":""}],` + - `"SubSliceNil":[],` + - - `"SubPtrSlice":[{"Value":"p1","Value2":""},{"Value":"p2","Value2":""}],` + - `"SubPtrSliceNil":[],` + - - `"SubA1":{"Value":"test3","Value2":"v3"},` + - `"SubA2":{"Value":"test4","Value2":"v4"},` + - - `"Anonymous":{"V":"bla","I":5},` + - `"Anonymous1":{"V":"bla1"},` + - - `"AnonymousSlice":[{"V":1},{"V":2}],` + - `"AnonymousPtrSlice":[{"V":3},{"V":4}],` + - - `"Slice":["test5","test6"],` + - - // Embedded fields go last. - `"V":"subp",` + - `"Value":"test"` + - "}" - -type OmitEmpty struct { - // NOTE: first field is empty to test comma printing. - - StrE, StrNE string `json:",omitempty"` - PtrE, PtrNE *string `json:",omitempty"` - - IntNE int `json:"intField,omitempty"` - IntE int `json:",omitempty"` - - // NOTE: omitempty has no effect on non-pointer struct fields. - SubE, SubNE SubStruct `json:",omitempty"` - SubPE, SubPNE *SubStruct `json:",omitempty"` -} - -var omitEmptyValue = OmitEmpty{ - StrNE: "str", - PtrNE: &str, - IntNE: 6, - SubNE: SubStruct{Value: "1", Value2: "2"}, - SubPNE: &SubStruct{Value: "3", Value2: "4"}, -} - -var omitEmptyString = "{" + - `"StrNE":"str",` + - `"PtrNE":"bla",` + - `"intField":6,` + - `"SubE":{"Value":"","Value2":""},` + - `"SubNE":{"Value":"1","Value2":"2"},` + - `"SubPNE":{"Value":"3","Value2":"4"}` + - "}" - -type Opts struct { - StrNull opt.String - StrEmpty opt.String - Str opt.String - StrOmitempty opt.String `json:",omitempty"` - - IntNull opt.Int - IntZero opt.Int - Int opt.Int -} - -var optsValue = Opts{ - StrEmpty: opt.OString(""), - Str: opt.OString("test"), - - IntZero: opt.OInt(0), - Int: opt.OInt(5), -} - -var optsString = `{` + - `"StrNull":null,` + - `"StrEmpty":"",` + - `"Str":"test",` + - `"IntNull":null,` + - `"IntZero":0,` + - `"Int":5` + - `}` - -type Raw struct { - Field easyjson.RawMessage - Field2 string -} - -var rawValue = Raw{ - Field: []byte(`{"a" : "b"}`), - Field2: "test", -} - -var rawString = `{` + - `"Field":{"a" : "b"},` + - `"Field2":"test"` + - `}` - -type StdMarshaler struct { - T time.Time -} - -var stdMarshalerValue = StdMarshaler{T: time.Date(2016, 01, 02, 14, 15, 10, 0, time.UTC)} -var stdMarshalerString = `{"T":"2016-01-02T14:15:10Z"}` - -type unexportedStruct struct { - Value string -} - -var unexportedStructValue = unexportedStruct{"test"} -var unexportedStructString = `{"Value":"test"}` - -type ExcludedField struct { - Process bool `json:"process"` - DoNotProcess bool `json:"-"` - DoNotProcess1 bool `json:"-"` -} - -var excludedFieldValue = ExcludedField{ - Process: true, - DoNotProcess: false, - DoNotProcess1: false, -} -var excludedFieldString = `{"process":true}` - -type Str string - -type Maps struct { - Map map[string]string - InterfaceMap map[string]interface{} - NilMap map[string]string - - CustomMap map[Str]Str -} - -var mapsValue = Maps{ - Map: map[string]string{"A": "b"}, // only one item since map iteration is randomized - InterfaceMap: map[string]interface{}{"G": float64(1)}, - - CustomMap: map[Str]Str{"c": "d"}, -} - -var mapsString = `{` + - `"Map":{"A":"b"},` + - `"InterfaceMap":{"G":1},` + - `"NilMap":null,` + - `"CustomMap":{"c":"d"}` + - `}` - -type NamedSlice []Str -type NamedMap map[Str]Str - -type DeepNest struct { - SliceMap map[Str][]Str - SliceMap1 map[Str][]Str - NamedSliceMap map[Str]NamedSlice - NamedMapMap map[Str]NamedMap - MapSlice []map[Str]Str - NamedSliceSlice []NamedSlice - NamedMapSlice []NamedMap - NamedStringSlice []NamedString -} - -var deepNestValue = DeepNest{ - SliceMap: map[Str][]Str{ - "testSliceMap": []Str{ - "0", - "1", - }, - }, - SliceMap1: map[Str][]Str{ - "testSliceMap1": nil, - }, - NamedSliceMap: map[Str]NamedSlice{ - "testNamedSliceMap": NamedSlice{ - "2", - "3", - }, - }, - NamedMapMap: map[Str]NamedMap{ - "testNamedMapMap": NamedMap{ - "key1": "value1", - }, - }, - MapSlice: []map[Str]Str{ - map[Str]Str{ - "testMapSlice": "someValue", - }, - }, - NamedSliceSlice: []NamedSlice{ - NamedSlice{ - "someValue1", - "someValue2", - }, - NamedSlice{ - "someValue3", - "someValue4", - }, - }, - NamedMapSlice: []NamedMap{ - NamedMap{ - "key2": "value2", - }, - NamedMap{ - "key3": "value3", - }, - }, - NamedStringSlice: []NamedString{ - "value4", "value5", - }, -} - -var deepNestString = `{` + - `"SliceMap":{` + - `"testSliceMap":["0","1"]` + - `},` + - `"SliceMap1":{` + - `"testSliceMap1":[]` + - `},` + - `"NamedSliceMap":{` + - `"testNamedSliceMap":["2","3"]` + - `},` + - `"NamedMapMap":{` + - `"testNamedMapMap":{"key1":"value1"}` + - `},` + - `"MapSlice":[` + - `{"testMapSlice":"someValue"}` + - `],` + - `"NamedSliceSlice":[` + - `["someValue1","someValue2"],` + - `["someValue3","someValue4"]` + - `],` + - `"NamedMapSlice":[` + - `{"key2":"value2"},` + - `{"key3":"value3"}` + - `],` + - `"NamedStringSlice":["value4","value5"]` + - `}` - -//easyjson:json -type Ints []int - -var IntsValue = Ints{1, 2, 3, 4, 5} - -var IntsString = `[1,2,3,4,5]` - -type RequiredOptionalStruct struct { - FirstName string `json:"first_name,required"` - Lastname string `json:"last_name"` -} diff --git a/vendor/github.com/mailru/easyjson/tests/nothing.go b/vendor/github.com/mailru/easyjson/tests/nothing.go deleted file mode 100644 index 35334f5f..00000000 --- a/vendor/github.com/mailru/easyjson/tests/nothing.go +++ /dev/null @@ -1,3 +0,0 @@ -package tests - -// No structs in this file diff --git a/vendor/github.com/mailru/easyjson/tests/omitempty.go b/vendor/github.com/mailru/easyjson/tests/omitempty.go deleted file mode 100644 index ede5eb95..00000000 --- a/vendor/github.com/mailru/easyjson/tests/omitempty.go +++ /dev/null @@ -1,12 +0,0 @@ -package tests - -//easyjson:json -type OmitEmptyDefault struct { - Field string - Str string - Str1 string `json:"s,!omitempty"` - Str2 string `json:",!omitempty"` -} - -var omitEmptyDefaultValue = OmitEmptyDefault{Field: "test"} -var omitEmptyDefaultString = `{"Field":"test","s":"","Str2":""}` diff --git a/vendor/github.com/mailru/easyjson/tests/required_test.go b/vendor/github.com/mailru/easyjson/tests/required_test.go deleted file mode 100644 index 8b03be6e..00000000 --- a/vendor/github.com/mailru/easyjson/tests/required_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package tests - -import ( - "testing" - "fmt" -) - -func TestRequiredField(t *testing.T) { - cases := []struct{ json, errorMessage string }{ - {`{"first_name":"Foo", "last_name": "Bar"}`, ""}, - {`{"last_name":"Bar"}`, "key 'first_name' is required"}, - {"{}", "key 'first_name' is required"}, - } - - for _, tc := range cases { - var v RequiredOptionalStruct - err := v.UnmarshalJSON([]byte(tc.json)) - if tc.errorMessage == "" { - if err != nil { - t.Errorf("%s. UnmarshallJSON didn`t expect error: %v", tc.json, err) - } - } else { - if fmt.Sprintf("%v", err) != tc.errorMessage { - t.Errorf("%s. UnmarshallJSON expected error: %v. got: %v", tc.json, tc.errorMessage, err) - } - } - } -} diff --git a/vendor/github.com/mailru/easyjson/tests/snake.go b/vendor/github.com/mailru/easyjson/tests/snake.go deleted file mode 100644 index 9b64f861..00000000 --- a/vendor/github.com/mailru/easyjson/tests/snake.go +++ /dev/null @@ -1,10 +0,0 @@ -package tests - -//easyjson:json -type SnakeStruct struct { - WeirdHTTPStuff bool - CustomNamedField string `json:"cUsToM"` -} - -var snakeStructValue SnakeStruct -var snakeStructString = `{"weird_http_stuff":false,"cUsToM":""}` diff --git a/vendor/github.com/onsi/ginkgo/.gitignore b/vendor/github.com/onsi/ginkgo/.gitignore index 922b4f7f..18793c24 100644 --- a/vendor/github.com/onsi/ginkgo/.gitignore +++ b/vendor/github.com/onsi/ginkgo/.gitignore @@ -1,4 +1,7 @@ .DS_Store TODO tmp/**/* -*.coverprofile \ No newline at end of file +*.coverprofile +.vscode +.idea/ +*.log \ No newline at end of file diff --git a/vendor/github.com/onsi/ginkgo/.travis.yml b/vendor/github.com/onsi/ginkgo/.travis.yml index 19ca78b6..7ad39b78 100644 --- a/vendor/github.com/onsi/ginkgo/.travis.yml +++ b/vendor/github.com/onsi/ginkgo/.travis.yml @@ -1,8 +1,10 @@ language: go go: - - 1.5 - - 1.6 - - 1.7 + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x install: - go get -v -t ./... @@ -11,4 +13,4 @@ install: - go install github.com/onsi/ginkgo/ginkgo - export PATH=$PATH:$HOME/gopath/bin -script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --randomizeSuites --race --trace +script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --randomizeSuites --race --trace && go vet diff --git a/vendor/github.com/onsi/ginkgo/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/CHANGELOG.md index 5bc46f91..32370206 100644 --- a/vendor/github.com/onsi/ginkgo/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/CHANGELOG.md @@ -1,10 +1,71 @@ -## HEAD +## 1.6.0 + +### New Features +- add --debug flag to emit node output to files (#499) [39febac] + +### Fixes +- fix: for `go vet` to pass [69338ec] +- docs: fix for contributing instructions [7004cb1] +- consolidate and streamline contribution docs (#494) [d848015] +- Make generated Junit file compatable with "Maven Surefire" (#488) [e51bee6] +- all: gofmt [000d317] +- Increase eventually timeout to 30s [c73579c] +- Clarify asynchronous test behaviour [294d8f4] +- Travis badge should only show master [26d2143] + +## 1.5.0 5/10/2018 + +### New Features +- Supports go v1.10 (#443, #446, #451) [e873237, 468e89e, e37dbfe, a37f4c0, c0b857d, bca5260, 4177ca8] +- Add a When() synonym for Context() (#386) [747514b, 7484dad, 7354a07, dd826c8] +- Re-add noisySkippings flag [652e15c] +- Allow coverage to be displayed for focused specs (#367) [11459a8] +- Handle -outputdir flag (#364) [228e3a8] +- Handle -coverprofile flag (#355) [43392d5] + +### Fixes +- When using custom reporters register the custom reporters *before* the default reporter. This allows users to see the output of any print statements in their customer reporters. (#365) [8382b23] +- When running a test and calculating the coverage using the `-coverprofile` and `-outputdir` flags, Ginkgo fails with an error if the directory does not exist. This is due to an [issue in go 1.10](https://github.com/golang/go/issues/24588) (#446) [b36a6e0] +- `unfocus` command ignores vendor folder (#459) [e5e551c, c556e43, a3b6351, 9a820dd] +- Ignore packages whose tests are all ignored by go (#456) [7430ca7, 6d8be98] +- Increase the threshold when checking time measuments (#455) [2f714bf, 68f622c] +- Fix race condition in coverage tests (#423) [a5a8ff7, ab9c08b] +- Add an extra new line after reporting spec run completion for test2json [874520d] +- added name name field to junit reported testsuite [ae61c63] +- Do not set the run time of a spec when the dryRun flag is used (#438) [457e2d9, ba8e856] +- Process FWhen and FSpecify when unfocusing (#434) [9008c7b, ee65bd, df87dfe] +- Synchronise the access to the state of specs to avoid race conditions (#430) [7d481bc, ae6829d] +- Added Duration on GinkgoTestDescription (#383) [5f49dad, 528417e, 0747408, 329d7ed] +- Fix Ginkgo stack trace on failure for Specify (#415) [b977ede, 65ca40e, 6c46eb8] +- Update README with Go 1.6+, Golang -> Go (#409) [17f6b97, bc14b66, 20d1598] +- Use fmt.Errorf instead of errors.New(fmt.Sprintf (#401) [a299f56, 44e2eaa] +- Imports in generated code should follow conventions (#398) [0bec0b0, e8536d8] +- Prevent data race error when Recording a benchmark value from multiple go routines (#390) [c0c4881, 7a241e9] +- Replace GOPATH in Environment [4b883f0] + + +## 1.4.0 7/16/2017 + +- `ginkgo` now provides a hint if you accidentally forget to run `ginkgo bootstrap` to generate a `*_suite_test.go` file that actually invokes the Ginkgo test runner. [#345](https://github.com/onsi/ginkgo/pull/345) +- thanks to improvements in `go test -c` `ginkgo` no longer needs to fix Go's compilation output to ensure compilation errors are expressed relative to the CWD. [#357] +- `ginkgo watch -watchRegExp=...` allows you to specify a custom regular expression to watch. Only files matching the regular expression are watched for changes (the default is `\.go$`) [#356] +- `ginkgo` now always emits compilation output. Previously, only failed compilation output was printed out. [#277] +- `ginkgo -requireSuite` now fails the test run if there are `*_test.go` files but `go test` fails to detect any tests. Typically this means you forgot to run `ginkgo bootstrap` to generate a suite file. [#344] +- `ginkgo -timeout=DURATION` allows you to adjust the timeout for the entire test suite (default is 24 hours) [#248] + +## 1.3.0 3/28/2017 Improvements: +- Significantly improved parallel test distribution. Now instead of pre-sharding test cases across workers (which can result in idle workers and poor test performance) Ginkgo uses a shared queue to keep all workers busy until all tests are complete. This improves test-time performance and consistency. - `Skip(message)` can be used to skip the current test. - Added `extensions/table` - a Ginkgo DSL for [Table Driven Tests](http://onsi.github.io/ginkgo/#table-driven-tests) - Add `GinkgoRandomSeed()` - shorthand for `config.GinkgoConfig.RandomSeed` +- Support for retrying flaky tests with `--flakeAttempts` +- `ginkgo ./...` now recurses as you'd expect +- Added `Specify` a synonym for `It` +- Support colorise on Windows +- Broader support for various go compilation flags in the `ginkgo` CLI Bug Fixes: diff --git a/vendor/github.com/onsi/ginkgo/CONTRIBUTING.md b/vendor/github.com/onsi/ginkgo/CONTRIBUTING.md new file mode 100644 index 00000000..908b95c2 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# Contributing to Ginkgo + +Your contributions to Ginkgo are essential for its long-term maintenance and improvement. + +- Please **open an issue first** - describe what problem you are trying to solve and give the community a forum for input and feedback ahead of investing time in writing code! +- Ensure adequate test coverage: + - When adding to the Ginkgo library, add unit and/or integration tests (under the `integration` folder). + - When adding to the Ginkgo CLI, note that there are very few unit tests. Please add an integration test. +- Update the documentation. Ginko uses `godoc` comments and documentation on the `gh-pages` branch. + If relevant, please submit a docs PR to that branch alongside your code PR. + +Thanks for supporting Ginkgo! + +## Setup + +Fork the repo, then: + +``` +go get github.com/onsi/ginkgo +go get github.com/onsi/gomega/... +cd $GOPATH/src/github.com/onsi/ginkgo +git remote add fork git@github.com:/ginkgo.git + +ginkgo -r -p # ensure tests are green +go vet ./... # ensure linter is happy +``` + +## Making the PR + - go to a new branch `git checkout -b my-feature` + - make your changes + - run tests and linter again (see above) + - `git push fork` + - open PR 🎉 diff --git a/vendor/github.com/onsi/ginkgo/README.md b/vendor/github.com/onsi/ginkgo/README.md index b8b77b57..cdf8d054 100644 --- a/vendor/github.com/onsi/ginkgo/README.md +++ b/vendor/github.com/onsi/ginkgo/README.md @@ -1,19 +1,19 @@ -![Ginkgo: A Golang BDD Testing Framework](http://onsi.github.io/ginkgo/images/ginkgo.png) +![Ginkgo: A Go BDD Testing Framework](http://onsi.github.io/ginkgo/images/ginkgo.png) -[![Build Status](https://travis-ci.org/onsi/ginkgo.png)](https://travis-ci.org/onsi/ginkgo) +[![Build Status](https://travis-ci.org/onsi/ginkgo.svg?branch=master)](https://travis-ci.org/onsi/ginkgo) Jump to the [docs](http://onsi.github.io/ginkgo/) to learn more. To start rolling your Ginkgo tests *now* [keep reading](#set-me-up)! -To discuss Ginkgo and get updates, join the [google group](https://groups.google.com/d/forum/ginkgo-and-gomega). +If you have a question, comment, bug report, feature request, etc. please open a GitHub issue. ## Feature List - Ginkgo uses Go's `testing` package and can live alongside your existing `testing` tests. It's easy to [bootstrap](http://onsi.github.io/ginkgo/#bootstrapping-a-suite) and start writing your [first tests](http://onsi.github.io/ginkgo/#adding-specs-to-a-suite) - Structure your BDD-style tests expressively: - - Nestable [`Describe` and `Context` container blocks](http://onsi.github.io/ginkgo/#organizing-specs-with-containers-describe-and-context) + - Nestable [`Describe`, `Context` and `When` container blocks](http://onsi.github.io/ginkgo/#organizing-specs-with-containers-describe-and-context) - [`BeforeEach` and `AfterEach` blocks](http://onsi.github.io/ginkgo/#extracting-common-setup-beforeeach) for setup and teardown - - [`It` blocks](http://onsi.github.io/ginkgo/#individual-specs-) that hold your assertions + - [`It` and `Specify` blocks](http://onsi.github.io/ginkgo/#individual-specs-) that hold your assertions - [`JustBeforeEach` blocks](http://onsi.github.io/ginkgo/#separating-creation-and-configuration-justbeforeeach) that separate creation from configuration (also known as the subject action pattern). - [`BeforeSuite` and `AfterSuite` blocks](http://onsi.github.io/ginkgo/#global-setup-and-teardown-beforesuite-and-aftersuite) to prep for and cleanup after a suite. @@ -25,7 +25,7 @@ To discuss Ginkgo and get updates, join the [google group](https://groups.google - `ginkgo`: a command line interface with plenty of handy command line arguments for [running your tests](http://onsi.github.io/ginkgo/#running-tests) and [generating](http://onsi.github.io/ginkgo/#generators) test files. Here are a few choice examples: - `ginkgo -nodes=N` runs your tests in `N` parallel processes and print out coherent output in realtime - - `ginkgo -cover` runs your tests using Golang's code coverage tool + - `ginkgo -cover` runs your tests using Go's code coverage tool - `ginkgo convert` converts an XUnit-style `testing` package to a Ginkgo-style package - `ginkgo -focus="REGEXP"` and `ginkgo -skip="REGEXP"` allow you to specify a subset of tests to run via regular expression - `ginkgo -r` runs all tests suites under the current directory @@ -43,6 +43,8 @@ To discuss Ginkgo and get updates, join the [google group](https://groups.google - [Completions for Sublime Text](https://github.com/onsi/ginkgo-sublime-completions): just use [Package Control](https://sublime.wbond.net/) to install `Ginkgo Completions`. +- [Completions for VSCode](https://github.com/onsi/vscode-ginkgo): just use VSCode's extension installer to install `vscode-ginkgo`. + - Straightforward support for third-party testing libraries such as [Gomock](https://code.google.com/p/gomock/) and [Testify](https://github.com/stretchr/testify). Check out the [docs](http://onsi.github.io/ginkgo/#third-party-integrations) for details. - A modular architecture that lets you easily: @@ -53,18 +55,18 @@ To discuss Ginkgo and get updates, join the [google group](https://groups.google Ginkgo is best paired with Gomega. Learn more about Gomega [here](http://onsi.github.io/gomega/) -## [Agouti](http://github.com/sclevine/agouti): A Golang Acceptance Testing Framework +## [Agouti](http://github.com/sclevine/agouti): A Go Acceptance Testing Framework Agouti allows you run WebDriver integration tests. Learn more about Agouti [here](http://agouti.org) ## Set Me Up! -You'll need Golang v1.3+ (Ubuntu users: you probably have Golang v1.0 -- you'll need to upgrade!) +You'll need the Go command-line tools. Ginkgo is tested with Go 1.6+, but preferably you should get the latest. Follow the [installation instructions](https://golang.org/doc/install) if you don't have it installed. ```bash -go get github.com/onsi/ginkgo/ginkgo # installs the ginkgo CLI -go get github.com/onsi/gomega # fetches the matcher library +go get -u github.com/onsi/ginkgo/ginkgo # installs the ginkgo CLI +go get -u github.com/onsi/gomega/... # fetches the matcher library cd path/to/package/you/want/to/test @@ -83,11 +85,11 @@ Of course, I heartily recommend [Ginkgo](https://github.com/onsi/ginkgo) and [Go With that said, it's great to know what your options are :) -### What Golang gives you out of the box +### What Go gives you out of the box -Testing is a first class citizen in Golang, however Go's built-in testing primitives are somewhat limited: The [testing](http://golang.org/pkg/testing) package provides basic XUnit style tests and no assertion library. +Testing is a first class citizen in Go, however Go's built-in testing primitives are somewhat limited: The [testing](http://golang.org/pkg/testing) package provides basic XUnit style tests and no assertion library. -### Matcher libraries for Golang's XUnit style tests +### Matcher libraries for Go's XUnit style tests A number of matcher libraries have been written to augment Go's built-in XUnit style tests. Here are two that have gained traction: @@ -98,7 +100,7 @@ You can also use Ginkgo's matcher library [Gomega](https://github.com/onsi/gomeg ### BDD style testing frameworks -There are a handful of BDD-style testing frameworks written for Golang. Here are a few: +There are a handful of BDD-style testing frameworks written for Go. Here are a few: - [Ginkgo](https://github.com/onsi/ginkgo) ;) - [GoConvey](https://github.com/smartystreets/goconvey) @@ -106,10 +108,14 @@ There are a handful of BDD-style testing frameworks written for Golang. Here ar - [Mao](https://github.com/azer/mao) - [Zen](https://github.com/pranavraja/zen) -Finally, @shageman has [put together](https://github.com/shageman/gotestit) a comprehensive comparison of golang testing libraries. +Finally, @shageman has [put together](https://github.com/shageman/gotestit) a comprehensive comparison of Go testing libraries. Go explore! ## License Ginkgo is MIT-Licensed + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/vendor/github.com/onsi/ginkgo/RELEASING.md b/vendor/github.com/onsi/ginkgo/RELEASING.md new file mode 100644 index 00000000..1e298c2d --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/RELEASING.md @@ -0,0 +1,14 @@ +A Ginkgo release is a tagged git sha and a GitHub release. To cut a release: + +1. Ensure CHANGELOG.md is up to date. + - Use `git log --pretty=format:'- %s [%h]' HEAD...vX.X.X` to list all the commits since the last release + - Categorize the changes into + - Breaking Changes (requires a major version) + - New Features (minor version) + - Fixes (fix version) + - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact) +1. Update `VERSION` in `config/config.go` +1. Create a commit with the version number as the commit message (e.g. `v1.3.0`) +1. Tag the commit with the version number as the tag name (e.g. `v1.3.0`) +1. Push the commit and tag to GitHub +1. Create a new [GitHub release](https://help.github.com/articles/creating-releases/) with the version number as the tag (e.g. `v1.3.0`). List the key changes in the release notes. diff --git a/vendor/github.com/onsi/ginkgo/config/config.go b/vendor/github.com/onsi/ginkgo/config/config.go index 4b5485b4..d4ed1fa5 100644 --- a/vendor/github.com/onsi/ginkgo/config/config.go +++ b/vendor/github.com/onsi/ginkgo/config/config.go @@ -20,7 +20,7 @@ import ( "fmt" ) -const VERSION = "1.2.0" +const VERSION = "1.6.0" type GinkgoConfigType struct { RandomSeed int64 @@ -34,6 +34,7 @@ type GinkgoConfigType struct { FlakeAttempts int EmitSpecProgress bool DryRun bool + DebugParallel bool ParallelNode int ParallelTotal int @@ -47,6 +48,7 @@ type DefaultReporterConfigType struct { NoColor bool SlowSpecThreshold float64 NoisyPendings bool + NoisySkippings bool Succinct bool Verbose bool FullTrace bool @@ -64,7 +66,7 @@ func processPrefix(prefix string) string { 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.RandomizeAllSpecs), prefix+"randomizeAllSpecs", false, "If set, ginkgo will randomize all specs together. By default, ginkgo only randomizes the top level Describe, Context and When 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.") @@ -80,6 +82,8 @@ func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bool) { flagSet.BoolVar(&(GinkgoConfig.EmitSpecProgress), prefix+"progress", false, "If set, ginkgo will emit progress information as each spec runs to the GinkgoWriter.") + flagSet.BoolVar(&(GinkgoConfig.DebugParallel), prefix+"debug", false, "If set, ginkgo will emit node output to files when running in parallel.") + 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.") @@ -90,6 +94,7 @@ func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bool) { 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") @@ -139,6 +144,10 @@ func BuildFlagArgs(prefix string, ginkgo GinkgoConfigType, reporter DefaultRepor result = append(result, fmt.Sprintf("--%sprogress", prefix)) } + if ginkgo.DebugParallel { + result = append(result, fmt.Sprintf("--%sdebug", prefix)) + } + if ginkgo.ParallelNode != 0 { result = append(result, fmt.Sprintf("--%sparallel.node=%d", prefix, ginkgo.ParallelNode)) } @@ -171,6 +180,10 @@ func BuildFlagArgs(prefix string, ginkgo GinkgoConfigType, reporter DefaultRepor 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)) } 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 ae8ab7d2..00000000 --- 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 5fa645bc..00000000 --- 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/extensions/table/table_suite_test.go b/vendor/github.com/onsi/ginkgo/extensions/table/table_suite_test.go deleted file mode 100644 index f482ec3d..00000000 --- a/vendor/github.com/onsi/ginkgo/extensions/table/table_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package table_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestTable(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Table Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/extensions/table/table_test.go b/vendor/github.com/onsi/ginkgo/extensions/table/table_test.go deleted file mode 100644 index b008e432..00000000 --- a/vendor/github.com/onsi/ginkgo/extensions/table/table_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package table_test - -import ( - "strings" - - . "github.com/onsi/ginkgo/extensions/table" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Table", func() { - 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), - ) - - type ComplicatedThings struct { - Superstructure string - Substructure string - Count int - } - - DescribeTable("a more complicated table", - func(c ComplicatedThings) { - Ω(strings.Count(c.Superstructure, c.Substructure)).Should(BeNumerically("==", c.Count)) - }, - Entry("with no matching substructures", ComplicatedThings{ - Superstructure: "the sixth sheikh's sixth sheep's sick", - Substructure: "emir", - Count: 0, - }), - Entry("with one matching substructure", ComplicatedThings{ - Superstructure: "the sixth sheikh's sixth sheep's sick", - Substructure: "sheep", - Count: 1, - }), - Entry("with many matching substructures", ComplicatedThings{ - Superstructure: "the sixth sheikh's sixth sheep's sick", - Substructure: "si", - Count: 3, - }), - ) - - PDescribeTable("a failure", - func(value bool) { - Ω(value).Should(BeFalse()) - }, - Entry("when true", true), - Entry("when false", false), - Entry("when malformed", 2), - ) - - DescribeTable("an untyped nil as an entry", - func(x interface{}) { - Expect(x).To(BeNil()) - }, - Entry("nil", nil), - ) -}) 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 1e209e4f..00000000 --- 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 ( - {{.GinkgoImport}} - {{.GomegaImport}} - - "testing" -) - -func Test{{.FormattedName}}(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "{{.FormattedName}} Suite") -} -` - -var agoutiBootstrapText = `package {{.Package}} - -import ( - {{.GinkgoImport}} - {{.GomegaImport}} - "github.com/sclevine/agouti" - - "testing" -) - -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 41bd1acf..00000000 --- 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, 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 02e2b3b3..00000000 --- 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 e226196f..00000000 --- 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 ed09c460..00000000 --- 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 b33595c9..00000000 --- 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 4b001a7d..00000000 --- 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 418cdc4e..00000000 --- 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 89e60d39..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert_command.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "github.com/onsi/ginkgo/ginkgo/convert" - "os" -) - -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 3b9405aa..00000000 --- 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 .DotImportPackage}}. "{{.PackageImportPath}}"{{end}} - - {{if .IncludeImports}}. "github.com/onsi/ginkgo"{{end}} - {{if .IncludeImports}}. "github.com/onsi/gomega"{{end}} -) - -var _ = Describe("{{.Subject}}", func() { - -}) -` - -var agoutiSpecText = `package {{.Package}}_test - -import ( - {{if .DotImportPackage}}. "{{.PackageImportPath}}"{{end}} - - {{if .IncludeImports}}. "github.com/onsi/ginkgo"{{end}} - {{if .IncludeImports}}. "github.com/onsi/gomega"{{end}} - . "github.com/sclevine/agouti/matchers" - "github.com/sclevine/agouti" -) - -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 23b1d2f1..00000000 --- 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 c15db0b0..00000000 --- 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 43c18544..00000000 --- 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 7f4a50e1..00000000 --- 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 b031b808..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/main.go +++ /dev/null @@ -1,291 +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 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, recurse 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 - } - } - suites = append(suites, testsuite.SuitesInDir(arg, recurse)...) - } - } else { - suites = testsuite.SuitesInDir(".", recurse) - } - - 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 3f7237c6..00000000 --- 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/nodot_suite_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_suite_test.go deleted file mode 100644 index ca4613e6..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_suite_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package nodot_test - -import ( - "github.com/onsi/ginkgo" - "github.com/onsi/gomega" - - "testing" -) - -func TestNodot(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Nodot Suite") -} - -// Declarations for Ginkgo DSL -type Done ginkgo.Done -type Benchmarker ginkgo.Benchmarker - -var GinkgoWriter = ginkgo.GinkgoWriter -var GinkgoParallelNode = ginkgo.GinkgoParallelNode -var GinkgoT = ginkgo.GinkgoT -var CurrentGinkgoTestDescription = ginkgo.CurrentGinkgoTestDescription -var RunSpecs = ginkgo.RunSpecs -var RunSpecsWithDefaultAndCustomReporters = ginkgo.RunSpecsWithDefaultAndCustomReporters -var RunSpecsWithCustomReporters = ginkgo.RunSpecsWithCustomReporters -var Fail = ginkgo.Fail -var GinkgoRecover = ginkgo.GinkgoRecover -var Describe = ginkgo.Describe -var FDescribe = ginkgo.FDescribe -var PDescribe = ginkgo.PDescribe -var XDescribe = ginkgo.XDescribe -var Context = ginkgo.Context -var FContext = ginkgo.FContext -var PContext = ginkgo.PContext -var XContext = ginkgo.XContext -var It = ginkgo.It -var FIt = ginkgo.FIt -var PIt = ginkgo.PIt -var XIt = ginkgo.XIt -var Measure = ginkgo.Measure -var FMeasure = ginkgo.FMeasure -var PMeasure = ginkgo.PMeasure -var XMeasure = ginkgo.XMeasure -var BeforeSuite = ginkgo.BeforeSuite -var AfterSuite = ginkgo.AfterSuite -var SynchronizedBeforeSuite = ginkgo.SynchronizedBeforeSuite -var SynchronizedAfterSuite = ginkgo.SynchronizedAfterSuite -var BeforeEach = ginkgo.BeforeEach -var JustBeforeEach = ginkgo.JustBeforeEach -var AfterEach = ginkgo.AfterEach - -// Declarations for Gomega DSL -var RegisterFailHandler = gomega.RegisterFailHandler -var RegisterTestingT = gomega.RegisterTestingT -var InterceptGomegaFailures = gomega.InterceptGomegaFailures -var Ω = gomega.Ω -var Expect = gomega.Expect -var ExpectWithOffset = gomega.ExpectWithOffset -var Eventually = gomega.Eventually -var EventuallyWithOffset = gomega.EventuallyWithOffset -var Consistently = gomega.Consistently -var ConsistentlyWithOffset = gomega.ConsistentlyWithOffset -var SetDefaultEventuallyTimeout = gomega.SetDefaultEventuallyTimeout -var SetDefaultEventuallyPollingInterval = gomega.SetDefaultEventuallyPollingInterval -var SetDefaultConsistentlyDuration = gomega.SetDefaultConsistentlyDuration -var SetDefaultConsistentlyPollingInterval = gomega.SetDefaultConsistentlyPollingInterval - -// Declarations for Gomega Matchers -var Equal = gomega.Equal -var BeEquivalentTo = gomega.BeEquivalentTo -var BeNil = gomega.BeNil -var BeTrue = gomega.BeTrue -var BeFalse = gomega.BeFalse -var HaveOccurred = gomega.HaveOccurred -var MatchError = gomega.MatchError -var BeClosed = gomega.BeClosed -var Receive = gomega.Receive -var MatchRegexp = gomega.MatchRegexp -var ContainSubstring = gomega.ContainSubstring -var MatchJSON = gomega.MatchJSON -var BeEmpty = gomega.BeEmpty -var HaveLen = gomega.HaveLen -var BeZero = gomega.BeZero -var ContainElement = gomega.ContainElement -var ConsistOf = gomega.ConsistOf -var HaveKey = gomega.HaveKey -var HaveKeyWithValue = gomega.HaveKeyWithValue -var BeNumerically = gomega.BeNumerically -var BeTemporally = gomega.BeTemporally -var BeAssignableToTypeOf = gomega.BeAssignableToTypeOf -var Panic = gomega.Panic diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_test.go deleted file mode 100644 index 37260a89..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package nodot_test - -import ( - . "github.com/onsi/ginkgo/ginkgo/nodot" - "strings" -) - -var _ = Describe("ApplyNoDot", func() { - var result string - - apply := func(input string) string { - output, err := ApplyNoDot([]byte(input)) - Ω(err).ShouldNot(HaveOccurred()) - return string(output) - } - - Context("when no declarations have been imported yet", func() { - BeforeEach(func() { - result = apply("") - }) - - It("should add headings for the various declarations", func() { - Ω(result).Should(ContainSubstring("// Declarations for Ginkgo DSL")) - Ω(result).Should(ContainSubstring("// Declarations for Gomega DSL")) - Ω(result).Should(ContainSubstring("// Declarations for Gomega Matchers")) - }) - - It("should import Ginkgo's declarations", func() { - Ω(result).Should(ContainSubstring("var It = ginkgo.It")) - Ω(result).Should(ContainSubstring("var XDescribe = ginkgo.XDescribe")) - }) - - It("should import Ginkgo's types", func() { - Ω(result).Should(ContainSubstring("type Done ginkgo.Done")) - Ω(result).Should(ContainSubstring("type Benchmarker ginkgo.Benchmarker")) - Ω(strings.Count(result, "type ")).Should(Equal(2)) - }) - - It("should import Gomega's DSL and matchers", func() { - Ω(result).Should(ContainSubstring("var Ω = gomega.Ω")) - Ω(result).Should(ContainSubstring("var ContainSubstring = gomega.ContainSubstring")) - Ω(result).Should(ContainSubstring("var Equal = gomega.Equal")) - }) - - It("should not import blacklisted things", func() { - Ω(result).ShouldNot(ContainSubstring("GINKGO_VERSION")) - Ω(result).ShouldNot(ContainSubstring("GINKGO_PANIC")) - Ω(result).ShouldNot(ContainSubstring("GOMEGA_VERSION")) - }) - }) - - It("should be idempotent (module empty lines - go fmt can fix those for us)", func() { - first := apply("") - second := apply(first) - first = strings.Trim(first, "\n") - second = strings.Trim(second, "\n") - Ω(first).Should(Equal(second)) - }) - - It("should not mess with other things in the input", func() { - result = apply("var MyThing = SomethingThatsMine") - Ω(result).Should(ContainSubstring("var MyThing = SomethingThatsMine")) - }) - - Context("when the user has redefined a name", func() { - It("should honor the redefinition", func() { - result = apply(` -var _ = gomega.Ω -var When = ginkgo.It - `) - - Ω(result).Should(ContainSubstring("var _ = gomega.Ω")) - Ω(result).ShouldNot(ContainSubstring("var Ω = gomega.Ω")) - - Ω(result).Should(ContainSubstring("var When = ginkgo.It")) - Ω(result).ShouldNot(ContainSubstring("var It = ginkgo.It")) - - Ω(result).Should(ContainSubstring("var Context = ginkgo.Context")) - }) - }) -}) 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 212235ba..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/nodot_command.go +++ /dev/null @@ -1,76 +0,0 @@ -package main - -import ( - "bufio" - "flag" - "github.com/onsi/ginkgo/ginkgo/nodot" - "io/ioutil" - "os" - "path/filepath" - "regexp" -) - -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 368d61fb..00000000 --- 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 9f19192a..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go +++ /dev/null @@ -1,192 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "math/rand" - "os" - "time" - - "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.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) - } - - 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 { - 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) - } -} - -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", - "Here we go 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 20ba7924..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/run_watch_and_build_command_flags.go +++ /dev/null @@ -1,160 +0,0 @@ -package main - -import ( - "flag" - "runtime" - - "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 - - //only for run command - KeepGoing bool - UntilItFails bool - RandomizeSuites bool - - //only for watch command - Depth int - - 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.") - - 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") - } - - 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") - } -} 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 7d56e5f7..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/suite_runner.go +++ /dev/null @@ -1,172 +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" -) - -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.Printf("\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 a73a6e37..00000000 --- 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 5d472acb..00000000 --- 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 3645f1f4..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go +++ /dev/null @@ -1,506 +0,0 @@ -package testrunner - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "regexp" - "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 - goOpts map[string]interface{} - additionalArgs []string -} - -func New(suite testsuite.TestSuite, numCPU int, parallelStream bool, goOpts map[string]interface{}, additionalArgs []string) *TestRunner { - runner := &TestRunner{ - Suite: suite, - numCPU: numCPU, - parallelStream: parallelStream, - goOpts: goOpts, - additionalArgs: additionalArgs, - } - - 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.goOpts["covermode"].(*string) != "" { - args = append(args, "-cover", fmt.Sprintf("-covermode=%s", *t.goOpts["covermode"].(*string))) - } else { - if *t.goOpts["cover"].(*bool) || *t.goOpts["coverpkg"].(*string) != "" { - 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 { - fixedOutput := fixCompilationOutput(string(output), t.Suite.Path) - if len(output) > 0 { - return fmt.Errorf("Failed to compile %s:\n\n%s", t.Suite.PackageName, fixedOutput) - } - return fmt.Errorf("Failed to compile %s", t.Suite.PackageName) - } - - 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) -} - -/* -go test -c -i spits package.test out into the cwd. there's no way to change this. - -to make sure it doesn't generate conflicting .test files in the cwd, Compile() must switch the cwd to the test package. - -unfortunately, this causes go test's compile output to be expressed *relative to the test package* instead of the cwd. - -this makes it hard to reason about what failed, and also prevents iterm's Cmd+click from working. - -fixCompilationOutput..... rewrites the output to fix the paths. - -yeah...... -*/ -func fixCompilationOutput(output string, relToPath string) string { - relToPath = filepath.Join(relToPath) - re := regexp.MustCompile(`^(\S.*\.go)\:\d+\:`) - lines := strings.Split(output, "\n") - for i, line := range lines { - indices := re.FindStringSubmatchIndex(line) - if len(indices) == 0 { - continue - } - - path := line[indices[2]:indices[3]] - if filepath.Dir(path) != relToPath { - path = filepath.Join(relToPath, path) - lines[i] = path + line[indices[3]:] - } - } - return strings.Join(lines, "\n") -} - -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.goOpts["cover"].(*bool) || *t.goOpts["coverpkg"].(*string) != "" || *t.goOpts["covermode"].(*string) != "" { - 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! | - | | - ------------------------------------------------------------------- -`) - - os.Stdout.Sync() - - for _, writer := range writers { - writer.Close() - } - - for _, report := range reports { - fmt.Print(report.String()) - } - - os.Stdout.Sync() - } - - if *t.goOpts["cover"].(*bool) || *t.goOpts["coverpkg"].(*string) != "" || *t.goOpts["covermode"].(*string) != "" { - t.combineCoverprofiles() - } - - return res -} - -func (t *TestRunner) cmd(ginkgoArgs []string, stream io.Writer, node int) *exec.Cmd { - args := []string{"--test.timeout=24h"} - if *t.goOpts["cover"].(*bool) || *t.goOpts["coverpkg"].(*string) != "" || *t.goOpts["covermode"].(*string) != "" { - coverprofile := "--test.coverprofile=" + t.Suite.PackageName + ".coverprofile" - if t.numCPU > 1 { - coverprofile = fmt.Sprintf("%s.%d", coverprofile, node) - } - args = append(args, coverprofile) - } - - 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 = stream - cmd.Stdout = stream - - return cmd -} - -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) - - return res -} - -func (t *TestRunner) combineCoverprofiles() { - profiles := []string{} - for cpu := 1; cpu <= t.numCPU; cpu++ { - coverFile := fmt.Sprintf("%s.coverprofile.%d", t.Suite.PackageName, 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") - ioutil.WriteFile(filepath.Join(t.Suite.Path, fmt.Sprintf("%s.coverprofile", t.Suite.PackageName)), []byte(finalOutput), 0666) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner_test.go deleted file mode 100644 index d862d698..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package testrunner_test - -import ( - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/ginkgo/testrunner" - "github.com/onsi/ginkgo/ginkgo/testsuite" - . "github.com/onsi/gomega" - "testing" -) - -func strAddr(s string) interface{} { - return &s -} - -func boolAddr(s bool) interface{} { - return &s -} - -func intAddr(s int) interface{} { - return &s -} - -var _ = Describe("TestRunner", func() { - It("should pass through go opts", func() { - //var opts map[string]interface{} - opts := map[string]interface{}{ - "asmflags": strAddr("a"), - "pkgdir": strAddr("b"), - "gcflags": strAddr("c"), - "covermode": strAddr(""), - "coverpkg": strAddr(""), - "cover": boolAddr(false), - "blockprofilerate": intAddr(100), - } - tr := testrunner.New(testsuite.TestSuite{}, 1, false, opts, []string{}) - - args := tr.BuildArgs(".") - Ω(args).Should(Equal([]string{ - "test", - "-c", - "-i", - "-o", - ".", - "", - "-blockprofilerate=100", - "-asmflags=a", - "-pkgdir=b", - "-gcflags=c", - })) - }) -}) - -func TestTestRunner(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Test Runner Suite") -} 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 3046ce51..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go +++ /dev/null @@ -1,111 +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)) - 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/testsuite_suite_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_suite_test.go deleted file mode 100644 index d1e8b21d..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package testsuite_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestTestsuite(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Testsuite Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_test.go deleted file mode 100644 index 05a82c31..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_test.go +++ /dev/null @@ -1,202 +0,0 @@ -// +build go1.6 - -package testsuite_test - -import ( - "io/ioutil" - "os" - "path/filepath" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/ginkgo/testsuite" - . "github.com/onsi/gomega" -) - -var _ = Describe("TestSuite", func() { - var tmpDir string - var relTmpDir string - - writeFile := func(folder string, filename string, content string, mode os.FileMode) { - path := filepath.Join(tmpDir, folder) - err := os.MkdirAll(path, 0700) - Ω(err).ShouldNot(HaveOccurred()) - - path = filepath.Join(path, filename) - ioutil.WriteFile(path, []byte(content), mode) - } - - var origVendor string - - BeforeSuite(func() { - origVendor = os.Getenv("GO15VENDOREXPERIMENT") - }) - - AfterSuite(func() { - os.Setenv("GO15VENDOREXPERIMENT", origVendor) - }) - - BeforeEach(func() { - var err error - tmpDir, err = ioutil.TempDir("/tmp", "ginkgo") - Ω(err).ShouldNot(HaveOccurred()) - - cwd, err := os.Getwd() - Ω(err).ShouldNot(HaveOccurred()) - relTmpDir, err = filepath.Rel(cwd, tmpDir) - relTmpDir = "./" + relTmpDir - Ω(err).ShouldNot(HaveOccurred()) - - //go files in the root directory (no tests) - writeFile("/", "main.go", "package main", 0666) - - //non-go files in a nested directory - writeFile("/redherring", "big_test.jpg", "package ginkgo", 0666) - - //non-ginkgo tests in a nested directory - writeFile("/professorplum", "professorplum_test.go", `import "testing"`, 0666) - - //ginkgo tests in a nested directory - writeFile("/colonelmustard", "colonelmustard_test.go", `import "github.com/onsi/ginkgo"`, 0666) - - //ginkgo tests in a deeply nested directory - writeFile("/colonelmustard/library", "library_test.go", `import "github.com/onsi/ginkgo"`, 0666) - - //ginkgo tests deeply nested in a vendored dependency - writeFile("/vendor/mrspeacock/lounge", "lounge_test.go", `import "github.com/onsi/ginkgo"`, 0666) - - //a precompiled ginkgo test - writeFile("/precompiled-dir", "precompiled.test", `fake-binary-file`, 0777) - writeFile("/precompiled-dir", "some-other-binary", `fake-binary-file`, 0777) - writeFile("/precompiled-dir", "nonexecutable.test", `fake-binary-file`, 0666) - }) - - AfterEach(func() { - os.RemoveAll(tmpDir) - }) - - Describe("Finding precompiled test suites", func() { - Context("if pointed at an executable file that ends with .test", func() { - It("should return a precompiled test suite", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "precompiled.test")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(suite).Should(Equal(TestSuite{ - Path: relTmpDir + "/precompiled-dir", - PackageName: "precompiled", - IsGinkgo: true, - Precompiled: true, - })) - }) - }) - - Context("if pointed at a directory", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("if pointed at an executable that doesn't have .test", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "some-other-binary")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("if pointed at a .test that isn't executable", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "nonexecutable.test")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("if pointed at a nonexisting file", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "nope-nothing-to-see-here")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - }) - - Describe("scanning for suites in a directory", func() { - Context("when there are no tests in the specified directory", func() { - It("should come up empty", func() { - suites := SuitesInDir(tmpDir, false) - Ω(suites).Should(BeEmpty()) - }) - }) - - Context("when there are ginkgo tests in the specified directory", func() { - It("should return an appropriately configured suite", func() { - suites := SuitesInDir(filepath.Join(tmpDir, "colonelmustard"), false) - Ω(suites).Should(HaveLen(1)) - - Ω(suites[0].Path).Should(Equal(relTmpDir + "/colonelmustard")) - Ω(suites[0].PackageName).Should(Equal("colonelmustard")) - Ω(suites[0].IsGinkgo).Should(BeTrue()) - Ω(suites[0].Precompiled).Should(BeFalse()) - }) - }) - - Context("when there are non-ginkgo tests in the specified directory", func() { - It("should return an appropriately configured suite", func() { - suites := SuitesInDir(filepath.Join(tmpDir, "professorplum"), false) - Ω(suites).Should(HaveLen(1)) - - Ω(suites[0].Path).Should(Equal(relTmpDir + "/professorplum")) - Ω(suites[0].PackageName).Should(Equal("professorplum")) - Ω(suites[0].IsGinkgo).Should(BeFalse()) - Ω(suites[0].Precompiled).Should(BeFalse()) - }) - }) - - Context("given GO15VENDOREXPERIMENT disabled", func() { - BeforeEach(func() { - os.Setenv("GO15VENDOREXPERIMENT", "0") - }) - - AfterEach(func() { - os.Setenv("GO15VENDOREXPERIMENT", "") - }) - - It("should not skip vendor dirs", func() { - suites := SuitesInDir(filepath.Join(tmpDir+"/vendor"), true) - Ω(suites).Should(HaveLen(1)) - }) - - It("should recurse into vendor dirs", func() { - suites := SuitesInDir(filepath.Join(tmpDir), true) - Ω(suites).Should(HaveLen(4)) - }) - }) - - Context("when recursively scanning", func() { - It("should return suites for corresponding test suites, only", func() { - suites := SuitesInDir(tmpDir, true) - Ω(suites).Should(HaveLen(3)) - - Ω(suites).Should(ContainElement(TestSuite{ - Path: relTmpDir + "/colonelmustard", - PackageName: "colonelmustard", - IsGinkgo: true, - Precompiled: false, - })) - Ω(suites).Should(ContainElement(TestSuite{ - Path: relTmpDir + "/professorplum", - PackageName: "professorplum", - IsGinkgo: false, - Precompiled: false, - })) - Ω(suites).Should(ContainElement(TestSuite{ - Path: relTmpDir + "/colonelmustard/library", - PackageName: "library", - IsGinkgo: true, - Precompiled: 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 75f827a1..00000000 --- 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_go15_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go15_test.go deleted file mode 100644 index 7ca4347b..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go15_test.go +++ /dev/null @@ -1,202 +0,0 @@ -// +build !go1.6 - -package testsuite_test - -import ( - "io/ioutil" - "os" - "path/filepath" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/ginkgo/testsuite" - . "github.com/onsi/gomega" -) - -var _ = Describe("TestSuite", func() { - var tmpDir string - var relTmpDir string - - writeFile := func(folder string, filename string, content string, mode os.FileMode) { - path := filepath.Join(tmpDir, folder) - err := os.MkdirAll(path, 0700) - Ω(err).ShouldNot(HaveOccurred()) - - path = filepath.Join(path, filename) - ioutil.WriteFile(path, []byte(content), mode) - } - - var origVendor string - - BeforeSuite(func() { - origVendor = os.Getenv("GO15VENDOREXPERIMENT") - }) - - AfterSuite(func() { - os.Setenv("GO15VENDOREXPERIMENT", origVendor) - }) - - BeforeEach(func() { - var err error - tmpDir, err = ioutil.TempDir("/tmp", "ginkgo") - Ω(err).ShouldNot(HaveOccurred()) - - cwd, err := os.Getwd() - Ω(err).ShouldNot(HaveOccurred()) - relTmpDir, err = filepath.Rel(cwd, tmpDir) - relTmpDir = "./" + relTmpDir - Ω(err).ShouldNot(HaveOccurred()) - - //go files in the root directory (no tests) - writeFile("/", "main.go", "package main", 0666) - - //non-go files in a nested directory - writeFile("/redherring", "big_test.jpg", "package ginkgo", 0666) - - //non-ginkgo tests in a nested directory - writeFile("/professorplum", "professorplum_test.go", `import "testing"`, 0666) - - //ginkgo tests in a nested directory - writeFile("/colonelmustard", "colonelmustard_test.go", `import "github.com/onsi/ginkgo"`, 0666) - - //ginkgo tests in a deeply nested directory - writeFile("/colonelmustard/library", "library_test.go", `import "github.com/onsi/ginkgo"`, 0666) - - //ginkgo tests deeply nested in a vendored dependency - writeFile("/vendor/mrspeacock/lounge", "lounge_test.go", `import "github.com/onsi/ginkgo"`, 0666) - - //a precompiled ginkgo test - writeFile("/precompiled-dir", "precompiled.test", `fake-binary-file`, 0777) - writeFile("/precompiled-dir", "some-other-binary", `fake-binary-file`, 0777) - writeFile("/precompiled-dir", "nonexecutable.test", `fake-binary-file`, 0666) - }) - - AfterEach(func() { - os.RemoveAll(tmpDir) - }) - - Describe("Finding precompiled test suites", func() { - Context("if pointed at an executable file that ends with .test", func() { - It("should return a precompiled test suite", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "precompiled.test")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(suite).Should(Equal(TestSuite{ - Path: relTmpDir + "/precompiled-dir", - PackageName: "precompiled", - IsGinkgo: true, - Precompiled: true, - })) - }) - }) - - Context("if pointed at a directory", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("if pointed at an executable that doesn't have .test", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "some-other-binary")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("if pointed at a .test that isn't executable", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "nonexecutable.test")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("if pointed at a nonexisting file", func() { - It("should error", func() { - suite, err := PrecompiledTestSuite(filepath.Join(tmpDir, "precompiled-dir", "nope-nothing-to-see-here")) - Ω(suite).Should(BeZero()) - Ω(err).Should(HaveOccurred()) - }) - }) - }) - - Describe("scanning for suites in a directory", func() { - Context("when there are no tests in the specified directory", func() { - It("should come up empty", func() { - suites := SuitesInDir(tmpDir, false) - Ω(suites).Should(BeEmpty()) - }) - }) - - Context("when there are ginkgo tests in the specified directory", func() { - It("should return an appropriately configured suite", func() { - suites := SuitesInDir(filepath.Join(tmpDir, "colonelmustard"), false) - Ω(suites).Should(HaveLen(1)) - - Ω(suites[0].Path).Should(Equal(relTmpDir + "/colonelmustard")) - Ω(suites[0].PackageName).Should(Equal("colonelmustard")) - Ω(suites[0].IsGinkgo).Should(BeTrue()) - Ω(suites[0].Precompiled).Should(BeFalse()) - }) - }) - - Context("when there are non-ginkgo tests in the specified directory", func() { - It("should return an appropriately configured suite", func() { - suites := SuitesInDir(filepath.Join(tmpDir, "professorplum"), false) - Ω(suites).Should(HaveLen(1)) - - Ω(suites[0].Path).Should(Equal(relTmpDir + "/professorplum")) - Ω(suites[0].PackageName).Should(Equal("professorplum")) - Ω(suites[0].IsGinkgo).Should(BeFalse()) - Ω(suites[0].Precompiled).Should(BeFalse()) - }) - }) - - Context("given GO15VENDOREXPERIMENT", func() { - BeforeEach(func() { - os.Setenv("GO15VENDOREXPERIMENT", "1") - }) - - AfterEach(func() { - os.Setenv("GO15VENDOREXPERIMENT", "") - }) - - It("should skip vendor dirs", func() { - suites := SuitesInDir(filepath.Join(tmpDir+"/vendor"), false) - Ω(suites).Should(HaveLen(0)) - }) - - It("should not recurse into vendor dirs", func() { - suites := SuitesInDir(filepath.Join(tmpDir), true) - Ω(suites).Should(HaveLen(3)) - }) - }) - - Context("when recursively scanning", func() { - It("should return suites for corresponding test suites, only", func() { - suites := SuitesInDir(tmpDir, true) - Ω(suites).Should(HaveLen(4)) - - Ω(suites).Should(ContainElement(TestSuite{ - Path: relTmpDir + "/colonelmustard", - PackageName: "colonelmustard", - IsGinkgo: true, - Precompiled: false, - })) - Ω(suites).Should(ContainElement(TestSuite{ - Path: relTmpDir + "/professorplum", - PackageName: "professorplum", - IsGinkgo: false, - Precompiled: false, - })) - Ω(suites).Should(ContainElement(TestSuite{ - Path: relTmpDir + "/colonelmustard/library", - PackageName: "library", - IsGinkgo: true, - Precompiled: false, - })) - }) - }) - }) -}) 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 596e5e5c..00000000 --- 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 683c3a99..00000000 --- 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 cdca3a34..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go +++ /dev/null @@ -1,23 +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 6c485c5b..00000000 --- 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 452c07e4..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta_tracker.go +++ /dev/null @@ -1,71 +0,0 @@ -package watch - -import ( - "fmt" - - "github.com/onsi/ginkgo/ginkgo/testsuite" -) - -type SuiteErrors map[testsuite.TestSuite]error - -type DeltaTracker struct { - maxDepth int - suites map[string]*Suite - packageHashes *PackageHashes -} - -func NewDeltaTracker(maxDepth int) *DeltaTracker { - return &DeltaTracker{ - maxDepth: maxDepth, - packageHashes: NewPackageHashes(), - 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 82c25fac..00000000 --- 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 eaf357c2..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hash.go +++ /dev/null @@ -1,103 +0,0 @@ -package watch - -import ( - "fmt" - "io/ioutil" - "os" - "regexp" - "time" -) - -var goRegExp = regexp.MustCompile(`\.go$`) -var goTestRegExp = regexp.MustCompile(`_test\.go$`) - -type PackageHash struct { - CodeModifiedTime time.Time - TestModifiedTime time.Time - Deleted bool - - path string - codeHash string - testHash string -} - -func NewPackageHash(path string) *PackageHash { - p := &PackageHash{ - path: path, - } - - 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 goRegExp.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 262eaa84..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hashes.go +++ /dev/null @@ -1,82 +0,0 @@ -package watch - -import ( - "path/filepath" - "sync" -) - -type PackageHashes struct { - PackageHashes map[string]*PackageHash - usedPaths map[string]bool - lock *sync.Mutex -} - -func NewPackageHashes() *PackageHashes { - return &PackageHashes{ - PackageHashes: map[string]*PackageHash{}, - usedPaths: nil, - 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) - } - - 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 5deaba7c..00000000 --- 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 27c26b7f..00000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch_command.go +++ /dev/null @@ -1,172 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "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" -) - -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.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) - 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) - - suitesToRun := []testsuite.TestSuite{} - - if len(delta.NewSuites) > 0 { - fmt.Printf(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.Println(" " + suite.Description()) - } - } - - modifiedSuites := delta.ModifiedSuites() - if len(modifiedSuites) > 0 { - fmt.Println(greenColor + "\nDetected changes in:" + defaultStyle) - for _, pkg := range delta.ModifiedPackages { - fmt.Println(" " + pkg) - } - fmt.Printf(greenColor+"Will run %d %s:\n"+defaultStyle, len(modifiedSuites), pluralizedWord("suite", "suites", len(modifiedSuites))) - for _, suite := range modifiedSuites { - suitesToRun = append(suitesToRun, suite.Suite) - fmt.Println(" " + suite.Description()) - } - fmt.Println("") - } - - 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.Println(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 index 8fe0b70a..158acdd5 100644 --- a/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go +++ b/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go @@ -29,6 +29,7 @@ import ( "github.com/onsi/ginkgo/internal/writer" "github.com/onsi/ginkgo/reporters" "github.com/onsi/ginkgo/reporters/stenographer" + colorable "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable" "github.com/onsi/ginkgo/types" ) @@ -149,7 +150,8 @@ type GinkgoTestDescription struct { FileName string LineNumber int - Failed bool + Failed bool + Duration time.Duration } //CurrentGinkgoTestDescripton returns information about the current running test. @@ -169,6 +171,7 @@ func CurrentGinkgoTestDescription() GinkgoTestDescription { FileName: subjectCodeLocation.FileName, LineNumber: subjectCodeLocation.LineNumber, Failed: summary.HasFailureState(), + Duration: summary.RunTime, } } @@ -202,7 +205,7 @@ func RunSpecs(t GinkgoTestingT, description string) bool { //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([]Reporter{buildDefaultReporter()}, specReporters...) + specReporters = append(specReporters, buildDefaultReporter()) return RunSpecsWithCustomReporters(t, description, specReporters) } @@ -216,7 +219,7 @@ func RunSpecsWithCustomReporters(t GinkgoTestingT, description string, specRepor reporters[i] = reporter } passed, hasFocusedTests := globalSuite.Run(t, description, reporters, writer, config.GinkgoConfig) - if passed && hasFocusedTests { + if passed && hasFocusedTests && strings.TrimSpace(os.Getenv("GINKGO_EDITOR_INTEGRATION")) == "" { fmt.Println("PASS | FOCUSED") os.Exit(types.GINKGO_FOCUS_EXIT_CODE) } @@ -226,14 +229,18 @@ func RunSpecsWithCustomReporters(t GinkgoTestingT, description string, specRepor func buildDefaultReporter() Reporter { remoteReportingServer := config.GinkgoConfig.StreamHost if remoteReportingServer == "" { - stenographer := stenographer.New(!config.DefaultReporterConfig.NoColor, config.GinkgoConfig.FlakeAttempts > 1) + stenographer := stenographer.New(!config.DefaultReporterConfig.NoColor, config.GinkgoConfig.FlakeAttempts > 1, colorable.NewColorableStdout()) return reporters.NewDefaultReporter(config.DefaultReporterConfig, stenographer) } else { - return remote.NewForwardingReporter(remoteReportingServer, &http.Client{}, remote.NewOutputInterceptor()) + debugFile := "" + if config.GinkgoConfig.DebugParallel { + debugFile = fmt.Sprintf("ginkgo-node-%d.log", config.GinkgoConfig.ParallelNode) + } + return remote.NewForwardingReporter(config.DefaultReporterConfig, remoteReportingServer, &http.Client{}, remote.NewOutputInterceptor(), GinkgoWriter.(*writer.Writer), debugFile) } } -//Skip notifies Ginkgo that the current spec should be skipped. +//Skip notifies Ginkgo that the current spec was skipped. func Skip(message string, callerSkip ...int) { skip := 0 if len(callerSkip) > 0 { @@ -275,9 +282,9 @@ func GinkgoRecover() { //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 +//In addition you can nest Describe, Context and When blocks. Describe, Context and When 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. +//or method and, within that Describe, outline a number of Contexts and Whens. func Describe(text string, body func()) bool { globalSuite.PushContainerNode(text, body, types.FlagTypeNone, codelocation.New(1)) return true @@ -304,9 +311,9 @@ func XDescribe(text string, body func()) bool { //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 +//In addition you can nest Describe, Context and When blocks. Describe, Context and When 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. +//or method and, within that Describe, outline a number of Contexts and Whens. func Context(text string, body func()) bool { globalSuite.PushContainerNode(text, body, types.FlagTypeNone, codelocation.New(1)) return true @@ -330,6 +337,35 @@ func XContext(text string, body func()) bool { return true } +//When blocks allow you to organize your specs. A When block can contain any number of +//BeforeEach, AfterEach, JustBeforeEach, It, and Measurement blocks. +// +//In addition you can nest Describe, Context and When blocks. Describe, Context and When 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 and Whens. +func When(text string, body func()) bool { + globalSuite.PushContainerNode("when "+text, body, types.FlagTypeNone, codelocation.New(1)) + return true +} + +//You can focus the tests within a describe block using FWhen +func FWhen(text string, body func()) bool { + globalSuite.PushContainerNode("when "+text, body, types.FlagTypeFocused, codelocation.New(1)) + return true +} + +//You can mark the tests within a describe block as pending using PWhen +func PWhen(text string, body func()) bool { + globalSuite.PushContainerNode("when "+text, body, types.FlagTypePending, codelocation.New(1)) + return true +} + +//You can mark the tests within a describe block as pending using XWhen +func XWhen(text string, body func()) bool { + globalSuite.PushContainerNode("when "+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. // @@ -362,22 +398,26 @@ func XIt(text string, _ ...interface{}) bool { //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 { - return It(text, body, timeout...) + 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 { - return FIt(text, body, timeout...) + 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 { - return PIt(text, is...) + 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 { - return XIt(text, is...) + globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0) + return true } //By allows you to better document large Its. diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/extra_functions_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/extra_functions_test.go deleted file mode 100644 index ccb3669a..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/extra_functions_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package tmp - -import ( - "testing" -) - -func TestSomethingLessImportant(t *testing.T) { - strp := "hello!" - somethingImportant(t, &strp) -} - -func somethingImportant(t *testing.T, message *string) { - t.Log("Something important happened in a test: " + *message) -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested/nested_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested/nested_test.go deleted file mode 100644 index cde42e47..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested/nested_test.go +++ /dev/null @@ -1,10 +0,0 @@ -package nested - -import ( - "testing" -) - -func TestSomethingLessImportant(t *testing.T) { - whatever := &UselessStruct{} - t.Fail(whatever.ImportantField != "SECRET_PASSWORD") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested_without_gofiles/subpackage/nested_subpackage_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested_without_gofiles/subpackage/nested_subpackage_test.go deleted file mode 100644 index 7cdd326c..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/nested_without_gofiles/subpackage/nested_subpackage_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package subpackage - -import ( - "testing" -) - -func TestNestedSubPackages(t *testing.T) { - t.Fail(true) -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/outside_package_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/outside_package_test.go deleted file mode 100644 index a682eeaf..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/outside_package_test.go +++ /dev/null @@ -1,16 +0,0 @@ -package tmp_test - -import ( - "testing" -) - -type UselessStruct struct { - ImportantField string -} - -func TestSomethingImportant(t *testing.T) { - whatever := &UselessStruct{} - if whatever.ImportantField != "SECRET_PASSWORD" { - t.Fail() - } -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/xunit_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/xunit_test.go deleted file mode 100644 index 049829a7..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_fixtures/xunit_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package tmp - -import ( - "testing" -) - -type UselessStruct struct { - ImportantField string - T *testing.T -} - -var testFunc = func(t *testing.T, arg *string) {} - -func assertEqual(t *testing.T, arg1, arg2 interface{}) { - if arg1 != arg2 { - t.Fail() - } -} - -func TestSomethingImportant(t *testing.T) { - whatever := &UselessStruct{ - T: t, - ImportantField: "SECRET_PASSWORD", - } - something := &UselessStruct{ImportantField: "string value"} - assertEqual(t, whatever.ImportantField, "SECRET_PASSWORD") - assertEqual(t, something.ImportantField, "string value") - - var foo = func(t *testing.T) {} - foo(t) - - strp := "something" - testFunc(t, &strp) - t.Fail() -} - -func Test3Things(t *testing.T) { - if 3 != 3 { - t.Fail() - } -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/extra_functions_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/extra_functions_test.go deleted file mode 100644 index 1c2c56ce..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/extra_functions_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package tmp - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("Testing with Ginkgo", func() { - It("something less important", func() { - - strp := "hello!" - somethingImportant(GinkgoT(), &strp) - }) -}) - -func somethingImportant(t GinkgoTInterface, message *string) { - t.Log("Something important happened in a test: " + *message) -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/fixtures_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/fixtures_suite_test.go deleted file mode 100644 index a9a404b5..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/fixtures_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package tmp - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestTmp(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Tmp Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_subpackage_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_subpackage_test.go deleted file mode 100644 index 3653eae8..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_subpackage_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package subpackage - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("Testing with Ginkgo", func() { - It("nested sub packages", func() { - GinkgoT().Fail(true) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_suite_test.go deleted file mode 100644 index d3d35e81..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package nested_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestNested(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Nested Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_test.go deleted file mode 100644 index 47364b81..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/nested_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package nested - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("Testing with Ginkgo", func() { - It("something less important", func() { - - whatever := &UselessStruct{} - GinkgoT().Fail(whatever.ImportantField != "SECRET_PASSWORD") - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/outside_package_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/outside_package_test.go deleted file mode 100644 index 1f2e332c..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/outside_package_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package tmp_test - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("Testing with Ginkgo", func() { - It("something important", func() { - - whatever := &UselessStruct{} - if whatever.ImportantField != "SECRET_PASSWORD" { - GinkgoT().Fail() - } - }) -}) - -type UselessStruct struct { - ImportantField string -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/suite_test.go deleted file mode 100644 index fd69d333..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package tmp_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestConvertFixtures(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "ConvertFixtures Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go deleted file mode 100644 index dbe3b419..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package tmp - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("Testing with Ginkgo", func() { - It("something important", func() { - - whatever := &UselessStruct{ - T: GinkgoT(), - ImportantField: "SECRET_PASSWORD", - } - something := &UselessStruct{ImportantField: "string value"} - assertEqual(GinkgoT(), whatever.ImportantField, "SECRET_PASSWORD") - assertEqual(GinkgoT(), something.ImportantField, "string value") - - var foo = func(t GinkgoTInterface) {} - foo(GinkgoT()) - - strp := "something" - testFunc(GinkgoT(), &strp) - GinkgoT().Fail() - }) - It("3 things", func() { - - if 3 != 3 { - GinkgoT().Fail() - } - }) -}) - -type UselessStruct struct { - ImportantField string - T GinkgoTInterface -} - -var testFunc = func(t GinkgoTInterface, arg *string) {} - -func assertEqual(t GinkgoTInterface, arg1, arg2 interface{}) { - if arg1 != arg2 { - t.Fail() - } -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage.go deleted file mode 100644 index 436e21d1..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage.go +++ /dev/null @@ -1,21 +0,0 @@ -package coverage_fixture - -func A() string { - return "A" -} - -func B() string { - return "B" -} - -func C() string { - return "C" -} - -func D() string { - return "D" -} - -func E() string { - return "untested" -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_suite_test.go deleted file mode 100644 index 2831bf7d..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package coverage_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestCoverageFixture(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CoverageFixture Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_test.go deleted file mode 100644 index 12a72dce..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/coverage_fixture_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package coverage_fixture_test - -import ( - . "github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture" - . "github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("CoverageFixture", func() { - It("should test A", func() { - Ω(A()).Should(Equal("A")) - }) - - It("should test B", func() { - Ω(B()).Should(Equal("B")) - }) - - It("should test C", func() { - Ω(C()).Should(Equal("C")) - }) - - It("should test D", func() { - Ω(D()).Should(Equal("D")) - }) - - It("should test external package", func() { - Ω(Tested()).Should(Equal("tested")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture/external_coverage.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture/external_coverage.go deleted file mode 100644 index 5280d4dd..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture/external_coverage.go +++ /dev/null @@ -1,9 +0,0 @@ -package external_coverage - -func Tested() string { - return "tested" -} - -func Untested() string { - return "untested" -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_suite_test.go deleted file mode 100644 index 01e79269..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package does_not_compile_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestDoes_not_compile(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Does_not_compile Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_test.go deleted file mode 100644 index e4f22b3c..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/does_not_compile/does_not_compile_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package does_not_compile_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/integration/_fixtures/does_not_compile" - . "github.com/onsi/gomega" -) - -var _ = Describe("DoesNotCompile", func() { - -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_suite_test.go deleted file mode 100644 index 97fa2e77..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package eventually_failing_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestEventuallyFailing(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "EventuallyFailing Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_test.go deleted file mode 100644 index 6c83b425..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/eventually_failing/eventually_failing_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package eventually_failing_test - -import ( - "fmt" - "io/ioutil" - "strings" - "time" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("EventuallyFailing", func() { - It("should fail on the third try", func() { - time.Sleep(time.Second) - files, err := ioutil.ReadDir(".") - Ω(err).ShouldNot(HaveOccurred()) - - numRuns := 1 - for _, file := range files { - if strings.HasPrefix(file.Name(), "counter") { - numRuns++ - } - } - - Ω(numRuns).Should(BeNumerically("<", 3)) - ioutil.WriteFile(fmt.Sprintf("./counter-%d", numRuns), []byte("foo"), 0777) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/exiting_synchronized_setup_tests/exiting_synchronized_setup_tests_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/exiting_synchronized_setup_tests/exiting_synchronized_setup_tests_suite_test.go deleted file mode 100644 index 045ca7c6..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/exiting_synchronized_setup_tests/exiting_synchronized_setup_tests_suite_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package synchronized_setup_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "fmt" - "os" - "testing" -) - -func TestSynchronized_setup_tests(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Synchronized_setup_tests Suite") -} - -var beforeData string - -var _ = SynchronizedBeforeSuite(func() []byte { - fmt.Printf("BEFORE_A_%d\n", GinkgoParallelNode()) - os.Exit(1) - return []byte("WHAT EVZ") -}, func(data []byte) { - println("NEVER SEE THIS") -}) - -var _ = Describe("Synchronized Setup", func() { - It("should do nothing", func() { - Ω(true).Should(BeTrue()) - }) - - It("should do nothing", func() { - Ω(true).Should(BeTrue()) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_suite_test.go deleted file mode 100644 index 6e822643..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package fail_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFail_fixture(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Fail_fixture Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_test.go deleted file mode 100644 index 801acf13..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/fail_fixture/fail_fixture_test.go +++ /dev/null @@ -1,99 +0,0 @@ -package fail_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = It("handles top level failures", func() { - Ω("a top level failure on line 9").Should(Equal("nope")) - println("NEVER SEE THIS") -}) - -var _ = It("handles async top level failures", func(done Done) { - Fail("an async top level failure on line 14") - println("NEVER SEE THIS") -}, 0.1) - -var _ = It("FAIL in a goroutine", func(done Done) { - go func() { - defer GinkgoRecover() - Fail("a top level goroutine failure on line 21") - println("NEVER SEE THIS") - }() -}, 0.1) - -var _ = Describe("Excercising different failure modes", func() { - It("synchronous failures", func() { - Ω("a sync failure").Should(Equal("nope")) - println("NEVER SEE THIS") - }) - - It("synchronous panics", func() { - panic("a sync panic") - println("NEVER SEE THIS") - }) - - It("synchronous failures with FAIL", func() { - Fail("a sync FAIL failure") - println("NEVER SEE THIS") - }) - - It("async timeout", func(done Done) { - Ω(true).Should(BeTrue()) - }, 0.1) - - It("async failure", func(done Done) { - Ω("an async failure").Should(Equal("nope")) - println("NEVER SEE THIS") - }, 0.1) - - It("async panic", func(done Done) { - panic("an async panic") - println("NEVER SEE THIS") - }, 0.1) - - It("async failure with FAIL", func(done Done) { - Fail("an async FAIL failure") - println("NEVER SEE THIS") - }, 0.1) - - It("FAIL in a goroutine", func(done Done) { - go func() { - defer GinkgoRecover() - Fail("a goroutine FAIL failure") - println("NEVER SEE THIS") - }() - }, 0.1) - - It("Gomega in a goroutine", func(done Done) { - go func() { - defer GinkgoRecover() - Ω("a goroutine failure").Should(Equal("nope")) - println("NEVER SEE THIS") - }() - }, 0.1) - - It("Panic in a goroutine", func(done Done) { - go func() { - defer GinkgoRecover() - panic("a goroutine panic") - println("NEVER SEE THIS") - }() - }, 0.1) - - Measure("a FAIL measure", func(Benchmarker) { - Fail("a measure FAIL failure") - println("NEVER SEE THIS") - }, 1) - - Measure("a gomega failed measure", func(Benchmarker) { - Ω("a measure failure").Should(Equal("nope")) - println("NEVER SEE THIS") - }, 1) - - Measure("a panicking measure", func(Benchmarker) { - panic("a measure panic") - println("NEVER SEE THIS") - }, 1) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_suite_test.go deleted file mode 100644 index 0e410aae..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_suite_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package failing_before_suite_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFailingAfterSuite(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "FailingAfterSuite Suite") -} - -var _ = BeforeSuite(func() { - println("BEFORE SUITE") -}) - -var _ = AfterSuite(func() { - println("AFTER SUITE") - panic("BAM!") -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_test.go deleted file mode 100644 index 3902ec6c..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_after_suite/failing_after_suite_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package failing_before_suite_test - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("FailingBeforeSuite", func() { - It("should run", func() { - println("A TEST") - }) - - It("should run", func() { - println("A TEST") - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_suite_test.go deleted file mode 100644 index 109ea360..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_suite_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package failing_before_suite_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFailing_before_suite(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Failing_before_suite Suite") -} - -var _ = BeforeSuite(func() { - println("BEFORE SUITE") - panic("BAM!") -}) - -var _ = AfterSuite(func() { - println("AFTER SUITE") -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_test.go deleted file mode 100644 index e8697c64..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_before_suite/failing_before_suite_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package failing_before_suite_test - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("FailingBeforeSuite", func() { - It("should never run", func() { - println("NEVER SEE THIS") - }) - - It("should never run", func() { - println("NEVER SEE THIS") - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests.go deleted file mode 100644 index e32cd619..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests.go +++ /dev/null @@ -1,5 +0,0 @@ -package failing_ginkgo_tests - -func AlwaysFalse() bool { - return false -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_suite_test.go deleted file mode 100644 index 49939bda..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package failing_ginkgo_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFailing_ginkgo_tests(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Failing_ginkgo_tests Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_test.go deleted file mode 100644 index d9c01e32..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests/failing_ginkgo_tests_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package failing_ginkgo_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/integration/_fixtures/failing_ginkgo_tests" - . "github.com/onsi/gomega" -) - -var _ = Describe("FailingGinkgoTests", func() { - It("should fail", func() { - Ω(AlwaysFalse()).Should(BeTrue()) - }) - - It("should pass", func() { - Ω(AlwaysFalse()).Should(BeFalse()) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags.go deleted file mode 100644 index a440abda..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags.go +++ /dev/null @@ -1,9 +0,0 @@ -package flags - -func Tested() string { - return "tested" -} - -func Untested() string { - return "untested" -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_suite_test.go deleted file mode 100644 index 0b3071f6..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package flags_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFlags(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Flags Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_test.go deleted file mode 100644 index 5cd9b72f..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/flags_tests/flags_test.go +++ /dev/null @@ -1,95 +0,0 @@ -package flags_test - -import ( - "flag" - "fmt" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/integration/_fixtures/flags_tests" - . "github.com/onsi/gomega" - "time" - remapped "math" -) - -var customFlag string - -func init() { - flag.StringVar(&customFlag, "customFlag", "default", "custom flag!") -} - -var _ = Describe("Testing various flags", func() { - FDescribe("the focused set", func() { - Measure("a measurement", func(b Benchmarker) { - b.RecordValue("a value", 3) - }, 3) - - It("should honor -cover", func() { - Ω(Tested()).Should(Equal("tested")) - }) - - It("should allow gcflags", func() { - fmt.Printf("NaN returns %T\n", remapped.NaN()) - }) - - PIt("should honor -failOnPending and -noisyPendings") - - Describe("smores", func() { - It("should honor -skip: marshmallow", func() { - println("marshmallow") - }) - - It("should honor -focus: chocolate", func() { - println("chocolate") - }) - }) - - It("should detect races", func(done Done) { - var a string - go func() { - a = "now you don't" - close(done) - }() - a = "now you see me" - println(a) - }) - - It("should randomize A", func() { - println("RANDOM_A") - }) - - It("should randomize B", func() { - println("RANDOM_B") - }) - - It("should randomize C", func() { - println("RANDOM_C") - }) - - It("should honor -slowSpecThreshold", func() { - time.Sleep(100 * time.Millisecond) - }) - - It("should pass in additional arguments after '--' directly to the test process", func() { - fmt.Printf("CUSTOM_FLAG: %s", customFlag) - }) - }) - - Describe("more smores", func() { - It("should not run these unless -focus is set", func() { - println("smores") - }) - }) - - Describe("a failing test", func() { - It("should fail", func() { - Ω(true).Should(Equal(false)) - }) - }) - - Describe("a flaky test", func() { - runs := 0 - It("should only pass the second time it's run", func() { - runs++ - Ω(runs).Should(BeNumerically("==", 2)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_suite_test.go deleted file mode 100644 index 92d0c6e4..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package focused_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFocused_fixture(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Focused_fixture Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_test.go deleted file mode 100644 index 16ad16de..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/focused_fixture/focused_fixture_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package focused_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" -) - -var _ = Describe("FocusedFixture", func() { - FDescribe("focused", func() { - It("focused", func() { - - }) - }) - - FContext("focused", func() { - It("focused", func() { - - }) - }) - - FIt("focused", func() { - - }) - - FMeasure("focused", func(b Benchmarker) { - - }, 2) - - FDescribeTable("focused", - func() {}, - Entry("focused"), - ) - - DescribeTable("focused", - func() {}, - FEntry("focused"), - ) - - Describe("not focused", func() { - It("not focused", func() { - - }) - }) - - Context("not focused", func() { - It("not focused", func() { - - }) - }) - - It("not focused", func() { - - }) - - Measure("not focused", func(b Benchmarker) { - - }, 2) - - DescribeTable("not focused", - func() {}, - Entry("not focused"), - ) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_suite_test.go deleted file mode 100644 index e8dd54b5..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package hanging_suite_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestHangingSuite(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "HangingSuite Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_test.go deleted file mode 100644 index 1728dcbe..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/hanging_suite/hanging_suite_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package hanging_suite_test - -import ( - "fmt" - "time" - . "github.com/onsi/ginkgo" -) - -var _ = AfterSuite(func() { - fmt.Println("Heading Out After Suite") -}) - -var _ = Describe("HangingSuite", func() { - BeforeEach(func() { - fmt.Fprintln(GinkgoWriter, "Just beginning") - }) - - Context("inner context", func() { - BeforeEach(func() { - fmt.Fprintln(GinkgoWriter, "Almost there...") - }) - - It("should hang out for a while", func() { - fmt.Fprintln(GinkgoWriter, "Hanging Out") - fmt.Println("Sleeping...") - time.Sleep(time.Hour) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests.go deleted file mode 100644 index ca12c0d9..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests.go +++ /dev/null @@ -1,5 +0,0 @@ -package more_ginkgo_tests - -func AlwaysTrue() bool { - return true -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_suite_test.go deleted file mode 100644 index 1e15c885..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package more_ginkgo_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestMore_ginkgo_tests(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "More_ginkgo_tests Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_test.go deleted file mode 100644 index 0549f62f..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests/more_ginkgo_tests_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package more_ginkgo_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/integration/_fixtures/more_ginkgo_tests" - . "github.com/onsi/gomega" -) - -var _ = Describe("MoreGinkgoTests", func() { - It("should pass", func() { - Ω(AlwaysTrue()).Should(BeTrue()) - }) - - It("should always pass", func() { - Ω(AlwaysTrue()).Should(BeTrue()) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/no_tests/no_tests.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/no_tests/no_tests.go deleted file mode 100644 index da29a2ca..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/no_tests/no_tests.go +++ /dev/null @@ -1,4 +0,0 @@ -package main - -func main() { -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests.go deleted file mode 100644 index b710dd12..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests.go +++ /dev/null @@ -1,9 +0,0 @@ -package passing_ginkgo_tests - -func StringIdentity(a string) string { - return a -} - -func IntegerIdentity(a int) int { - return a -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_suite_test.go deleted file mode 100644 index 31a3f7d0..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package passing_ginkgo_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestPassing_ginkgo_tests(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Passing_ginkgo_tests Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_test.go deleted file mode 100644 index a5822fdd..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests/passing_ginkgo_tests_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package passing_ginkgo_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/integration/_fixtures/passing_ginkgo_tests" - . "github.com/onsi/gomega" -) - -var _ = Describe("PassingGinkgoTests", func() { - It("should proxy strings", func() { - Ω(StringIdentity("foo")).Should(Equal("foo")) - }) - - It("should proxy integers", func() { - Ω(IntegerIdentity(3)).Should(Equal(3)) - }) - - It("should do it again", func() { - Ω(StringIdentity("foo")).Should(Equal("foo")) - Ω(IntegerIdentity(3)).Should(Equal(3)) - }) - - It("should be able to run Bys", func() { - By("emitting one By") - Ω(3).Should(Equal(3)) - - By("emitting another By") - Ω(4).Should(Equal(4)) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_setup_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_setup_suite_test.go deleted file mode 100644 index 86c9aa2a..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_setup_suite_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package passing_before_suite_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestPassingSuiteSetup(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "PassingSuiteSetup Suite") -} - -var a string -var b string - -var _ = BeforeSuite(func() { - a = "ran before suite" - println("BEFORE SUITE") -}) - -var _ = AfterSuite(func() { - b = "ran after suite" - println("AFTER SUITE") -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_test.go deleted file mode 100644 index f139e1d2..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/passing_suite_setup/passing_suite_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package passing_before_suite_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("PassingSuiteSetup", func() { - It("should pass", func() { - Ω(a).Should(Equal("ran before suite")) - Ω(b).Should(BeEmpty()) - }) - - It("should pass", func() { - Ω(a).Should(Equal("ran before suite")) - Ω(b).Should(BeEmpty()) - }) - - It("should pass", func() { - Ω(a).Should(Equal("ran before suite")) - Ω(b).Should(BeEmpty()) - }) - - It("should pass", func() { - Ω(a).Should(Equal("ran before suite")) - Ω(b).Should(BeEmpty()) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_suite_test.go deleted file mode 100644 index 74262bbc..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package progress_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestProgressFixture(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "ProgressFixture Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_test.go deleted file mode 100644 index 1e0aa795..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/progress_fixture/progress_fixture_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package progress_fixture_test - -import ( - "fmt" - - . "github.com/onsi/ginkgo" -) - -var _ = Describe("ProgressFixture", func() { - BeforeEach(func() { - fmt.Fprintln(GinkgoWriter, ">outer before<") - }) - - JustBeforeEach(func() { - fmt.Fprintln(GinkgoWriter, ">outer just before<") - }) - - AfterEach(func() { - fmt.Fprintln(GinkgoWriter, ">outer after<") - }) - - Context("Inner Context", func() { - BeforeEach(func() { - fmt.Fprintln(GinkgoWriter, ">inner before<") - }) - - JustBeforeEach(func() { - fmt.Fprintln(GinkgoWriter, ">inner just before<") - }) - - AfterEach(func() { - fmt.Fprintln(GinkgoWriter, ">inner after<") - }) - - It("should emit progress as it goes", func() { - fmt.Fprintln(GinkgoWriter, ">it<") - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_suite_test.go deleted file mode 100644 index b2028cf5..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package fail_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFail_fixture(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Skip_fixture Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_test.go deleted file mode 100644 index 72aeb8f4..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/skip_fixture/skip_fixture_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package fail_fixture_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = It("handles top level skips", func() { - Skip("a top level skip on line 9") - println("NEVER SEE THIS") -}) - -var _ = It("handles async top level skips", func(done Done) { - Skip("an async top level skip on line 14") - println("NEVER SEE THIS") -}, 0.1) - -var _ = It("SKIP in a goroutine", func(done Done) { - go func() { - defer GinkgoRecover() - Skip("a top level goroutine skip on line 21") - println("NEVER SEE THIS") - }() -}, 0.1) - -var _ = Describe("Excercising different skip modes", func() { - It("synchronous skip", func() { - Skip("a sync SKIP") - println("NEVER SEE THIS") - }) - - It("async skip", func(done Done) { - Skip("an async SKIP") - println("NEVER SEE THIS") - }, 0.1) - - It("SKIP in a goroutine", func(done Done) { - go func() { - defer GinkgoRecover() - Skip("a goroutine SKIP") - println("NEVER SEE THIS") - }() - }, 0.1) - - Measure("a SKIP measure", func(Benchmarker) { - Skip("a measure SKIP") - println("NEVER SEE THIS") - }, 1) -}) - - -var _ = Describe("SKIP in a BeforeEach", func() { - BeforeEach(func() { - Skip("a BeforeEach SKIP") - println("NEVER SEE THIS") - }) - - It("a SKIP BeforeEach", func() { - println("NEVER SEE THIS") - }) -}) - -var _ = Describe("SKIP in an AfterEach", func() { - AfterEach(func() { - Skip("an AfterEach SKIP") - println("NEVER SEE THIS") - }) - - It("a SKIP AfterEach", func() { - Expect(true).To(BeTrue()) - }) -}) \ No newline at end of file diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command.go deleted file mode 100644 index 1d670488..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command.go +++ /dev/null @@ -1,9 +0,0 @@ -package suite_command - -func Tested() string { - return "tested" -} - -func Untested() string { - return "untested" -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_suite_test.go deleted file mode 100644 index 7f76d8b8..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package suite_command_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestSuiteCommand(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Suite Command Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_test.go deleted file mode 100644 index e083d27a..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/suite_command_tests/suite_command_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package suite_command_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Testing suite command", func() { - It("it should succeed", func() { - Ω(true).Should(Equal(true)) - }) - - PIt("a failing test", func() { - It("should fail", func() { - Ω(true).Should(Equal(false)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/synchronized_setup_tests/synchronized_setup_tests_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/synchronized_setup_tests/synchronized_setup_tests_suite_test.go deleted file mode 100644 index b734854e..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/synchronized_setup_tests/synchronized_setup_tests_suite_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package synchronized_setup_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "fmt" - "testing" - "time" -) - -func TestSynchronized_setup_tests(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Synchronized_setup_tests Suite") -} - -var beforeData string - -var _ = SynchronizedBeforeSuite(func() []byte { - fmt.Printf("BEFORE_A_%d\n", GinkgoParallelNode()) - time.Sleep(100 * time.Millisecond) - return []byte("DATA") -}, func(data []byte) { - fmt.Printf("BEFORE_B_%d: %s\n", GinkgoParallelNode(), string(data)) - beforeData += string(data) + "OTHER" -}) - -var _ = SynchronizedAfterSuite(func() { - fmt.Printf("\nAFTER_A_%d\n", GinkgoParallelNode()) - time.Sleep(100 * time.Millisecond) -}, func() { - fmt.Printf("AFTER_B_%d\n", GinkgoParallelNode()) -}) - -var _ = Describe("Synchronized Setup", func() { - It("should run the before suite once", func() { - Ω(beforeData).Should(Equal("DATAOTHER")) - }) - - It("should run the before suite once", func() { - Ω(beforeData).Should(Equal("DATAOTHER")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/ignored_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/ignored_test.go deleted file mode 100644 index 51762353..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/ignored_test.go +++ /dev/null @@ -1,17 +0,0 @@ -// +build complex_tests - -package tags_tests_test - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("Ignored", func() { - It("should not have these tests", func() { - - }) - - It("should not have these tests", func() { - - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_suite_test.go deleted file mode 100644 index dcb11bb1..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package tags_tests_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestTagsTests(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "TagsTests Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_test.go deleted file mode 100644 index b91a8923..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/tags_tests/tags_tests_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package tags_tests_test - -import ( - . "github.com/onsi/ginkgo" -) - -var _ = Describe("TagsTests", func() { - It("should have a test", func() { - - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_suite_test.go deleted file mode 100644 index 8976370d..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package test_description_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestTestDescription(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "TestDescription Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_test.go deleted file mode 100644 index 53c2779e..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/test_description/test_description_test.go +++ /dev/null @@ -1,23 +0,0 @@ -package test_description_test - -import ( - "fmt" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("TestDescription", func() { - It("should pass", func() { - Ω(true).Should(BeTrue()) - }) - - It("should fail", func() { - Ω(true).Should(BeFalse()) - }) - - AfterEach(func() { - description := CurrentGinkgoTestDescription() - fmt.Printf("%s:%t\n", description.FullTestText, description.Failed) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A.go deleted file mode 100644 index de2c6bbb..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A.go +++ /dev/null @@ -1,7 +0,0 @@ -package A - -import "github.com/onsi/B" - -func DoIt() string { - return B.DoIt() -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_suite_test.go deleted file mode 100644 index 1b6cff4c..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package A_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestA(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "A Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_test.go deleted file mode 100644 index 003530aa..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A/A_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package A_test - -import ( - . "github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/A" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("A", func() { - It("should do it", func() { - Ω(DoIt()).Should(Equal("done!")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B.go deleted file mode 100644 index 990bab36..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B.go +++ /dev/null @@ -1,7 +0,0 @@ -package B - -import "github.com/onsi/C" - -func DoIt() string { - return C.DoIt() -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_suite_test.go deleted file mode 100644 index e54fce66..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package B_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestB(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "B Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_test.go deleted file mode 100644 index b147913c..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B/B_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package B_test - -import ( - . "github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/B" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("B", func() { - It("should do it", func() { - Ω(DoIt()).Should(Equal("done!")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C.go deleted file mode 100644 index 205b6888..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C.go +++ /dev/null @@ -1,5 +0,0 @@ -package C - -func DoIt() string { - return "done!" -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_suite_test.go deleted file mode 100644 index 57a7a96b..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package C_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestC(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "C Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_test.go deleted file mode 100644 index 7703fefa..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C/C_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package C_test - -import ( - . "github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("C", func() { - It("should do it", func() { - Ω(DoIt()).Should(Equal("done!")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D.go deleted file mode 100644 index 4371b852..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D.go +++ /dev/null @@ -1,7 +0,0 @@ -package D - -import "github.com/onsi/C" - -func DoIt() string { - return C.DoIt() -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_suite_test.go deleted file mode 100644 index 0ebefe6b..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package D_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestD(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "D Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_test.go deleted file mode 100644 index 097945bf..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/D/D_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package D_test - -import ( - . "github.com/onsi/ginkgo/integration/_fixtures/watch_fixtures/C" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("D", func() { - It("should do it", func() { - Ω(DoIt()).Should(Equal("done!")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests.go deleted file mode 100644 index cb8fc8bc..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests.go +++ /dev/null @@ -1,5 +0,0 @@ -package xunit_tests - -func AlwaysTrue() bool { - return true -} diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests_test.go deleted file mode 100644 index a6ebbe14..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/_fixtures/xunit_tests/xunit_tests_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package xunit_tests - -import ( - "testing" -) - -func TestAlwaysTrue(t *testing.T) { - if AlwaysTrue() != true { - t.Errorf("Expected true, got false") - } -} diff --git a/vendor/github.com/onsi/ginkgo/integration/convert_test.go b/vendor/github.com/onsi/ginkgo/integration/convert_test.go deleted file mode 100644 index f4fd678c..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/convert_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package integration_test - -import ( - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "strings" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("ginkgo convert", func() { - var tmpDir string - - readConvertedFileNamed := func(pathComponents ...string) string { - pathToFile := filepath.Join(tmpDir, "convert_fixtures", filepath.Join(pathComponents...)) - bytes, err := ioutil.ReadFile(pathToFile) - ExpectWithOffset(1, err).NotTo(HaveOccurred()) - - return string(bytes) - } - - readGoldMasterNamed := func(filename string) string { - bytes, err := ioutil.ReadFile(filepath.Join("_fixtures", "convert_goldmasters", filename)) - Ω(err).ShouldNot(HaveOccurred()) - - return string(bytes) - } - - BeforeEach(func() { - var err error - - tmpDir, err = ioutil.TempDir("", "ginkgo-convert") - Ω(err).ShouldNot(HaveOccurred()) - - err = exec.Command("cp", "-r", filepath.Join("_fixtures", "convert_fixtures"), tmpDir).Run() - Ω(err).ShouldNot(HaveOccurred()) - }) - - JustBeforeEach(func() { - cwd, err := os.Getwd() - Ω(err).ShouldNot(HaveOccurred()) - - relPath, err := filepath.Rel(cwd, filepath.Join(tmpDir, "convert_fixtures")) - Ω(err).ShouldNot(HaveOccurred()) - - cmd := exec.Command(pathToGinkgo, "convert", relPath) - cmd.Env = os.Environ() - for i, env := range cmd.Env { - if strings.HasPrefix(env, "PATH") { - cmd.Env[i] = cmd.Env[i] + ":" + filepath.Dir(pathToGinkgo) - break - } - } - err = cmd.Run() - Ω(err).ShouldNot(HaveOccurred()) - }) - - AfterEach(func() { - err := os.RemoveAll(tmpDir) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("rewrites xunit tests as ginkgo tests", func() { - convertedFile := readConvertedFileNamed("xunit_test.go") - goldMaster := readGoldMasterNamed("xunit_test.go") - Ω(convertedFile).Should(Equal(goldMaster)) - }) - - It("rewrites all usages of *testing.T as mr.T()", func() { - convertedFile := readConvertedFileNamed("extra_functions_test.go") - goldMaster := readGoldMasterNamed("extra_functions_test.go") - Ω(convertedFile).Should(Equal(goldMaster)) - }) - - It("rewrites tests in the package dir that belong to other packages", func() { - convertedFile := readConvertedFileNamed("outside_package_test.go") - goldMaster := readGoldMasterNamed("outside_package_test.go") - Ω(convertedFile).Should(Equal(goldMaster)) - }) - - It("rewrites tests in nested packages", func() { - convertedFile := readConvertedFileNamed("nested", "nested_test.go") - goldMaster := readGoldMasterNamed("nested_test.go") - Ω(convertedFile).Should(Equal(goldMaster)) - }) - - Context("ginkgo test suite files", func() { - It("creates a ginkgo test suite file for the package you specified", func() { - testsuite := readConvertedFileNamed("convert_fixtures_suite_test.go") - goldMaster := readGoldMasterNamed("suite_test.go") - Ω(testsuite).Should(Equal(goldMaster)) - }) - - It("converts go tests in deeply nested packages (some may not contain go files)", func() { - testsuite := readConvertedFileNamed("nested_without_gofiles", "subpackage", "nested_subpackage_test.go") - goldMaster := readGoldMasterNamed("nested_subpackage_test.go") - Ω(testsuite).Should(Equal(goldMaster)) - }) - - It("creates ginkgo test suites for all nested packages", func() { - testsuite := readConvertedFileNamed("nested", "nested_suite_test.go") - goldMaster := readGoldMasterNamed("nested_suite_test.go") - Ω(testsuite).Should(Equal(goldMaster)) - }) - }) - - Context("with an existing test suite file", func() { - BeforeEach(func() { - goldMaster := readGoldMasterNamed("fixtures_suite_test.go") - err := ioutil.WriteFile(filepath.Join(tmpDir, "convert_fixtures", "tmp_suite_test.go"), []byte(goldMaster), 0600) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("gracefully handles existing test suite files", func() { - //nothing should have gone wrong! - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/coverage_test.go b/vendor/github.com/onsi/ginkgo/integration/coverage_test.go deleted file mode 100644 index 4a20b0d6..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/coverage_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package integration_test - -import ( - "os" - "os/exec" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Coverage Specs", func() { - AfterEach(func() { - os.RemoveAll("./_fixtures/coverage_fixture/coverage_fixture.coverprofile") - }) - - It("runs coverage analysis in series and in parallel", func() { - session := startGinkgo("./_fixtures/coverage_fixture", "-cover") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - Ω(output).Should(ContainSubstring("coverage: 80.0% of statements")) - - serialCoverProfileOutput, err := exec.Command("go", "tool", "cover", "-func=./_fixtures/coverage_fixture/coverage_fixture.coverprofile").CombinedOutput() - Ω(err).ShouldNot(HaveOccurred()) - - os.RemoveAll("./_fixtures/coverage_fixture/coverage_fixture.coverprofile") - - Eventually(startGinkgo("./_fixtures/coverage_fixture", "-cover", "-nodes=4")).Should(gexec.Exit(0)) - - parallelCoverProfileOutput, err := exec.Command("go", "tool", "cover", "-func=./_fixtures/coverage_fixture/coverage_fixture.coverprofile").CombinedOutput() - Ω(err).ShouldNot(HaveOccurred()) - - Ω(parallelCoverProfileOutput).Should(Equal(serialCoverProfileOutput)) - }) - - It("runs coverage analysis on external packages in series and in parallel", func() { - session := startGinkgo("./_fixtures/coverage_fixture", "-coverpkg=github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture,github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - Ω(output).Should(ContainSubstring("coverage: 71.4% of statements in github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture, github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture")) - - serialCoverProfileOutput, err := exec.Command("go", "tool", "cover", "-func=./_fixtures/coverage_fixture/coverage_fixture.coverprofile").CombinedOutput() - Ω(err).ShouldNot(HaveOccurred()) - - os.RemoveAll("./_fixtures/coverage_fixture/coverage_fixture.coverprofile") - - Eventually(startGinkgo("./_fixtures/coverage_fixture", "-coverpkg=github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture,github.com/onsi/ginkgo/integration/_fixtures/coverage_fixture/external_coverage_fixture", "-nodes=4")).Should(gexec.Exit(0)) - - parallelCoverProfileOutput, err := exec.Command("go", "tool", "cover", "-func=./_fixtures/coverage_fixture/coverage_fixture.coverprofile").CombinedOutput() - Ω(err).ShouldNot(HaveOccurred()) - - Ω(parallelCoverProfileOutput).Should(Equal(serialCoverProfileOutput)) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/fail_test.go b/vendor/github.com/onsi/ginkgo/integration/fail_test.go deleted file mode 100644 index 8dcf5e4a..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/fail_test.go +++ /dev/null @@ -1,48 +0,0 @@ -package integration_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Failing Specs", func() { - var pathToTest string - - BeforeEach(func() { - pathToTest = tmpPath("failing") - copyIn("fail_fixture", pathToTest) - }) - - It("should fail in all the possible ways", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(output).ShouldNot(ContainSubstring("NEVER SEE THIS")) - - Ω(output).Should(ContainSubstring("a top level failure on line 9")) - Ω(output).Should(ContainSubstring("fail_fixture_test.go:9")) - Ω(output).Should(ContainSubstring("an async top level failure on line 14")) - Ω(output).Should(ContainSubstring("fail_fixture_test.go:14")) - Ω(output).Should(ContainSubstring("a top level goroutine failure on line 21")) - Ω(output).Should(ContainSubstring("fail_fixture_test.go:21")) - - Ω(output).Should(ContainSubstring("a sync failure")) - Ω(output).Should(MatchRegexp(`Test Panicked\n\s+a sync panic`)) - Ω(output).Should(ContainSubstring("a sync FAIL failure")) - Ω(output).Should(ContainSubstring("async timeout [It]")) - Ω(output).Should(ContainSubstring("Timed out")) - Ω(output).Should(ContainSubstring("an async failure")) - Ω(output).Should(MatchRegexp(`Test Panicked\n\s+an async panic`)) - Ω(output).Should(ContainSubstring("an async FAIL failure")) - Ω(output).Should(ContainSubstring("a goroutine FAIL failure")) - Ω(output).Should(ContainSubstring("a goroutine failure")) - Ω(output).Should(MatchRegexp(`Test Panicked\n\s+a goroutine panic`)) - Ω(output).Should(ContainSubstring("a measure failure")) - Ω(output).Should(ContainSubstring("a measure FAIL failure")) - Ω(output).Should(MatchRegexp(`Test Panicked\n\s+a measure panic`)) - - Ω(output).Should(ContainSubstring("0 Passed | 16 Failed")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/flags_test.go b/vendor/github.com/onsi/ginkgo/integration/flags_test.go deleted file mode 100644 index f34a0cd4..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/flags_test.go +++ /dev/null @@ -1,231 +0,0 @@ -package integration_test - -import ( - "io/ioutil" - "os" - "path/filepath" - "strings" - - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Flags Specs", func() { - var pathToTest string - - BeforeEach(func() { - pathToTest = tmpPath("flags") - copyIn("flags_tests", pathToTest) - }) - - getRandomOrders := func(output string) []int { - return []int{strings.Index(output, "RANDOM_A"), strings.Index(output, "RANDOM_B"), strings.Index(output, "RANDOM_C")} - } - - It("normally passes, runs measurements, prints out noisy pendings, does not randomize tests, and honors the programmatic focus", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Ran 3 samples:"), "has a measurement") - Ω(output).Should(ContainSubstring("11 Passed")) - Ω(output).Should(ContainSubstring("0 Failed")) - Ω(output).Should(ContainSubstring("1 Pending")) - Ω(output).Should(ContainSubstring("3 Skipped")) - Ω(output).Should(ContainSubstring("[PENDING]")) - Ω(output).Should(ContainSubstring("marshmallow")) - Ω(output).Should(ContainSubstring("chocolate")) - Ω(output).Should(ContainSubstring("CUSTOM_FLAG: default")) - Ω(output).Should(ContainSubstring("Detected Programmatic Focus - setting exit status to %d", types.GINKGO_FOCUS_EXIT_CODE)) - Ω(output).ShouldNot(ContainSubstring("smores")) - Ω(output).ShouldNot(ContainSubstring("SLOW TEST")) - Ω(output).ShouldNot(ContainSubstring("should honor -slowSpecThreshold")) - - orders := getRandomOrders(output) - Ω(orders[0]).Should(BeNumerically("<", orders[1])) - Ω(orders[1]).Should(BeNumerically("<", orders[2])) - }) - - It("should run a coverprofile when passed -cover", func() { - session := startGinkgo(pathToTest, "--noColor", "--cover", "--focus=the focused set") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - _, err := os.Stat(filepath.Join(pathToTest, "flags.coverprofile")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(output).Should(ContainSubstring("coverage: ")) - }) - - It("should fail when there are pending tests and it is passed --failOnPending", func() { - session := startGinkgo(pathToTest, "--noColor", "--failOnPending") - Eventually(session).Should(gexec.Exit(1)) - }) - - It("should not print out pendings when --noisyPendings=false", func() { - session := startGinkgo(pathToTest, "--noColor", "--noisyPendings=false") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - Ω(output).ShouldNot(ContainSubstring("[PENDING]")) - Ω(output).Should(ContainSubstring("1 Pending")) - }) - - It("should override the programmatic focus when told to focus", func() { - session := startGinkgo(pathToTest, "--noColor", "--focus=smores") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("marshmallow")) - Ω(output).Should(ContainSubstring("chocolate")) - Ω(output).Should(ContainSubstring("smores")) - Ω(output).Should(ContainSubstring("3 Passed")) - Ω(output).Should(ContainSubstring("0 Failed")) - Ω(output).Should(ContainSubstring("0 Pending")) - Ω(output).Should(ContainSubstring("12 Skipped")) - }) - - It("should override the programmatic focus when told to skip", func() { - session := startGinkgo(pathToTest, "--noColor", "--skip=marshmallow|failing|flaky") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).ShouldNot(ContainSubstring("marshmallow")) - Ω(output).Should(ContainSubstring("chocolate")) - Ω(output).Should(ContainSubstring("smores")) - Ω(output).Should(ContainSubstring("11 Passed")) - Ω(output).Should(ContainSubstring("0 Failed")) - Ω(output).Should(ContainSubstring("1 Pending")) - Ω(output).Should(ContainSubstring("3 Skipped")) - }) - - It("should run the race detector when told to", func() { - session := startGinkgo(pathToTest, "--noColor", "--race") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("WARNING: DATA RACE")) - }) - - It("should randomize tests when told to", func() { - session := startGinkgo(pathToTest, "--noColor", "--randomizeAllSpecs", "--seed=17") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - orders := getRandomOrders(output) - Ω(orders[0]).ShouldNot(BeNumerically("<", orders[1])) - }) - - It("should skip measurements when told to", func() { - session := startGinkgo(pathToTest, "--skipMeasurements") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - Ω(output).ShouldNot(ContainSubstring("Ran 3 samples:"), "has a measurement") - Ω(output).Should(ContainSubstring("4 Skipped")) - }) - - It("should watch for slow specs", func() { - session := startGinkgo(pathToTest, "--slowSpecThreshold=0.05") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("SLOW TEST")) - Ω(output).Should(ContainSubstring("should honor -slowSpecThreshold")) - }) - - It("should pass additional arguments in", func() { - session := startGinkgo(pathToTest, "--", "--customFlag=madagascar") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("CUSTOM_FLAG: madagascar")) - }) - - It("should print out full stack traces for failures when told to", func() { - session := startGinkgo(pathToTest, "--focus=a failing test", "--trace") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Full Stack Trace")) - }) - - It("should fail fast when told to", func() { - pathToTest = tmpPath("fail") - copyIn("fail_fixture", pathToTest) - session := startGinkgo(pathToTest, "--failFast") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("1 Failed")) - Ω(output).Should(ContainSubstring("15 Skipped")) - }) - - Context("with a flaky test", func() { - It("should normally fail", func() { - session := startGinkgo(pathToTest, "--focus=flaky") - Eventually(session).Should(gexec.Exit(1)) - }) - - It("should pass if retries are requested", func() { - session := startGinkgo(pathToTest, "--focus=flaky --flakeAttempts=2") - Eventually(session).Should(gexec.Exit(0)) - }) - }) - - It("should perform a dry run when told to", func() { - pathToTest = tmpPath("fail") - copyIn("fail_fixture", pathToTest) - session := startGinkgo(pathToTest, "--dryRun", "-v") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("synchronous failures")) - Ω(output).Should(ContainSubstring("16 Specs")) - Ω(output).Should(ContainSubstring("0 Passed")) - Ω(output).Should(ContainSubstring("0 Failed")) - }) - - regextest := func(regexOption string, skipOrFocus string) string { - pathToTest = tmpPath("passing") - copyIn("passing_ginkgo_tests", pathToTest) - session := startGinkgo(pathToTest, regexOption, "--dryRun", "-v", skipOrFocus) - Eventually(session).Should(gexec.Exit(0)) - return string(session.Out.Contents()) - } - - It("regexScansFilePath (enabled) should skip and focus on file names", func() { - output := regextest("-regexScansFilePath=true", "-skip=/passing/") // everything gets skipped (nothing runs) - Ω(output).Should(ContainSubstring("0 of 4 Specs")) - output = regextest("-regexScansFilePath=true", "-focus=/passing/") // everything gets focused (everything runs) - Ω(output).Should(ContainSubstring("4 of 4 Specs")) - }) - - It("regexScansFilePath (disabled) should not effect normal filtering", func() { - output := regextest("-regexScansFilePath=false", "-skip=/passing/") // nothing gets skipped (everything runs) - Ω(output).Should(ContainSubstring("4 of 4 Specs")) - output = regextest("-regexScansFilePath=false", "-focus=/passing/") // nothing gets focused (nothing runs) - Ω(output).Should(ContainSubstring("0 of 4 Specs")) - }) - It("should honor compiler flags", func() { - session := startGinkgo(pathToTest, "-gcflags=-importmap 'math=math/cmplx'") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - Ω(output).Should(ContainSubstring("NaN returns complex128")) - }) - - It("should honor covermode flag", func() { - session := startGinkgo(pathToTest, "--noColor", "--covermode=count", "--focus=the focused set") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - Ω(output).Should(ContainSubstring("coverage: ")) - - coverageFile := filepath.Join(pathToTest, "flags.coverprofile") - _, err := os.Stat(coverageFile) - Ω(err).ShouldNot(HaveOccurred()) - contents, err := ioutil.ReadFile(coverageFile) - Ω(err).ShouldNot(HaveOccurred()) - Ω(contents).Should(ContainSubstring("mode: count")) - }) -}) 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 76ab1b72..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/integration.go +++ /dev/null @@ -1 +0,0 @@ -package integration diff --git a/vendor/github.com/onsi/ginkgo/integration/integration_suite_test.go b/vendor/github.com/onsi/ginkgo/integration/integration_suite_test.go deleted file mode 100644 index 5cf9546d..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/integration_suite_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package integration_test - -import ( - "io" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" - - "testing" - "time" -) - -var tmpDir string -var pathToGinkgo string - -func TestIntegration(t *testing.T) { - SetDefaultEventuallyTimeout(15 * time.Second) - RegisterFailHandler(Fail) - RunSpecs(t, "Integration Suite") -} - -var _ = SynchronizedBeforeSuite(func() []byte { - pathToGinkgo, err := gexec.Build("github.com/onsi/ginkgo/ginkgo") - Ω(err).ShouldNot(HaveOccurred()) - return []byte(pathToGinkgo) -}, func(computedPathToGinkgo []byte) { - pathToGinkgo = string(computedPathToGinkgo) -}) - -var _ = BeforeEach(func() { - var err error - tmpDir, err = ioutil.TempDir("", "ginkgo-run") - Ω(err).ShouldNot(HaveOccurred()) -}) - -var _ = AfterEach(func() { - err := os.RemoveAll(tmpDir) - Ω(err).ShouldNot(HaveOccurred()) -}) - -var _ = SynchronizedAfterSuite(func() {}, func() { - gexec.CleanupBuildArtifacts() -}) - -func tmpPath(destination string) string { - return filepath.Join(tmpDir, destination) -} - -func copyIn(fixture string, destination string) { - err := os.MkdirAll(destination, 0777) - Ω(err).ShouldNot(HaveOccurred()) - - filepath.Walk(filepath.Join("_fixtures", fixture), func(path string, info os.FileInfo, err error) error { - if info.IsDir() { - return nil - } - - base := filepath.Base(path) - - src, err := os.Open(path) - Ω(err).ShouldNot(HaveOccurred()) - defer src.Close() - - dst, err := os.Create(filepath.Join(destination, base)) - Ω(err).ShouldNot(HaveOccurred()) - defer dst.Close() - - _, err = io.Copy(dst, src) - Ω(err).ShouldNot(HaveOccurred()) - return nil - }) -} - -func ginkgoCommand(dir string, args ...string) *exec.Cmd { - cmd := exec.Command(pathToGinkgo, args...) - cmd.Dir = dir - - return cmd -} - -func startGinkgo(dir string, args ...string) *gexec.Session { - cmd := ginkgoCommand(dir, args...) - session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - return session -} diff --git a/vendor/github.com/onsi/ginkgo/integration/interrupt_test.go b/vendor/github.com/onsi/ginkgo/integration/interrupt_test.go deleted file mode 100644 index dc3bf284..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/interrupt_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package integration_test - -import ( - "os/exec" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Interrupt", func() { - var pathToTest string - BeforeEach(func() { - pathToTest = tmpPath("hanging") - copyIn("hanging_suite", pathToTest) - }) - - Context("when interrupting a suite", func() { - var session *gexec.Session - BeforeEach(func() { - //we need to signal the actual process, so we must compile the test first - var err error - cmd := exec.Command("go", "test", "-c") - cmd.Dir = pathToTest - session, err = gexec.Start(cmd, GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - Eventually(session).Should(gexec.Exit(0)) - - //then run the compiled test directly - cmd = exec.Command("./hanging.test", "--test.v=true", "--ginkgo.noColor") - cmd.Dir = pathToTest - session, err = gexec.Start(cmd, GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - - Eventually(session).Should(gbytes.Say("Sleeping...")) - session.Interrupt() - Eventually(session, 1000).Should(gexec.Exit(1)) - }) - - It("should emit the contents of the GinkgoWriter", func() { - Ω(session).Should(gbytes.Say("Just beginning")) - Ω(session).Should(gbytes.Say("Almost there...")) - Ω(session).Should(gbytes.Say("Hanging Out")) - }) - - It("should run the AfterSuite", func() { - Ω(session).Should(gbytes.Say("Heading Out After Suite")) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/precompiled_test.go b/vendor/github.com/onsi/ginkgo/integration/precompiled_test.go deleted file mode 100644 index d9b78e0b..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/precompiled_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package integration_test - -import ( - "os" - "os/exec" - "path/filepath" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("ginkgo build", func() { - var pathToTest string - - BeforeEach(func() { - pathToTest = tmpPath("passing_ginkgo_tests") - copyIn("passing_ginkgo_tests", pathToTest) - session := startGinkgo(pathToTest, "build") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - Ω(output).Should(ContainSubstring("Compiling passing_ginkgo_tests")) - Ω(output).Should(ContainSubstring("compiled passing_ginkgo_tests.test")) - }) - - It("should build a test binary", func() { - _, err := os.Stat(filepath.Join(pathToTest, "passing_ginkgo_tests.test")) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should be possible to run the test binary directly", func() { - cmd := exec.Command("./passing_ginkgo_tests.test") - cmd.Dir = pathToTest - session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - Eventually(session).Should(gexec.Exit(0)) - Ω(session).Should(gbytes.Say("Running Suite: Passing_ginkgo_tests Suite")) - }) - - It("should be possible to run the test binary via ginkgo", func() { - session := startGinkgo(pathToTest, "./passing_ginkgo_tests.test") - Eventually(session).Should(gexec.Exit(0)) - Ω(session).Should(gbytes.Say("Running Suite: Passing_ginkgo_tests Suite")) - }) - - It("should be possible to run the test binary in parallel", func() { - session := startGinkgo(pathToTest, "--nodes=4", "--noColor", "./passing_ginkgo_tests.test") - Eventually(session).Should(gexec.Exit(0)) - Ω(session).Should(gbytes.Say("Running Suite: Passing_ginkgo_tests Suite")) - Ω(session).Should(gbytes.Say("Running in parallel across 4 nodes")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/progress_test.go b/vendor/github.com/onsi/ginkgo/integration/progress_test.go deleted file mode 100644 index 8589c338..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/progress_test.go +++ /dev/null @@ -1,75 +0,0 @@ -package integration_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Emitting progress", func() { - var pathToTest string - var session *gexec.Session - var args []string - - BeforeEach(func() { - args = []string{"--noColor"} - pathToTest = tmpPath("progress") - copyIn("progress_fixture", pathToTest) - }) - - JustBeforeEach(func() { - session = startGinkgo(pathToTest, args...) - Eventually(session).Should(gexec.Exit(0)) - }) - - Context("with the -progress flag, but no -v flag", func() { - BeforeEach(func() { - args = append(args, "-progress") - }) - - It("should not emit progress", func() { - Ω(session).ShouldNot(gbytes.Say("[bB]efore")) - }) - }) - - Context("with the -v flag", func() { - BeforeEach(func() { - args = append(args, "-v") - }) - - It("should not emit progress", func() { - Ω(session).ShouldNot(gbytes.Say(`\[BeforeEach\]`)) - Ω(session).Should(gbytes.Say(`>outer before<`)) - }) - }) - - Context("with the -progress flag and the -v flag", func() { - BeforeEach(func() { - args = append(args, "-progress", "-v") - }) - - It("should emit progress (by writing to the GinkgoWriter)", func() { - Ω(session).Should(gbytes.Say(`\[BeforeEach\] ProgressFixture`)) - Ω(session).Should(gbytes.Say(`>outer before<`)) - - Ω(session).Should(gbytes.Say(`\[BeforeEach\] Inner Context`)) - Ω(session).Should(gbytes.Say(`>inner before<`)) - - Ω(session).Should(gbytes.Say(`\[JustBeforeEach\] ProgressFixture`)) - Ω(session).Should(gbytes.Say(`>outer just before<`)) - - Ω(session).Should(gbytes.Say(`\[JustBeforeEach\] Inner Context`)) - Ω(session).Should(gbytes.Say(`>inner just before<`)) - - Ω(session).Should(gbytes.Say(`\[It\] should emit progress as it goes`)) - Ω(session).Should(gbytes.Say(`>it<`)) - - Ω(session).Should(gbytes.Say(`\[AfterEach\] Inner Context`)) - Ω(session).Should(gbytes.Say(`>inner after<`)) - - Ω(session).Should(gbytes.Say(`\[AfterEach\] ProgressFixture`)) - Ω(session).Should(gbytes.Say(`>outer after<`)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/run_test.go b/vendor/github.com/onsi/ginkgo/integration/run_test.go deleted file mode 100644 index 636b8332..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/run_test.go +++ /dev/null @@ -1,382 +0,0 @@ -package integration_test - -import ( - "fmt" - "regexp" - "runtime" - "strings" - - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Running Specs", func() { - var pathToTest string - - isWindows := (runtime.GOOS == "windows") - denoter := "•" - - if isWindows { - denoter = "+" - } - - Context("when pointed at the current directory", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - copyIn("passing_ginkgo_tests", pathToTest) - }) - - It("should run the tests in the working directory", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Running Suite: Passing_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring(strings.Repeat(denoter, 4))) - Ω(output).Should(ContainSubstring("SUCCESS! -- 4 Passed")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - - Context("when passed an explicit package to run", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - copyIn("passing_ginkgo_tests", pathToTest) - }) - - It("should run the ginkgo style tests", func() { - session := startGinkgo(tmpDir, "--noColor", pathToTest) - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Running Suite: Passing_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring(strings.Repeat(denoter, 4))) - Ω(output).Should(ContainSubstring("SUCCESS! -- 4 Passed")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - - Context("when passed a number of packages to run", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - otherPathToTest := tmpPath("other") - copyIn("passing_ginkgo_tests", pathToTest) - copyIn("more_ginkgo_tests", otherPathToTest) - }) - - It("should run the ginkgo style tests", func() { - session := startGinkgo(tmpDir, "--noColor", "--succinct=false", "ginkgo", "./other") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Running Suite: Passing_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Running Suite: More_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - - Context("when passed a number of packages to run, some of which have focused tests", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - otherPathToTest := tmpPath("other") - focusedPathToTest := tmpPath("focused") - copyIn("passing_ginkgo_tests", pathToTest) - copyIn("more_ginkgo_tests", otherPathToTest) - copyIn("focused_fixture", focusedPathToTest) - }) - - It("should exit with a status code of 2 and explain why", func() { - session := startGinkgo(tmpDir, "--noColor", "--succinct=false", "-r") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Running Suite: Passing_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Running Suite: More_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - Ω(output).Should(ContainSubstring("Detected Programmatic Focus - setting exit status to %d", types.GINKGO_FOCUS_EXIT_CODE)) - }) - }) - - Context("when told to skipPackages", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - otherPathToTest := tmpPath("other") - focusedPathToTest := tmpPath("focused") - copyIn("passing_ginkgo_tests", pathToTest) - copyIn("more_ginkgo_tests", otherPathToTest) - copyIn("focused_fixture", focusedPathToTest) - }) - - It("should skip packages that match the list", func() { - session := startGinkgo(tmpDir, "--noColor", "--skipPackage=other,focused", "-r") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Passing_ginkgo_tests Suite")) - Ω(output).ShouldNot(ContainSubstring("More_ginkgo_tests Suite")) - Ω(output).ShouldNot(ContainSubstring("Focused_fixture Suite")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - - Context("when all packages are skipped", func() { - It("should not run anything, but still exit 0", func() { - session := startGinkgo(tmpDir, "--noColor", "--skipPackage=other,focused,ginkgo", "-r") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("All tests skipped!")) - Ω(output).ShouldNot(ContainSubstring("Passing_ginkgo_tests Suite")) - Ω(output).ShouldNot(ContainSubstring("More_ginkgo_tests Suite")) - Ω(output).ShouldNot(ContainSubstring("Focused_fixture Suite")) - Ω(output).ShouldNot(ContainSubstring("Test Suite Passed")) - }) - }) - }) - - Context("when there are no tests to run", func() { - It("should exit 1", func() { - session := startGinkgo(tmpDir, "--noColor", "--skipPackage=other,focused", "-r") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Err.Contents()) - - Ω(output).Should(ContainSubstring("Found no test suites")) - }) - }) - - Context("when told to randomizeSuites", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - otherPathToTest := tmpPath("other") - copyIn("passing_ginkgo_tests", pathToTest) - copyIn("more_ginkgo_tests", otherPathToTest) - }) - - It("should skip packages that match the regexp", func() { - session := startGinkgo(tmpDir, "--noColor", "--randomizeSuites", "-r", "--seed=2") - Eventually(session).Should(gexec.Exit(0)) - - Ω(session).Should(gbytes.Say("More_ginkgo_tests Suite")) - Ω(session).Should(gbytes.Say("Passing_ginkgo_tests Suite")) - - session = startGinkgo(tmpDir, "--noColor", "--randomizeSuites", "-r", "--seed=3") - Eventually(session).Should(gexec.Exit(0)) - - Ω(session).Should(gbytes.Say("Passing_ginkgo_tests Suite")) - Ω(session).Should(gbytes.Say("More_ginkgo_tests Suite")) - }) - }) - - Context("when pointed at a package with xunit style tests", func() { - BeforeEach(func() { - pathToTest = tmpPath("xunit") - copyIn("xunit_tests", pathToTest) - }) - - It("should run the xunit style tests", func() { - session := startGinkgo(pathToTest) - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("--- PASS: TestAlwaysTrue")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - - Context("when pointed at a package with no tests", func() { - BeforeEach(func() { - pathToTest = tmpPath("no_tests") - copyIn("no_tests", pathToTest) - }) - - It("should fail", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(1)) - - Ω(session.Err.Contents()).Should(ContainSubstring("Found no test suites")) - }) - }) - - Context("when pointed at a package that fails to compile", func() { - BeforeEach(func() { - pathToTest = tmpPath("does_not_compile") - copyIn("does_not_compile", pathToTest) - }) - - It("should fail", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Failed to compile")) - }) - }) - - Context("when running in parallel", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - copyIn("passing_ginkgo_tests", pathToTest) - }) - - Context("with a specific number of -nodes", func() { - It("should use the specified number of nodes", func() { - session := startGinkgo(pathToTest, "--noColor", "-succinct", "-nodes=2") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(MatchRegexp(`\[\d+\] Passing_ginkgo_tests Suite - 4/4 specs - 2 nodes [%s]{4} SUCCESS! \d+(\.\d+)?[muµ]s`, regexp.QuoteMeta(denoter))) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - - Context("with -p", func() { - It("it should autocompute the number of nodes", func() { - session := startGinkgo(pathToTest, "--noColor", "-succinct", "-p") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - nodes := runtime.NumCPU() - if nodes > 4 { - nodes = nodes - 1 - } - Ω(output).Should(MatchRegexp(`\[\d+\] Passing_ginkgo_tests Suite - 4/4 specs - %d nodes [%s]{4} SUCCESS! \d+(\.\d+)?[muµ]s`, nodes, regexp.QuoteMeta(denoter))) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - }) - - Context("when streaming in parallel", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - copyIn("passing_ginkgo_tests", pathToTest) - }) - - It("should print output in realtime", func() { - session := startGinkgo(pathToTest, "--noColor", "-stream", "-nodes=2") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring(`[1] Parallel test node 1/2.`)) - Ω(output).Should(ContainSubstring(`[2] Parallel test node 2/2.`)) - Ω(output).Should(ContainSubstring(`[1] SUCCESS!`)) - Ω(output).Should(ContainSubstring(`[2] SUCCESS!`)) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - - Context("when running recursively", func() { - BeforeEach(func() { - passingTest := tmpPath("A") - otherPassingTest := tmpPath("E") - copyIn("passing_ginkgo_tests", passingTest) - copyIn("more_ginkgo_tests", otherPassingTest) - }) - - Context("when all the tests pass", func() { - It("should run all the tests (in succinct mode) and succeed", func() { - session := startGinkgo(tmpDir, "--noColor", "-r") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - outputLines := strings.Split(output, "\n") - Ω(outputLines[0]).Should(MatchRegexp(`\[\d+\] Passing_ginkgo_tests Suite - 4/4 specs [%s]{4} SUCCESS! \d+(\.\d+)?[muµ]s PASS`, regexp.QuoteMeta(denoter))) - Ω(outputLines[1]).Should(MatchRegexp(`\[\d+\] More_ginkgo_tests Suite - 2/2 specs [%s]{2} SUCCESS! \d+(\.\d+)?[muµ]s PASS`, regexp.QuoteMeta(denoter))) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - }) - }) - - Context("when one of the packages has a failing tests", func() { - BeforeEach(func() { - failingTest := tmpPath("C") - copyIn("failing_ginkgo_tests", failingTest) - }) - - It("should fail and stop running tests", func() { - session := startGinkgo(tmpDir, "--noColor", "-r") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - outputLines := strings.Split(output, "\n") - Ω(outputLines[0]).Should(MatchRegexp(`\[\d+\] Passing_ginkgo_tests Suite - 4/4 specs [%s]{4} SUCCESS! \d+(\.\d+)?[muµ]s PASS`, regexp.QuoteMeta(denoter))) - Ω(outputLines[1]).Should(MatchRegexp(`\[\d+\] Failing_ginkgo_tests Suite - 2/2 specs`)) - Ω(output).Should(ContainSubstring(fmt.Sprintf("%s Failure", denoter))) - Ω(output).ShouldNot(ContainSubstring("More_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Test Suite Failed")) - - Ω(output).Should(ContainSubstring("Summarizing 1 Failure:")) - Ω(output).Should(ContainSubstring("[Fail] FailingGinkgoTests [It] should fail")) - }) - }) - - Context("when one of the packages fails to compile", func() { - BeforeEach(func() { - doesNotCompileTest := tmpPath("C") - copyIn("does_not_compile", doesNotCompileTest) - }) - - It("should fail and stop running tests", func() { - session := startGinkgo(tmpDir, "--noColor", "-r") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - outputLines := strings.Split(output, "\n") - Ω(outputLines[0]).Should(MatchRegexp(`\[\d+\] Passing_ginkgo_tests Suite - 4/4 specs [%s]{4} SUCCESS! \d+(\.\d+)?[muµ]s PASS`, regexp.QuoteMeta(denoter))) - Ω(outputLines[1]).Should(ContainSubstring("Failed to compile C:")) - Ω(output).ShouldNot(ContainSubstring("More_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Test Suite Failed")) - }) - }) - - Context("when either is the case, but the keepGoing flag is set", func() { - BeforeEach(func() { - doesNotCompileTest := tmpPath("B") - copyIn("does_not_compile", doesNotCompileTest) - - failingTest := tmpPath("C") - copyIn("failing_ginkgo_tests", failingTest) - }) - - It("should soldier on", func() { - session := startGinkgo(tmpDir, "--noColor", "-r", "-keepGoing") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - outputLines := strings.Split(output, "\n") - Ω(outputLines[0]).Should(MatchRegexp(`\[\d+\] Passing_ginkgo_tests Suite - 4/4 specs [%s]{4} SUCCESS! \d+(\.\d+)?[muµ]s PASS`, regexp.QuoteMeta(denoter))) - Ω(outputLines[1]).Should(ContainSubstring("Failed to compile B:")) - Ω(output).Should(MatchRegexp(`\[\d+\] Failing_ginkgo_tests Suite - 2/2 specs`)) - Ω(output).Should(ContainSubstring(fmt.Sprintf("%s Failure", denoter))) - Ω(output).Should(MatchRegexp(`\[\d+\] More_ginkgo_tests Suite - 2/2 specs [%s]{2} SUCCESS! \d+(\.\d+)?[muµ]s PASS`, regexp.QuoteMeta(denoter))) - Ω(output).Should(ContainSubstring("Test Suite Failed")) - }) - }) - }) - - Context("when told to keep going --untilItFails", func() { - BeforeEach(func() { - copyIn("eventually_failing", tmpDir) - }) - - It("should keep rerunning the tests, until a failure occurs", func() { - session := startGinkgo(tmpDir, "--untilItFails", "--noColor") - Eventually(session).Should(gexec.Exit(1)) - Ω(session).Should(gbytes.Say("This was attempt #1")) - Ω(session).Should(gbytes.Say("This was attempt #2")) - Ω(session).Should(gbytes.Say("Tests failed on attempt #3")) - - //it should change the random seed between each test - lines := strings.Split(string(session.Out.Contents()), "\n") - randomSeeds := []string{} - for _, line := range lines { - if strings.Contains(line, "Random Seed:") { - randomSeeds = append(randomSeeds, strings.Split(line, ": ")[1]) - } - } - Ω(randomSeeds[0]).ShouldNot(Equal(randomSeeds[1])) - Ω(randomSeeds[1]).ShouldNot(Equal(randomSeeds[2])) - Ω(randomSeeds[0]).ShouldNot(Equal(randomSeeds[2])) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/skip_test.go b/vendor/github.com/onsi/ginkgo/integration/skip_test.go deleted file mode 100644 index 59a12ee6..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/skip_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package integration_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Skipping Specs", func() { - var pathToTest string - - BeforeEach(func() { - pathToTest = tmpPath("skipping") - copyIn("skip_fixture", pathToTest) - }) - - It("should skip in all the possible ways", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).ShouldNot(ContainSubstring("NEVER SEE THIS")) - - Ω(output).Should(ContainSubstring("a top level skip on line 9")) - Ω(output).Should(ContainSubstring("skip_fixture_test.go:9")) - Ω(output).Should(ContainSubstring("an async top level skip on line 14")) - Ω(output).Should(ContainSubstring("skip_fixture_test.go:14")) - Ω(output).Should(ContainSubstring("a top level goroutine skip on line 21")) - Ω(output).Should(ContainSubstring("skip_fixture_test.go:21")) - - Ω(output).Should(ContainSubstring("a sync SKIP")) - Ω(output).Should(ContainSubstring("an async SKIP")) - Ω(output).Should(ContainSubstring("a goroutine SKIP")) - Ω(output).Should(ContainSubstring("a measure SKIP")) - - Ω(output).Should(ContainSubstring("S [SKIPPING] in Spec Setup (BeforeEach) [")) - Ω(output).Should(ContainSubstring("a BeforeEach SKIP")) - Ω(output).Should(ContainSubstring("S [SKIPPING] in Spec Teardown (AfterEach) [")) - Ω(output).Should(ContainSubstring("an AfterEach SKIP")) - - Ω(output).Should(ContainSubstring("0 Passed | 0 Failed | 0 Pending | 9 Skipped")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/subcommand_test.go b/vendor/github.com/onsi/ginkgo/integration/subcommand_test.go deleted file mode 100644 index 6a1913ad..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/subcommand_test.go +++ /dev/null @@ -1,395 +0,0 @@ -package integration_test - -import ( - "io/ioutil" - "os" - "path/filepath" - "strings" - - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Subcommand", func() { - Describe("ginkgo bootstrap", func() { - var pkgPath string - BeforeEach(func() { - pkgPath = tmpPath("foo") - os.Mkdir(pkgPath, 0777) - }) - - It("should generate a bootstrap file, as long as one does not exist", func() { - session := startGinkgo(pkgPath, "bootstrap") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_suite_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_test")) - Ω(content).Should(ContainSubstring("func TestFoo(t *testing.T) {")) - Ω(content).Should(ContainSubstring("RegisterFailHandler")) - Ω(content).Should(ContainSubstring("RunSpecs")) - - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/ginkgo"`)) - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/gomega"`)) - - session = startGinkgo(pkgPath, "bootstrap") - Eventually(session).Should(gexec.Exit(1)) - output = session.Out.Contents() - Ω(output).Should(ContainSubstring("foo_suite_test.go already exists")) - }) - - It("should import nodot declarations when told to", func() { - session := startGinkgo(pkgPath, "bootstrap", "--nodot") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_suite_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_test")) - Ω(content).Should(ContainSubstring("func TestFoo(t *testing.T) {")) - Ω(content).Should(ContainSubstring("RegisterFailHandler")) - Ω(content).Should(ContainSubstring("RunSpecs")) - - Ω(content).Should(ContainSubstring("var It = ginkgo.It")) - Ω(content).Should(ContainSubstring("var Ω = gomega.Ω")) - - Ω(content).Should(ContainSubstring("\t" + `"github.com/onsi/ginkgo"`)) - Ω(content).Should(ContainSubstring("\t" + `"github.com/onsi/gomega"`)) - }) - - It("should generate an agouti bootstrap file when told to", func() { - session := startGinkgo(pkgPath, "bootstrap", "--agouti") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_suite_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_test")) - Ω(content).Should(ContainSubstring("func TestFoo(t *testing.T) {")) - Ω(content).Should(ContainSubstring("RegisterFailHandler")) - Ω(content).Should(ContainSubstring("RunSpecs")) - - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/ginkgo"`)) - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/gomega"`)) - Ω(content).Should(ContainSubstring("\t" + `"github.com/sclevine/agouti"`)) - }) - - It("should generate a bootstrap file using a template when told to", func() { - templateFile := filepath.Join(pkgPath, ".bootstrap") - ioutil.WriteFile(templateFile, []byte(`package {{.Package}} - - import ( - {{.GinkgoImport}} - {{.GomegaImport}} - - "testing" - "binary" - ) - - func Test{{.FormattedName}}(t *testing.T) { - // This is a {{.Package}} test - }`), 0666) - session := startGinkgo(pkgPath, "bootstrap", "--template", templateFile) - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_suite_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_test")) - Ω(content).Should(ContainSubstring(`. "github.com/onsi/ginkgo"`)) - Ω(content).Should(ContainSubstring(`. "github.com/onsi/gomega"`)) - Ω(content).Should(ContainSubstring(`"binary"`)) - Ω(content).Should(ContainSubstring("// This is a foo_test test")) - }) - }) - - Describe("nodot", func() { - It("should update the declarations in the bootstrap file", func() { - pkgPath := tmpPath("foo") - os.Mkdir(pkgPath, 0777) - - session := startGinkgo(pkgPath, "bootstrap", "--nodot") - Eventually(session).Should(gexec.Exit(0)) - - byteContent, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - - content := string(byteContent) - content = strings.Replace(content, "var It =", "var MyIt =", -1) - content = strings.Replace(content, "var Ω = gomega.Ω\n", "", -1) - - err = ioutil.WriteFile(filepath.Join(pkgPath, "foo_suite_test.go"), []byte(content), os.ModePerm) - Ω(err).ShouldNot(HaveOccurred()) - - session = startGinkgo(pkgPath, "nodot") - Eventually(session).Should(gexec.Exit(0)) - - byteContent, err = ioutil.ReadFile(filepath.Join(pkgPath, "foo_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(byteContent).Should(ContainSubstring("var MyIt = ginkgo.It")) - Ω(byteContent).ShouldNot(ContainSubstring("var It = ginkgo.It")) - Ω(byteContent).Should(ContainSubstring("var Ω = gomega.Ω")) - }) - }) - - Describe("ginkgo generate", func() { - var pkgPath string - - BeforeEach(func() { - pkgPath = tmpPath("foo_bar") - os.Mkdir(pkgPath, 0777) - }) - - Context("with no arguments", func() { - It("should generate a test file named after the package", func() { - session := startGinkgo(pkgPath, "generate") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_bar_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_bar_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring(`var _ = Describe("FooBar", func() {`)) - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/ginkgo"`)) - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/gomega"`)) - - session = startGinkgo(pkgPath, "generate") - Eventually(session).Should(gexec.Exit(1)) - output = session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_bar_test.go already exists")) - }) - }) - - Context("with an argument of the form: foo", func() { - It("should generate a test file named after the argument", func() { - session := startGinkgo(pkgPath, "generate", "baz_buzz") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("baz_buzz_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "baz_buzz_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring(`var _ = Describe("BazBuzz", func() {`)) - }) - }) - - Context("with an argument of the form: foo.go", func() { - It("should generate a test file named after the argument", func() { - session := startGinkgo(pkgPath, "generate", "baz_buzz.go") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("baz_buzz_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "baz_buzz_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring(`var _ = Describe("BazBuzz", func() {`)) - - }) - }) - - Context("with an argument of the form: foo_test", func() { - It("should generate a test file named after the argument", func() { - session := startGinkgo(pkgPath, "generate", "baz_buzz_test") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("baz_buzz_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "baz_buzz_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring(`var _ = Describe("BazBuzz", func() {`)) - }) - }) - - Context("with an argument of the form: foo_test.go", func() { - It("should generate a test file named after the argument", func() { - session := startGinkgo(pkgPath, "generate", "baz_buzz_test.go") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("baz_buzz_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "baz_buzz_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring(`var _ = Describe("BazBuzz", func() {`)) - }) - }) - - Context("with multiple arguments", func() { - It("should generate a test file named after the argument", func() { - session := startGinkgo(pkgPath, "generate", "baz", "buzz") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("baz_test.go")) - Ω(output).Should(ContainSubstring("buzz_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "baz_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring(`var _ = Describe("Baz", func() {`)) - - content, err = ioutil.ReadFile(filepath.Join(pkgPath, "buzz_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring(`var _ = Describe("Buzz", func() {`)) - }) - }) - - Context("with nodot", func() { - It("should not import ginkgo or gomega", func() { - session := startGinkgo(pkgPath, "generate", "--nodot") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_bar_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_bar_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).ShouldNot(ContainSubstring("\t" + `. "github.com/onsi/ginkgo"`)) - Ω(content).ShouldNot(ContainSubstring("\t" + `. "github.com/onsi/gomega"`)) - }) - }) - - Context("with agouti", func() { - It("should generate an agouti test file", func() { - session := startGinkgo(pkgPath, "generate", "--agouti") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("foo_bar_test.go")) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "foo_bar_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package foo_bar_test")) - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/ginkgo"`)) - Ω(content).Should(ContainSubstring("\t" + `. "github.com/onsi/gomega"`)) - Ω(content).Should(ContainSubstring("\t" + `. "github.com/sclevine/agouti/matchers"`)) - Ω(content).Should(ContainSubstring("\t" + `"github.com/sclevine/agouti"`)) - Ω(content).Should(ContainSubstring("page, err = agoutiDriver.NewPage()")) - }) - }) - }) - - Describe("ginkgo bootstrap/generate", func() { - var pkgPath string - BeforeEach(func() { - pkgPath = tmpPath("some crazy-thing") - os.Mkdir(pkgPath, 0777) - }) - - Context("when the working directory is empty", func() { - It("generates correctly named bootstrap and generate files with a package name derived from the directory", func() { - session := startGinkgo(pkgPath, "bootstrap") - Eventually(session).Should(gexec.Exit(0)) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "some_crazy_thing_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package some_crazy_thing_test")) - Ω(content).Should(ContainSubstring("SomeCrazyThing Suite")) - - session = startGinkgo(pkgPath, "generate") - Eventually(session).Should(gexec.Exit(0)) - - content, err = ioutil.ReadFile(filepath.Join(pkgPath, "some_crazy_thing_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package some_crazy_thing_test")) - Ω(content).Should(ContainSubstring("SomeCrazyThing")) - }) - }) - - Context("when the working directory contains a file with a package name", func() { - BeforeEach(func() { - Ω(ioutil.WriteFile(filepath.Join(pkgPath, "foo.go"), []byte("package main\n\nfunc main() {}"), 0777)).Should(Succeed()) - }) - - It("generates correctly named bootstrap and generate files with the package name", func() { - session := startGinkgo(pkgPath, "bootstrap") - Eventually(session).Should(gexec.Exit(0)) - - content, err := ioutil.ReadFile(filepath.Join(pkgPath, "some_crazy_thing_suite_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package main_test")) - Ω(content).Should(ContainSubstring("SomeCrazyThing Suite")) - - session = startGinkgo(pkgPath, "generate") - Eventually(session).Should(gexec.Exit(0)) - - content, err = ioutil.ReadFile(filepath.Join(pkgPath, "some_crazy_thing_test.go")) - Ω(err).ShouldNot(HaveOccurred()) - Ω(content).Should(ContainSubstring("package main_test")) - Ω(content).Should(ContainSubstring("SomeCrazyThing")) - }) - }) - }) - - Describe("ginkgo blur", func() { - It("should unfocus tests", func() { - pathToTest := tmpPath("focused") - copyIn("focused_fixture", pathToTest) - - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("6 Passed")) - Ω(output).Should(ContainSubstring("5 Skipped")) - - session = startGinkgo(pathToTest, "blur") - Eventually(session).Should(gexec.Exit(0)) - - session = startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(0)) - output = session.Out.Contents() - Ω(output).Should(ContainSubstring("11 Passed")) - Ω(output).Should(ContainSubstring("0 Skipped")) - }) - }) - - Describe("ginkgo version", func() { - It("should print out the version info", func() { - session := startGinkgo("", "version") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(MatchRegexp(`Ginkgo Version \d+\.\d+\.\d+`)) - }) - }) - - Describe("ginkgo help", func() { - It("should print out usage information", func() { - session := startGinkgo("", "help") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Err.Contents()) - - Ω(output).Should(MatchRegexp(`Ginkgo Version \d+\.\d+\.\d+`)) - Ω(output).Should(ContainSubstring("ginkgo watch")) - Ω(output).Should(ContainSubstring("-succinct")) - Ω(output).Should(ContainSubstring("-nodes")) - Ω(output).Should(ContainSubstring("ginkgo generate")) - Ω(output).Should(ContainSubstring("ginkgo help ")) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/suite_command_test.go b/vendor/github.com/onsi/ginkgo/integration/suite_command_test.go deleted file mode 100644 index 4bd46f01..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/suite_command_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package integration_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Suite Command Specs", func() { - var pathToTest string - - BeforeEach(func() { - pathToTest = tmpPath("suite_command") - copyIn("suite_command_tests", pathToTest) - }) - - It("Runs command after suite echoing out suite data, properly reporting suite name and passing status in successful command output", func() { - command := "-afterSuiteHook=echo THIS IS A (ginkgo-suite-passed) TEST OF THE (ginkgo-suite-name) SYSTEM, THIS IS ONLY A TEST" - expected := "THIS IS A [PASS] TEST OF THE suite_command SYSTEM, THIS IS ONLY A TEST" - session := startGinkgo(pathToTest, command) - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("1 Passed")) - Ω(output).Should(ContainSubstring("0 Failed")) - Ω(output).Should(ContainSubstring("1 Pending")) - Ω(output).Should(ContainSubstring("0 Skipped")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - Ω(output).Should(ContainSubstring("Post-suite command succeeded:")) - Ω(output).Should(ContainSubstring(expected)) - }) - - It("Runs command after suite reporting that command failed", func() { - command := "-afterSuiteHook=exit 1" - session := startGinkgo(pathToTest, command) - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("1 Passed")) - Ω(output).Should(ContainSubstring("0 Failed")) - Ω(output).Should(ContainSubstring("1 Pending")) - Ω(output).Should(ContainSubstring("0 Skipped")) - Ω(output).Should(ContainSubstring("Test Suite Passed")) - Ω(output).Should(ContainSubstring("Post-suite command failed:")) - }) - - It("Runs command after suite echoing out suite data, properly reporting suite name and failing status in successful command output", func() { - command := "-afterSuiteHook=echo THIS IS A (ginkgo-suite-passed) TEST OF THE (ginkgo-suite-name) SYSTEM, THIS IS ONLY A TEST" - expected := "THIS IS A [FAIL] TEST OF THE suite_command SYSTEM, THIS IS ONLY A TEST" - session := startGinkgo(pathToTest, "-failOnPending=true", command) - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("1 Passed")) - Ω(output).Should(ContainSubstring("0 Failed")) - Ω(output).Should(ContainSubstring("1 Pending")) - Ω(output).Should(ContainSubstring("0 Skipped")) - Ω(output).Should(ContainSubstring("Test Suite Failed")) - Ω(output).Should(ContainSubstring("Post-suite command succeeded:")) - Ω(output).Should(ContainSubstring(expected)) - }) - -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/suite_setup_test.go b/vendor/github.com/onsi/ginkgo/integration/suite_setup_test.go deleted file mode 100644 index b9313db5..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/suite_setup_test.go +++ /dev/null @@ -1,178 +0,0 @@ -package integration_test - -import ( - "strings" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("SuiteSetup", func() { - var pathToTest string - - Context("when the BeforeSuite and AfterSuite pass", func() { - BeforeEach(func() { - pathToTest = tmpPath("suite_setup") - copyIn("passing_suite_setup", pathToTest) - }) - - It("should run the BeforeSuite once, then run all the tests", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(strings.Count(output, "BEFORE SUITE")).Should(Equal(1)) - Ω(strings.Count(output, "AFTER SUITE")).Should(Equal(1)) - }) - - It("should run the BeforeSuite once per parallel node, then run all the tests", func() { - session := startGinkgo(pathToTest, "--noColor", "--nodes=2") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(strings.Count(output, "BEFORE SUITE")).Should(Equal(2)) - Ω(strings.Count(output, "AFTER SUITE")).Should(Equal(2)) - }) - }) - - Context("when the BeforeSuite fails", func() { - BeforeEach(func() { - pathToTest = tmpPath("suite_setup") - copyIn("failing_before_suite", pathToTest) - }) - - It("should run the BeforeSuite once, none of the tests, but it should run the AfterSuite", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(strings.Count(output, "BEFORE SUITE")).Should(Equal(1)) - Ω(strings.Count(output, "Test Panicked")).Should(Equal(1)) - Ω(strings.Count(output, "AFTER SUITE")).Should(Equal(1)) - Ω(output).ShouldNot(ContainSubstring("NEVER SEE THIS")) - }) - - It("should run the BeforeSuite once per parallel node, none of the tests, but it should run the AfterSuite for each node", func() { - session := startGinkgo(pathToTest, "--noColor", "--nodes=2") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(strings.Count(output, "BEFORE SUITE")).Should(Equal(2)) - Ω(strings.Count(output, "Test Panicked")).Should(Equal(2)) - Ω(strings.Count(output, "AFTER SUITE")).Should(Equal(2)) - Ω(output).ShouldNot(ContainSubstring("NEVER SEE THIS")) - }) - }) - - Context("when the AfterSuite fails", func() { - BeforeEach(func() { - pathToTest = tmpPath("suite_setup") - copyIn("failing_after_suite", pathToTest) - }) - - It("should run the BeforeSuite once, none of the tests, but it should run the AfterSuite", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(strings.Count(output, "BEFORE SUITE")).Should(Equal(1)) - Ω(strings.Count(output, "AFTER SUITE")).Should(Equal(1)) - Ω(strings.Count(output, "Test Panicked")).Should(Equal(1)) - Ω(strings.Count(output, "A TEST")).Should(Equal(2)) - }) - - It("should run the BeforeSuite once per parallel node, none of the tests, but it should run the AfterSuite for each node", func() { - session := startGinkgo(pathToTest, "--noColor", "--nodes=2") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(strings.Count(output, "BEFORE SUITE")).Should(Equal(2)) - Ω(strings.Count(output, "AFTER SUITE")).Should(Equal(2)) - Ω(strings.Count(output, "Test Panicked")).Should(Equal(2)) - Ω(strings.Count(output, "A TEST")).Should(Equal(2)) - }) - }) - - Context("With passing synchronized before and after suites", func() { - BeforeEach(func() { - pathToTest = tmpPath("suite_setup") - copyIn("synchronized_setup_tests", pathToTest) - }) - - Context("when run with one node", func() { - It("should do all the work on that one node", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("BEFORE_A_1\nBEFORE_B_1: DATA")) - Ω(output).Should(ContainSubstring("AFTER_A_1\nAFTER_B_1")) - }) - }) - - Context("when run across multiple nodes", func() { - It("should run the first BeforeSuite function (BEFORE_A) on node 1, the second (BEFORE_B) on all the nodes, the first AfterSuite (AFTER_A) on all the nodes, and then the second (AFTER_B) on Node 1 *after* everything else is finished", func() { - session := startGinkgo(pathToTest, "--noColor", "--nodes=3") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("BEFORE_A_1")) - Ω(output).Should(ContainSubstring("BEFORE_B_1: DATA")) - Ω(output).Should(ContainSubstring("BEFORE_B_2: DATA")) - Ω(output).Should(ContainSubstring("BEFORE_B_3: DATA")) - - Ω(output).ShouldNot(ContainSubstring("BEFORE_A_2")) - Ω(output).ShouldNot(ContainSubstring("BEFORE_A_3")) - - Ω(output).Should(ContainSubstring("AFTER_A_1")) - Ω(output).Should(ContainSubstring("AFTER_A_2")) - Ω(output).Should(ContainSubstring("AFTER_A_3")) - Ω(output).Should(ContainSubstring("AFTER_B_1")) - - Ω(output).ShouldNot(ContainSubstring("AFTER_B_2")) - Ω(output).ShouldNot(ContainSubstring("AFTER_B_3")) - }) - }) - - Context("when streaming across multiple nodes", func() { - It("should run the first BeforeSuite function (BEFORE_A) on node 1, the second (BEFORE_B) on all the nodes, the first AfterSuite (AFTER_A) on all the nodes, and then the second (AFTER_B) on Node 1 *after* everything else is finished", func() { - session := startGinkgo(pathToTest, "--noColor", "--nodes=3", "--stream") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("[1] BEFORE_A_1")) - Ω(output).Should(ContainSubstring("[1] BEFORE_B_1: DATA")) - Ω(output).Should(ContainSubstring("[2] BEFORE_B_2: DATA")) - Ω(output).Should(ContainSubstring("[3] BEFORE_B_3: DATA")) - - Ω(output).ShouldNot(ContainSubstring("BEFORE_A_2")) - Ω(output).ShouldNot(ContainSubstring("BEFORE_A_3")) - - Ω(output).Should(ContainSubstring("[1] AFTER_A_1")) - Ω(output).Should(ContainSubstring("[2] AFTER_A_2")) - Ω(output).Should(ContainSubstring("[3] AFTER_A_3")) - Ω(output).Should(ContainSubstring("[1] AFTER_B_1")) - - Ω(output).ShouldNot(ContainSubstring("AFTER_B_2")) - Ω(output).ShouldNot(ContainSubstring("AFTER_B_3")) - }) - }) - }) - - Context("With a failing synchronized before suite", func() { - BeforeEach(func() { - pathToTest = tmpPath("suite_setup") - copyIn("exiting_synchronized_setup_tests", pathToTest) - }) - - It("should fail and let the user know that node 1 disappeared prematurely", func() { - session := startGinkgo(pathToTest, "--noColor", "--nodes=3") - Eventually(session).Should(gexec.Exit(1)) - output := string(session.Out.Contents()) - - Ω(output).Should(ContainSubstring("Node 1 disappeared before completing BeforeSuite")) - Ω(output).Should(ContainSubstring("Ginkgo timed out waiting for all parallel nodes to report back!")) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/tags_test.go b/vendor/github.com/onsi/ginkgo/integration/tags_test.go deleted file mode 100644 index 626635bf..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/tags_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package integration_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Tags", func() { - var pathToTest string - BeforeEach(func() { - pathToTest = tmpPath("tags") - copyIn("tags_tests", pathToTest) - }) - - It("should honor the passed in -tags flag", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(0)) - output := string(session.Out.Contents()) - Ω(output).Should(ContainSubstring("Ran 1 of 1 Specs")) - - session = startGinkgo(pathToTest, "--noColor", "-tags=complex_tests") - Eventually(session).Should(gexec.Exit(0)) - output = string(session.Out.Contents()) - Ω(output).Should(ContainSubstring("Ran 3 of 3 Specs")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/test_description_test.go b/vendor/github.com/onsi/ginkgo/integration/test_description_test.go deleted file mode 100644 index 70a8f04e..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/test_description_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package integration_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("TestDescription", func() { - var pathToTest string - - BeforeEach(func() { - pathToTest = tmpPath("test_description") - copyIn("test_description", pathToTest) - }) - - It("should capture and emit information about the current test", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(1)) - - Ω(session).Should(gbytes.Say("TestDescription should pass:false")) - Ω(session).Should(gbytes.Say("TestDescription should fail:true")) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/verbose_and_succinct_test.go b/vendor/github.com/onsi/ginkgo/integration/verbose_and_succinct_test.go deleted file mode 100644 index aba9a6b0..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/verbose_and_succinct_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package integration_test - -import ( - "regexp" - "runtime" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Verbose And Succinct Mode", func() { - var pathToTest string - var otherPathToTest string - - isWindows := (runtime.GOOS == "windows") - denoter := "•" - - if isWindows { - denoter = "+" - } - - Context("when running one package", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - copyIn("passing_ginkgo_tests", pathToTest) - }) - - It("should default to non-succinct mode", func() { - session := startGinkgo(pathToTest, "--noColor") - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("Running Suite: Passing_ginkgo_tests Suite")) - }) - }) - - Context("when running more than one package", func() { - BeforeEach(func() { - pathToTest = tmpPath("ginkgo") - copyIn("passing_ginkgo_tests", pathToTest) - otherPathToTest = tmpPath("more_ginkgo") - copyIn("more_ginkgo_tests", otherPathToTest) - }) - - Context("with no flags set", func() { - It("should default to succinct mode", func() { - session := startGinkgo(pathToTest, "--noColor", pathToTest, otherPathToTest) - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(MatchRegexp(`\] Passing_ginkgo_tests Suite - 4/4 specs [%s]{4} SUCCESS!`, regexp.QuoteMeta(denoter))) - Ω(output).Should(MatchRegexp(`\] More_ginkgo_tests Suite - 2/2 specs [%s]{2} SUCCESS!`, regexp.QuoteMeta(denoter))) - }) - }) - - Context("with --succinct=false", func() { - It("should not be in succinct mode", func() { - session := startGinkgo(pathToTest, "--noColor", "--succinct=false", pathToTest, otherPathToTest) - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("Running Suite: Passing_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Running Suite: More_ginkgo_tests Suite")) - }) - }) - - Context("with -v", func() { - It("should not be in succinct mode, but should be verbose", func() { - session := startGinkgo(pathToTest, "--noColor", "-v", pathToTest, otherPathToTest) - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("Running Suite: Passing_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("Running Suite: More_ginkgo_tests Suite")) - Ω(output).Should(ContainSubstring("should proxy strings")) - Ω(output).Should(ContainSubstring("should always pass")) - }) - - It("should emit output from Bys", func() { - session := startGinkgo(pathToTest, "--noColor", "-v", pathToTest) - Eventually(session).Should(gexec.Exit(0)) - output := session.Out.Contents() - - Ω(output).Should(ContainSubstring("emitting one By")) - Ω(output).Should(ContainSubstring("emitting another By")) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/integration/watch_test.go b/vendor/github.com/onsi/ginkgo/integration/watch_test.go deleted file mode 100644 index bbbcf36a..00000000 --- a/vendor/github.com/onsi/ginkgo/integration/watch_test.go +++ /dev/null @@ -1,239 +0,0 @@ -package integration_test - -import ( - "io/ioutil" - "os" - "path/filepath" - "time" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" - "github.com/onsi/gomega/gexec" -) - -var _ = Describe("Watch", func() { - var rootPath string - var pathA string - var pathB string - var pathC string - var session *gexec.Session - - BeforeEach(func() { - rootPath = tmpPath("root") - pathA = filepath.Join(rootPath, "src", "github.com", "onsi", "A") - pathB = filepath.Join(rootPath, "src", "github.com", "onsi", "B") - pathC = filepath.Join(rootPath, "src", "github.com", "onsi", "C") - - err := os.MkdirAll(pathA, 0700) - Ω(err).ShouldNot(HaveOccurred()) - - err = os.MkdirAll(pathB, 0700) - Ω(err).ShouldNot(HaveOccurred()) - - err = os.MkdirAll(pathC, 0700) - Ω(err).ShouldNot(HaveOccurred()) - - copyIn(filepath.Join("watch_fixtures", "A"), pathA) - copyIn(filepath.Join("watch_fixtures", "B"), pathB) - copyIn(filepath.Join("watch_fixtures", "C"), pathC) - }) - - startGinkgoWithGopath := func(args ...string) *gexec.Session { - cmd := ginkgoCommand(rootPath, args...) - cmd.Env = append([]string{"GOPATH=" + rootPath + ":" + os.Getenv("GOPATH")}, os.Environ()...) - session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - return session - } - - modifyFile := func(path string) { - time.Sleep(time.Second) - content, err := ioutil.ReadFile(path) - Ω(err).ShouldNot(HaveOccurred()) - content = append(content, []byte("//")...) - err = ioutil.WriteFile(path, content, 0666) - Ω(err).ShouldNot(HaveOccurred()) - } - - modifyCode := func(pkgToModify string) { - modifyFile(filepath.Join(rootPath, "src", "github.com", "onsi", pkgToModify, pkgToModify+".go")) - } - - modifyTest := func(pkgToModify string) { - modifyFile(filepath.Join(rootPath, "src", "github.com", "onsi", pkgToModify, pkgToModify+"_test.go")) - } - - AfterEach(func() { - if session != nil { - session.Kill().Wait() - } - }) - - It("should be set up correctly", func() { - session = startGinkgoWithGopath("-r") - Eventually(session).Should(gexec.Exit(0)) - Ω(session.Out.Contents()).Should(ContainSubstring("A Suite")) - Ω(session.Out.Contents()).Should(ContainSubstring("B Suite")) - Ω(session.Out.Contents()).Should(ContainSubstring("C Suite")) - Ω(session.Out.Contents()).Should(ContainSubstring("Ginkgo ran 3 suites")) - }) - - Context("when watching just one test suite", func() { - It("should immediately run, and should rerun when the test suite changes", func() { - session = startGinkgoWithGopath("watch", "-succinct", pathA) - Eventually(session).Should(gbytes.Say("A Suite")) - modifyCode("A") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("A Suite")) - session.Kill().Wait() - }) - }) - - Context("when watching several test suites", func() { - It("should not immediately run, but should rerun a test when its code changes", func() { - session = startGinkgoWithGopath("watch", "-succinct", "-r") - Eventually(session).Should(gbytes.Say("Identified 3 test suites")) - Consistently(session).ShouldNot(gbytes.Say("A Suite|B Suite|C Suite")) - modifyCode("A") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("A Suite")) - Consistently(session).ShouldNot(gbytes.Say("B Suite|C Suite")) - session.Kill().Wait() - }) - }) - - Describe("watching dependencies", func() { - Context("with a depth of 2", func() { - It("should watch down to that depth", func() { - session = startGinkgoWithGopath("watch", "-succinct", "-r", "-depth=2") - Eventually(session).Should(gbytes.Say("Identified 3 test suites")) - Eventually(session).Should(gbytes.Say(`A \[2 dependencies\]`)) - Eventually(session).Should(gbytes.Say(`B \[1 dependency\]`)) - Eventually(session).Should(gbytes.Say(`C \[0 dependencies\]`)) - - modifyCode("A") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("A Suite")) - Consistently(session).ShouldNot(gbytes.Say("B Suite|C Suite")) - - modifyCode("B") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("B Suite")) - Eventually(session).Should(gbytes.Say("A Suite")) - Consistently(session).ShouldNot(gbytes.Say("C Suite")) - - modifyCode("C") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("C Suite")) - Eventually(session).Should(gbytes.Say("B Suite")) - Eventually(session).Should(gbytes.Say("A Suite")) - }) - }) - - Context("with a depth of 1", func() { - It("should watch down to that depth", func() { - session = startGinkgoWithGopath("watch", "-succinct", "-r", "-depth=1") - Eventually(session).Should(gbytes.Say("Identified 3 test suites")) - Eventually(session).Should(gbytes.Say(`A \[1 dependency\]`)) - Eventually(session).Should(gbytes.Say(`B \[1 dependency\]`)) - Eventually(session).Should(gbytes.Say(`C \[0 dependencies\]`)) - - modifyCode("A") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("A Suite")) - Consistently(session).ShouldNot(gbytes.Say("B Suite|C Suite")) - - modifyCode("B") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("B Suite")) - Eventually(session).Should(gbytes.Say("A Suite")) - Consistently(session).ShouldNot(gbytes.Say("C Suite")) - - modifyCode("C") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("C Suite")) - Eventually(session).Should(gbytes.Say("B Suite")) - Consistently(session).ShouldNot(gbytes.Say("A Suite")) - }) - }) - - Context("with a depth of 0", func() { - It("should not watch any dependencies", func() { - session = startGinkgoWithGopath("watch", "-succinct", "-r", "-depth=0") - Eventually(session).Should(gbytes.Say("Identified 3 test suites")) - Eventually(session).Should(gbytes.Say(`A \[0 dependencies\]`)) - Eventually(session).Should(gbytes.Say(`B \[0 dependencies\]`)) - Eventually(session).Should(gbytes.Say(`C \[0 dependencies\]`)) - - modifyCode("A") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("A Suite")) - Consistently(session).ShouldNot(gbytes.Say("B Suite|C Suite")) - - modifyCode("B") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("B Suite")) - Consistently(session).ShouldNot(gbytes.Say("A Suite|C Suite")) - - modifyCode("C") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("C Suite")) - Consistently(session).ShouldNot(gbytes.Say("A Suite|B Suite")) - }) - }) - - It("should not trigger dependents when tests are changed", func() { - session = startGinkgoWithGopath("watch", "-succinct", "-r", "-depth=2") - Eventually(session).Should(gbytes.Say("Identified 3 test suites")) - Eventually(session).Should(gbytes.Say(`A \[2 dependencies\]`)) - Eventually(session).Should(gbytes.Say(`B \[1 dependency\]`)) - Eventually(session).Should(gbytes.Say(`C \[0 dependencies\]`)) - - modifyTest("A") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("A Suite")) - Consistently(session).ShouldNot(gbytes.Say("B Suite|C Suite")) - - modifyTest("B") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("B Suite")) - Consistently(session).ShouldNot(gbytes.Say("A Suite|C Suite")) - - modifyTest("C") - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("C Suite")) - Consistently(session).ShouldNot(gbytes.Say("A Suite|B Suite")) - }) - }) - - Describe("when new test suite is added", func() { - It("should start monitoring that test suite", func() { - session = startGinkgoWithGopath("watch", "-succinct", "-r") - - Eventually(session).Should(gbytes.Say("Watching 3 suites")) - - pathD := filepath.Join(rootPath, "src", "github.com", "onsi", "D") - - err := os.MkdirAll(pathD, 0700) - Ω(err).ShouldNot(HaveOccurred()) - - copyIn(filepath.Join("watch_fixtures", "D"), pathD) - - Eventually(session).Should(gbytes.Say("Detected 1 new suite")) - Eventually(session).Should(gbytes.Say(`D \[1 dependency\]`)) - Eventually(session).Should(gbytes.Say("D Suite")) - - modifyCode("D") - - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("D Suite")) - - modifyCode("C") - - Eventually(session).Should(gbytes.Say("Detected changes in")) - Eventually(session).Should(gbytes.Say("C Suite")) - Eventually(session).Should(gbytes.Say("D Suite")) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_suite_test.go deleted file mode 100644 index f06abf3c..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package codelocation_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestCodelocation(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CodeLocation Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_test.go b/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_test.go deleted file mode 100644 index 55a9e9d0..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location_test.go +++ /dev/null @@ -1,79 +0,0 @@ -package codelocation_test - -import ( - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - "runtime" -) - -var _ = Describe("CodeLocation", func() { - var ( - codeLocation types.CodeLocation - expectedFileName string - expectedLineNumber int - ) - - caller0 := func() { - codeLocation = codelocation.New(1) - } - - caller1 := func() { - _, expectedFileName, expectedLineNumber, _ = runtime.Caller(0) - expectedLineNumber += 2 - caller0() - } - - BeforeEach(func() { - caller1() - }) - - It("should use the passed in skip parameter to pick out the correct file & line number", func() { - Ω(codeLocation.FileName).Should(Equal(expectedFileName)) - Ω(codeLocation.LineNumber).Should(Equal(expectedLineNumber)) - }) - - Describe("stringer behavior", func() { - It("should stringify nicely", func() { - Ω(codeLocation.String()).Should(ContainSubstring("code_location_test.go:%d", expectedLineNumber)) - }) - }) - - //There's no better way than to test this private method as it - //goes out of its way to prune out ginkgo related code in the stack trace - Describe("PruneStack", func() { - It("should remove any references to ginkgo and pkg/testing and pkg/runtime", func() { - input := `/Skip/me -Skip: skip() -/Skip/me -Skip: skip() -/Users/whoever/gospace/src/github.com/onsi/ginkgo/whatever.go:10 (0x12314) -Something: Func() -/Users/whoever/gospace/src/github.com/onsi/ginkgo/whatever_else.go:10 (0x12314) -SomethingInternalToGinkgo: Func() -/usr/goroot/pkg/strings/oops.go:10 (0x12341) -Oops: BlowUp() -/Users/whoever/gospace/src/mycode/code.go:10 (0x12341) -MyCode: Func() -/Users/whoever/gospace/src/mycode/code_test.go:10 (0x12341) -MyCodeTest: Func() -/Users/whoever/gospace/src/mycode/code_suite_test.go:12 (0x37f08) -TestFoo: RunSpecs(t, "Foo Suite") -/usr/goroot/pkg/testing/testing.go:12 (0x37f08) -TestingT: Blah() -/usr/goroot/pkg/runtime/runtime.go:12 (0x37f08) -Something: Func() -` - prunedStack := codelocation.PruneStack(input, 1) - Ω(prunedStack).Should(Equal(`/usr/goroot/pkg/strings/oops.go:10 (0x12341) -Oops: BlowUp() -/Users/whoever/gospace/src/mycode/code.go:10 (0x12341) -MyCode: Func() -/Users/whoever/gospace/src/mycode/code_test.go:10 (0x12341) -MyCodeTest: Func() -/Users/whoever/gospace/src/mycode/code_suite_test.go:12 (0x37f08) -TestFoo: RunSpecs(t, "Foo Suite")`)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/containernode/container_node_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/containernode/container_node_suite_test.go deleted file mode 100644 index c6fc314f..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/containernode/container_node_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package containernode_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestContainernode(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Containernode Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/containernode/container_node_test.go b/vendor/github.com/onsi/ginkgo/internal/containernode/container_node_test.go deleted file mode 100644 index b8d61b13..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/containernode/container_node_test.go +++ /dev/null @@ -1,212 +0,0 @@ -package containernode_test - -import ( - "github.com/onsi/ginkgo/internal/leafnodes" - "math/rand" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/internal/codelocation" - . "github.com/onsi/ginkgo/internal/containernode" - "github.com/onsi/ginkgo/types" -) - -var _ = Describe("Container Node", func() { - var ( - codeLocation types.CodeLocation - container *ContainerNode - ) - - BeforeEach(func() { - codeLocation = codelocation.New(0) - container = New("description text", types.FlagTypeFocused, codeLocation) - }) - - Describe("creating a container node", func() { - It("can answer questions about itself", func() { - Ω(container.Text()).Should(Equal("description text")) - Ω(container.Flag()).Should(Equal(types.FlagTypeFocused)) - Ω(container.CodeLocation()).Should(Equal(codeLocation)) - }) - }) - - Describe("pushing setup nodes", func() { - It("can append setup nodes of various types and fetch them by type", func() { - befA := leafnodes.NewBeforeEachNode(func() {}, codelocation.New(0), 0, nil, 0) - befB := leafnodes.NewBeforeEachNode(func() {}, codelocation.New(0), 0, nil, 0) - aftA := leafnodes.NewAfterEachNode(func() {}, codelocation.New(0), 0, nil, 0) - aftB := leafnodes.NewAfterEachNode(func() {}, codelocation.New(0), 0, nil, 0) - jusBefA := leafnodes.NewJustBeforeEachNode(func() {}, codelocation.New(0), 0, nil, 0) - jusBefB := leafnodes.NewJustBeforeEachNode(func() {}, codelocation.New(0), 0, nil, 0) - - container.PushSetupNode(befA) - container.PushSetupNode(befB) - container.PushSetupNode(aftA) - container.PushSetupNode(aftB) - container.PushSetupNode(jusBefA) - container.PushSetupNode(jusBefB) - - subject := leafnodes.NewItNode("subject", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - container.PushSubjectNode(subject) - - Ω(container.SetupNodesOfType(types.SpecComponentTypeBeforeEach)).Should(Equal([]leafnodes.BasicNode{befA, befB})) - Ω(container.SetupNodesOfType(types.SpecComponentTypeAfterEach)).Should(Equal([]leafnodes.BasicNode{aftA, aftB})) - Ω(container.SetupNodesOfType(types.SpecComponentTypeJustBeforeEach)).Should(Equal([]leafnodes.BasicNode{jusBefA, jusBefB})) - Ω(container.SetupNodesOfType(types.SpecComponentTypeIt)).Should(BeEmpty()) //subjects are not setup nodes - }) - }) - - Context("With appended containers and subject nodes", func() { - var ( - itA, itB, innerItA, innerItB leafnodes.SubjectNode - innerContainer *ContainerNode - ) - - BeforeEach(func() { - itA = leafnodes.NewItNode("Banana", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - itB = leafnodes.NewItNode("Apple", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - - innerItA = leafnodes.NewItNode("inner A", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - innerItB = leafnodes.NewItNode("inner B", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - - innerContainer = New("Orange", types.FlagTypeNone, codelocation.New(0)) - - container.PushSubjectNode(itA) - container.PushContainerNode(innerContainer) - innerContainer.PushSubjectNode(innerItA) - innerContainer.PushSubjectNode(innerItB) - container.PushSubjectNode(itB) - }) - - Describe("Collating", func() { - It("should return a collated set of containers and subject nodes in the correct order", func() { - collated := container.Collate() - Ω(collated).Should(HaveLen(4)) - - Ω(collated[0]).Should(Equal(CollatedNodes{ - Containers: []*ContainerNode{container}, - Subject: itA, - })) - - Ω(collated[1]).Should(Equal(CollatedNodes{ - Containers: []*ContainerNode{container, innerContainer}, - Subject: innerItA, - })) - - Ω(collated[2]).Should(Equal(CollatedNodes{ - Containers: []*ContainerNode{container, innerContainer}, - Subject: innerItB, - })) - - Ω(collated[3]).Should(Equal(CollatedNodes{ - Containers: []*ContainerNode{container}, - Subject: itB, - })) - }) - }) - - Describe("Backpropagating Programmatic Focus", func() { - //This allows inner focused specs to override the focus of outer focussed - //specs and more closely maps to what a developer wants to happen - //when debugging a test suite - - Context("when a parent is focused *and* an inner subject is focused", func() { - BeforeEach(func() { - container = New("description text", types.FlagTypeFocused, codeLocation) - itA = leafnodes.NewItNode("A", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - container.PushSubjectNode(itA) - - innerContainer = New("Orange", types.FlagTypeNone, codelocation.New(0)) - container.PushContainerNode(innerContainer) - innerItA = leafnodes.NewItNode("inner A", func() {}, types.FlagTypeFocused, codelocation.New(0), 0, nil, 0) - innerContainer.PushSubjectNode(innerItA) - }) - - It("should unfocus the parent", func() { - container.BackPropagateProgrammaticFocus() - - Ω(container.Flag()).Should(Equal(types.FlagTypeNone)) - Ω(itA.Flag()).Should(Equal(types.FlagTypeNone)) - Ω(innerContainer.Flag()).Should(Equal(types.FlagTypeNone)) - Ω(innerItA.Flag()).Should(Equal(types.FlagTypeFocused)) - }) - }) - - Context("when a parent is focused *and* an inner container is focused", func() { - BeforeEach(func() { - container = New("description text", types.FlagTypeFocused, codeLocation) - itA = leafnodes.NewItNode("A", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - container.PushSubjectNode(itA) - - innerContainer = New("Orange", types.FlagTypeFocused, codelocation.New(0)) - container.PushContainerNode(innerContainer) - innerItA = leafnodes.NewItNode("inner A", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - innerContainer.PushSubjectNode(innerItA) - }) - - It("should unfocus the parent", func() { - container.BackPropagateProgrammaticFocus() - - Ω(container.Flag()).Should(Equal(types.FlagTypeNone)) - Ω(itA.Flag()).Should(Equal(types.FlagTypeNone)) - Ω(innerContainer.Flag()).Should(Equal(types.FlagTypeFocused)) - Ω(innerItA.Flag()).Should(Equal(types.FlagTypeNone)) - }) - }) - - Context("when a parent is pending and a child is focused", func() { - BeforeEach(func() { - container = New("description text", types.FlagTypeFocused, codeLocation) - itA = leafnodes.NewItNode("A", func() {}, types.FlagTypeNone, codelocation.New(0), 0, nil, 0) - container.PushSubjectNode(itA) - - innerContainer = New("Orange", types.FlagTypePending, codelocation.New(0)) - container.PushContainerNode(innerContainer) - innerItA = leafnodes.NewItNode("inner A", func() {}, types.FlagTypeFocused, codelocation.New(0), 0, nil, 0) - innerContainer.PushSubjectNode(innerItA) - }) - - It("should not do anything", func() { - container.BackPropagateProgrammaticFocus() - - Ω(container.Flag()).Should(Equal(types.FlagTypeFocused)) - Ω(itA.Flag()).Should(Equal(types.FlagTypeNone)) - Ω(innerContainer.Flag()).Should(Equal(types.FlagTypePending)) - Ω(innerItA.Flag()).Should(Equal(types.FlagTypeFocused)) - }) - }) - }) - - Describe("Shuffling", func() { - var unshuffledCollation []CollatedNodes - BeforeEach(func() { - unshuffledCollation = container.Collate() - - r := rand.New(rand.NewSource(17)) - container.Shuffle(r) - }) - - It("should sort, and then shuffle, the top level contents of the container", func() { - shuffledCollation := container.Collate() - Ω(shuffledCollation).Should(HaveLen(len(unshuffledCollation))) - Ω(shuffledCollation).ShouldNot(Equal(unshuffledCollation)) - - for _, entry := range unshuffledCollation { - Ω(shuffledCollation).Should(ContainElement(entry)) - } - - innerAIndex, innerBIndex := 0, 0 - for i, entry := range shuffledCollation { - if entry.Subject == innerItA { - innerAIndex = i - } else if entry.Subject == innerItB { - innerBIndex = i - } - } - - Ω(innerAIndex).Should(Equal(innerBIndex - 1)) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/failer/failer_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/failer/failer_suite_test.go deleted file mode 100644 index 8dce7be9..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/failer/failer_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package failer_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFailer(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Failer Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/failer/failer_test.go b/vendor/github.com/onsi/ginkgo/internal/failer/failer_test.go deleted file mode 100644 index 65210a40..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/failer/failer_test.go +++ /dev/null @@ -1,141 +0,0 @@ -package failer_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/failer" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/types" -) - -var _ = Describe("Failer", func() { - var ( - failer *Failer - codeLocationA types.CodeLocation - codeLocationB types.CodeLocation - ) - - BeforeEach(func() { - codeLocationA = codelocation.New(0) - codeLocationB = codelocation.New(0) - failer = New() - }) - - Context("with no failures", func() { - It("should return success when drained", func() { - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - Ω(failure).Should(BeZero()) - Ω(state).Should(Equal(types.SpecStatePassed)) - }) - }) - - Describe("Skip", func() { - It("should handle failures", func() { - failer.Skip("something skipped", codeLocationA) - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "something skipped", - Location: codeLocationA, - ForwardedPanic: "", - ComponentType: types.SpecComponentTypeIt, - ComponentIndex: 3, - ComponentCodeLocation: codeLocationB, - })) - Ω(state).Should(Equal(types.SpecStateSkipped)) - }) - }) - - Describe("Fail", func() { - It("should handle failures", func() { - failer.Fail("something failed", codeLocationA) - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "something failed", - Location: codeLocationA, - ForwardedPanic: "", - ComponentType: types.SpecComponentTypeIt, - ComponentIndex: 3, - ComponentCodeLocation: codeLocationB, - })) - Ω(state).Should(Equal(types.SpecStateFailed)) - }) - }) - - Describe("Panic", func() { - It("should handle panics", func() { - failer.Panic(codeLocationA, "some forwarded panic") - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "Test Panicked", - Location: codeLocationA, - ForwardedPanic: "some forwarded panic", - ComponentType: types.SpecComponentTypeIt, - ComponentIndex: 3, - ComponentCodeLocation: codeLocationB, - })) - Ω(state).Should(Equal(types.SpecStatePanicked)) - }) - }) - - Describe("Timeout", func() { - It("should handle timeouts", func() { - failer.Timeout(codeLocationA) - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "Timed out", - Location: codeLocationA, - ForwardedPanic: "", - ComponentType: types.SpecComponentTypeIt, - ComponentIndex: 3, - ComponentCodeLocation: codeLocationB, - })) - Ω(state).Should(Equal(types.SpecStateTimedOut)) - }) - }) - - Context("when multiple failures are registered", func() { - BeforeEach(func() { - failer.Fail("something failed", codeLocationA) - failer.Fail("something else failed", codeLocationA) - }) - - It("should only report the first one when drained", func() { - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "something failed", - Location: codeLocationA, - ForwardedPanic: "", - ComponentType: types.SpecComponentTypeIt, - ComponentIndex: 3, - ComponentCodeLocation: codeLocationB, - })) - Ω(state).Should(Equal(types.SpecStateFailed)) - }) - - It("should report subsequent failures after being drained", func() { - failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - failer.Fail("yet another thing failed", codeLocationA) - - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "yet another thing failed", - Location: codeLocationA, - ForwardedPanic: "", - ComponentType: types.SpecComponentTypeIt, - ComponentIndex: 3, - ComponentCodeLocation: codeLocationB, - })) - Ω(state).Should(Equal(types.SpecStateFailed)) - }) - - It("should report sucess on subsequent drains if no errors occur", func() { - failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - failure, state := failer.Drain(types.SpecComponentTypeIt, 3, codeLocationB) - Ω(failure).Should(BeZero()) - Ω(state).Should(Equal(types.SpecStatePassed)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go index 9c3eed2b..d6d54234 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go @@ -35,15 +35,15 @@ func (b *benchmarker) Time(name string, body func(), info ...interface{}) (elaps } func (b *benchmarker) RecordValue(name string, value float64, info ...interface{}) { - measurement := b.getMeasurement(name, "Smallest", " Largest", " Average", "", 3, info...) 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{}) { - measurement := b.getMeasurement(name, "Smallest", " Largest", " Average", units, precision, info...) b.mu.Lock() + measurement := b.getMeasurement(name, "Smallest", " Largest", " Average", units, precision, info...) defer b.mu.Unlock() measurement.Results = append(measurement.Results, value) } diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go index c76fe3a4..6eded7b7 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go @@ -1,9 +1,10 @@ package leafnodes import ( + "time" + "github.com/onsi/ginkgo/internal/failer" "github.com/onsi/ginkgo/types" - "time" ) type ItNode struct { diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node_test.go deleted file mode 100644 index 29fa0c6e..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/leafnodes" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/types" -) - -var _ = Describe("It Nodes", func() { - It("should report the correct type, text, flag, and code location", func() { - codeLocation := codelocation.New(0) - it := NewItNode("my it node", func() {}, types.FlagTypeFocused, codeLocation, 0, nil, 3) - Ω(it.Type()).Should(Equal(types.SpecComponentTypeIt)) - Ω(it.Flag()).Should(Equal(types.FlagTypeFocused)) - Ω(it.Text()).Should(Equal("my it node")) - Ω(it.CodeLocation()).Should(Equal(codeLocation)) - Ω(it.Samples()).Should(Equal(1)) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/leaf_node_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/leaf_node_suite_test.go deleted file mode 100644 index a7ba9e00..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/leaf_node_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestLeafNode(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "LeafNode Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go index efc3348c..3ab9a6d5 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go @@ -1,9 +1,10 @@ package leafnodes import ( + "reflect" + "github.com/onsi/ginkgo/internal/failer" "github.com/onsi/ginkgo/types" - "reflect" ) type MeasureNode struct { diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node_test.go deleted file mode 100644 index 252065b8..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node_test.go +++ /dev/null @@ -1,154 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/leafnodes" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/internal/codelocation" - Failer "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" - "time" -) - -var _ = Describe("Measure Nodes", func() { - It("should report the correct type, text, flag, and code location", func() { - codeLocation := codelocation.New(0) - measure := NewMeasureNode("my measure node", func(b Benchmarker) {}, types.FlagTypeFocused, codeLocation, 10, nil, 3) - Ω(measure.Type()).Should(Equal(types.SpecComponentTypeMeasure)) - Ω(measure.Flag()).Should(Equal(types.FlagTypeFocused)) - Ω(measure.Text()).Should(Equal("my measure node")) - Ω(measure.CodeLocation()).Should(Equal(codeLocation)) - Ω(measure.Samples()).Should(Equal(10)) - }) - - Describe("benchmarking", func() { - var measure *MeasureNode - - Describe("Value", func() { - BeforeEach(func() { - measure = NewMeasureNode("the measurement", func(b Benchmarker) { - b.RecordValue("foo", 7, "info!") - b.RecordValue("foo", 2) - b.RecordValue("foo", 3) - b.RecordValue("bar", 0.3) - b.RecordValue("bar", 0.1) - b.RecordValue("bar", 0.5) - b.RecordValue("bar", 0.7) - }, types.FlagTypeFocused, codelocation.New(0), 1, Failer.New(), 3) - Ω(measure.Run()).Should(Equal(types.SpecStatePassed)) - }) - - It("records passed in values and reports on them", func() { - report := measure.MeasurementsReport() - Ω(report).Should(HaveLen(2)) - Ω(report["foo"].Name).Should(Equal("foo")) - Ω(report["foo"].Info).Should(Equal("info!")) - Ω(report["foo"].Order).Should(Equal(0)) - Ω(report["foo"].SmallestLabel).Should(Equal("Smallest")) - Ω(report["foo"].LargestLabel).Should(Equal(" Largest")) - Ω(report["foo"].AverageLabel).Should(Equal(" Average")) - Ω(report["foo"].Units).Should(Equal("")) - Ω(report["foo"].Results).Should(Equal([]float64{7, 2, 3})) - Ω(report["foo"].Smallest).Should(BeNumerically("==", 2)) - Ω(report["foo"].Largest).Should(BeNumerically("==", 7)) - Ω(report["foo"].Average).Should(BeNumerically("==", 4)) - Ω(report["foo"].StdDeviation).Should(BeNumerically("~", 2.16, 0.01)) - - Ω(report["bar"].Name).Should(Equal("bar")) - Ω(report["bar"].Info).Should(BeNil()) - Ω(report["bar"].SmallestLabel).Should(Equal("Smallest")) - Ω(report["bar"].Order).Should(Equal(1)) - Ω(report["bar"].LargestLabel).Should(Equal(" Largest")) - Ω(report["bar"].AverageLabel).Should(Equal(" Average")) - Ω(report["bar"].Units).Should(Equal("")) - Ω(report["bar"].Results).Should(Equal([]float64{0.3, 0.1, 0.5, 0.7})) - Ω(report["bar"].Smallest).Should(BeNumerically("==", 0.1)) - Ω(report["bar"].Largest).Should(BeNumerically("==", 0.7)) - Ω(report["bar"].Average).Should(BeNumerically("==", 0.4)) - Ω(report["bar"].StdDeviation).Should(BeNumerically("~", 0.22, 0.01)) - }) - }) - - Describe("Value with precision", func() { - BeforeEach(func() { - measure = NewMeasureNode("the measurement", func(b Benchmarker) { - b.RecordValueWithPrecision("foo", 7, "ms", 7, "info!") - b.RecordValueWithPrecision("foo", 2, "ms", 6) - b.RecordValueWithPrecision("foo", 3, "ms", 5) - b.RecordValueWithPrecision("bar", 0.3, "ns", 4) - b.RecordValueWithPrecision("bar", 0.1, "ns", 3) - b.RecordValueWithPrecision("bar", 0.5, "ns", 2) - b.RecordValueWithPrecision("bar", 0.7, "ns", 1) - }, types.FlagTypeFocused, codelocation.New(0), 1, Failer.New(), 3) - Ω(measure.Run()).Should(Equal(types.SpecStatePassed)) - }) - - It("records passed in values and reports on them", func() { - report := measure.MeasurementsReport() - Ω(report).Should(HaveLen(2)) - Ω(report["foo"].Name).Should(Equal("foo")) - Ω(report["foo"].Info).Should(Equal("info!")) - Ω(report["foo"].Order).Should(Equal(0)) - Ω(report["foo"].SmallestLabel).Should(Equal("Smallest")) - Ω(report["foo"].LargestLabel).Should(Equal(" Largest")) - Ω(report["foo"].AverageLabel).Should(Equal(" Average")) - Ω(report["foo"].Units).Should(Equal("ms")) - Ω(report["foo"].Results).Should(Equal([]float64{7, 2, 3})) - Ω(report["foo"].Smallest).Should(BeNumerically("==", 2)) - Ω(report["foo"].Largest).Should(BeNumerically("==", 7)) - Ω(report["foo"].Average).Should(BeNumerically("==", 4)) - Ω(report["foo"].StdDeviation).Should(BeNumerically("~", 2.16, 0.01)) - - Ω(report["bar"].Name).Should(Equal("bar")) - Ω(report["bar"].Info).Should(BeNil()) - Ω(report["bar"].SmallestLabel).Should(Equal("Smallest")) - Ω(report["bar"].Order).Should(Equal(1)) - Ω(report["bar"].LargestLabel).Should(Equal(" Largest")) - Ω(report["bar"].AverageLabel).Should(Equal(" Average")) - Ω(report["bar"].Units).Should(Equal("ns")) - Ω(report["bar"].Results).Should(Equal([]float64{0.3, 0.1, 0.5, 0.7})) - Ω(report["bar"].Smallest).Should(BeNumerically("==", 0.1)) - Ω(report["bar"].Largest).Should(BeNumerically("==", 0.7)) - Ω(report["bar"].Average).Should(BeNumerically("==", 0.4)) - Ω(report["bar"].StdDeviation).Should(BeNumerically("~", 0.22, 0.01)) - }) - }) - - Describe("Time", func() { - BeforeEach(func() { - measure = NewMeasureNode("the measurement", func(b Benchmarker) { - b.Time("foo", func() { - time.Sleep(100 * time.Millisecond) - }, "info!") - b.Time("foo", func() { - time.Sleep(200 * time.Millisecond) - }) - b.Time("foo", func() { - time.Sleep(170 * time.Millisecond) - }) - }, types.FlagTypeFocused, codelocation.New(0), 1, Failer.New(), 3) - Ω(measure.Run()).Should(Equal(types.SpecStatePassed)) - }) - - It("records passed in values and reports on them", func() { - report := measure.MeasurementsReport() - Ω(report).Should(HaveLen(1)) - Ω(report["foo"].Name).Should(Equal("foo")) - Ω(report["foo"].Info).Should(Equal("info!")) - Ω(report["foo"].SmallestLabel).Should(Equal("Fastest Time")) - Ω(report["foo"].LargestLabel).Should(Equal("Slowest Time")) - Ω(report["foo"].AverageLabel).Should(Equal("Average Time")) - Ω(report["foo"].Units).Should(Equal("s")) - Ω(report["foo"].Results).Should(HaveLen(3)) - Ω(report["foo"].Results[0]).Should(BeNumerically("~", 0.1, 0.01)) - Ω(report["foo"].Results[1]).Should(BeNumerically("~", 0.2, 0.01)) - Ω(report["foo"].Results[2]).Should(BeNumerically("~", 0.17, 0.01)) - Ω(report["foo"].Smallest).Should(BeNumerically("~", 0.1, 0.01)) - Ω(report["foo"].Largest).Should(BeNumerically("~", 0.2, 0.01)) - Ω(report["foo"].Average).Should(BeNumerically("~", 0.16, 0.01)) - Ω(report["foo"].StdDeviation).Should(BeNumerically("~", 0.04, 0.01)) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go index 870ad826..16cb66c3 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go @@ -2,11 +2,12 @@ package leafnodes import ( "fmt" + "reflect" + "time" + "github.com/onsi/ginkgo/internal/codelocation" "github.com/onsi/ginkgo/internal/failer" "github.com/onsi/ginkgo/types" - "reflect" - "time" ) type runner struct { @@ -86,6 +87,9 @@ func (r *runner) runAsync() (outcome types.SpecState, failure types.SpecFailure) finished = true }() + // If this goroutine gets no CPU time before the select block, + // the <-done case may complete even if the test took longer than the timeoutThreshold. + // This can cause flaky behaviour, but we haven't seen it in the wild. select { case <-done: case <-time.After(r.timeoutThreshold): diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go index 6b725a63..b4654cd2 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go @@ -1,9 +1,10 @@ package leafnodes import ( + "time" + "github.com/onsi/ginkgo/internal/failer" "github.com/onsi/ginkgo/types" - "time" ) type SetupNode struct { diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go deleted file mode 100644 index d5b9251f..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - - . "github.com/onsi/ginkgo/internal/leafnodes" - - "github.com/onsi/ginkgo/internal/codelocation" -) - -var _ = Describe("Setup Nodes", func() { - Describe("BeforeEachNodes", func() { - It("should report the correct type and code location", func() { - codeLocation := codelocation.New(0) - beforeEach := NewBeforeEachNode(func() {}, codeLocation, 0, nil, 3) - Ω(beforeEach.Type()).Should(Equal(types.SpecComponentTypeBeforeEach)) - Ω(beforeEach.CodeLocation()).Should(Equal(codeLocation)) - }) - }) - - Describe("AfterEachNodes", func() { - It("should report the correct type and code location", func() { - codeLocation := codelocation.New(0) - afterEach := NewAfterEachNode(func() {}, codeLocation, 0, nil, 3) - Ω(afterEach.Type()).Should(Equal(types.SpecComponentTypeAfterEach)) - Ω(afterEach.CodeLocation()).Should(Equal(codeLocation)) - }) - }) - - Describe("JustBeforeEachNodes", func() { - It("should report the correct type and code location", func() { - codeLocation := codelocation.New(0) - justBeforeEach := NewJustBeforeEachNode(func() {}, codeLocation, 0, nil, 3) - Ω(justBeforeEach.Type()).Should(Equal(types.SpecComponentTypeJustBeforeEach)) - Ω(justBeforeEach.CodeLocation()).Should(Equal(codeLocation)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/shared_runner_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/shared_runner_test.go deleted file mode 100644 index 4bf906c7..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/shared_runner_test.go +++ /dev/null @@ -1,359 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/leafnodes" - . "github.com/onsi/gomega" - - "reflect" - "runtime" - "time" - - "github.com/onsi/ginkgo/internal/codelocation" - Failer "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type runnable interface { - Run() (outcome types.SpecState, failure types.SpecFailure) - CodeLocation() types.CodeLocation -} - -func SynchronousSharedRunnerBehaviors(build func(body interface{}, timeout time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable, componentType types.SpecComponentType, componentIndex int) { - var ( - outcome types.SpecState - failure types.SpecFailure - - failer *Failer.Failer - - componentCodeLocation types.CodeLocation - innerCodeLocation types.CodeLocation - - didRun bool - ) - - BeforeEach(func() { - failer = Failer.New() - componentCodeLocation = codelocation.New(0) - innerCodeLocation = codelocation.New(0) - - didRun = false - }) - - Describe("synchronous functions", func() { - Context("when the function passes", func() { - BeforeEach(func() { - outcome, failure = build(func() { - didRun = true - }, 0, failer, componentCodeLocation).Run() - }) - - It("should have a succesful outcome", func() { - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStatePassed)) - Ω(failure).Should(BeZero()) - }) - }) - - Context("when a failure occurs", func() { - BeforeEach(func() { - outcome, failure = build(func() { - didRun = true - failer.Fail("bam", innerCodeLocation) - panic("should not matter") - }, 0, failer, componentCodeLocation).Run() - }) - - It("should return the failure", func() { - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStateFailed)) - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "bam", - Location: innerCodeLocation, - ForwardedPanic: "", - ComponentIndex: componentIndex, - ComponentType: componentType, - ComponentCodeLocation: componentCodeLocation, - })) - }) - }) - - Context("when a panic occurs", func() { - BeforeEach(func() { - outcome, failure = build(func() { - didRun = true - innerCodeLocation = codelocation.New(0) - panic("ack!") - }, 0, failer, componentCodeLocation).Run() - }) - - It("should return the panic", func() { - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStatePanicked)) - Ω(failure.ForwardedPanic).Should(Equal("ack!")) - }) - }) - - Context("when a panic occurs with a nil value", func() { - BeforeEach(func() { - outcome, failure = build(func() { - didRun = true - innerCodeLocation = codelocation.New(0) - panic(nil) - }, 0, failer, componentCodeLocation).Run() - }) - - It("should return the nil-valued panic", func() { - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStatePanicked)) - Ω(failure.ForwardedPanic).Should(Equal("")) - }) - }) - - }) -} - -func AsynchronousSharedRunnerBehaviors(build func(body interface{}, timeout time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable, componentType types.SpecComponentType, componentIndex int) { - var ( - outcome types.SpecState - failure types.SpecFailure - - failer *Failer.Failer - - componentCodeLocation types.CodeLocation - innerCodeLocation types.CodeLocation - - didRun bool - ) - - BeforeEach(func() { - failer = Failer.New() - componentCodeLocation = codelocation.New(0) - innerCodeLocation = codelocation.New(0) - - didRun = false - }) - - Describe("asynchronous functions", func() { - var timeoutDuration time.Duration - - BeforeEach(func() { - timeoutDuration = time.Duration(1 * float64(time.Second)) - }) - - Context("when running", func() { - It("should run the function as a goroutine, and block until it's done", func() { - initialNumberOfGoRoutines := runtime.NumGoroutine() - numberOfGoRoutines := 0 - - build(func(done Done) { - didRun = true - numberOfGoRoutines = runtime.NumGoroutine() - close(done) - }, timeoutDuration, failer, componentCodeLocation).Run() - - Ω(didRun).Should(BeTrue()) - Ω(numberOfGoRoutines).Should(BeNumerically(">=", initialNumberOfGoRoutines+1)) - }) - }) - - Context("when the function passes", func() { - BeforeEach(func() { - outcome, failure = build(func(done Done) { - didRun = true - close(done) - }, timeoutDuration, failer, componentCodeLocation).Run() - }) - - It("should have a succesful outcome", func() { - Ω(didRun).Should(BeTrue()) - Ω(outcome).Should(Equal(types.SpecStatePassed)) - Ω(failure).Should(BeZero()) - }) - }) - - Context("when the function fails", func() { - BeforeEach(func() { - outcome, failure = build(func(done Done) { - didRun = true - failer.Fail("bam", innerCodeLocation) - time.Sleep(20 * time.Millisecond) - panic("doesn't matter") - close(done) - }, 10*time.Millisecond, failer, componentCodeLocation).Run() - }) - - It("should return the failure", func() { - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStateFailed)) - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "bam", - Location: innerCodeLocation, - ForwardedPanic: "", - ComponentIndex: componentIndex, - ComponentType: componentType, - ComponentCodeLocation: componentCodeLocation, - })) - }) - }) - - Context("when the function times out", func() { - var guard chan struct{} - - BeforeEach(func() { - guard = make(chan struct{}) - outcome, failure = build(func(done Done) { - didRun = true - time.Sleep(20 * time.Millisecond) - close(guard) - panic("doesn't matter") - close(done) - }, 10*time.Millisecond, failer, componentCodeLocation).Run() - }) - - It("should return the timeout", func() { - <-guard - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStateTimedOut)) - Ω(failure).Should(Equal(types.SpecFailure{ - Message: "Timed out", - Location: componentCodeLocation, - ForwardedPanic: "", - ComponentIndex: componentIndex, - ComponentType: componentType, - ComponentCodeLocation: componentCodeLocation, - })) - }) - }) - - Context("when the function panics", func() { - BeforeEach(func() { - outcome, failure = build(func(done Done) { - didRun = true - innerCodeLocation = codelocation.New(0) - panic("ack!") - }, 100*time.Millisecond, failer, componentCodeLocation).Run() - }) - - It("should return the panic", func() { - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStatePanicked)) - Ω(failure.ForwardedPanic).Should(Equal("ack!")) - }) - }) - - Context("when the function panics with a nil value", func() { - BeforeEach(func() { - outcome, failure = build(func(done Done) { - didRun = true - innerCodeLocation = codelocation.New(0) - panic(nil) - }, 100*time.Millisecond, failer, componentCodeLocation).Run() - }) - - It("should return the nil-valued panic", func() { - Ω(didRun).Should(BeTrue()) - - Ω(outcome).Should(Equal(types.SpecStatePanicked)) - Ω(failure.ForwardedPanic).Should(Equal("")) - }) - }) - }) -} - -func InvalidSharedRunnerBehaviors(build func(body interface{}, timeout time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable, componentType types.SpecComponentType) { - var ( - failer *Failer.Failer - componentCodeLocation types.CodeLocation - ) - - BeforeEach(func() { - failer = Failer.New() - componentCodeLocation = codelocation.New(0) - }) - - Describe("invalid functions", func() { - Context("when passed something that's not a function", func() { - It("should panic", func() { - Ω(func() { - build("not a function", 0, failer, componentCodeLocation) - }).Should(Panic()) - }) - }) - - Context("when the function takes the wrong kind of argument", func() { - It("should panic", func() { - Ω(func() { - build(func(oops string) {}, 0, failer, componentCodeLocation) - }).Should(Panic()) - }) - }) - - Context("when the function takes more than one argument", func() { - It("should panic", func() { - Ω(func() { - build(func(done Done, oops string) {}, 0, failer, componentCodeLocation) - }).Should(Panic()) - }) - }) - }) -} - -var _ = Describe("Shared RunnableNode behavior", func() { - Describe("It Nodes", func() { - build := func(body interface{}, timeout time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable { - return NewItNode("", body, types.FlagTypeFocused, componentCodeLocation, timeout, failer, 3) - } - - SynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeIt, 3) - AsynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeIt, 3) - InvalidSharedRunnerBehaviors(build, types.SpecComponentTypeIt) - }) - - Describe("Measure Nodes", func() { - build := func(body interface{}, _ time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable { - return NewMeasureNode("", func(Benchmarker) { - reflect.ValueOf(body).Call([]reflect.Value{}) - }, types.FlagTypeFocused, componentCodeLocation, 10, failer, 3) - } - - SynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeMeasure, 3) - }) - - Describe("BeforeEach Nodes", func() { - build := func(body interface{}, timeout time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable { - return NewBeforeEachNode(body, componentCodeLocation, timeout, failer, 3) - } - - SynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeBeforeEach, 3) - AsynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeBeforeEach, 3) - InvalidSharedRunnerBehaviors(build, types.SpecComponentTypeBeforeEach) - }) - - Describe("AfterEach Nodes", func() { - build := func(body interface{}, timeout time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable { - return NewAfterEachNode(body, componentCodeLocation, timeout, failer, 3) - } - - SynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeAfterEach, 3) - AsynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeAfterEach, 3) - InvalidSharedRunnerBehaviors(build, types.SpecComponentTypeAfterEach) - }) - - Describe("JustBeforeEach Nodes", func() { - build := func(body interface{}, timeout time.Duration, failer *Failer.Failer, componentCodeLocation types.CodeLocation) runnable { - return NewJustBeforeEachNode(body, componentCodeLocation, timeout, failer, 3) - } - - SynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeJustBeforeEach, 3) - AsynchronousSharedRunnerBehaviors(build, types.SpecComponentTypeJustBeforeEach, 3) - InvalidSharedRunnerBehaviors(build, types.SpecComponentTypeJustBeforeEach) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go index 2ccc7dc0..80f16ed7 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go @@ -1,9 +1,10 @@ package leafnodes import ( + "time" + "github.com/onsi/ginkgo/internal/failer" "github.com/onsi/ginkgo/types" - "time" ) type SuiteNode interface { diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes_test.go deleted file mode 100644 index 246b329f..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes_test.go +++ /dev/null @@ -1,230 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - . "github.com/onsi/ginkgo/internal/leafnodes" - - "time" - - "github.com/onsi/ginkgo/internal/codelocation" - Failer "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -var _ = Describe("SuiteNodes", func() { - Describe("BeforeSuite nodes", func() { - var befSuite SuiteNode - var failer *Failer.Failer - var codeLocation types.CodeLocation - var innerCodeLocation types.CodeLocation - var outcome bool - - BeforeEach(func() { - failer = Failer.New() - codeLocation = codelocation.New(0) - innerCodeLocation = codelocation.New(0) - }) - - Context("when the body passes", func() { - BeforeEach(func() { - befSuite = NewBeforeSuiteNode(func() { - time.Sleep(10 * time.Millisecond) - }, codeLocation, 0, failer) - outcome = befSuite.Run(0, 0, "") - }) - - It("should return true when run and report as passed", func() { - Ω(outcome).Should(BeTrue()) - Ω(befSuite.Passed()).Should(BeTrue()) - }) - - It("should have the correct summary", func() { - summary := befSuite.Summary() - Ω(summary.ComponentType).Should(Equal(types.SpecComponentTypeBeforeSuite)) - Ω(summary.CodeLocation).Should(Equal(codeLocation)) - Ω(summary.State).Should(Equal(types.SpecStatePassed)) - Ω(summary.RunTime).Should(BeNumerically(">=", 10*time.Millisecond)) - Ω(summary.Failure).Should(BeZero()) - }) - }) - - Context("when the body fails", func() { - BeforeEach(func() { - befSuite = NewBeforeSuiteNode(func() { - failer.Fail("oops", innerCodeLocation) - }, codeLocation, 0, failer) - outcome = befSuite.Run(0, 0, "") - }) - - It("should return false when run and report as failed", func() { - Ω(outcome).Should(BeFalse()) - Ω(befSuite.Passed()).Should(BeFalse()) - }) - - It("should have the correct summary", func() { - summary := befSuite.Summary() - Ω(summary.State).Should(Equal(types.SpecStateFailed)) - Ω(summary.Failure.Message).Should(Equal("oops")) - Ω(summary.Failure.Location).Should(Equal(innerCodeLocation)) - Ω(summary.Failure.ForwardedPanic).Should(BeEmpty()) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeBeforeSuite)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - - Context("when the body times out", func() { - BeforeEach(func() { - befSuite = NewBeforeSuiteNode(func(done Done) { - }, codeLocation, time.Millisecond, failer) - outcome = befSuite.Run(0, 0, "") - }) - - It("should return false when run and report as failed", func() { - Ω(outcome).Should(BeFalse()) - Ω(befSuite.Passed()).Should(BeFalse()) - }) - - It("should have the correct summary", func() { - summary := befSuite.Summary() - Ω(summary.State).Should(Equal(types.SpecStateTimedOut)) - Ω(summary.Failure.ForwardedPanic).Should(BeEmpty()) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeBeforeSuite)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - - Context("when the body panics", func() { - BeforeEach(func() { - befSuite = NewBeforeSuiteNode(func() { - panic("bam") - }, codeLocation, 0, failer) - outcome = befSuite.Run(0, 0, "") - }) - - It("should return false when run and report as failed", func() { - Ω(outcome).Should(BeFalse()) - Ω(befSuite.Passed()).Should(BeFalse()) - }) - - It("should have the correct summary", func() { - summary := befSuite.Summary() - Ω(summary.State).Should(Equal(types.SpecStatePanicked)) - Ω(summary.Failure.ForwardedPanic).Should(Equal("bam")) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeBeforeSuite)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - }) - - Describe("AfterSuite nodes", func() { - var aftSuite SuiteNode - var failer *Failer.Failer - var codeLocation types.CodeLocation - var innerCodeLocation types.CodeLocation - var outcome bool - - BeforeEach(func() { - failer = Failer.New() - codeLocation = codelocation.New(0) - innerCodeLocation = codelocation.New(0) - }) - - Context("when the body passes", func() { - BeforeEach(func() { - aftSuite = NewAfterSuiteNode(func() { - time.Sleep(10 * time.Millisecond) - }, codeLocation, 0, failer) - outcome = aftSuite.Run(0, 0, "") - }) - - It("should return true when run and report as passed", func() { - Ω(outcome).Should(BeTrue()) - Ω(aftSuite.Passed()).Should(BeTrue()) - }) - - It("should have the correct summary", func() { - summary := aftSuite.Summary() - Ω(summary.ComponentType).Should(Equal(types.SpecComponentTypeAfterSuite)) - Ω(summary.CodeLocation).Should(Equal(codeLocation)) - Ω(summary.State).Should(Equal(types.SpecStatePassed)) - Ω(summary.RunTime).Should(BeNumerically(">=", 10*time.Millisecond)) - Ω(summary.Failure).Should(BeZero()) - }) - }) - - Context("when the body fails", func() { - BeforeEach(func() { - aftSuite = NewAfterSuiteNode(func() { - failer.Fail("oops", innerCodeLocation) - }, codeLocation, 0, failer) - outcome = aftSuite.Run(0, 0, "") - }) - - It("should return false when run and report as failed", func() { - Ω(outcome).Should(BeFalse()) - Ω(aftSuite.Passed()).Should(BeFalse()) - }) - - It("should have the correct summary", func() { - summary := aftSuite.Summary() - Ω(summary.State).Should(Equal(types.SpecStateFailed)) - Ω(summary.Failure.Message).Should(Equal("oops")) - Ω(summary.Failure.Location).Should(Equal(innerCodeLocation)) - Ω(summary.Failure.ForwardedPanic).Should(BeEmpty()) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeAfterSuite)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - - Context("when the body times out", func() { - BeforeEach(func() { - aftSuite = NewAfterSuiteNode(func(done Done) { - }, codeLocation, time.Millisecond, failer) - outcome = aftSuite.Run(0, 0, "") - }) - - It("should return false when run and report as failed", func() { - Ω(outcome).Should(BeFalse()) - Ω(aftSuite.Passed()).Should(BeFalse()) - }) - - It("should have the correct summary", func() { - summary := aftSuite.Summary() - Ω(summary.State).Should(Equal(types.SpecStateTimedOut)) - Ω(summary.Failure.ForwardedPanic).Should(BeEmpty()) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeAfterSuite)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - - Context("when the body panics", func() { - BeforeEach(func() { - aftSuite = NewAfterSuiteNode(func() { - panic("bam") - }, codeLocation, 0, failer) - outcome = aftSuite.Run(0, 0, "") - }) - - It("should return false when run and report as failed", func() { - Ω(outcome).Should(BeFalse()) - Ω(aftSuite.Passed()).Should(BeFalse()) - }) - - It("should have the correct summary", func() { - summary := aftSuite.Summary() - Ω(summary.State).Should(Equal(types.SpecStatePanicked)) - Ω(summary.Failure.ForwardedPanic).Should(Equal("bam")) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeAfterSuite)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - }) -}) 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 index e7030d91..a721d0cf 100644 --- 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 @@ -2,11 +2,12 @@ package leafnodes import ( "encoding/json" - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" "io/ioutil" "net/http" "time" + + "github.com/onsi/ginkgo/internal/failer" + "github.com/onsi/ginkgo/types" ) type synchronizedAfterSuiteNode struct { diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node_test.go deleted file mode 100644 index 4266a4bc..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node_test.go +++ /dev/null @@ -1,196 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - "sync" - - "github.com/onsi/gomega/ghttp" - "net/http" - - "github.com/onsi/ginkgo/internal/codelocation" - Failer "github.com/onsi/ginkgo/internal/failer" - "time" -) - -var _ = Describe("SynchronizedAfterSuiteNode", func() { - var failer *Failer.Failer - var node SuiteNode - var codeLocation types.CodeLocation - var innerCodeLocation types.CodeLocation - var outcome bool - var server *ghttp.Server - var things []string - var lock *sync.Mutex - - BeforeEach(func() { - things = []string{} - server = ghttp.NewServer() - codeLocation = codelocation.New(0) - innerCodeLocation = codelocation.New(0) - failer = Failer.New() - lock = &sync.Mutex{} - }) - - AfterEach(func() { - server.Close() - }) - - newNode := func(bodyA interface{}, bodyB interface{}) SuiteNode { - return NewSynchronizedAfterSuiteNode(bodyA, bodyB, codeLocation, time.Millisecond, failer) - } - - ranThing := func(thing string) { - lock.Lock() - defer lock.Unlock() - things = append(things, thing) - } - - thingsThatRan := func() []string { - lock.Lock() - defer lock.Unlock() - return things - } - - Context("when not running in parallel", func() { - Context("when all is well", func() { - BeforeEach(func() { - node = newNode(func() { - ranThing("A") - }, func() { - ranThing("B") - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should run A, then B", func() { - Ω(thingsThatRan()).Should(Equal([]string{"A", "B"})) - }) - - It("should report success", func() { - Ω(outcome).Should(BeTrue()) - Ω(node.Passed()).Should(BeTrue()) - Ω(node.Summary().State).Should(Equal(types.SpecStatePassed)) - }) - }) - - Context("when A fails", func() { - BeforeEach(func() { - node = newNode(func() { - ranThing("A") - failer.Fail("bam", innerCodeLocation) - }, func() { - ranThing("B") - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should still run B", func() { - Ω(thingsThatRan()).Should(Equal([]string{"A", "B"})) - }) - - It("should report failure", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - Ω(node.Summary().State).Should(Equal(types.SpecStateFailed)) - }) - }) - - Context("when B fails", func() { - BeforeEach(func() { - node = newNode(func() { - ranThing("A") - }, func() { - ranThing("B") - failer.Fail("bam", innerCodeLocation) - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should run all the things", func() { - Ω(thingsThatRan()).Should(Equal([]string{"A", "B"})) - }) - - It("should report failure", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - Ω(node.Summary().State).Should(Equal(types.SpecStateFailed)) - }) - }) - }) - - Context("when running in parallel", func() { - Context("as the first node", func() { - BeforeEach(func() { - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/RemoteAfterSuiteData"), - func(writer http.ResponseWriter, request *http.Request) { - ranThing("Request1") - }, - ghttp.RespondWithJSONEncoded(200, types.RemoteAfterSuiteData{false}), - ), ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/RemoteAfterSuiteData"), - func(writer http.ResponseWriter, request *http.Request) { - ranThing("Request2") - }, - ghttp.RespondWithJSONEncoded(200, types.RemoteAfterSuiteData{false}), - ), ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/RemoteAfterSuiteData"), - func(writer http.ResponseWriter, request *http.Request) { - ranThing("Request3") - }, - ghttp.RespondWithJSONEncoded(200, types.RemoteAfterSuiteData{true}), - )) - - node = newNode(func() { - ranThing("A") - }, func() { - ranThing("B") - }) - - outcome = node.Run(1, 3, server.URL()) - }) - - It("should run A and, when the server says its time, run B", func() { - Ω(thingsThatRan()).Should(Equal([]string{"A", "Request1", "Request2", "Request3", "B"})) - }) - - It("should report success", func() { - Ω(outcome).Should(BeTrue()) - Ω(node.Passed()).Should(BeTrue()) - Ω(node.Summary().State).Should(Equal(types.SpecStatePassed)) - }) - }) - - Context("as any other node", func() { - BeforeEach(func() { - node = newNode(func() { - ranThing("A") - }, func() { - ranThing("B") - }) - - outcome = node.Run(2, 3, server.URL()) - }) - - It("should run A, and not run B", func() { - Ω(thingsThatRan()).Should(Equal([]string{"A"})) - }) - - It("should not talk to the server", func() { - Ω(server.ReceivedRequests()).Should(BeEmpty()) - }) - - It("should report success", func() { - Ω(outcome).Should(BeTrue()) - Ω(node.Passed()).Should(BeTrue()) - Ω(node.Summary().State).Should(Equal(types.SpecStatePassed)) - }) - }) - }) -}) 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 index 76a96798..d5c88931 100644 --- 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 @@ -3,12 +3,13 @@ package leafnodes import ( "bytes" "encoding/json" - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" "io/ioutil" "net/http" "reflect" "time" + + "github.com/onsi/ginkgo/internal/failer" + "github.com/onsi/ginkgo/types" ) type synchronizedBeforeSuiteNode struct { @@ -109,8 +110,6 @@ func (node *synchronizedBeforeSuiteNode) waitForA(syncHost string) (types.SpecSt time.Sleep(50 * time.Millisecond) } - - return types.SpecStateFailed, failure("Shouldn't get here!") } func (node *synchronizedBeforeSuiteNode) Passed() bool { diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node_test.go deleted file mode 100644 index dbf24267..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node_test.go +++ /dev/null @@ -1,445 +0,0 @@ -package leafnodes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/leafnodes" - . "github.com/onsi/gomega" - - "github.com/onsi/gomega/ghttp" - "net/http" - - "github.com/onsi/ginkgo/internal/codelocation" - Failer "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" - "time" -) - -var _ = Describe("SynchronizedBeforeSuiteNode", func() { - var failer *Failer.Failer - var node SuiteNode - var codeLocation types.CodeLocation - var innerCodeLocation types.CodeLocation - var outcome bool - var server *ghttp.Server - - BeforeEach(func() { - server = ghttp.NewServer() - codeLocation = codelocation.New(0) - innerCodeLocation = codelocation.New(0) - failer = Failer.New() - }) - - AfterEach(func() { - server.Close() - }) - - newNode := func(bodyA interface{}, bodyB interface{}) SuiteNode { - return NewSynchronizedBeforeSuiteNode(bodyA, bodyB, codeLocation, time.Millisecond, failer) - } - - Describe("when not running in parallel", func() { - Context("when all is well", func() { - var data []byte - BeforeEach(func() { - data = nil - - node = newNode(func() []byte { - return []byte("my data") - }, func(d []byte) { - data = d - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should run A, then B passing the output from A to B", func() { - Ω(data).Should(Equal([]byte("my data"))) - }) - - It("should report success", func() { - Ω(outcome).Should(BeTrue()) - Ω(node.Passed()).Should(BeTrue()) - Ω(node.Summary().State).Should(Equal(types.SpecStatePassed)) - }) - }) - - Context("when A fails", func() { - var ranB bool - BeforeEach(func() { - ranB = false - node = newNode(func() []byte { - failer.Fail("boom", innerCodeLocation) - return nil - }, func([]byte) { - ranB = true - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should not run B", func() { - Ω(ranB).Should(BeFalse()) - }) - - It("should report failure", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - Ω(node.Summary().State).Should(Equal(types.SpecStateFailed)) - }) - }) - - Context("when B fails", func() { - BeforeEach(func() { - node = newNode(func() []byte { - return nil - }, func([]byte) { - failer.Fail("boom", innerCodeLocation) - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should report failure", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - Ω(node.Summary().State).Should(Equal(types.SpecStateFailed)) - }) - }) - - Context("when A times out", func() { - var ranB bool - BeforeEach(func() { - ranB = false - node = newNode(func(Done) []byte { - time.Sleep(time.Second) - return nil - }, func([]byte) { - ranB = true - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should not run B", func() { - Ω(ranB).Should(BeFalse()) - }) - - It("should report failure", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - Ω(node.Summary().State).Should(Equal(types.SpecStateTimedOut)) - }) - }) - - Context("when B times out", func() { - BeforeEach(func() { - node = newNode(func() []byte { - return nil - }, func([]byte, Done) { - time.Sleep(time.Second) - }) - - outcome = node.Run(1, 1, server.URL()) - }) - - It("should report failure", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - Ω(node.Summary().State).Should(Equal(types.SpecStateTimedOut)) - }) - }) - }) - - Describe("when running in parallel", func() { - var ranB bool - var parallelNode, parallelTotal int - BeforeEach(func() { - ranB = false - parallelNode, parallelTotal = 1, 3 - }) - - Context("as the first node, it runs A", func() { - var expectedState types.RemoteBeforeSuiteData - - BeforeEach(func() { - parallelNode, parallelTotal = 1, 3 - }) - - JustBeforeEach(func() { - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyRequest("POST", "/BeforeSuiteState"), - ghttp.VerifyJSONRepresenting(expectedState), - )) - - outcome = node.Run(parallelNode, parallelTotal, server.URL()) - }) - - Context("when A succeeds", func() { - BeforeEach(func() { - expectedState = types.RemoteBeforeSuiteData{[]byte("my data"), types.RemoteBeforeSuiteStatePassed} - - node = newNode(func() []byte { - return []byte("my data") - }, func([]byte) { - ranB = true - }) - }) - - It("should post about A succeeding", func() { - Ω(server.ReceivedRequests()).Should(HaveLen(1)) - }) - - It("should run B", func() { - Ω(ranB).Should(BeTrue()) - }) - - It("should report success", func() { - Ω(outcome).Should(BeTrue()) - }) - }) - - Context("when A fails", func() { - BeforeEach(func() { - expectedState = types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStateFailed} - - node = newNode(func() []byte { - panic("BAM") - return []byte("my data") - }, func([]byte) { - ranB = true - }) - }) - - It("should post about A failing", func() { - Ω(server.ReceivedRequests()).Should(HaveLen(1)) - }) - - It("should not run B", func() { - Ω(ranB).Should(BeFalse()) - }) - - It("should report failure", func() { - Ω(outcome).Should(BeFalse()) - }) - }) - }) - - Context("as the Nth node", func() { - var statusCode int - var response interface{} - var ranA bool - var bData []byte - - BeforeEach(func() { - ranA = false - bData = nil - - statusCode = http.StatusOK - - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/BeforeSuiteState"), - ghttp.RespondWith(http.StatusOK, string((types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending}).ToJSON())), - ), ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/BeforeSuiteState"), - ghttp.RespondWith(http.StatusOK, string((types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending}).ToJSON())), - ), ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/BeforeSuiteState"), - ghttp.RespondWithJSONEncodedPtr(&statusCode, &response), - )) - - node = newNode(func() []byte { - ranA = true - return nil - }, func(data []byte) { - bData = data - }) - - parallelNode, parallelTotal = 2, 3 - }) - - Context("when A on node1 succeeds", func() { - BeforeEach(func() { - response = types.RemoteBeforeSuiteData{[]byte("my data"), types.RemoteBeforeSuiteStatePassed} - outcome = node.Run(parallelNode, parallelTotal, server.URL()) - }) - - It("should not run A", func() { - Ω(ranA).Should(BeFalse()) - }) - - It("should poll for A", func() { - Ω(server.ReceivedRequests()).Should(HaveLen(3)) - }) - - It("should run B when the polling succeeds", func() { - Ω(bData).Should(Equal([]byte("my data"))) - }) - - It("should succeed", func() { - Ω(outcome).Should(BeTrue()) - Ω(node.Passed()).Should(BeTrue()) - }) - }) - - Context("when A on node1 fails", func() { - BeforeEach(func() { - response = types.RemoteBeforeSuiteData{[]byte("my data"), types.RemoteBeforeSuiteStateFailed} - outcome = node.Run(parallelNode, parallelTotal, server.URL()) - }) - - It("should not run A", func() { - Ω(ranA).Should(BeFalse()) - }) - - It("should poll for A", func() { - Ω(server.ReceivedRequests()).Should(HaveLen(3)) - }) - - It("should not run B", func() { - Ω(bData).Should(BeNil()) - }) - - It("should fail", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - - summary := node.Summary() - Ω(summary.State).Should(Equal(types.SpecStateFailed)) - Ω(summary.Failure.Message).Should(Equal("BeforeSuite on Node 1 failed")) - Ω(summary.Failure.Location).Should(Equal(codeLocation)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeBeforeSuite)) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - - Context("when node1 disappears", func() { - BeforeEach(func() { - response = types.RemoteBeforeSuiteData{[]byte("my data"), types.RemoteBeforeSuiteStateDisappeared} - outcome = node.Run(parallelNode, parallelTotal, server.URL()) - }) - - It("should not run A", func() { - Ω(ranA).Should(BeFalse()) - }) - - It("should poll for A", func() { - Ω(server.ReceivedRequests()).Should(HaveLen(3)) - }) - - It("should not run B", func() { - Ω(bData).Should(BeNil()) - }) - - It("should fail", func() { - Ω(outcome).Should(BeFalse()) - Ω(node.Passed()).Should(BeFalse()) - - summary := node.Summary() - Ω(summary.State).Should(Equal(types.SpecStateFailed)) - Ω(summary.Failure.Message).Should(Equal("Node 1 disappeared before completing BeforeSuite")) - Ω(summary.Failure.Location).Should(Equal(codeLocation)) - Ω(summary.Failure.ComponentType).Should(Equal(types.SpecComponentTypeBeforeSuite)) - Ω(summary.Failure.ComponentIndex).Should(Equal(0)) - Ω(summary.Failure.ComponentCodeLocation).Should(Equal(codeLocation)) - }) - }) - }) - }) - - Describe("construction", func() { - Describe("the first function", func() { - Context("when the first function returns a byte array", func() { - Context("and takes nothing", func() { - It("should be fine", func() { - Ω(func() { - newNode(func() []byte { return nil }, func([]byte) {}) - }).ShouldNot(Panic()) - }) - }) - - Context("and takes a done function", func() { - It("should be fine", func() { - Ω(func() { - newNode(func(Done) []byte { return nil }, func([]byte) {}) - }).ShouldNot(Panic()) - }) - }) - - Context("and takes more than one thing", func() { - It("should panic", func() { - Ω(func() { - newNode(func(Done, Done) []byte { return nil }, func([]byte) {}) - }).Should(Panic()) - }) - }) - - Context("and takes something else", func() { - It("should panic", func() { - Ω(func() { - newNode(func(bool) []byte { return nil }, func([]byte) {}) - }).Should(Panic()) - }) - }) - }) - - Context("when the first function does not return a byte array", func() { - It("should panic", func() { - Ω(func() { - newNode(func() {}, func([]byte) {}) - }).Should(Panic()) - - Ω(func() { - newNode(func() []int { return nil }, func([]byte) {}) - }).Should(Panic()) - }) - }) - }) - - Describe("the second function", func() { - Context("when the second function takes a byte array", func() { - It("should be fine", func() { - Ω(func() { - newNode(func() []byte { return nil }, func([]byte) {}) - }).ShouldNot(Panic()) - }) - }) - - Context("when it also takes a done channel", func() { - It("should be fine", func() { - Ω(func() { - newNode(func() []byte { return nil }, func([]byte, Done) {}) - }).ShouldNot(Panic()) - }) - }) - - Context("if it takes anything else", func() { - It("should panic", func() { - Ω(func() { - newNode(func() []byte { return nil }, func([]byte, chan bool) {}) - }).Should(Panic()) - - Ω(func() { - newNode(func() []byte { return nil }, func(string) {}) - }).Should(Panic()) - }) - }) - - Context("if it takes nothing at all", func() { - It("should panic", func() { - Ω(func() { - newNode(func() []byte { return nil }, func() {}) - }).Should(Panic()) - }) - }) - - Context("if it returns something", func() { - It("should panic", func() { - Ω(func() { - newNode(func() []byte { return nil }, func([]byte) []byte { return nil }) - }).Should(Panic()) - }) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go b/vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go index 1e34dbf6..6b54afe0 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go @@ -125,14 +125,12 @@ func (aggregator *Aggregator) registerSuiteBeginning(configAndSuite configAndSui aggregator.stenographer.AnnounceSuite(configAndSuite.summary.SuiteDescription, configAndSuite.config.RandomSeed, configAndSuite.config.RandomizeAllSpecs, aggregator.config.Succinct) - numberOfSpecsToRun := 0 totalNumberOfSpecs := 0 - for _, configAndSuite := range aggregator.aggregatedSuiteBeginnings { - numberOfSpecsToRun += configAndSuite.summary.NumberOfSpecsThatWillBeRun - totalNumberOfSpecs += configAndSuite.summary.NumberOfTotalSpecs + if len(aggregator.aggregatedSuiteBeginnings) > 0 { + totalNumberOfSpecs = configAndSuite.summary.NumberOfSpecsBeforeParallelization } - aggregator.stenographer.AnnounceNumberOfSpecs(numberOfSpecsToRun, totalNumberOfSpecs, aggregator.config.Succinct) + aggregator.stenographer.AnnounceTotalNumberOfSpecs(totalNumberOfSpecs, aggregator.config.Succinct) aggregator.stenographer.AnnounceAggregatedParallelRun(aggregator.nodeCount, aggregator.config.Succinct) aggregator.flushCompletedSpecs() } @@ -209,7 +207,7 @@ func (aggregator *Aggregator) announceSpec(specSummary *types.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.FullTrace) + 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: @@ -239,6 +237,7 @@ func (aggregator *Aggregator) registerSuiteEnding(suite *types.SuiteSummary) (fi aggregatedSuiteSummary.NumberOfFailedSpecs += suiteSummary.NumberOfFailedSpecs aggregatedSuiteSummary.NumberOfPendingSpecs += suiteSummary.NumberOfPendingSpecs aggregatedSuiteSummary.NumberOfSkippedSpecs += suiteSummary.NumberOfSkippedSpecs + aggregatedSuiteSummary.NumberOfFlakedSpecs += suiteSummary.NumberOfFlakedSpecs } aggregatedSuiteSummary.RunTime = time.Since(aggregator.startTime) diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/aggregator_test.go b/vendor/github.com/onsi/ginkgo/internal/remote/aggregator_test.go deleted file mode 100644 index 377a016d..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/aggregator_test.go +++ /dev/null @@ -1,311 +0,0 @@ -package remote_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/config" - . "github.com/onsi/ginkgo/internal/remote" - st "github.com/onsi/ginkgo/reporters/stenographer" - "github.com/onsi/ginkgo/types" - "time" -) - -var _ = Describe("Aggregator", func() { - var ( - aggregator *Aggregator - reporterConfig config.DefaultReporterConfigType - stenographer *st.FakeStenographer - result chan bool - - ginkgoConfig1 config.GinkgoConfigType - ginkgoConfig2 config.GinkgoConfigType - - suiteSummary1 *types.SuiteSummary - suiteSummary2 *types.SuiteSummary - - beforeSummary *types.SetupSummary - afterSummary *types.SetupSummary - specSummary *types.SpecSummary - - suiteDescription string - ) - - BeforeEach(func() { - reporterConfig = config.DefaultReporterConfigType{ - NoColor: false, - SlowSpecThreshold: 0.1, - NoisyPendings: true, - Succinct: false, - Verbose: true, - } - stenographer = st.NewFakeStenographer() - result = make(chan bool, 1) - aggregator = NewAggregator(2, result, reporterConfig, stenographer) - - // - // now set up some fixture data - // - - ginkgoConfig1 = config.GinkgoConfigType{ - RandomSeed: 1138, - RandomizeAllSpecs: true, - ParallelNode: 1, - ParallelTotal: 2, - } - - ginkgoConfig2 = config.GinkgoConfigType{ - RandomSeed: 1138, - RandomizeAllSpecs: true, - ParallelNode: 2, - ParallelTotal: 2, - } - - suiteDescription = "My Parallel Suite" - - suiteSummary1 = &types.SuiteSummary{ - SuiteDescription: suiteDescription, - - NumberOfSpecsBeforeParallelization: 30, - NumberOfTotalSpecs: 17, - NumberOfSpecsThatWillBeRun: 15, - NumberOfPendingSpecs: 1, - NumberOfSkippedSpecs: 1, - } - - suiteSummary2 = &types.SuiteSummary{ - SuiteDescription: suiteDescription, - - NumberOfSpecsBeforeParallelization: 30, - NumberOfTotalSpecs: 13, - NumberOfSpecsThatWillBeRun: 8, - NumberOfPendingSpecs: 2, - NumberOfSkippedSpecs: 3, - } - - beforeSummary = &types.SetupSummary{ - State: types.SpecStatePassed, - CapturedOutput: "BeforeSuiteOutput", - } - - afterSummary = &types.SetupSummary{ - State: types.SpecStatePassed, - CapturedOutput: "AfterSuiteOutput", - } - - specSummary = &types.SpecSummary{ - State: types.SpecStatePassed, - CapturedOutput: "SpecOutput", - } - }) - - call := func(method string, args ...interface{}) st.FakeStenographerCall { - return st.NewFakeStenographerCall(method, args...) - } - - beginSuite := func() { - stenographer.Reset() - aggregator.SpecSuiteWillBegin(ginkgoConfig2, suiteSummary2) - aggregator.SpecSuiteWillBegin(ginkgoConfig1, suiteSummary1) - Eventually(func() interface{} { - return len(stenographer.Calls()) - }).Should(BeNumerically(">=", 3)) - } - - Describe("Announcing the beginning of the suite", func() { - Context("When one of the parallel-suites starts", func() { - BeforeEach(func() { - aggregator.SpecSuiteWillBegin(ginkgoConfig2, suiteSummary2) - }) - - It("should be silent", func() { - Consistently(func() interface{} { return stenographer.Calls() }).Should(BeEmpty()) - }) - }) - - Context("once all of the parallel-suites have started", func() { - BeforeEach(func() { - aggregator.SpecSuiteWillBegin(ginkgoConfig2, suiteSummary2) - aggregator.SpecSuiteWillBegin(ginkgoConfig1, suiteSummary1) - Eventually(func() interface{} { - return stenographer.Calls() - }).Should(HaveLen(3)) - }) - - It("should announce the beginning of the suite", func() { - Ω(stenographer.Calls()).Should(HaveLen(3)) - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuite", suiteDescription, ginkgoConfig1.RandomSeed, true, false))) - Ω(stenographer.Calls()[1]).Should(Equal(call("AnnounceNumberOfSpecs", 23, 30, false))) - Ω(stenographer.Calls()[2]).Should(Equal(call("AnnounceAggregatedParallelRun", 2, false))) - }) - }) - }) - - Describe("Announcing specs and before suites", func() { - Context("when the parallel-suites have not all started", func() { - BeforeEach(func() { - aggregator.BeforeSuiteDidRun(beforeSummary) - aggregator.AfterSuiteDidRun(afterSummary) - aggregator.SpecDidComplete(specSummary) - }) - - It("should not announce any specs", func() { - Consistently(func() interface{} { return stenographer.Calls() }).Should(BeEmpty()) - }) - - Context("when the parallel-suites subsequently start", func() { - BeforeEach(func() { - beginSuite() - }) - - It("should announce the specs, the before suites and the after suites", func() { - Eventually(func() interface{} { - return stenographer.Calls() - }).Should(ContainElement(call("AnnounceSuccesfulSpec", specSummary))) - - Ω(stenographer.Calls()).Should(ContainElement(call("AnnounceCapturedOutput", beforeSummary.CapturedOutput))) - Ω(stenographer.Calls()).Should(ContainElement(call("AnnounceCapturedOutput", afterSummary.CapturedOutput))) - }) - }) - }) - - Context("When the parallel-suites have all started", func() { - BeforeEach(func() { - beginSuite() - stenographer.Reset() - }) - - Context("When a spec completes", func() { - BeforeEach(func() { - aggregator.BeforeSuiteDidRun(beforeSummary) - aggregator.SpecDidComplete(specSummary) - aggregator.AfterSuiteDidRun(afterSummary) - Eventually(func() interface{} { - return stenographer.Calls() - }).Should(HaveLen(5)) - }) - - It("should announce the captured output of the BeforeSuite", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceCapturedOutput", beforeSummary.CapturedOutput))) - }) - - It("should announce that the spec will run (when in verbose mode)", func() { - Ω(stenographer.Calls()[1]).Should(Equal(call("AnnounceSpecWillRun", specSummary))) - }) - - It("should announce the captured stdout of the spec", func() { - Ω(stenographer.Calls()[2]).Should(Equal(call("AnnounceCapturedOutput", specSummary.CapturedOutput))) - }) - - It("should announce completion", func() { - Ω(stenographer.Calls()[3]).Should(Equal(call("AnnounceSuccesfulSpec", specSummary))) - }) - - It("should announce the captured output of the AfterSuite", func() { - Ω(stenographer.Calls()[4]).Should(Equal(call("AnnounceCapturedOutput", afterSummary.CapturedOutput))) - }) - }) - }) - }) - - Describe("Announcing the end of the suite", func() { - BeforeEach(func() { - beginSuite() - stenographer.Reset() - }) - - Context("When one of the parallel-suites ends", func() { - BeforeEach(func() { - aggregator.SpecSuiteDidEnd(suiteSummary2) - }) - - It("should be silent", func() { - Consistently(func() interface{} { return stenographer.Calls() }).Should(BeEmpty()) - }) - - It("should not notify the channel", func() { - Ω(result).Should(BeEmpty()) - }) - }) - - Context("once all of the parallel-suites end", func() { - BeforeEach(func() { - time.Sleep(200 * time.Millisecond) - - suiteSummary1.SuiteSucceeded = true - suiteSummary1.NumberOfPassedSpecs = 15 - suiteSummary1.NumberOfFailedSpecs = 0 - suiteSummary2.SuiteSucceeded = false - suiteSummary2.NumberOfPassedSpecs = 5 - suiteSummary2.NumberOfFailedSpecs = 3 - - aggregator.SpecSuiteDidEnd(suiteSummary2) - aggregator.SpecSuiteDidEnd(suiteSummary1) - Eventually(func() interface{} { - return stenographer.Calls() - }).Should(HaveLen(2)) - }) - - It("should announce the end of the suite", func() { - compositeSummary := stenographer.Calls()[1].Args[0].(*types.SuiteSummary) - - Ω(compositeSummary.SuiteSucceeded).Should(BeFalse()) - Ω(compositeSummary.NumberOfSpecsThatWillBeRun).Should(Equal(23)) - Ω(compositeSummary.NumberOfTotalSpecs).Should(Equal(30)) - Ω(compositeSummary.NumberOfPassedSpecs).Should(Equal(20)) - Ω(compositeSummary.NumberOfFailedSpecs).Should(Equal(3)) - Ω(compositeSummary.NumberOfPendingSpecs).Should(Equal(3)) - Ω(compositeSummary.NumberOfSkippedSpecs).Should(Equal(4)) - Ω(compositeSummary.RunTime.Seconds()).Should(BeNumerically(">", 0.2)) - }) - }) - - Context("when all the parallel-suites pass", func() { - BeforeEach(func() { - suiteSummary1.SuiteSucceeded = true - suiteSummary2.SuiteSucceeded = true - - aggregator.SpecSuiteDidEnd(suiteSummary2) - aggregator.SpecSuiteDidEnd(suiteSummary1) - Eventually(func() interface{} { - return stenographer.Calls() - }).Should(HaveLen(2)) - }) - - It("should report success", func() { - compositeSummary := stenographer.Calls()[1].Args[0].(*types.SuiteSummary) - - Ω(compositeSummary.SuiteSucceeded).Should(BeTrue()) - }) - - It("should notify the channel that it succeded", func(done Done) { - Ω(<-result).Should(BeTrue()) - close(done) - }) - }) - - Context("when one of the parallel-suites fails", func() { - BeforeEach(func() { - suiteSummary1.SuiteSucceeded = true - suiteSummary2.SuiteSucceeded = false - - aggregator.SpecSuiteDidEnd(suiteSummary2) - aggregator.SpecSuiteDidEnd(suiteSummary1) - Eventually(func() interface{} { - return stenographer.Calls() - }).Should(HaveLen(2)) - }) - - It("should report failure", func() { - compositeSummary := stenographer.Calls()[1].Args[0].(*types.SuiteSummary) - - Ω(compositeSummary.SuiteSucceeded).Should(BeFalse()) - }) - - It("should notify the channel that it failed", func(done Done) { - Ω(<-result).Should(BeFalse()) - close(done) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/fake_output_interceptor_test.go b/vendor/github.com/onsi/ginkgo/internal/remote/fake_output_interceptor_test.go deleted file mode 100644 index a928f93d..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/fake_output_interceptor_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package remote_test - -type fakeOutputInterceptor struct { - DidStartInterceptingOutput bool - DidStopInterceptingOutput bool - InterceptedOutput string -} - -func (interceptor *fakeOutputInterceptor) StartInterceptingOutput() error { - interceptor.DidStartInterceptingOutput = true - return nil -} - -func (interceptor *fakeOutputInterceptor) StopInterceptingAndReturnOutput() (string, error) { - interceptor.DidStopInterceptingOutput = true - return interceptor.InterceptedOutput, nil -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/fake_poster_test.go b/vendor/github.com/onsi/ginkgo/internal/remote/fake_poster_test.go deleted file mode 100644 index 3543c59c..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/fake_poster_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package remote_test - -import ( - "io" - "io/ioutil" - "net/http" -) - -type post struct { - url string - bodyType string - bodyContent []byte -} - -type fakePoster struct { - posts []post -} - -func newFakePoster() *fakePoster { - return &fakePoster{ - posts: make([]post, 0), - } -} - -func (poster *fakePoster) Post(url string, bodyType string, body io.Reader) (resp *http.Response, err error) { - bodyContent, _ := ioutil.ReadAll(body) - poster.posts = append(poster.posts, post{ - url: url, - bodyType: bodyType, - bodyContent: bodyContent, - }) - return nil, nil -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go b/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go index 025eb506..284bc62e 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go @@ -3,8 +3,14 @@ package remote import ( "bytes" "encoding/json" + "fmt" "io" "net/http" + "os" + + "github.com/onsi/ginkgo/internal/writer" + "github.com/onsi/ginkgo/reporters" + "github.com/onsi/ginkgo/reporters/stenographer" "github.com/onsi/ginkgo/config" "github.com/onsi/ginkgo/types" @@ -30,14 +36,41 @@ type ForwardingReporter struct { serverHost string poster Poster outputInterceptor OutputInterceptor + debugMode bool + debugFile *os.File + nestedReporter *reporters.DefaultReporter } -func NewForwardingReporter(serverHost string, poster Poster, outputInterceptor OutputInterceptor) *ForwardingReporter { - return &ForwardingReporter{ +func NewForwardingReporter(config config.DefaultReporterConfigType, serverHost string, poster Poster, outputInterceptor OutputInterceptor, ginkgoWriter *writer.Writer, debugFile string) *ForwardingReporter { + reporter := &ForwardingReporter{ serverHost: serverHost, poster: poster, outputInterceptor: outputInterceptor, } + + if debugFile != "" { + var err error + reporter.debugMode = true + reporter.debugFile, err = os.Create(debugFile) + if err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } + + if !config.Verbose { + //if verbose is true then the GinkgoWriter emits to stdout. Don't _also_ redirect GinkgoWriter output as that will result in duplication. + ginkgoWriter.AndRedirectTo(reporter.debugFile) + } + outputInterceptor.StreamTo(reporter.debugFile) //This is not working + + stenographer := stenographer.New(false, true, reporter.debugFile) + config.Succinct = false + config.Verbose = true + config.FullTrace = true + reporter.nestedReporter = reporters.NewDefaultReporter(config, stenographer) + } + + return reporter } func (reporter *ForwardingReporter) post(path string, data interface{}) { @@ -56,6 +89,10 @@ func (reporter *ForwardingReporter) SpecSuiteWillBegin(conf config.GinkgoConfigT } reporter.outputInterceptor.StartInterceptingOutput() + if reporter.debugMode { + reporter.nestedReporter.SpecSuiteWillBegin(conf, summary) + reporter.debugFile.Sync() + } reporter.post("/SpecSuiteWillBegin", data) } @@ -63,10 +100,18 @@ func (reporter *ForwardingReporter) BeforeSuiteDidRun(setupSummary *types.SetupS output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() reporter.outputInterceptor.StartInterceptingOutput() setupSummary.CapturedOutput = output + if reporter.debugMode { + reporter.nestedReporter.BeforeSuiteDidRun(setupSummary) + reporter.debugFile.Sync() + } reporter.post("/BeforeSuiteDidRun", setupSummary) } func (reporter *ForwardingReporter) SpecWillRun(specSummary *types.SpecSummary) { + if reporter.debugMode { + reporter.nestedReporter.SpecWillRun(specSummary) + reporter.debugFile.Sync() + } reporter.post("/SpecWillRun", specSummary) } @@ -74,6 +119,10 @@ func (reporter *ForwardingReporter) SpecDidComplete(specSummary *types.SpecSumma output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() reporter.outputInterceptor.StartInterceptingOutput() specSummary.CapturedOutput = output + if reporter.debugMode { + reporter.nestedReporter.SpecDidComplete(specSummary) + reporter.debugFile.Sync() + } reporter.post("/SpecDidComplete", specSummary) } @@ -81,10 +130,18 @@ func (reporter *ForwardingReporter) AfterSuiteDidRun(setupSummary *types.SetupSu output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() reporter.outputInterceptor.StartInterceptingOutput() setupSummary.CapturedOutput = output + if reporter.debugMode { + reporter.nestedReporter.AfterSuiteDidRun(setupSummary) + reporter.debugFile.Sync() + } reporter.post("/AfterSuiteDidRun", setupSummary) } func (reporter *ForwardingReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { reporter.outputInterceptor.StopInterceptingAndReturnOutput() + if reporter.debugMode { + reporter.nestedReporter.SpecSuiteDidEnd(summary) + reporter.debugFile.Sync() + } reporter.post("/SpecSuiteDidEnd", summary) } diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter_test.go b/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter_test.go deleted file mode 100644 index e5f3b1e3..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter_test.go +++ /dev/null @@ -1,180 +0,0 @@ -package remote_test - -import ( - "encoding/json" - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/config" - . "github.com/onsi/ginkgo/internal/remote" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" -) - -var _ = Describe("ForwardingReporter", func() { - var ( - reporter *ForwardingReporter - interceptor *fakeOutputInterceptor - poster *fakePoster - suiteSummary *types.SuiteSummary - specSummary *types.SpecSummary - setupSummary *types.SetupSummary - serverHost string - ) - - BeforeEach(func() { - serverHost = "http://127.0.0.1:7788" - - poster = newFakePoster() - - interceptor = &fakeOutputInterceptor{ - InterceptedOutput: "The intercepted output!", - } - - reporter = NewForwardingReporter(serverHost, poster, interceptor) - - suiteSummary = &types.SuiteSummary{ - SuiteDescription: "My Test Suite", - } - - setupSummary = &types.SetupSummary{ - State: types.SpecStatePassed, - } - - specSummary = &types.SpecSummary{ - ComponentTexts: []string{"My", "Spec"}, - State: types.SpecStatePassed, - } - }) - - Context("When a suite begins", func() { - BeforeEach(func() { - reporter.SpecSuiteWillBegin(config.GinkgoConfig, suiteSummary) - }) - - It("should start intercepting output", func() { - Ω(interceptor.DidStartInterceptingOutput).Should(BeTrue()) - }) - - It("should POST the SuiteSummary and Ginkgo Config to the Ginkgo server", func() { - Ω(poster.posts).Should(HaveLen(1)) - Ω(poster.posts[0].url).Should(Equal("http://127.0.0.1:7788/SpecSuiteWillBegin")) - Ω(poster.posts[0].bodyType).Should(Equal("application/json")) - - var sentData struct { - SentConfig config.GinkgoConfigType `json:"config"` - SentSuiteSummary *types.SuiteSummary `json:"suite-summary"` - } - - err := json.Unmarshal(poster.posts[0].bodyContent, &sentData) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(sentData.SentConfig).Should(Equal(config.GinkgoConfig)) - Ω(sentData.SentSuiteSummary).Should(Equal(suiteSummary)) - }) - }) - - Context("when a BeforeSuite completes", func() { - BeforeEach(func() { - reporter.BeforeSuiteDidRun(setupSummary) - }) - - It("should stop, then start intercepting output", func() { - Ω(interceptor.DidStopInterceptingOutput).Should(BeTrue()) - Ω(interceptor.DidStartInterceptingOutput).Should(BeTrue()) - }) - - It("should POST the SetupSummary to the Ginkgo server", func() { - Ω(poster.posts).Should(HaveLen(1)) - Ω(poster.posts[0].url).Should(Equal("http://127.0.0.1:7788/BeforeSuiteDidRun")) - Ω(poster.posts[0].bodyType).Should(Equal("application/json")) - - var summary *types.SetupSummary - err := json.Unmarshal(poster.posts[0].bodyContent, &summary) - Ω(err).ShouldNot(HaveOccurred()) - setupSummary.CapturedOutput = interceptor.InterceptedOutput - Ω(summary).Should(Equal(setupSummary)) - }) - }) - - Context("when an AfterSuite completes", func() { - BeforeEach(func() { - reporter.AfterSuiteDidRun(setupSummary) - }) - - It("should stop, then start intercepting output", func() { - Ω(interceptor.DidStopInterceptingOutput).Should(BeTrue()) - Ω(interceptor.DidStartInterceptingOutput).Should(BeTrue()) - }) - - It("should POST the SetupSummary to the Ginkgo server", func() { - Ω(poster.posts).Should(HaveLen(1)) - Ω(poster.posts[0].url).Should(Equal("http://127.0.0.1:7788/AfterSuiteDidRun")) - Ω(poster.posts[0].bodyType).Should(Equal("application/json")) - - var summary *types.SetupSummary - err := json.Unmarshal(poster.posts[0].bodyContent, &summary) - Ω(err).ShouldNot(HaveOccurred()) - setupSummary.CapturedOutput = interceptor.InterceptedOutput - Ω(summary).Should(Equal(setupSummary)) - }) - }) - - Context("When a spec will run", func() { - BeforeEach(func() { - reporter.SpecWillRun(specSummary) - }) - - It("should POST the SpecSummary to the Ginkgo server", func() { - Ω(poster.posts).Should(HaveLen(1)) - Ω(poster.posts[0].url).Should(Equal("http://127.0.0.1:7788/SpecWillRun")) - Ω(poster.posts[0].bodyType).Should(Equal("application/json")) - - var summary *types.SpecSummary - err := json.Unmarshal(poster.posts[0].bodyContent, &summary) - Ω(err).ShouldNot(HaveOccurred()) - Ω(summary).Should(Equal(specSummary)) - }) - - Context("When a spec completes", func() { - BeforeEach(func() { - specSummary.State = types.SpecStatePanicked - reporter.SpecDidComplete(specSummary) - }) - - It("should POST the SpecSummary to the Ginkgo server and include any intercepted output", func() { - Ω(poster.posts).Should(HaveLen(2)) - Ω(poster.posts[1].url).Should(Equal("http://127.0.0.1:7788/SpecDidComplete")) - Ω(poster.posts[1].bodyType).Should(Equal("application/json")) - - var summary *types.SpecSummary - err := json.Unmarshal(poster.posts[1].bodyContent, &summary) - Ω(err).ShouldNot(HaveOccurred()) - specSummary.CapturedOutput = interceptor.InterceptedOutput - Ω(summary).Should(Equal(specSummary)) - }) - - It("should stop, then start intercepting output", func() { - Ω(interceptor.DidStopInterceptingOutput).Should(BeTrue()) - Ω(interceptor.DidStartInterceptingOutput).Should(BeTrue()) - }) - }) - }) - - Context("When a suite ends", func() { - BeforeEach(func() { - reporter.SpecSuiteDidEnd(suiteSummary) - }) - - It("should POST the SuiteSummary to the Ginkgo server", func() { - Ω(poster.posts).Should(HaveLen(1)) - Ω(poster.posts[0].url).Should(Equal("http://127.0.0.1:7788/SpecSuiteDidEnd")) - Ω(poster.posts[0].bodyType).Should(Equal("application/json")) - - var summary *types.SuiteSummary - - err := json.Unmarshal(poster.posts[0].bodyContent, &summary) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(summary).Should(Equal(suiteSummary)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go b/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go index 093f4513..5154abe8 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go @@ -1,5 +1,7 @@ package remote +import "os" + /* The OutputInterceptor is used by the ForwardingReporter to intercept and capture all stdin and stderr output during a test run. @@ -7,4 +9,5 @@ intercept and capture all stdin and stderr output during a test run. type OutputInterceptor interface { StartInterceptingOutput() error StopInterceptingAndReturnOutput() (string, error) + StreamTo(*os.File) } 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 index 980065da..ab6622a2 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go @@ -6,6 +6,8 @@ import ( "errors" "io/ioutil" "os" + + "github.com/hpcloud/tail" ) func NewOutputInterceptor() OutputInterceptor { @@ -14,7 +16,10 @@ func NewOutputInterceptor() OutputInterceptor { type outputInterceptor struct { redirectFile *os.File + streamTarget *os.File intercepting bool + tailer *tail.Tail + doneTailing chan bool } func (interceptor *outputInterceptor) StartInterceptingOutput() error { @@ -37,6 +42,18 @@ func (interceptor *outputInterceptor) StartInterceptingOutput() error { syscallDup(int(interceptor.redirectFile.Fd()), 1) syscallDup(int(interceptor.redirectFile.Fd()), 2) + if interceptor.streamTarget != nil { + interceptor.tailer, _ = tail.TailFile(interceptor.redirectFile.Name(), tail.Config{Follow: true}) + interceptor.doneTailing = make(chan bool) + + go func() { + for line := range interceptor.tailer.Lines { + interceptor.streamTarget.Write([]byte(line.Text + "\n")) + } + close(interceptor.doneTailing) + }() + } + return nil } @@ -51,5 +68,16 @@ func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, interceptor.intercepting = false + if interceptor.streamTarget != nil { + interceptor.tailer.Stop() + interceptor.tailer.Cleanup() + <-interceptor.doneTailing + interceptor.streamTarget.Sync() + } + return string(output), err } + +func (interceptor *outputInterceptor) StreamTo(out *os.File) { + interceptor.streamTarget = out +} 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 index c8f97d97..40c79033 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go @@ -4,6 +4,7 @@ package remote import ( "errors" + "os" ) func NewOutputInterceptor() OutputInterceptor { @@ -31,3 +32,5 @@ func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, return "", nil } + +func (interceptor *outputInterceptor) StreamTo(*os.File) {} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/remote_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/remote/remote_suite_test.go deleted file mode 100644 index e6b4e9f3..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/remote_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package remote_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestRemote(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Remote Spec Forwarding Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/server.go b/vendor/github.com/onsi/ginkgo/internal/remote/server.go index b55c681b..367c54da 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/server.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/server.go @@ -9,13 +9,16 @@ package remote import ( "encoding/json" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" "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" ) /* @@ -29,6 +32,7 @@ type Server struct { lock *sync.Mutex beforeSuiteData types.RemoteBeforeSuiteData parallelTotal int + counter int } //Create a new server, automatically selecting a port @@ -41,7 +45,7 @@ func NewServer(parallelTotal int) (*Server, error) { listener: listener, lock: &sync.Mutex{}, alives: make([]func() bool, parallelTotal), - beforeSuiteData: types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending}, + beforeSuiteData: types.RemoteBeforeSuiteData{Data: nil, State: types.RemoteBeforeSuiteStatePending}, parallelTotal: parallelTotal, }, nil } @@ -63,6 +67,8 @@ func (server *Server) Start() { //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) } @@ -202,3 +208,17 @@ func (server *Server) handleRemoteAfterSuiteData(writer http.ResponseWriter, req 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/server_test.go b/vendor/github.com/onsi/ginkgo/internal/remote/server_test.go deleted file mode 100644 index eb2eefeb..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/server_test.go +++ /dev/null @@ -1,269 +0,0 @@ -package remote_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/remote" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" - - "bytes" - "encoding/json" - "net/http" -) - -var _ = Describe("Server", func() { - var ( - server *Server - ) - - BeforeEach(func() { - var err error - server, err = NewServer(3) - Ω(err).ShouldNot(HaveOccurred()) - - server.Start() - }) - - AfterEach(func() { - server.Close() - }) - - Describe("Streaming endpoints", func() { - var ( - reporterA, reporterB *reporters.FakeReporter - forwardingReporter *ForwardingReporter - - suiteSummary *types.SuiteSummary - setupSummary *types.SetupSummary - specSummary *types.SpecSummary - ) - - BeforeEach(func() { - reporterA = reporters.NewFakeReporter() - reporterB = reporters.NewFakeReporter() - - server.RegisterReporters(reporterA, reporterB) - - forwardingReporter = NewForwardingReporter(server.Address(), &http.Client{}, &fakeOutputInterceptor{}) - - suiteSummary = &types.SuiteSummary{ - SuiteDescription: "My Test Suite", - } - - setupSummary = &types.SetupSummary{ - State: types.SpecStatePassed, - } - - specSummary = &types.SpecSummary{ - ComponentTexts: []string{"My", "Spec"}, - State: types.SpecStatePassed, - } - }) - - It("should make its address available", func() { - Ω(server.Address()).Should(MatchRegexp(`http://127.0.0.1:\d{2,}`)) - }) - - Describe("/SpecSuiteWillBegin", func() { - It("should decode and forward the Ginkgo config and suite summary", func(done Done) { - forwardingReporter.SpecSuiteWillBegin(config.GinkgoConfig, suiteSummary) - Ω(reporterA.Config).Should(Equal(config.GinkgoConfig)) - Ω(reporterB.Config).Should(Equal(config.GinkgoConfig)) - Ω(reporterA.BeginSummary).Should(Equal(suiteSummary)) - Ω(reporterB.BeginSummary).Should(Equal(suiteSummary)) - close(done) - }) - }) - - Describe("/BeforeSuiteDidRun", func() { - It("should decode and forward the setup summary", func() { - forwardingReporter.BeforeSuiteDidRun(setupSummary) - Ω(reporterA.BeforeSuiteSummary).Should(Equal(setupSummary)) - Ω(reporterB.BeforeSuiteSummary).Should(Equal(setupSummary)) - }) - }) - - Describe("/AfterSuiteDidRun", func() { - It("should decode and forward the setup summary", func() { - forwardingReporter.AfterSuiteDidRun(setupSummary) - Ω(reporterA.AfterSuiteSummary).Should(Equal(setupSummary)) - Ω(reporterB.AfterSuiteSummary).Should(Equal(setupSummary)) - }) - }) - - Describe("/SpecWillRun", func() { - It("should decode and forward the spec summary", func(done Done) { - forwardingReporter.SpecWillRun(specSummary) - Ω(reporterA.SpecWillRunSummaries[0]).Should(Equal(specSummary)) - Ω(reporterB.SpecWillRunSummaries[0]).Should(Equal(specSummary)) - close(done) - }) - }) - - Describe("/SpecDidComplete", func() { - It("should decode and forward the spec summary", func(done Done) { - forwardingReporter.SpecDidComplete(specSummary) - Ω(reporterA.SpecSummaries[0]).Should(Equal(specSummary)) - Ω(reporterB.SpecSummaries[0]).Should(Equal(specSummary)) - close(done) - }) - }) - - Describe("/SpecSuiteDidEnd", func() { - It("should decode and forward the suite summary", func(done Done) { - forwardingReporter.SpecSuiteDidEnd(suiteSummary) - Ω(reporterA.EndSummary).Should(Equal(suiteSummary)) - Ω(reporterB.EndSummary).Should(Equal(suiteSummary)) - close(done) - }) - }) - }) - - Describe("Synchronization endpoints", func() { - Describe("GETting and POSTing BeforeSuiteState", func() { - getBeforeSuite := func() types.RemoteBeforeSuiteData { - resp, err := http.Get(server.Address() + "/BeforeSuiteState") - Ω(err).ShouldNot(HaveOccurred()) - Ω(resp.StatusCode).Should(Equal(http.StatusOK)) - - r := types.RemoteBeforeSuiteData{} - decoder := json.NewDecoder(resp.Body) - err = decoder.Decode(&r) - Ω(err).ShouldNot(HaveOccurred()) - - return r - } - - postBeforeSuite := func(r types.RemoteBeforeSuiteData) { - resp, err := http.Post(server.Address()+"/BeforeSuiteState", "application/json", bytes.NewReader(r.ToJSON())) - Ω(err).ShouldNot(HaveOccurred()) - Ω(resp.StatusCode).Should(Equal(http.StatusOK)) - } - - Context("when the first node's Alive has not been registered yet", func() { - It("should return pending", func() { - state := getBeforeSuite() - Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending})) - - state = getBeforeSuite() - Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending})) - }) - }) - - Context("when the first node is Alive but has not responded yet", func() { - BeforeEach(func() { - server.RegisterAlive(1, func() bool { - return true - }) - }) - - It("should return pending", func() { - state := getBeforeSuite() - Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending})) - - state = getBeforeSuite() - Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending})) - }) - }) - - Context("when the first node has responded", func() { - var state types.RemoteBeforeSuiteData - BeforeEach(func() { - server.RegisterAlive(1, func() bool { - return false - }) - - state = types.RemoteBeforeSuiteData{ - Data: []byte("my data"), - State: types.RemoteBeforeSuiteStatePassed, - } - postBeforeSuite(state) - }) - - It("should return the passed in state", func() { - returnedState := getBeforeSuite() - Ω(returnedState).Should(Equal(state)) - }) - }) - - Context("when the first node is no longer Alive and has not responded yet", func() { - BeforeEach(func() { - server.RegisterAlive(1, func() bool { - return false - }) - }) - - It("should return disappeared", func() { - state := getBeforeSuite() - Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStateDisappeared})) - - state = getBeforeSuite() - Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStateDisappeared})) - }) - }) - }) - - Describe("GETting RemoteAfterSuiteData", func() { - getRemoteAfterSuiteData := func() bool { - resp, err := http.Get(server.Address() + "/RemoteAfterSuiteData") - Ω(err).ShouldNot(HaveOccurred()) - Ω(resp.StatusCode).Should(Equal(http.StatusOK)) - - a := types.RemoteAfterSuiteData{} - decoder := json.NewDecoder(resp.Body) - err = decoder.Decode(&a) - Ω(err).ShouldNot(HaveOccurred()) - - return a.CanRun - } - - Context("when there are unregistered nodes", func() { - BeforeEach(func() { - server.RegisterAlive(2, func() bool { - return false - }) - }) - - It("should return false", func() { - Ω(getRemoteAfterSuiteData()).Should(BeFalse()) - }) - }) - - Context("when all none-node-1 nodes are still running", func() { - BeforeEach(func() { - server.RegisterAlive(2, func() bool { - return true - }) - - server.RegisterAlive(3, func() bool { - return false - }) - }) - - It("should return false", func() { - Ω(getRemoteAfterSuiteData()).Should(BeFalse()) - }) - }) - - Context("when all none-1 nodes are done", func() { - BeforeEach(func() { - server.RegisterAlive(2, func() bool { - return false - }) - - server.RegisterAlive(3, func() bool { - return false - }) - }) - - It("should return true", func() { - Ω(getRemoteAfterSuiteData()).Should(BeTrue()) - }) - - }) - }) - }) -}) 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 index 5c59728e..9550d37b 100644 --- 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 @@ -8,4 +8,4 @@ import "syscall" // use the nearly identical syscall.Dup3 instead func syscallDup(oldfd int, newfd int) (err error) { return syscall.Dup3(oldfd, newfd, 0) -} \ No newline at end of file +} 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 index ecf9cafb..75ef7fb7 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go @@ -6,4 +6,4 @@ import "golang.org/x/sys/unix" func syscallDup(oldfd int, newfd int) (err error) { return unix.Dup2(oldfd, newfd) -} \ No newline at end of file +} 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 index cacdd0e6..ef625596 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go @@ -8,4 +8,4 @@ import "syscall" func syscallDup(oldfd int, newfd int) (err error) { return syscall.Dup2(oldfd, newfd) -} \ No newline at end of file +} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/index_computer_test.go b/vendor/github.com/onsi/ginkgo/internal/spec/index_computer_test.go deleted file mode 100644 index 0396d7bd..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec/index_computer_test.go +++ /dev/null @@ -1,149 +0,0 @@ -package spec_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/spec" - . "github.com/onsi/gomega" -) - -var _ = Describe("ParallelizedIndexRange", func() { - var startIndex, count int - - It("should return the correct index range for 4 tests on 2 nodes", func() { - startIndex, count = ParallelizedIndexRange(4, 2, 1) - Ω(startIndex).Should(Equal(0)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(4, 2, 2) - Ω(startIndex).Should(Equal(2)) - Ω(count).Should(Equal(2)) - }) - - It("should return the correct index range for 5 tests on 2 nodes", func() { - startIndex, count = ParallelizedIndexRange(5, 2, 1) - Ω(startIndex).Should(Equal(0)) - Ω(count).Should(Equal(3)) - - startIndex, count = ParallelizedIndexRange(5, 2, 2) - Ω(startIndex).Should(Equal(3)) - Ω(count).Should(Equal(2)) - }) - - It("should return the correct index range for 5 tests on 3 nodes", func() { - startIndex, count = ParallelizedIndexRange(5, 3, 1) - Ω(startIndex).Should(Equal(0)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(5, 3, 2) - Ω(startIndex).Should(Equal(2)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(5, 3, 3) - Ω(startIndex).Should(Equal(4)) - Ω(count).Should(Equal(1)) - }) - - It("should return the correct index range for 5 tests on 4 nodes", func() { - startIndex, count = ParallelizedIndexRange(5, 4, 1) - Ω(startIndex).Should(Equal(0)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(5, 4, 2) - Ω(startIndex).Should(Equal(2)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 4, 3) - Ω(startIndex).Should(Equal(3)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 4, 4) - Ω(startIndex).Should(Equal(4)) - Ω(count).Should(Equal(1)) - }) - - It("should return the correct index range for 5 tests on 5 nodes", func() { - startIndex, count = ParallelizedIndexRange(5, 5, 1) - Ω(startIndex).Should(Equal(0)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 5, 2) - Ω(startIndex).Should(Equal(1)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 5, 3) - Ω(startIndex).Should(Equal(2)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 5, 4) - Ω(startIndex).Should(Equal(3)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 5, 5) - Ω(startIndex).Should(Equal(4)) - Ω(count).Should(Equal(1)) - }) - - It("should return the correct index range for 5 tests on 6 nodes", func() { - startIndex, count = ParallelizedIndexRange(5, 6, 1) - Ω(startIndex).Should(Equal(0)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 6, 2) - Ω(startIndex).Should(Equal(1)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 6, 3) - Ω(startIndex).Should(Equal(2)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 6, 4) - Ω(startIndex).Should(Equal(3)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 6, 5) - Ω(startIndex).Should(Equal(4)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(5, 6, 6) - Ω(count).Should(Equal(0)) - }) - - It("should return the correct index range for 5 tests on 7 nodes", func() { - startIndex, count = ParallelizedIndexRange(5, 7, 6) - Ω(count).Should(Equal(0)) - - startIndex, count = ParallelizedIndexRange(5, 7, 7) - Ω(count).Should(Equal(0)) - }) - - It("should return the correct index range for 11 tests on 7 nodes", func() { - startIndex, count = ParallelizedIndexRange(11, 7, 1) - Ω(startIndex).Should(Equal(0)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(11, 7, 2) - Ω(startIndex).Should(Equal(2)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(11, 7, 3) - Ω(startIndex).Should(Equal(4)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(11, 7, 4) - Ω(startIndex).Should(Equal(6)) - Ω(count).Should(Equal(2)) - - startIndex, count = ParallelizedIndexRange(11, 7, 5) - Ω(startIndex).Should(Equal(8)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(11, 7, 6) - Ω(startIndex).Should(Equal(9)) - Ω(count).Should(Equal(1)) - - startIndex, count = ParallelizedIndexRange(11, 7, 7) - Ω(startIndex).Should(Equal(10)) - Ω(count).Should(Equal(1)) - }) - -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/spec.go b/vendor/github.com/onsi/ginkgo/internal/spec/spec.go index d32dec69..77b23a4c 100644 --- a/vendor/github.com/onsi/ginkgo/internal/spec/spec.go +++ b/vendor/github.com/onsi/ginkgo/internal/spec/spec.go @@ -5,6 +5,8 @@ import ( "io" "time" + "sync" + "github.com/onsi/ginkgo/internal/containernode" "github.com/onsi/ginkgo/internal/leafnodes" "github.com/onsi/ginkgo/types" @@ -19,8 +21,11 @@ type Spec struct { state types.SpecState runTime time.Duration + startTime time.Time failure types.SpecFailure previousFailures bool + + stateMutex *sync.Mutex } func New(subject leafnodes.SubjectNode, containers []*containernode.ContainerNode, announceProgress bool) *Spec { @@ -29,6 +34,7 @@ func New(subject leafnodes.SubjectNode, containers []*containernode.ContainerNod containers: containers, focused: subject.Flag() == types.FlagTypeFocused, announceProgress: announceProgress, + stateMutex: &sync.Mutex{}, } spec.processFlag(subject.Flag()) @@ -43,32 +49,32 @@ func (spec *Spec) processFlag(flag types.FlagType) { if flag == types.FlagTypeFocused { spec.focused = true } else if flag == types.FlagTypePending { - spec.state = types.SpecStatePending + spec.setState(types.SpecStatePending) } } func (spec *Spec) Skip() { - spec.state = types.SpecStateSkipped + spec.setState(types.SpecStateSkipped) } func (spec *Spec) Failed() bool { - return spec.state == types.SpecStateFailed || spec.state == types.SpecStatePanicked || spec.state == types.SpecStateTimedOut + return spec.getState() == types.SpecStateFailed || spec.getState() == types.SpecStatePanicked || spec.getState() == types.SpecStateTimedOut } func (spec *Spec) Passed() bool { - return spec.state == types.SpecStatePassed + return spec.getState() == types.SpecStatePassed } func (spec *Spec) Flaked() bool { - return spec.state == types.SpecStatePassed && spec.previousFailures + return spec.getState() == types.SpecStatePassed && spec.previousFailures } func (spec *Spec) Pending() bool { - return spec.state == types.SpecStatePending + return spec.getState() == types.SpecStatePending } func (spec *Spec) Skipped() bool { - return spec.state == types.SpecStateSkipped + return spec.getState() == types.SpecStateSkipped } func (spec *Spec) Focused() bool { @@ -91,13 +97,18 @@ func (spec *Spec) Summary(suiteID string) *types.SpecSummary { componentTexts[len(spec.containers)] = spec.subject.Text() componentCodeLocations[len(spec.containers)] = spec.subject.CodeLocation() + runTime := spec.runTime + if runTime == 0 && !spec.startTime.IsZero() { + runTime = time.Since(spec.startTime) + } + return &types.SpecSummary{ IsMeasurement: spec.IsMeasurement(), NumberOfSamples: spec.subject.Samples(), ComponentTexts: componentTexts, ComponentCodeLocations: componentCodeLocations, - State: spec.state, - RunTime: spec.runTime, + State: spec.getState(), + RunTime: runTime, Failure: spec.failure, Measurements: spec.measurementsReport(), SuiteID: suiteID, @@ -114,26 +125,38 @@ func (spec *Spec) ConcatenatedString() string { } func (spec *Spec) Run(writer io.Writer) { - if spec.state == types.SpecStateFailed { + if spec.getState() == types.SpecStateFailed { spec.previousFailures = true } - startTime := time.Now() + spec.startTime = time.Now() defer func() { - spec.runTime = time.Since(startTime) + spec.runTime = time.Since(spec.startTime) }() for sample := 0; sample < spec.subject.Samples(); sample++ { spec.runSample(sample, writer) - if spec.state != types.SpecStatePassed { + if spec.getState() != types.SpecStatePassed { return } } } +func (spec *Spec) getState() types.SpecState { + spec.stateMutex.Lock() + defer spec.stateMutex.Unlock() + return spec.state +} + +func (spec *Spec) setState(state types.SpecState) { + spec.stateMutex.Lock() + defer spec.stateMutex.Unlock() + spec.state = state +} + func (spec *Spec) runSample(sample int, writer io.Writer) { - spec.state = types.SpecStatePassed + spec.setState(types.SpecStatePassed) spec.failure = types.SpecFailure{} innerMostContainerIndexToUnwind := -1 @@ -143,8 +166,8 @@ func (spec *Spec) runSample(sample int, writer io.Writer) { 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 + if afterEachState != types.SpecStatePassed && spec.getState() == types.SpecStatePassed { + spec.setState(afterEachState) spec.failure = afterEachFailure } } @@ -155,8 +178,10 @@ func (spec *Spec) runSample(sample int, writer io.Writer) { 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 { + s, f := beforeEach.Run() + spec.failure = f + spec.setState(s) + if spec.getState() != types.SpecStatePassed { return } } @@ -165,15 +190,19 @@ func (spec *Spec) runSample(sample int, writer io.Writer) { 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 { + s, f := justBeforeEach.Run() + spec.failure = f + spec.setState(s) + if spec.getState() != types.SpecStatePassed { return } } } spec.announceSubject(writer, spec.subject) - spec.state, spec.failure = spec.subject.Run() + s, f := spec.subject.Run() + spec.failure = f + spec.setState(s) } func (spec *Spec) announceSetupNode(writer io.Writer, nodeType string, container *containernode.ContainerNode, setupNode leafnodes.BasicNode) { diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/spec_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/spec/spec_suite_test.go deleted file mode 100644 index 8681a720..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec/spec_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package spec_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestSpec(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Spec Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go b/vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go deleted file mode 100644 index 3bab8887..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go +++ /dev/null @@ -1,657 +0,0 @@ -package spec_test - -import ( - "time" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" - - . "github.com/onsi/ginkgo/internal/spec" - - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/internal/containernode" - Failer "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/types" -) - -var noneFlag = types.FlagTypeNone -var focusedFlag = types.FlagTypeFocused -var pendingFlag = types.FlagTypePending - -var _ = Describe("Spec", func() { - var ( - failer *Failer.Failer - codeLocation types.CodeLocation - nodesThatRan []string - spec *Spec - buffer *gbytes.Buffer - ) - - newBody := func(text string, fail bool) func() { - return func() { - nodesThatRan = append(nodesThatRan, text) - if fail { - failer.Fail(text, codeLocation) - } - } - } - - newIt := func(text string, flag types.FlagType, fail bool) *leafnodes.ItNode { - return leafnodes.NewItNode(text, newBody(text, fail), flag, codeLocation, 0, failer, 0) - } - - newItWithBody := func(text string, body interface{}) *leafnodes.ItNode { - return leafnodes.NewItNode(text, body, noneFlag, codeLocation, 0, failer, 0) - } - - newMeasure := func(text string, flag types.FlagType, fail bool, samples int) *leafnodes.MeasureNode { - return leafnodes.NewMeasureNode(text, func(Benchmarker) { - nodesThatRan = append(nodesThatRan, text) - if fail { - failer.Fail(text, codeLocation) - } - }, flag, codeLocation, samples, failer, 0) - } - - newBef := func(text string, fail bool) leafnodes.BasicNode { - return leafnodes.NewBeforeEachNode(newBody(text, fail), codeLocation, 0, failer, 0) - } - - newAft := func(text string, fail bool) leafnodes.BasicNode { - return leafnodes.NewAfterEachNode(newBody(text, fail), codeLocation, 0, failer, 0) - } - - newJusBef := func(text string, fail bool) leafnodes.BasicNode { - return leafnodes.NewJustBeforeEachNode(newBody(text, fail), codeLocation, 0, failer, 0) - } - - newContainer := func(text string, flag types.FlagType, setupNodes ...leafnodes.BasicNode) *containernode.ContainerNode { - c := containernode.New(text, flag, codeLocation) - for _, node := range setupNodes { - c.PushSetupNode(node) - } - return c - } - - containers := func(containers ...*containernode.ContainerNode) []*containernode.ContainerNode { - return containers - } - - BeforeEach(func() { - buffer = gbytes.NewBuffer() - failer = Failer.New() - codeLocation = codelocation.New(0) - nodesThatRan = []string{} - }) - - Describe("marking specs focused and pending", func() { - It("should satisfy various caes", func() { - cases := []struct { - ContainerFlags []types.FlagType - SubjectFlag types.FlagType - Pending bool - Focused bool - }{ - {[]types.FlagType{}, noneFlag, false, false}, - {[]types.FlagType{}, focusedFlag, false, true}, - {[]types.FlagType{}, pendingFlag, true, false}, - {[]types.FlagType{noneFlag}, noneFlag, false, false}, - {[]types.FlagType{focusedFlag}, noneFlag, false, true}, - {[]types.FlagType{pendingFlag}, noneFlag, true, false}, - {[]types.FlagType{noneFlag}, focusedFlag, false, true}, - {[]types.FlagType{focusedFlag}, focusedFlag, false, true}, - {[]types.FlagType{pendingFlag}, focusedFlag, true, true}, - {[]types.FlagType{noneFlag}, pendingFlag, true, false}, - {[]types.FlagType{focusedFlag}, pendingFlag, true, true}, - {[]types.FlagType{pendingFlag}, pendingFlag, true, false}, - {[]types.FlagType{focusedFlag, noneFlag}, noneFlag, false, true}, - {[]types.FlagType{noneFlag, focusedFlag}, noneFlag, false, true}, - {[]types.FlagType{pendingFlag, noneFlag}, noneFlag, true, false}, - {[]types.FlagType{noneFlag, pendingFlag}, noneFlag, true, false}, - {[]types.FlagType{focusedFlag, pendingFlag}, noneFlag, true, true}, - } - - for i, c := range cases { - subject := newIt("it node", c.SubjectFlag, false) - containers := []*containernode.ContainerNode{} - for _, flag := range c.ContainerFlags { - containers = append(containers, newContainer("container", flag)) - } - - spec := New(subject, containers, false) - Ω(spec.Pending()).Should(Equal(c.Pending), "Case %d: %#v", i, c) - Ω(spec.Focused()).Should(Equal(c.Focused), "Case %d: %#v", i, c) - - if c.Pending { - Ω(spec.Summary("").State).Should(Equal(types.SpecStatePending)) - } - } - }) - }) - - Describe("Skip", func() { - It("should be skipped", func() { - spec := New(newIt("it node", noneFlag, false), containers(newContainer("container", noneFlag)), false) - Ω(spec.Skipped()).Should(BeFalse()) - spec.Skip() - Ω(spec.Skipped()).Should(BeTrue()) - Ω(spec.Summary("").State).Should(Equal(types.SpecStateSkipped)) - }) - }) - - Describe("IsMeasurement", func() { - It("should be true if the subject is a measurement node", func() { - spec := New(newIt("it node", noneFlag, false), containers(newContainer("container", noneFlag)), false) - Ω(spec.IsMeasurement()).Should(BeFalse()) - Ω(spec.Summary("").IsMeasurement).Should(BeFalse()) - Ω(spec.Summary("").NumberOfSamples).Should(Equal(1)) - - spec = New(newMeasure("measure node", noneFlag, false, 10), containers(newContainer("container", noneFlag)), false) - Ω(spec.IsMeasurement()).Should(BeTrue()) - Ω(spec.Summary("").IsMeasurement).Should(BeTrue()) - Ω(spec.Summary("").NumberOfSamples).Should(Equal(10)) - }) - }) - - Describe("Passed", func() { - It("should pass when the subject passed", func() { - spec := New(newIt("it node", noneFlag, false), containers(), false) - spec.Run(buffer) - - Ω(spec.Passed()).Should(BeTrue()) - Ω(spec.Failed()).Should(BeFalse()) - Ω(spec.Summary("").State).Should(Equal(types.SpecStatePassed)) - Ω(spec.Summary("").Failure).Should(BeZero()) - }) - }) - - Describe("Flaked", func() { - It("should work if Run is called twice and gets different results", func() { - i := 0 - spec := New(newItWithBody("flaky it", func() { - i++ - if i == 1 { - failer.Fail("oops", codeLocation) - } - }), containers(), false) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(spec.Flaked()).Should(BeFalse()) - Ω(spec.Summary("").State).Should(Equal(types.SpecStateFailed)) - Ω(spec.Summary("").Failure.Message).Should(Equal("oops")) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeTrue()) - Ω(spec.Failed()).Should(BeFalse()) - Ω(spec.Flaked()).Should(BeTrue()) - Ω(spec.Summary("").State).Should(Equal(types.SpecStatePassed)) - }) - }) - - Describe("Failed", func() { - It("should be failed if the failure was panic", func() { - spec := New(newItWithBody("panicky it", func() { - panic("bam") - }), containers(), false) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(spec.Summary("").State).Should(Equal(types.SpecStatePanicked)) - Ω(spec.Summary("").Failure.Message).Should(Equal("Test Panicked")) - Ω(spec.Summary("").Failure.ForwardedPanic).Should(Equal("bam")) - }) - - It("should be failed if the failure was a timeout", func() { - spec := New(newItWithBody("sleepy it", func(done Done) {}), containers(), false) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(spec.Summary("").State).Should(Equal(types.SpecStateTimedOut)) - Ω(spec.Summary("").Failure.Message).Should(Equal("Timed out")) - }) - - It("should be failed if the failure was... a failure", func() { - spec := New(newItWithBody("failing it", func() { - failer.Fail("bam", codeLocation) - }), containers(), false) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(spec.Summary("").State).Should(Equal(types.SpecStateFailed)) - Ω(spec.Summary("").Failure.Message).Should(Equal("bam")) - }) - }) - - Describe("Concatenated string", func() { - It("should concatenate the texts of the containers and the subject", func() { - spec := New( - newIt("it node", noneFlag, false), - containers( - newContainer("outer container", noneFlag), - newContainer("inner container", noneFlag), - ), - false, - ) - - Ω(spec.ConcatenatedString()).Should(Equal("outer container inner container it node")) - }) - }) - - Describe("running it specs", func() { - Context("with just an it", func() { - Context("that succeeds", func() { - It("should run the it and report on its success", func() { - spec := New(newIt("it node", noneFlag, false), containers(), false) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeTrue()) - Ω(spec.Failed()).Should(BeFalse()) - Ω(nodesThatRan).Should(Equal([]string{"it node"})) - }) - }) - - Context("that fails", func() { - It("should run the it and report on its success", func() { - spec := New(newIt("it node", noneFlag, true), containers(), false) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(spec.Summary("").Failure.Message).Should(Equal("it node")) - Ω(nodesThatRan).Should(Equal([]string{"it node"})) - }) - }) - }) - - Context("with a full set of setup nodes", func() { - var failingNodes map[string]bool - - BeforeEach(func() { - failingNodes = map[string]bool{} - }) - - JustBeforeEach(func() { - spec = New( - newIt("it node", noneFlag, failingNodes["it node"]), - containers( - newContainer("outer container", noneFlag, - newBef("outer bef A", failingNodes["outer bef A"]), - newBef("outer bef B", failingNodes["outer bef B"]), - newJusBef("outer jusbef A", failingNodes["outer jusbef A"]), - newJusBef("outer jusbef B", failingNodes["outer jusbef B"]), - newAft("outer aft A", failingNodes["outer aft A"]), - newAft("outer aft B", failingNodes["outer aft B"]), - ), - newContainer("inner container", noneFlag, - newBef("inner bef A", failingNodes["inner bef A"]), - newBef("inner bef B", failingNodes["inner bef B"]), - newJusBef("inner jusbef A", failingNodes["inner jusbef A"]), - newJusBef("inner jusbef B", failingNodes["inner jusbef B"]), - newAft("inner aft A", failingNodes["inner aft A"]), - newAft("inner aft B", failingNodes["inner aft B"]), - ), - ), - false, - ) - spec.Run(buffer) - }) - - Context("that all pass", func() { - It("should walk through the nodes in the correct order", func() { - Ω(spec.Passed()).Should(BeTrue()) - Ω(spec.Failed()).Should(BeFalse()) - Ω(nodesThatRan).Should(Equal([]string{ - "outer bef A", - "outer bef B", - "inner bef A", - "inner bef B", - "outer jusbef A", - "outer jusbef B", - "inner jusbef A", - "inner jusbef B", - "it node", - "inner aft A", - "inner aft B", - "outer aft A", - "outer aft B", - })) - }) - }) - - Context("when the subject fails", func() { - BeforeEach(func() { - failingNodes["it node"] = true - }) - - It("should run the afters", func() { - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(nodesThatRan).Should(Equal([]string{ - "outer bef A", - "outer bef B", - "inner bef A", - "inner bef B", - "outer jusbef A", - "outer jusbef B", - "inner jusbef A", - "inner jusbef B", - "it node", - "inner aft A", - "inner aft B", - "outer aft A", - "outer aft B", - })) - Ω(spec.Summary("").Failure.Message).Should(Equal("it node")) - }) - }) - - Context("when an inner before fails", func() { - BeforeEach(func() { - failingNodes["inner bef A"] = true - }) - - It("should not run any other befores, but it should run the subsequent afters", func() { - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(nodesThatRan).Should(Equal([]string{ - "outer bef A", - "outer bef B", - "inner bef A", - "inner aft A", - "inner aft B", - "outer aft A", - "outer aft B", - })) - Ω(spec.Summary("").Failure.Message).Should(Equal("inner bef A")) - }) - }) - - Context("when an outer before fails", func() { - BeforeEach(func() { - failingNodes["outer bef B"] = true - }) - - It("should not run any other befores, but it should run the subsequent afters", func() { - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(nodesThatRan).Should(Equal([]string{ - "outer bef A", - "outer bef B", - "outer aft A", - "outer aft B", - })) - Ω(spec.Summary("").Failure.Message).Should(Equal("outer bef B")) - }) - }) - - Context("when an after fails", func() { - BeforeEach(func() { - failingNodes["inner aft B"] = true - }) - - It("should run all other afters, but mark the test as failed", func() { - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(nodesThatRan).Should(Equal([]string{ - "outer bef A", - "outer bef B", - "inner bef A", - "inner bef B", - "outer jusbef A", - "outer jusbef B", - "inner jusbef A", - "inner jusbef B", - "it node", - "inner aft A", - "inner aft B", - "outer aft A", - "outer aft B", - })) - Ω(spec.Summary("").Failure.Message).Should(Equal("inner aft B")) - }) - }) - - Context("when a just before each fails", func() { - BeforeEach(func() { - failingNodes["outer jusbef B"] = true - }) - - It("should run the afters, but not the subject", func() { - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(nodesThatRan).Should(Equal([]string{ - "outer bef A", - "outer bef B", - "inner bef A", - "inner bef B", - "outer jusbef A", - "outer jusbef B", - "inner aft A", - "inner aft B", - "outer aft A", - "outer aft B", - })) - Ω(spec.Summary("").Failure.Message).Should(Equal("outer jusbef B")) - }) - }) - - Context("when an after fails after an earlier node has failed", func() { - BeforeEach(func() { - failingNodes["it node"] = true - failingNodes["inner aft B"] = true - }) - - It("should record the earlier failure", func() { - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(nodesThatRan).Should(Equal([]string{ - "outer bef A", - "outer bef B", - "inner bef A", - "inner bef B", - "outer jusbef A", - "outer jusbef B", - "inner jusbef A", - "inner jusbef B", - "it node", - "inner aft A", - "inner aft B", - "outer aft A", - "outer aft B", - })) - Ω(spec.Summary("").Failure.Message).Should(Equal("it node")) - }) - }) - }) - }) - - Describe("running measurement specs", func() { - Context("when the measurement succeeds", func() { - It("should run N samples", func() { - spec = New( - newMeasure("measure node", noneFlag, false, 3), - containers( - newContainer("container", noneFlag, - newBef("bef A", false), - newJusBef("jusbef A", false), - newAft("aft A", false), - ), - ), - false, - ) - spec.Run(buffer) - - Ω(spec.Passed()).Should(BeTrue()) - Ω(spec.Failed()).Should(BeFalse()) - Ω(nodesThatRan).Should(Equal([]string{ - "bef A", - "jusbef A", - "measure node", - "aft A", - "bef A", - "jusbef A", - "measure node", - "aft A", - "bef A", - "jusbef A", - "measure node", - "aft A", - })) - }) - }) - - Context("when the measurement fails", func() { - It("should bail after the failure occurs", func() { - spec = New( - newMeasure("measure node", noneFlag, true, 3), - containers( - newContainer("container", noneFlag, - newBef("bef A", false), - newJusBef("jusbef A", false), - newAft("aft A", false), - ), - ), - false, - ) - spec.Run(buffer) - - Ω(spec.Passed()).Should(BeFalse()) - Ω(spec.Failed()).Should(BeTrue()) - Ω(nodesThatRan).Should(Equal([]string{ - "bef A", - "jusbef A", - "measure node", - "aft A", - })) - }) - }) - }) - - Describe("Summary", func() { - var ( - subjectCodeLocation types.CodeLocation - outerContainerCodeLocation types.CodeLocation - innerContainerCodeLocation types.CodeLocation - summary *types.SpecSummary - ) - - BeforeEach(func() { - subjectCodeLocation = codelocation.New(0) - outerContainerCodeLocation = codelocation.New(0) - innerContainerCodeLocation = codelocation.New(0) - - spec = New( - leafnodes.NewItNode("it node", func() { - time.Sleep(10 * time.Millisecond) - }, noneFlag, subjectCodeLocation, 0, failer, 0), - containers( - containernode.New("outer container", noneFlag, outerContainerCodeLocation), - containernode.New("inner container", noneFlag, innerContainerCodeLocation), - ), - false, - ) - - spec.Run(buffer) - Ω(spec.Passed()).Should(BeTrue()) - summary = spec.Summary("suite id") - }) - - It("should have the suite id", func() { - Ω(summary.SuiteID).Should(Equal("suite id")) - }) - - It("should have the component texts and code locations", func() { - Ω(summary.ComponentTexts).Should(Equal([]string{"outer container", "inner container", "it node"})) - Ω(summary.ComponentCodeLocations).Should(Equal([]types.CodeLocation{outerContainerCodeLocation, innerContainerCodeLocation, subjectCodeLocation})) - }) - - It("should have a runtime", func() { - Ω(summary.RunTime).Should(BeNumerically(">=", 10*time.Millisecond)) - }) - - It("should not be a measurement, or have a measurement summary", func() { - Ω(summary.IsMeasurement).Should(BeFalse()) - Ω(summary.Measurements).Should(BeEmpty()) - }) - }) - - Describe("Summaries for measurements", func() { - var summary *types.SpecSummary - - BeforeEach(func() { - spec = New(leafnodes.NewMeasureNode("measure node", func(b Benchmarker) { - b.RecordValue("a value", 7, "some info") - b.RecordValueWithPrecision("another value", 8, "ns", 5, "more info") - }, noneFlag, codeLocation, 4, failer, 0), containers(), false) - spec.Run(buffer) - Ω(spec.Passed()).Should(BeTrue()) - summary = spec.Summary("suite id") - }) - - It("should include the number of samples", func() { - Ω(summary.NumberOfSamples).Should(Equal(4)) - }) - - It("should be a measurement", func() { - Ω(summary.IsMeasurement).Should(BeTrue()) - }) - - It("should have the measurements report", func() { - Ω(summary.Measurements).Should(HaveKey("a value")) - report := summary.Measurements["a value"] - Ω(report.Name).Should(Equal("a value")) - Ω(report.Info).Should(Equal("some info")) - Ω(report.Results).Should(Equal([]float64{7, 7, 7, 7})) - - Ω(summary.Measurements).Should(HaveKey("another value")) - report = summary.Measurements["another value"] - Ω(report.Name).Should(Equal("another value")) - Ω(report.Info).Should(Equal("more info")) - Ω(report.Results).Should(Equal([]float64{8, 8, 8, 8})) - Ω(report.Units).Should(Equal("ns")) - Ω(report.Precision).Should(Equal(5)) - }) - }) - - Describe("When told to emit progress", func() { - It("should emit progress to the writer as it runs Befores, JustBefores, Afters, and Its", func() { - spec = New( - newIt("it node", noneFlag, false), - containers( - newContainer("outer container", noneFlag, - newBef("outer bef A", false), - newJusBef("outer jusbef A", false), - newAft("outer aft A", false), - ), - newContainer("inner container", noneFlag, - newBef("inner bef A", false), - newJusBef("inner jusbef A", false), - newAft("inner aft A", false), - ), - ), - true, - ) - spec.Run(buffer) - - Ω(buffer).Should(gbytes.Say(`\[BeforeEach\] outer container`)) - Ω(buffer).Should(gbytes.Say(`\[BeforeEach\] inner container`)) - Ω(buffer).Should(gbytes.Say(`\[JustBeforeEach\] outer container`)) - Ω(buffer).Should(gbytes.Say(`\[JustBeforeEach\] inner container`)) - Ω(buffer).Should(gbytes.Say(`\[It\] it node`)) - Ω(buffer).Should(gbytes.Say(`\[AfterEach\] inner container`)) - Ω(buffer).Should(gbytes.Say(`\[AfterEach\] outer container`)) - }) - - It("should emit progress to the writer as it runs Befores, JustBefores, Afters, and Measures", func() { - spec = New( - newMeasure("measure node", noneFlag, false, 2), - containers(), - true, - ) - spec.Run(buffer) - - Ω(buffer).Should(gbytes.Say(`\[Measure\] measure node`)) - Ω(buffer).Should(gbytes.Say(`\[Measure\] measure node`)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/specs.go b/vendor/github.com/onsi/ginkgo/internal/spec/specs.go index 6f4fbd36..006185ab 100644 --- a/vendor/github.com/onsi/ginkgo/internal/spec/specs.go +++ b/vendor/github.com/onsi/ginkgo/internal/spec/specs.go @@ -7,16 +7,14 @@ import ( ) type Specs struct { - specs []*Spec - numberOfOriginalSpecs int - hasProgrammaticFocus bool - RegexScansFilePath bool + specs []*Spec + hasProgrammaticFocus bool + RegexScansFilePath bool } func NewSpecs(specs []*Spec) *Specs { return &Specs{ specs: specs, - numberOfOriginalSpecs: len(specs), } } @@ -24,10 +22,6 @@ func (e *Specs) Specs() []*Spec { return e.specs } -func (e *Specs) NumberOfOriginalSpecs() int { - return e.numberOfOriginalSpecs -} - func (e *Specs) HasProgrammaticFocus() bool { return e.hasProgrammaticFocus } @@ -114,15 +108,6 @@ func (e *Specs) SkipMeasurements() { } } -func (e *Specs) TrimForParallelization(total int, node int) { - startIndex, count := ParallelizedIndexRange(len(e.specs), total, node) - if count == 0 { - e.specs = make([]*Spec, 0) - } else { - e.specs = e.specs[startIndex : startIndex+count] - } -} - //sort.Interface func (e *Specs) Len() int { diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/specs_test.go b/vendor/github.com/onsi/ginkgo/internal/spec/specs_test.go deleted file mode 100644 index ce9f5f33..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec/specs_test.go +++ /dev/null @@ -1,335 +0,0 @@ -package spec_test - -import ( - "math/rand" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/spec" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/internal/containernode" - "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/types" -) - -var _ = Describe("Specs", func() { - var specs *Specs - - newSpec := func(text string, flag types.FlagType) *Spec { - subject := leafnodes.NewItNode(text, func() {}, flag, codelocation.New(0), 0, nil, 0) - return New(subject, []*containernode.ContainerNode{}, false) - } - - newMeasureSpec := func(text string, flag types.FlagType) *Spec { - subject := leafnodes.NewMeasureNode(text, func(Benchmarker) {}, flag, codelocation.New(0), 0, nil, 0) - return New(subject, []*containernode.ContainerNode{}, false) - } - - newSpecs := func(args ...interface{}) *Specs { - specs := []*Spec{} - for index := 0; index < len(args)-1; index += 2 { - specs = append(specs, newSpec(args[index].(string), args[index+1].(types.FlagType))) - } - return NewSpecs(specs) - } - - specTexts := func(specs *Specs) []string { - texts := []string{} - for _, spec := range specs.Specs() { - texts = append(texts, spec.ConcatenatedString()) - } - return texts - } - - willRunTexts := func(specs *Specs) []string { - texts := []string{} - for _, spec := range specs.Specs() { - if !(spec.Skipped() || spec.Pending()) { - texts = append(texts, spec.ConcatenatedString()) - } - } - return texts - } - - skippedTexts := func(specs *Specs) []string { - texts := []string{} - for _, spec := range specs.Specs() { - if spec.Skipped() { - texts = append(texts, spec.ConcatenatedString()) - } - } - return texts - } - - pendingTexts := func(specs *Specs) []string { - texts := []string{} - for _, spec := range specs.Specs() { - if spec.Pending() { - texts = append(texts, spec.ConcatenatedString()) - } - } - return texts - } - - Describe("Shuffling specs", func() { - It("should shuffle the specs using the passed in randomizer", func() { - specs17 := newSpecs("C", noneFlag, "A", noneFlag, "B", noneFlag) - specs17.Shuffle(rand.New(rand.NewSource(17))) - texts17 := specTexts(specs17) - - specs17Again := newSpecs("C", noneFlag, "A", noneFlag, "B", noneFlag) - specs17Again.Shuffle(rand.New(rand.NewSource(17))) - texts17Again := specTexts(specs17Again) - - specs15 := newSpecs("C", noneFlag, "A", noneFlag, "B", noneFlag) - specs15.Shuffle(rand.New(rand.NewSource(15))) - texts15 := specTexts(specs15) - - specsUnshuffled := newSpecs("C", noneFlag, "A", noneFlag, "B", noneFlag) - textsUnshuffled := specTexts(specsUnshuffled) - - Ω(textsUnshuffled).Should(Equal([]string{"C", "A", "B"})) - - Ω(texts17).Should(Equal(texts17Again)) - Ω(texts17).ShouldNot(Equal(texts15)) - Ω(texts17).ShouldNot(Equal(textsUnshuffled)) - Ω(texts15).ShouldNot(Equal(textsUnshuffled)) - - Ω(texts17).Should(HaveLen(3)) - Ω(texts17).Should(ContainElement("A")) - Ω(texts17).Should(ContainElement("B")) - Ω(texts17).Should(ContainElement("C")) - - Ω(texts15).Should(HaveLen(3)) - Ω(texts15).Should(ContainElement("A")) - Ω(texts15).Should(ContainElement("B")) - Ω(texts15).Should(ContainElement("C")) - }) - }) - - Describe("with no programmatic focus", func() { - BeforeEach(func() { - specs = newSpecs("A1", noneFlag, "A2", noneFlag, "B1", noneFlag, "B2", pendingFlag) - specs.ApplyFocus("", "", "") - }) - - It("should not report as having programmatic specs", func() { - Ω(specs.HasProgrammaticFocus()).Should(BeFalse()) - }) - }) - - Describe("Applying focus/skip", func() { - var description, focusString, skipString string - - BeforeEach(func() { - description, focusString, skipString = "", "", "" - }) - - JustBeforeEach(func() { - specs = newSpecs("A1", focusedFlag, "A2", noneFlag, "B1", focusedFlag, "B2", pendingFlag) - specs.ApplyFocus(description, focusString, skipString) - }) - - Context("with neither a focus string nor a skip string", func() { - It("should apply the programmatic focus", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"A1", "B1"})) - Ω(skippedTexts(specs)).Should(Equal([]string{"A2", "B2"})) - Ω(pendingTexts(specs)).Should(BeEmpty()) - }) - - It("should report as having programmatic specs", func() { - Ω(specs.HasProgrammaticFocus()).Should(BeTrue()) - }) - }) - - Context("with a focus regexp", func() { - BeforeEach(func() { - focusString = "A" - }) - - It("should override the programmatic focus", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"A1", "A2"})) - Ω(skippedTexts(specs)).Should(Equal([]string{"B1", "B2"})) - Ω(pendingTexts(specs)).Should(BeEmpty()) - }) - - It("should not report as having programmatic specs", func() { - Ω(specs.HasProgrammaticFocus()).Should(BeFalse()) - }) - }) - - Context("with a focus regexp", func() { - BeforeEach(func() { - focusString = "B" - }) - - It("should not override any pendings", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"B1"})) - Ω(skippedTexts(specs)).Should(Equal([]string{"A1", "A2"})) - Ω(pendingTexts(specs)).Should(Equal([]string{"B2"})) - }) - }) - - Context("with a description", func() { - BeforeEach(func() { - description = "C" - focusString = "C" - }) - - It("should include the description in the focus determination", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"A1", "A2", "B1"})) - Ω(skippedTexts(specs)).Should(BeEmpty()) - Ω(pendingTexts(specs)).Should(Equal([]string{"B2"})) - }) - }) - - Context("with a description", func() { - BeforeEach(func() { - description = "C" - skipString = "C" - }) - - It("should include the description in the focus determination", func() { - Ω(willRunTexts(specs)).Should(BeEmpty()) - Ω(skippedTexts(specs)).Should(Equal([]string{"A1", "A2", "B1", "B2"})) - Ω(pendingTexts(specs)).Should(BeEmpty()) - }) - }) - - Context("with a skip regexp", func() { - BeforeEach(func() { - skipString = "A" - }) - - It("should override the programmatic focus", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"B1"})) - Ω(skippedTexts(specs)).Should(Equal([]string{"A1", "A2"})) - Ω(pendingTexts(specs)).Should(Equal([]string{"B2"})) - }) - - It("should not report as having programmatic specs", func() { - Ω(specs.HasProgrammaticFocus()).Should(BeFalse()) - }) - }) - - Context("with both a focus and a skip regexp", func() { - BeforeEach(func() { - focusString = "1" - skipString = "B" - }) - - It("should AND the two", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"A1"})) - Ω(skippedTexts(specs)).Should(Equal([]string{"A2", "B1", "B2"})) - Ω(pendingTexts(specs)).Should(BeEmpty()) - }) - - It("should not report as having programmatic specs", func() { - Ω(specs.HasProgrammaticFocus()).Should(BeFalse()) - }) - }) - }) - - Describe("With a focused spec within a pending context and a pending spec within a focused context", func() { - BeforeEach(func() { - pendingInFocused := New( - leafnodes.NewItNode("PendingInFocused", func() {}, pendingFlag, codelocation.New(0), 0, nil, 0), - []*containernode.ContainerNode{ - containernode.New("", focusedFlag, codelocation.New(0)), - }, false) - - focusedInPending := New( - leafnodes.NewItNode("FocusedInPending", func() {}, focusedFlag, codelocation.New(0), 0, nil, 0), - []*containernode.ContainerNode{ - containernode.New("", pendingFlag, codelocation.New(0)), - }, false) - - specs = NewSpecs([]*Spec{ - newSpec("A", noneFlag), - newSpec("B", noneFlag), - pendingInFocused, - focusedInPending, - }) - specs.ApplyFocus("", "", "") - }) - - It("should not have a programmatic focus and should run all tests", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"A", "B"})) - Ω(skippedTexts(specs)).Should(BeEmpty()) - Ω(pendingTexts(specs)).Should(ConsistOf(ContainSubstring("PendingInFocused"), ContainSubstring("FocusedInPending"))) - }) - }) - - Describe("skipping measurements", func() { - BeforeEach(func() { - specs = NewSpecs([]*Spec{ - newSpec("A", noneFlag), - newSpec("B", noneFlag), - newSpec("C", pendingFlag), - newMeasureSpec("measurementA", noneFlag), - newMeasureSpec("measurementB", pendingFlag), - }) - }) - - It("should skip measurements", func() { - Ω(willRunTexts(specs)).Should(Equal([]string{"A", "B", "measurementA"})) - Ω(skippedTexts(specs)).Should(BeEmpty()) - Ω(pendingTexts(specs)).Should(Equal([]string{"C", "measurementB"})) - - specs.SkipMeasurements() - - Ω(willRunTexts(specs)).Should(Equal([]string{"A", "B"})) - Ω(skippedTexts(specs)).Should(Equal([]string{"measurementA", "measurementB"})) - Ω(pendingTexts(specs)).Should(Equal([]string{"C"})) - }) - }) - - Describe("when running tests in parallel", func() { - It("should select out a subset of the tests", func() { - specsNode1 := newSpecs("A", noneFlag, "B", noneFlag, "C", noneFlag, "D", noneFlag, "E", noneFlag) - specsNode2 := newSpecs("A", noneFlag, "B", noneFlag, "C", noneFlag, "D", noneFlag, "E", noneFlag) - specsNode3 := newSpecs("A", noneFlag, "B", noneFlag, "C", noneFlag, "D", noneFlag, "E", noneFlag) - - specsNode1.TrimForParallelization(3, 1) - specsNode2.TrimForParallelization(3, 2) - specsNode3.TrimForParallelization(3, 3) - - Ω(willRunTexts(specsNode1)).Should(Equal([]string{"A", "B"})) - Ω(willRunTexts(specsNode2)).Should(Equal([]string{"C", "D"})) - Ω(willRunTexts(specsNode3)).Should(Equal([]string{"E"})) - - Ω(specsNode1.Specs()).Should(HaveLen(2)) - Ω(specsNode2.Specs()).Should(HaveLen(2)) - Ω(specsNode3.Specs()).Should(HaveLen(1)) - - Ω(specsNode1.NumberOfOriginalSpecs()).Should(Equal(5)) - Ω(specsNode2.NumberOfOriginalSpecs()).Should(Equal(5)) - Ω(specsNode3.NumberOfOriginalSpecs()).Should(Equal(5)) - }) - - Context("when way too many nodes are used", func() { - It("should return 0 specs", func() { - specsNode1 := newSpecs("A", noneFlag, "B", noneFlag) - specsNode2 := newSpecs("A", noneFlag, "B", noneFlag) - specsNode3 := newSpecs("A", noneFlag, "B", noneFlag) - - specsNode1.TrimForParallelization(3, 1) - specsNode2.TrimForParallelization(3, 2) - specsNode3.TrimForParallelization(3, 3) - - Ω(willRunTexts(specsNode1)).Should(Equal([]string{"A"})) - Ω(willRunTexts(specsNode2)).Should(Equal([]string{"B"})) - Ω(willRunTexts(specsNode3)).Should(BeEmpty()) - - Ω(specsNode1.Specs()).Should(HaveLen(1)) - Ω(specsNode2.Specs()).Should(HaveLen(1)) - Ω(specsNode3.Specs()).Should(HaveLen(0)) - - Ω(specsNode1.NumberOfOriginalSpecs()).Should(Equal(2)) - Ω(specsNode2.NumberOfOriginalSpecs()).Should(Equal(2)) - Ω(specsNode3.NumberOfOriginalSpecs()).Should(Equal(2)) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/index_computer.go b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go similarity index 98% rename from vendor/github.com/onsi/ginkgo/internal/spec/index_computer.go rename to vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go index 5a67fc7b..82272554 100644 --- a/vendor/github.com/onsi/ginkgo/internal/spec/index_computer.go +++ b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go @@ -1,4 +1,4 @@ -package spec +package spec_iterator func ParallelizedIndexRange(length int, parallelTotal int, parallelNode int) (startIndex int, count int) { if length == 0 { 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 new file mode 100644 index 00000000..99f548bc --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go @@ -0,0 +1,59 @@ +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 new file mode 100644 index 00000000..a51c93b8 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go @@ -0,0 +1,45 @@ +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 new file mode 100644 index 00000000..ad4a3ea3 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go @@ -0,0 +1,47 @@ +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 new file mode 100644 index 00000000..74bffad6 --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go @@ -0,0 +1,20 @@ +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/spec_runner.go b/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go index 869aaeca..2c683cb8 100644 --- a/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go +++ b/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go @@ -7,6 +7,8 @@ import ( "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" @@ -20,7 +22,7 @@ import ( type SpecRunner struct { description string beforeSuiteNode leafnodes.SuiteNode - specs *spec.Specs + iterator spec_iterator.SpecIterator afterSuiteNode leafnodes.SuiteNode reporters []reporters.Reporter startTime time.Time @@ -29,14 +31,15 @@ type SpecRunner struct { writer Writer.WriterInterface config config.GinkgoConfigType interrupted bool + processedSpecs []*spec.Spec lock *sync.Mutex } -func New(description string, beforeSuiteNode leafnodes.SuiteNode, specs *spec.Specs, afterSuiteNode leafnodes.SuiteNode, reporters []reporters.Reporter, writer Writer.WriterInterface, config config.GinkgoConfigType) *SpecRunner { +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, - specs: specs, + iterator: iterator, afterSuiteNode: afterSuiteNode, reporters: reporters, writer: writer, @@ -53,7 +56,9 @@ func (runner *SpecRunner) Run() bool { } runner.reportSuiteWillBegin() - go runner.registerForInterrupts() + signalRegistered := make(chan struct{}) + go runner.registerForInterrupts(signalRegistered) + <-signalRegistered suitePassed := runner.runBeforeSuite() @@ -79,7 +84,18 @@ func (runner *SpecRunner) performDryRun() { runner.reportBeforeSuite(summary) } - for _, spec := range runner.specs.Specs() { + 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 { @@ -130,9 +146,21 @@ func (runner *SpecRunner) runAfterSuite() bool { func (runner *SpecRunner) runSpecs() bool { suiteFailed := false skipRemainingSpecs := false - for _, spec := range runner.specs.Specs() { + 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() { - return suiteFailed + break } if skipRemainingSpecs { spec.Skip() @@ -187,9 +215,10 @@ func (runner *SpecRunner) CurrentSpecSummary() (*types.SpecSummary, bool) { return runner.runningSpec.Summary(runner.suiteID), true } -func (runner *SpecRunner) registerForInterrupts() { +func (runner *SpecRunner) registerForInterrupts(signalRegistered chan struct{}) { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, syscall.SIGTERM) + close(signalRegistered) <-c signal.Stop(c) @@ -244,7 +273,7 @@ func (runner *SpecRunner) wasInterrupted() bool { func (runner *SpecRunner) reportSuiteWillBegin() { runner.startTime = time.Now() - summary := runner.summary(true) + summary := runner.suiteWillBeginSummary() for _, reporter := range runner.reporters { reporter.SpecSuiteWillBegin(runner.config, summary) } @@ -271,6 +300,9 @@ func (runner *SpecRunner) reportSpecWillRun(summary *types.SpecSummary) { } 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) } @@ -283,17 +315,17 @@ func (runner *SpecRunner) reportSpecDidComplete(summary *types.SpecSummary, fail } func (runner *SpecRunner) reportSuiteDidEnd(success bool) { - summary := runner.summary(success) + summary := runner.suiteDidEndSummary(success) summary.RunTime = time.Since(runner.startTime) for _, reporter := range runner.reporters { reporter.SpecSuiteDidEnd(summary) } } -func (runner *SpecRunner) countSpecsSatisfying(filter func(ex *spec.Spec) bool) (count int) { +func (runner *SpecRunner) countSpecsThatRanSatisfying(filter func(ex *spec.Spec) bool) (count int) { count = 0 - for _, spec := range runner.specs.Specs() { + for _, spec := range runner.processedSpecs { if filter(spec) { count++ } @@ -302,32 +334,37 @@ func (runner *SpecRunner) countSpecsSatisfying(filter func(ex *spec.Spec) bool) return count } -func (runner *SpecRunner) summary(success bool) *types.SuiteSummary { - numberOfSpecsThatWillBeRun := runner.countSpecsSatisfying(func(ex *spec.Spec) bool { +func (runner *SpecRunner) suiteDidEndSummary(success bool) *types.SuiteSummary { + numberOfSpecsThatWillBeRun := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { return !ex.Skipped() && !ex.Pending() }) - numberOfPendingSpecs := runner.countSpecsSatisfying(func(ex *spec.Spec) bool { + numberOfPendingSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { return ex.Pending() }) - numberOfSkippedSpecs := runner.countSpecsSatisfying(func(ex *spec.Spec) bool { + numberOfSkippedSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { return ex.Skipped() }) - numberOfPassedSpecs := runner.countSpecsSatisfying(func(ex *spec.Spec) bool { + numberOfPassedSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { return ex.Passed() }) - numberOfFlakedSpecs := runner.countSpecsSatisfying(func(ex *spec.Spec) bool { + numberOfFlakedSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { return ex.Flaked() }) - numberOfFailedSpecs := runner.countSpecsSatisfying(func(ex *spec.Spec) bool { + 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 } @@ -336,8 +373,8 @@ func (runner *SpecRunner) summary(success bool) *types.SuiteSummary { SuiteSucceeded: success, SuiteID: runner.suiteID, - NumberOfSpecsBeforeParallelization: runner.specs.NumberOfOriginalSpecs(), - NumberOfTotalSpecs: len(runner.specs.Specs()), + NumberOfSpecsBeforeParallelization: runner.iterator.NumberOfSpecsPriorToIteration(), + NumberOfTotalSpecs: len(runner.processedSpecs), NumberOfSpecsThatWillBeRun: numberOfSpecsThatWillBeRun, NumberOfPendingSpecs: numberOfPendingSpecs, NumberOfSkippedSpecs: numberOfSkippedSpecs, @@ -346,3 +383,29 @@ func (runner *SpecRunner) summary(success bool) *types.SuiteSummary { 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/specrunner/spec_runner_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner_suite_test.go deleted file mode 100644 index c8388fb6..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package specrunner_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestSpecRunner(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Spec Runner Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner_test.go b/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner_test.go deleted file mode 100644 index bbd6f2c5..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner_test.go +++ /dev/null @@ -1,794 +0,0 @@ -package specrunner_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/specrunner" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/internal/containernode" - Failer "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/internal/spec" - Writer "github.com/onsi/ginkgo/internal/writer" - "github.com/onsi/ginkgo/reporters" -) - -var noneFlag = types.FlagTypeNone -var focusedFlag = types.FlagTypeFocused -var pendingFlag = types.FlagTypePending - -var _ = Describe("Spec Runner", func() { - var ( - reporter1 *reporters.FakeReporter - reporter2 *reporters.FakeReporter - failer *Failer.Failer - writer *Writer.FakeGinkgoWriter - - thingsThatRan []string - - runner *SpecRunner - ) - - newBefSuite := func(text string, fail bool) leafnodes.SuiteNode { - return leafnodes.NewBeforeSuiteNode(func() { - writer.AddEvent(text) - thingsThatRan = append(thingsThatRan, text) - if fail { - failer.Fail(text, codelocation.New(0)) - } - }, codelocation.New(0), 0, failer) - } - - newAftSuite := func(text string, fail bool) leafnodes.SuiteNode { - return leafnodes.NewAfterSuiteNode(func() { - writer.AddEvent(text) - thingsThatRan = append(thingsThatRan, text) - if fail { - failer.Fail(text, codelocation.New(0)) - } - }, codelocation.New(0), 0, failer) - } - - newSpec := func(text string, flag types.FlagType, fail bool) *spec.Spec { - subject := leafnodes.NewItNode(text, func() { - writer.AddEvent(text) - thingsThatRan = append(thingsThatRan, text) - if fail { - failer.Fail(text, codelocation.New(0)) - } - }, flag, codelocation.New(0), 0, failer, 0) - - return spec.New(subject, []*containernode.ContainerNode{}, false) - } - - newFlakySpec := func(text string, flag types.FlagType, failures int) *spec.Spec { - runs := 0 - subject := leafnodes.NewItNode(text, func() { - writer.AddEvent(text) - thingsThatRan = append(thingsThatRan, text) - runs++ - if runs < failures { - failer.Fail(text, codelocation.New(0)) - } - }, flag, codelocation.New(0), 0, failer, 0) - - return spec.New(subject, []*containernode.ContainerNode{}, false) - } - - newSpecWithBody := func(text string, body interface{}) *spec.Spec { - subject := leafnodes.NewItNode(text, body, noneFlag, codelocation.New(0), 0, failer, 0) - - return spec.New(subject, []*containernode.ContainerNode{}, false) - } - - newRunner := func(config config.GinkgoConfigType, beforeSuiteNode leafnodes.SuiteNode, afterSuiteNode leafnodes.SuiteNode, specs ...*spec.Spec) *SpecRunner { - return New("description", beforeSuiteNode, spec.NewSpecs(specs), afterSuiteNode, []reporters.Reporter{reporter1, reporter2}, writer, config) - } - - BeforeEach(func() { - reporter1 = reporters.NewFakeReporter() - reporter2 = reporters.NewFakeReporter() - writer = Writer.NewFake() - failer = Failer.New() - - thingsThatRan = []string{} - }) - - Describe("Running and Reporting", func() { - var specA, pendingSpec, anotherPendingSpec, failedSpec, specB, skippedSpec *spec.Spec - var willRunCalls, didCompleteCalls []string - var conf config.GinkgoConfigType - - JustBeforeEach(func() { - willRunCalls = []string{} - didCompleteCalls = []string{} - specA = newSpec("spec A", noneFlag, false) - pendingSpec = newSpec("pending spec", pendingFlag, false) - anotherPendingSpec = newSpec("another pending spec", pendingFlag, false) - failedSpec = newSpec("failed spec", noneFlag, true) - specB = newSpec("spec B", noneFlag, false) - skippedSpec = newSpec("skipped spec", noneFlag, false) - skippedSpec.Skip() - - reporter1.SpecWillRunStub = func(specSummary *types.SpecSummary) { - willRunCalls = append(willRunCalls, "Reporter1") - } - reporter2.SpecWillRunStub = func(specSummary *types.SpecSummary) { - willRunCalls = append(willRunCalls, "Reporter2") - } - - reporter1.SpecDidCompleteStub = func(specSummary *types.SpecSummary) { - didCompleteCalls = append(didCompleteCalls, "Reporter1") - } - reporter2.SpecDidCompleteStub = func(specSummary *types.SpecSummary) { - didCompleteCalls = append(didCompleteCalls, "Reporter2") - } - - runner = newRunner(conf, newBefSuite("BefSuite", false), newAftSuite("AftSuite", false), specA, pendingSpec, anotherPendingSpec, failedSpec, specB, skippedSpec) - runner.Run() - }) - - BeforeEach(func() { - conf = config.GinkgoConfigType{RandomSeed: 17} - }) - - It("should skip skipped/pending tests", func() { - Ω(thingsThatRan).Should(Equal([]string{"BefSuite", "spec A", "failed spec", "spec B", "AftSuite"})) - }) - - It("should report to any attached reporters", func() { - Ω(reporter1.Config).Should(Equal(reporter2.Config)) - Ω(reporter1.BeforeSuiteSummary).Should(Equal(reporter2.BeforeSuiteSummary)) - Ω(reporter1.BeginSummary).Should(Equal(reporter2.BeginSummary)) - Ω(reporter1.SpecWillRunSummaries).Should(Equal(reporter2.SpecWillRunSummaries)) - Ω(reporter1.SpecSummaries).Should(Equal(reporter2.SpecSummaries)) - Ω(reporter1.AfterSuiteSummary).Should(Equal(reporter2.AfterSuiteSummary)) - Ω(reporter1.EndSummary).Should(Equal(reporter2.EndSummary)) - }) - - It("should report that a spec did end in reverse order", func() { - Ω(willRunCalls[0:4]).Should(Equal([]string{"Reporter1", "Reporter2", "Reporter1", "Reporter2"})) - Ω(didCompleteCalls[0:4]).Should(Equal([]string{"Reporter2", "Reporter1", "Reporter2", "Reporter1"})) - }) - - It("should report the passed in config", func() { - Ω(reporter1.Config.RandomSeed).Should(BeNumerically("==", 17)) - }) - - It("should report the beginning of the suite", func() { - Ω(reporter1.BeginSummary.SuiteDescription).Should(Equal("description")) - Ω(reporter1.BeginSummary.SuiteID).Should(MatchRegexp("[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}")) - Ω(reporter1.BeginSummary.NumberOfSpecsBeforeParallelization).Should(Equal(6)) - Ω(reporter1.BeginSummary.NumberOfTotalSpecs).Should(Equal(6)) - Ω(reporter1.BeginSummary.NumberOfSpecsThatWillBeRun).Should(Equal(3)) - Ω(reporter1.BeginSummary.NumberOfPendingSpecs).Should(Equal(2)) - Ω(reporter1.BeginSummary.NumberOfSkippedSpecs).Should(Equal(1)) - }) - - It("should report the end of the suite", func() { - Ω(reporter1.EndSummary.SuiteDescription).Should(Equal("description")) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteID).Should(MatchRegexp("[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}")) - Ω(reporter1.EndSummary.NumberOfSpecsBeforeParallelization).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfTotalSpecs).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfSpecsThatWillBeRun).Should(Equal(3)) - Ω(reporter1.EndSummary.NumberOfPendingSpecs).Should(Equal(2)) - Ω(reporter1.EndSummary.NumberOfSkippedSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfPassedSpecs).Should(Equal(2)) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(1)) - }) - - Context("when told to perform a dry run", func() { - BeforeEach(func() { - conf.DryRun = true - }) - - It("should report to the reporters", func() { - Ω(reporter1.Config).Should(Equal(reporter2.Config)) - Ω(reporter1.BeforeSuiteSummary).Should(Equal(reporter2.BeforeSuiteSummary)) - Ω(reporter1.BeginSummary).Should(Equal(reporter2.BeginSummary)) - Ω(reporter1.SpecWillRunSummaries).Should(Equal(reporter2.SpecWillRunSummaries)) - Ω(reporter1.SpecSummaries).Should(Equal(reporter2.SpecSummaries)) - Ω(reporter1.AfterSuiteSummary).Should(Equal(reporter2.AfterSuiteSummary)) - Ω(reporter1.EndSummary).Should(Equal(reporter2.EndSummary)) - }) - - It("should not actually run anything", func() { - Ω(thingsThatRan).Should(BeEmpty()) - }) - - It("report before and after suites as passed", func() { - Ω(reporter1.BeforeSuiteSummary.State).Should(Equal(types.SpecStatePassed)) - Ω(reporter1.AfterSuiteSummary.State).Should(Equal(types.SpecStatePassed)) - }) - - It("should report specs as passed", func() { - summaries := reporter1.SpecSummaries - Ω(summaries).Should(HaveLen(6)) - Ω(summaries[0].ComponentTexts).Should(ContainElement("spec A")) - Ω(summaries[0].State).Should(Equal(types.SpecStatePassed)) - Ω(summaries[1].ComponentTexts).Should(ContainElement("pending spec")) - Ω(summaries[1].State).Should(Equal(types.SpecStatePending)) - Ω(summaries[2].ComponentTexts).Should(ContainElement("another pending spec")) - Ω(summaries[2].State).Should(Equal(types.SpecStatePending)) - Ω(summaries[3].ComponentTexts).Should(ContainElement("failed spec")) - Ω(summaries[3].State).Should(Equal(types.SpecStatePassed)) - Ω(summaries[4].ComponentTexts).Should(ContainElement("spec B")) - Ω(summaries[4].State).Should(Equal(types.SpecStatePassed)) - Ω(summaries[5].ComponentTexts).Should(ContainElement("skipped spec")) - Ω(summaries[5].State).Should(Equal(types.SpecStateSkipped)) - }) - - It("should report the end of the suite", func() { - Ω(reporter1.EndSummary.SuiteDescription).Should(Equal("description")) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeTrue()) - Ω(reporter1.EndSummary.SuiteID).Should(MatchRegexp("[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}")) - Ω(reporter1.EndSummary.NumberOfSpecsBeforeParallelization).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfTotalSpecs).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfSpecsThatWillBeRun).Should(Equal(3)) - Ω(reporter1.EndSummary.NumberOfPendingSpecs).Should(Equal(2)) - Ω(reporter1.EndSummary.NumberOfSkippedSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfPassedSpecs).Should(Equal(0)) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(0)) - }) - }) - }) - - Describe("reporting on specs", func() { - var proceed chan bool - var ready chan bool - var finished chan bool - BeforeEach(func() { - ready = make(chan bool) - proceed = make(chan bool) - finished = make(chan bool) - skippedSpec := newSpec("SKIP", noneFlag, false) - skippedSpec.Skip() - - runner = newRunner( - config.GinkgoConfigType{}, - newBefSuite("BefSuite", false), - newAftSuite("AftSuite", false), - skippedSpec, - newSpec("PENDING", pendingFlag, false), - newSpecWithBody("RUN", func() { - close(ready) - <-proceed - }), - ) - go func() { - runner.Run() - close(finished) - }() - }) - - It("should report about pending/skipped specs", func() { - <-ready - Ω(reporter1.SpecWillRunSummaries).Should(HaveLen(3)) - - Ω(reporter1.SpecWillRunSummaries[0].ComponentTexts[0]).Should(Equal("SKIP")) - Ω(reporter1.SpecWillRunSummaries[1].ComponentTexts[0]).Should(Equal("PENDING")) - Ω(reporter1.SpecWillRunSummaries[2].ComponentTexts[0]).Should(Equal("RUN")) - - Ω(reporter1.SpecSummaries[0].ComponentTexts[0]).Should(Equal("SKIP")) - Ω(reporter1.SpecSummaries[1].ComponentTexts[0]).Should(Equal("PENDING")) - Ω(reporter1.SpecSummaries).Should(HaveLen(2)) - - close(proceed) - <-finished - - Ω(reporter1.SpecSummaries).Should(HaveLen(3)) - Ω(reporter1.SpecSummaries[2].ComponentTexts[0]).Should(Equal("RUN")) - }) - }) - - Describe("Running and Reporting when there's flakes", func() { - var specA, pendingSpec, flakySpec, failedSpec, specB, skippedSpec *spec.Spec - var willRunCalls, didCompleteCalls []string - var conf config.GinkgoConfigType - var failedSpecFlag = noneFlag - - JustBeforeEach(func() { - willRunCalls = []string{} - didCompleteCalls = []string{} - specA = newSpec("spec A", noneFlag, false) - pendingSpec = newSpec("pending spec", pendingFlag, false) - flakySpec = newFlakySpec("flaky spec", noneFlag, 3) - failedSpec = newSpec("failed spec", failedSpecFlag, true) - specB = newSpec("spec B", noneFlag, false) - skippedSpec = newSpec("skipped spec", noneFlag, false) - skippedSpec.Skip() - - reporter1.SpecWillRunStub = func(specSummary *types.SpecSummary) { - willRunCalls = append(willRunCalls, "Reporter1") - } - reporter2.SpecWillRunStub = func(specSummary *types.SpecSummary) { - willRunCalls = append(willRunCalls, "Reporter2") - } - - reporter1.SpecDidCompleteStub = func(specSummary *types.SpecSummary) { - didCompleteCalls = append(didCompleteCalls, "Reporter1") - } - reporter2.SpecDidCompleteStub = func(specSummary *types.SpecSummary) { - didCompleteCalls = append(didCompleteCalls, "Reporter2") - } - - runner = newRunner(conf, newBefSuite("BefSuite", false), newAftSuite("AftSuite", false), specA, pendingSpec, flakySpec, failedSpec, specB, skippedSpec) - runner.Run() - }) - - BeforeEach(func() { - failedSpecFlag = noneFlag - conf = config.GinkgoConfigType{ - RandomSeed: 17, - FlakeAttempts: 5, - } - }) - - It("should skip skipped/pending tests", func() { - Ω(thingsThatRan).Should(Equal([]string{"BefSuite", "spec A", "flaky spec", "flaky spec", "flaky spec", "failed spec", "failed spec", "failed spec", "failed spec", "failed spec", "spec B", "AftSuite"})) - }) - - It("should report to any attached reporters", func() { - Ω(reporter1.Config).Should(Equal(reporter2.Config)) - Ω(reporter1.BeforeSuiteSummary).Should(Equal(reporter2.BeforeSuiteSummary)) - Ω(reporter1.BeginSummary).Should(Equal(reporter2.BeginSummary)) - Ω(reporter1.SpecWillRunSummaries).Should(Equal(reporter2.SpecWillRunSummaries)) - Ω(reporter1.SpecSummaries).Should(Equal(reporter2.SpecSummaries)) - Ω(reporter1.AfterSuiteSummary).Should(Equal(reporter2.AfterSuiteSummary)) - Ω(reporter1.EndSummary).Should(Equal(reporter2.EndSummary)) - }) - - It("should report that a spec did end in reverse order", func() { - Ω(willRunCalls[0:4]).Should(Equal([]string{"Reporter1", "Reporter2", "Reporter1", "Reporter2"})) - Ω(didCompleteCalls[0:4]).Should(Equal([]string{"Reporter2", "Reporter1", "Reporter2", "Reporter1"})) - }) - - It("should report the passed in config", func() { - Ω(reporter1.Config.RandomSeed).Should(BeNumerically("==", 17)) - }) - - It("should report the beginning of the suite", func() { - Ω(reporter1.BeginSummary.SuiteDescription).Should(Equal("description")) - Ω(reporter1.BeginSummary.SuiteID).Should(MatchRegexp("[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}")) - Ω(reporter1.BeginSummary.NumberOfSpecsBeforeParallelization).Should(Equal(6)) - Ω(reporter1.BeginSummary.NumberOfTotalSpecs).Should(Equal(6)) - Ω(reporter1.BeginSummary.NumberOfSpecsThatWillBeRun).Should(Equal(4)) - Ω(reporter1.BeginSummary.NumberOfPendingSpecs).Should(Equal(1)) - Ω(reporter1.BeginSummary.NumberOfSkippedSpecs).Should(Equal(1)) - }) - - It("should report the end of the suite", func() { - Ω(reporter1.EndSummary.SuiteDescription).Should(Equal("description")) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteID).Should(MatchRegexp("[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}")) - Ω(reporter1.EndSummary.NumberOfSpecsBeforeParallelization).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfTotalSpecs).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfSpecsThatWillBeRun).Should(Equal(4)) - Ω(reporter1.EndSummary.NumberOfPendingSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfSkippedSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfPassedSpecs).Should(Equal(3)) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfFlakedSpecs).Should(Equal(1)) - }) - - Context("when nothing fails", func() { - BeforeEach(func() { - failedSpecFlag = pendingFlag - }) - - It("the suite should pass even with flakes", func() { - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeTrue()) - Ω(reporter1.EndSummary.NumberOfFlakedSpecs).Should(Equal(1)) - }) - }) - - Context("when told to perform a dry run", func() { - BeforeEach(func() { - conf.DryRun = true - }) - - It("should report to the reporters", func() { - Ω(reporter1.Config).Should(Equal(reporter2.Config)) - Ω(reporter1.BeforeSuiteSummary).Should(Equal(reporter2.BeforeSuiteSummary)) - Ω(reporter1.BeginSummary).Should(Equal(reporter2.BeginSummary)) - Ω(reporter1.SpecWillRunSummaries).Should(Equal(reporter2.SpecWillRunSummaries)) - Ω(reporter1.SpecSummaries).Should(Equal(reporter2.SpecSummaries)) - Ω(reporter1.AfterSuiteSummary).Should(Equal(reporter2.AfterSuiteSummary)) - Ω(reporter1.EndSummary).Should(Equal(reporter2.EndSummary)) - }) - - It("should not actually run anything", func() { - Ω(thingsThatRan).Should(BeEmpty()) - }) - - It("report before and after suites as passed", func() { - Ω(reporter1.BeforeSuiteSummary.State).Should(Equal(types.SpecStatePassed)) - Ω(reporter1.AfterSuiteSummary.State).Should(Equal(types.SpecStatePassed)) - }) - - It("should report specs as passed", func() { - summaries := reporter1.SpecSummaries - Ω(summaries).Should(HaveLen(6)) - Ω(summaries[0].ComponentTexts).Should(ContainElement("spec A")) - Ω(summaries[0].State).Should(Equal(types.SpecStatePassed)) - Ω(summaries[1].ComponentTexts).Should(ContainElement("pending spec")) - Ω(summaries[1].State).Should(Equal(types.SpecStatePending)) - Ω(summaries[2].ComponentTexts).Should(ContainElement("flaky spec")) - Ω(summaries[2].State).Should(Equal(types.SpecStatePassed)) - Ω(summaries[3].ComponentTexts).Should(ContainElement("failed spec")) - Ω(summaries[3].State).Should(Equal(types.SpecStatePassed)) - Ω(summaries[4].ComponentTexts).Should(ContainElement("spec B")) - Ω(summaries[4].State).Should(Equal(types.SpecStatePassed)) - Ω(summaries[5].ComponentTexts).Should(ContainElement("skipped spec")) - Ω(summaries[5].State).Should(Equal(types.SpecStateSkipped)) - }) - - It("should report the end of the suite", func() { - Ω(reporter1.EndSummary.SuiteDescription).Should(Equal("description")) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeTrue()) - Ω(reporter1.EndSummary.SuiteID).Should(MatchRegexp("[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}")) - Ω(reporter1.EndSummary.NumberOfSpecsBeforeParallelization).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfTotalSpecs).Should(Equal(6)) - Ω(reporter1.EndSummary.NumberOfSpecsThatWillBeRun).Should(Equal(4)) - Ω(reporter1.EndSummary.NumberOfPendingSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfSkippedSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfPassedSpecs).Should(Equal(0)) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(0)) - }) - }) - }) - - Describe("Running BeforeSuite & AfterSuite", func() { - var success bool - var befSuite leafnodes.SuiteNode - var aftSuite leafnodes.SuiteNode - Context("with a nil BeforeSuite & AfterSuite", func() { - BeforeEach(func() { - runner = newRunner( - config.GinkgoConfigType{}, - nil, - nil, - newSpec("A", noneFlag, false), - newSpec("B", noneFlag, false), - ) - success = runner.Run() - }) - - It("should not report about the BeforeSuite", func() { - Ω(reporter1.BeforeSuiteSummary).Should(BeNil()) - }) - - It("should not report about the AfterSuite", func() { - Ω(reporter1.AfterSuiteSummary).Should(BeNil()) - }) - - It("should run the specs", func() { - Ω(thingsThatRan).Should(Equal([]string{"A", "B"})) - }) - }) - - Context("when the BeforeSuite & AfterSuite pass", func() { - BeforeEach(func() { - befSuite = newBefSuite("BefSuite", false) - aftSuite = newBefSuite("AftSuite", false) - runner = newRunner( - config.GinkgoConfigType{}, - befSuite, - aftSuite, - newSpec("A", noneFlag, false), - newSpec("B", noneFlag, false), - ) - success = runner.Run() - }) - - It("should run the BeforeSuite, the AfterSuite and the specs", func() { - Ω(thingsThatRan).Should(Equal([]string{"BefSuite", "A", "B", "AftSuite"})) - }) - - It("should report about the BeforeSuite", func() { - Ω(reporter1.BeforeSuiteSummary).Should(Equal(befSuite.Summary())) - }) - - It("should report about the AfterSuite", func() { - Ω(reporter1.AfterSuiteSummary).Should(Equal(aftSuite.Summary())) - }) - - It("should report success", func() { - Ω(success).Should(BeTrue()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeTrue()) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(0)) - }) - - It("should not dump the writer", func() { - Ω(writer.EventStream).ShouldNot(ContainElement("DUMP")) - }) - }) - - Context("when the BeforeSuite fails", func() { - BeforeEach(func() { - befSuite = newBefSuite("BefSuite", true) - aftSuite = newBefSuite("AftSuite", false) - - skipped := newSpec("Skipped", noneFlag, false) - skipped.Skip() - - runner = newRunner( - config.GinkgoConfigType{}, - befSuite, - aftSuite, - newSpec("A", noneFlag, false), - newSpec("B", noneFlag, false), - newSpec("Pending", pendingFlag, false), - skipped, - ) - success = runner.Run() - }) - - It("should not run the specs, but it should run the AfterSuite", func() { - Ω(thingsThatRan).Should(Equal([]string{"BefSuite", "AftSuite"})) - }) - - It("should report about the BeforeSuite", func() { - Ω(reporter1.BeforeSuiteSummary).Should(Equal(befSuite.Summary())) - }) - - It("should report about the AfterSuite", func() { - Ω(reporter1.AfterSuiteSummary).Should(Equal(aftSuite.Summary())) - }) - - It("should report failure", func() { - Ω(success).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(2)) - Ω(reporter1.EndSummary.NumberOfSpecsThatWillBeRun).Should(Equal(2)) - }) - - It("should dump the writer", func() { - Ω(writer.EventStream).Should(ContainElement("DUMP")) - }) - }) - - Context("when some other test fails", func() { - BeforeEach(func() { - aftSuite = newBefSuite("AftSuite", false) - - runner = newRunner( - config.GinkgoConfigType{}, - nil, - aftSuite, - newSpec("A", noneFlag, true), - ) - success = runner.Run() - }) - - It("should still run the AfterSuite", func() { - Ω(thingsThatRan).Should(Equal([]string{"A", "AftSuite"})) - }) - - It("should report about the AfterSuite", func() { - Ω(reporter1.AfterSuiteSummary).Should(Equal(aftSuite.Summary())) - }) - - It("should report failure", func() { - Ω(success).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfSpecsThatWillBeRun).Should(Equal(1)) - }) - }) - - Context("when the AfterSuite fails", func() { - BeforeEach(func() { - befSuite = newBefSuite("BefSuite", false) - aftSuite = newBefSuite("AftSuite", true) - runner = newRunner( - config.GinkgoConfigType{}, - befSuite, - aftSuite, - newSpec("A", noneFlag, false), - newSpec("B", noneFlag, false), - ) - success = runner.Run() - }) - - It("should run everything", func() { - Ω(thingsThatRan).Should(Equal([]string{"BefSuite", "A", "B", "AftSuite"})) - }) - - It("should report about the BeforeSuite", func() { - Ω(reporter1.BeforeSuiteSummary).Should(Equal(befSuite.Summary())) - }) - - It("should report about the AfterSuite", func() { - Ω(reporter1.AfterSuiteSummary).Should(Equal(aftSuite.Summary())) - }) - - It("should report failure", func() { - Ω(success).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - Ω(reporter1.EndSummary.NumberOfFailedSpecs).Should(Equal(0)) - }) - - It("should dump the writer", func() { - Ω(writer.EventStream).Should(ContainElement("DUMP")) - }) - }) - }) - - Describe("When instructed to fail fast", func() { - BeforeEach(func() { - conf := config.GinkgoConfigType{ - FailFast: true, - } - runner = newRunner(conf, nil, newAftSuite("after-suite", false), newSpec("passing", noneFlag, false), newSpec("failing", noneFlag, true), newSpec("dont-see", noneFlag, true), newSpec("dont-see", noneFlag, true)) - }) - - It("should return false, report failure, and not run anything past the failing test", func() { - Ω(runner.Run()).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - Ω(thingsThatRan).Should(Equal([]string{"passing", "failing", "after-suite"})) - }) - - It("should announce the subsequent specs as skipped", func() { - runner.Run() - Ω(reporter1.SpecSummaries).Should(HaveLen(4)) - Ω(reporter1.SpecSummaries[2].State).Should(Equal(types.SpecStateSkipped)) - Ω(reporter1.SpecSummaries[3].State).Should(Equal(types.SpecStateSkipped)) - }) - - It("should mark all subsequent specs as skipped", func() { - runner.Run() - Ω(reporter1.EndSummary.NumberOfSkippedSpecs).Should(Equal(2)) - }) - }) - - Describe("Marking failure and success", func() { - Context("when all tests pass", func() { - BeforeEach(func() { - runner = newRunner(config.GinkgoConfigType{}, nil, nil, newSpec("passing", noneFlag, false), newSpec("pending", pendingFlag, false)) - }) - - It("should return true and report success", func() { - Ω(runner.Run()).Should(BeTrue()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeTrue()) - }) - }) - - Context("when a test fails", func() { - BeforeEach(func() { - runner = newRunner(config.GinkgoConfigType{}, nil, nil, newSpec("failing", noneFlag, true), newSpec("pending", pendingFlag, false)) - }) - - It("should return false and report failure", func() { - Ω(runner.Run()).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - }) - }) - - Context("when there is a pending test, but pendings count as failures", func() { - BeforeEach(func() { - runner = newRunner(config.GinkgoConfigType{FailOnPending: true}, nil, nil, newSpec("passing", noneFlag, false), newSpec("pending", pendingFlag, false)) - }) - - It("should return false and report failure", func() { - Ω(runner.Run()).Should(BeFalse()) - Ω(reporter1.EndSummary.SuiteSucceeded).Should(BeFalse()) - }) - }) - }) - - Describe("Managing the writer", func() { - BeforeEach(func() { - runner = newRunner( - config.GinkgoConfigType{}, - nil, - nil, - newSpec("A", noneFlag, false), - newSpec("B", noneFlag, true), - newSpec("C", noneFlag, false), - ) - reporter1.SpecWillRunStub = func(specSummary *types.SpecSummary) { - writer.AddEvent("R1.WillRun") - } - reporter2.SpecWillRunStub = func(specSummary *types.SpecSummary) { - writer.AddEvent("R2.WillRun") - } - reporter1.SpecDidCompleteStub = func(specSummary *types.SpecSummary) { - writer.AddEvent("R1.DidComplete") - } - reporter2.SpecDidCompleteStub = func(specSummary *types.SpecSummary) { - writer.AddEvent("R2.DidComplete") - } - runner.Run() - }) - - It("should truncate between tests, but only dump if a test fails", func() { - Ω(writer.EventStream).Should(Equal([]string{ - "TRUNCATE", - "R1.WillRun", - "R2.WillRun", - "A", - "R2.DidComplete", - "R1.DidComplete", - "TRUNCATE", - "R1.WillRun", - "R2.WillRun", - "B", - "R2.DidComplete", - "DUMP", - "R1.DidComplete", - "TRUNCATE", - "R1.WillRun", - "R2.WillRun", - "C", - "R2.DidComplete", - "R1.DidComplete", - })) - }) - }) - - Describe("CurrentSpecSummary", func() { - It("should return the spec summary for the currently running spec", func() { - var summary *types.SpecSummary - runner = newRunner( - config.GinkgoConfigType{}, - nil, - nil, - newSpec("A", noneFlag, false), - newSpecWithBody("B", func() { - var ok bool - summary, ok = runner.CurrentSpecSummary() - Ω(ok).Should(BeTrue()) - }), - newSpec("C", noneFlag, false), - ) - runner.Run() - - Ω(summary.ComponentTexts).Should(Equal([]string{"B"})) - - summary, ok := runner.CurrentSpecSummary() - Ω(summary).Should(BeNil()) - Ω(ok).Should(BeFalse()) - }) - }) - - Context("When running tests in parallel", func() { - It("reports the correct number of specs before parallelization", func() { - specs := spec.NewSpecs([]*spec.Spec{ - newSpec("A", noneFlag, false), - newSpec("B", pendingFlag, false), - newSpec("C", noneFlag, false), - }) - specs.TrimForParallelization(2, 1) - runner = New("description", nil, specs, nil, []reporters.Reporter{reporter1, reporter2}, writer, config.GinkgoConfigType{}) - runner.Run() - - Ω(reporter1.EndSummary.NumberOfSpecsBeforeParallelization).Should(Equal(3)) - Ω(reporter1.EndSummary.NumberOfTotalSpecs).Should(Equal(2)) - Ω(reporter1.EndSummary.NumberOfSpecsThatWillBeRun).Should(Equal(1)) - Ω(reporter1.EndSummary.NumberOfPendingSpecs).Should(Equal(1)) - }) - }) - - Describe("generating a suite id", func() { - It("should generate an id randomly", func() { - runnerA := newRunner(config.GinkgoConfigType{}, nil, nil) - runnerA.Run() - IDA := reporter1.BeginSummary.SuiteID - - runnerB := newRunner(config.GinkgoConfigType{}, nil, nil) - runnerB.Run() - IDB := reporter1.BeginSummary.SuiteID - - IDRegexp := "[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}" - Ω(IDA).Should(MatchRegexp(IDRegexp)) - Ω(IDB).Should(MatchRegexp(IDRegexp)) - - Ω(IDA).ShouldNot(Equal(IDB)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go b/vendor/github.com/onsi/ginkgo/internal/suite/suite.go index 949bd34f..f311e9a0 100644 --- a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go +++ b/vendor/github.com/onsi/ginkgo/internal/suite/suite.go @@ -2,8 +2,11 @@ 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" @@ -52,18 +55,18 @@ func (suite *Suite) Run(t ginkgoTestingT, description string, reporters []report r := rand.New(rand.NewSource(config.RandomSeed)) suite.topLevelContainer.Shuffle(r) - specs := suite.generateSpecs(description, config) - suite.runner = specrunner.New(description, suite.beforeSuiteNode, specs, suite.afterSuiteNode, reporters, writer, config) + 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, specs.HasProgrammaticFocus() + return success, hasProgrammaticFocus } -func (suite *Suite) generateSpecs(description string, config config.GinkgoConfigType) *spec.Specs { +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() { @@ -83,10 +86,19 @@ func (suite *Suite) generateSpecs(description string, config config.GinkgoConfig specs.SkipMeasurements() } + var iterator spec_iterator.SpecIterator + if config.ParallelTotal > 1 { - specs.TrimForParallelization(config.ParallelTotal, config.ParallelNode) + 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 specs + + return iterator, specs.HasProgrammaticFocus() } func (suite *Suite) CurrentRunningSpecSummary() (*types.SpecSummary, bool) { @@ -137,35 +149,35 @@ func (suite *Suite) PushContainerNode(text string, body func(), flag types.FlagT 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.failer.Fail("You may only call It from within a Describe, Context or When", 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.failer.Fail("You may only call Measure from within a Describe, Context or When", 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.failer.Fail("You may only call BeforeEach from within a Describe, Context or When", 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.failer.Fail("You may only call JustBeforeEach from within a Describe, Context or When", 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.failer.Fail("You may only call AfterEach from within a Describe, Context or When", codeLocation) } suite.currentContainer.PushSetupNode(leafnodes.NewAfterEachNode(body, codeLocation, timeout, suite.failer, suite.containerIndex)) } diff --git a/vendor/github.com/onsi/ginkgo/internal/suite/suite_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/suite/suite_suite_test.go deleted file mode 100644 index 06fe1d12..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/suite/suite_suite_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package suite_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func Test(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Suite") -} - -var numBeforeSuiteRuns = 0 -var numAfterSuiteRuns = 0 - -var _ = BeforeSuite(func() { - numBeforeSuiteRuns++ -}) - -var _ = AfterSuite(func() { - numAfterSuiteRuns++ - Ω(numBeforeSuiteRuns).Should(Equal(1)) - Ω(numAfterSuiteRuns).Should(Equal(1)) -}) - -//Fakes -type fakeTestingT struct { - didFail bool -} - -func (fakeT *fakeTestingT) Fail() { - fakeT.didFail = true -} diff --git a/vendor/github.com/onsi/ginkgo/internal/suite/suite_test.go b/vendor/github.com/onsi/ginkgo/internal/suite/suite_test.go deleted file mode 100644 index fa0ff38d..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/suite/suite_test.go +++ /dev/null @@ -1,408 +0,0 @@ -package suite_test - -import ( - "bytes" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/suite" - . "github.com/onsi/gomega" - - "math/rand" - "time" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/internal/codelocation" - Failer "github.com/onsi/ginkgo/internal/failer" - Writer "github.com/onsi/ginkgo/internal/writer" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" -) - -var _ = Describe("Suite", func() { - var ( - specSuite *Suite - fakeT *fakeTestingT - fakeR *reporters.FakeReporter - writer *Writer.FakeGinkgoWriter - failer *Failer.Failer - ) - - BeforeEach(func() { - writer = Writer.NewFake() - fakeT = &fakeTestingT{} - fakeR = reporters.NewFakeReporter() - failer = Failer.New() - specSuite = New(failer) - }) - - Describe("running a suite", func() { - var ( - runOrder []string - randomizeAllSpecs bool - randomSeed int64 - focusString string - parallelNode int - parallelTotal int - runResult bool - hasProgrammaticFocus bool - ) - - var f = func(runText string) func() { - return func() { - runOrder = append(runOrder, runText) - } - } - - BeforeEach(func() { - randomizeAllSpecs = false - randomSeed = 11 - parallelNode = 1 - parallelTotal = 1 - focusString = "" - - runOrder = make([]string, 0) - specSuite.SetBeforeSuiteNode(f("BeforeSuite"), codelocation.New(0), 0) - specSuite.PushBeforeEachNode(f("top BE"), codelocation.New(0), 0) - specSuite.PushJustBeforeEachNode(f("top JBE"), codelocation.New(0), 0) - specSuite.PushAfterEachNode(f("top AE"), codelocation.New(0), 0) - - specSuite.PushContainerNode("container", func() { - specSuite.PushBeforeEachNode(f("BE"), codelocation.New(0), 0) - specSuite.PushJustBeforeEachNode(f("JBE"), codelocation.New(0), 0) - specSuite.PushAfterEachNode(f("AE"), codelocation.New(0), 0) - specSuite.PushItNode("it", f("IT"), types.FlagTypeNone, codelocation.New(0), 0) - - specSuite.PushContainerNode("inner container", func() { - specSuite.PushItNode("inner it", f("inner IT"), types.FlagTypeNone, codelocation.New(0), 0) - }, types.FlagTypeNone, codelocation.New(0)) - }, types.FlagTypeNone, codelocation.New(0)) - - specSuite.PushContainerNode("container 2", func() { - specSuite.PushBeforeEachNode(f("BE 2"), codelocation.New(0), 0) - specSuite.PushItNode("it 2", f("IT 2"), types.FlagTypeNone, codelocation.New(0), 0) - }, types.FlagTypeNone, codelocation.New(0)) - - specSuite.PushItNode("top level it", f("top IT"), types.FlagTypeNone, codelocation.New(0), 0) - - specSuite.SetAfterSuiteNode(f("AfterSuite"), codelocation.New(0), 0) - }) - - JustBeforeEach(func() { - runResult, hasProgrammaticFocus = specSuite.Run(fakeT, "suite description", []reporters.Reporter{fakeR}, writer, config.GinkgoConfigType{ - RandomSeed: randomSeed, - RandomizeAllSpecs: randomizeAllSpecs, - FocusString: focusString, - ParallelNode: parallelNode, - ParallelTotal: parallelTotal, - }) - }) - - It("provides the config and suite description to the reporter", func() { - Ω(fakeR.Config.RandomSeed).Should(Equal(int64(randomSeed))) - Ω(fakeR.Config.RandomizeAllSpecs).Should(Equal(randomizeAllSpecs)) - Ω(fakeR.BeginSummary.SuiteDescription).Should(Equal("suite description")) - }) - - It("reports that the BeforeSuite node ran", func() { - Ω(fakeR.BeforeSuiteSummary).ShouldNot(BeNil()) - }) - - It("reports that the AfterSuite node ran", func() { - Ω(fakeR.AfterSuiteSummary).ShouldNot(BeNil()) - }) - - It("provides information about the current test", func() { - description := CurrentGinkgoTestDescription() - Ω(description.ComponentTexts).Should(Equal([]string{"Suite", "running a suite", "provides information about the current test"})) - Ω(description.FullTestText).Should(Equal("Suite running a suite provides information about the current test")) - Ω(description.TestText).Should(Equal("provides information about the current test")) - Ω(description.IsMeasurement).Should(BeFalse()) - Ω(description.FileName).Should(ContainSubstring("suite_test.go")) - Ω(description.LineNumber).Should(BeNumerically(">", 50)) - Ω(description.LineNumber).Should(BeNumerically("<", 150)) - Ω(description.Failed).Should(BeFalse()) - }) - - Measure("should run measurements", func(b Benchmarker) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - - runtime := b.Time("sleeping", func() { - sleepTime := time.Duration(r.Float64() * 0.01 * float64(time.Second)) - time.Sleep(sleepTime) - }) - Ω(runtime.Seconds()).Should(BeNumerically("<=", 1)) - Ω(runtime.Seconds()).Should(BeNumerically(">=", 0)) - - randomValue := r.Float64() * 10.0 - b.RecordValue("random value", randomValue) - Ω(randomValue).Should(BeNumerically("<=", 10.0)) - Ω(randomValue).Should(BeNumerically(">=", 0.0)) - - b.RecordValueWithPrecision("specific value", 123.4567, "ms", 2) - b.RecordValueWithPrecision("specific value", 234.5678, "ms", 2) - }, 10) - - It("creates a node hierarchy, converts it to a spec collection, and runs it", func() { - Ω(runOrder).Should(Equal([]string{ - "BeforeSuite", - "top BE", "BE", "top JBE", "JBE", "IT", "AE", "top AE", - "top BE", "BE", "top JBE", "JBE", "inner IT", "AE", "top AE", - "top BE", "BE 2", "top JBE", "IT 2", "top AE", - "top BE", "top JBE", "top IT", "top AE", - "AfterSuite", - })) - }) - - Context("when told to randomize all specs", func() { - BeforeEach(func() { - randomizeAllSpecs = true - }) - - It("does", func() { - Ω(runOrder).Should(Equal([]string{ - "BeforeSuite", - "top BE", "top JBE", "top IT", "top AE", - "top BE", "BE", "top JBE", "JBE", "inner IT", "AE", "top AE", - "top BE", "BE", "top JBE", "JBE", "IT", "AE", "top AE", - "top BE", "BE 2", "top JBE", "IT 2", "top AE", - "AfterSuite", - })) - }) - }) - - Describe("with ginkgo.parallel.total > 1", func() { - BeforeEach(func() { - parallelTotal = 2 - randomizeAllSpecs = true - }) - - Context("for one worker", func() { - BeforeEach(func() { - parallelNode = 1 - }) - - It("should run a subset of tests", func() { - Ω(runOrder).Should(Equal([]string{ - "BeforeSuite", - "top BE", "top JBE", "top IT", "top AE", - "top BE", "BE", "top JBE", "JBE", "inner IT", "AE", "top AE", - "AfterSuite", - })) - }) - }) - - Context("for another worker", func() { - BeforeEach(func() { - parallelNode = 2 - }) - - It("should run a (different) subset of tests", func() { - Ω(runOrder).Should(Equal([]string{ - "BeforeSuite", - "top BE", "BE", "top JBE", "JBE", "IT", "AE", "top AE", - "top BE", "BE 2", "top JBE", "IT 2", "top AE", - "AfterSuite", - })) - }) - }) - }) - - Context("when provided with a filter", func() { - BeforeEach(func() { - focusString = `inner|\d` - }) - - It("converts the filter to a regular expression and uses it to filter the running specs", func() { - Ω(runOrder).Should(Equal([]string{ - "BeforeSuite", - "top BE", "BE", "top JBE", "JBE", "inner IT", "AE", "top AE", - "top BE", "BE 2", "top JBE", "IT 2", "top AE", - "AfterSuite", - })) - }) - - It("should not report a programmatic focus", func() { - Ω(hasProgrammaticFocus).Should(BeFalse()) - }) - }) - - Context("with a programatically focused spec", func() { - BeforeEach(func() { - specSuite.PushItNode("focused it", f("focused it"), types.FlagTypeFocused, codelocation.New(0), 0) - - specSuite.PushContainerNode("focused container", func() { - specSuite.PushItNode("inner focused it", f("inner focused it"), types.FlagTypeFocused, codelocation.New(0), 0) - specSuite.PushItNode("inner unfocused it", f("inner unfocused it"), types.FlagTypeNone, codelocation.New(0), 0) - }, types.FlagTypeFocused, codelocation.New(0)) - - }) - - It("should only run the focused test, applying backpropagation to favor most deeply focused leaf nodes", func() { - Ω(runOrder).Should(Equal([]string{ - "BeforeSuite", - "top BE", "top JBE", "focused it", "top AE", - "top BE", "top JBE", "inner focused it", "top AE", - "AfterSuite", - })) - }) - - It("should report a programmatic focus", func() { - Ω(hasProgrammaticFocus).Should(BeTrue()) - }) - }) - - Context("when the specs pass", func() { - It("doesn't report a failure", func() { - Ω(fakeT.didFail).Should(BeFalse()) - }) - - It("should return true", func() { - Ω(runResult).Should(BeTrue()) - }) - }) - - Context("when a spec fails", func() { - var location types.CodeLocation - BeforeEach(func() { - specSuite.PushItNode("top level it", func() { - location = codelocation.New(0) - failer.Fail("oops!", location) - }, types.FlagTypeNone, codelocation.New(0), 0) - }) - - It("should return false", func() { - Ω(runResult).Should(BeFalse()) - }) - - It("reports a failure", func() { - Ω(fakeT.didFail).Should(BeTrue()) - }) - - It("generates the correct failure data", func() { - Ω(fakeR.SpecSummaries[0].Failure.Message).Should(Equal("oops!")) - Ω(fakeR.SpecSummaries[0].Failure.Location).Should(Equal(location)) - }) - }) - - Context("when runnable nodes are nested within other runnable nodes", func() { - Context("when an It is nested", func() { - BeforeEach(func() { - specSuite.PushItNode("top level it", func() { - specSuite.PushItNode("nested it", f("oops"), types.FlagTypeNone, codelocation.New(0), 0) - }, types.FlagTypeNone, codelocation.New(0), 0) - }) - - It("should fail", func() { - Ω(fakeT.didFail).Should(BeTrue()) - }) - }) - - Context("when a Measure is nested", func() { - BeforeEach(func() { - specSuite.PushItNode("top level it", func() { - specSuite.PushMeasureNode("nested measure", func(Benchmarker) {}, types.FlagTypeNone, codelocation.New(0), 10) - }, types.FlagTypeNone, codelocation.New(0), 0) - }) - - It("should fail", func() { - Ω(fakeT.didFail).Should(BeTrue()) - }) - }) - - Context("when a BeforeEach is nested", func() { - BeforeEach(func() { - specSuite.PushItNode("top level it", func() { - specSuite.PushBeforeEachNode(f("nested bef"), codelocation.New(0), 0) - }, types.FlagTypeNone, codelocation.New(0), 0) - }) - - It("should fail", func() { - Ω(fakeT.didFail).Should(BeTrue()) - }) - }) - - Context("when a JustBeforeEach is nested", func() { - BeforeEach(func() { - specSuite.PushItNode("top level it", func() { - specSuite.PushJustBeforeEachNode(f("nested jbef"), codelocation.New(0), 0) - }, types.FlagTypeNone, codelocation.New(0), 0) - }) - - It("should fail", func() { - Ω(fakeT.didFail).Should(BeTrue()) - }) - }) - - Context("when a AfterEach is nested", func() { - BeforeEach(func() { - specSuite.PushItNode("top level it", func() { - specSuite.PushAfterEachNode(f("nested aft"), codelocation.New(0), 0) - }, types.FlagTypeNone, codelocation.New(0), 0) - }) - - It("should fail", func() { - Ω(fakeT.didFail).Should(BeTrue()) - }) - }) - }) - }) - - Describe("BeforeSuite", func() { - Context("when setting BeforeSuite more than once", func() { - It("should panic", func() { - specSuite.SetBeforeSuiteNode(func() {}, codelocation.New(0), 0) - - Ω(func() { - specSuite.SetBeforeSuiteNode(func() {}, codelocation.New(0), 0) - }).Should(Panic()) - - }) - }) - }) - - Describe("AfterSuite", func() { - Context("when setting AfterSuite more than once", func() { - It("should panic", func() { - specSuite.SetAfterSuiteNode(func() {}, codelocation.New(0), 0) - - Ω(func() { - specSuite.SetAfterSuiteNode(func() {}, codelocation.New(0), 0) - }).Should(Panic()) - }) - }) - }) - - Describe("By", func() { - It("writes to the GinkgoWriter", func() { - originalGinkgoWriter := GinkgoWriter - buffer := &bytes.Buffer{} - - GinkgoWriter = buffer - By("Saying Hello GinkgoWriter") - GinkgoWriter = originalGinkgoWriter - - Ω(buffer.String()).Should(ContainSubstring("STEP")) - Ω(buffer.String()).Should(ContainSubstring(": Saying Hello GinkgoWriter\n")) - }) - - It("calls the passed-in callback if present", func() { - a := 0 - By("calling the callback", func() { - a = 1 - }) - Ω(a).Should(Equal(1)) - }) - - It("panics if there is more than one callback", func() { - Ω(func() { - By("registering more than one callback", func() {}, func() {}) - }).Should(Panic()) - }) - }) - - Describe("GinkgoRandomSeed", func() { - It("returns the current config's random seed", func() { - Ω(GinkgoRandomSeed()).Should(Equal(config.GinkgoConfig.RandomSeed)) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go b/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go index ac6540f0..6739c3f6 100644 --- a/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go +++ b/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go @@ -26,6 +26,11 @@ 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 index 7678fc1d..98eca3bd 100644 --- a/vendor/github.com/onsi/ginkgo/internal/writer/writer.go +++ b/vendor/github.com/onsi/ginkgo/internal/writer/writer.go @@ -12,13 +12,15 @@ type WriterInterface interface { Truncate() DumpOut() DumpOutWithHeader(header string) + Bytes() []byte } type Writer struct { - buffer *bytes.Buffer - outWriter io.Writer - lock *sync.Mutex - stream bool + buffer *bytes.Buffer + outWriter io.Writer + lock *sync.Mutex + stream bool + redirector io.Writer } func New(outWriter io.Writer) *Writer { @@ -30,6 +32,10 @@ func New(outWriter io.Writer) *Writer { } } +func (w *Writer) AndRedirectTo(writer io.Writer) { + w.redirector = writer +} + func (w *Writer) SetStream(stream bool) { w.lock.Lock() defer w.lock.Unlock() @@ -40,11 +46,14 @@ 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.redirector != nil { + w.redirector.Write(b) + } if w.stream { return w.outWriter.Write(b) - } else { - return w.buffer.Write(b) } + return n, err } func (w *Writer) Truncate() { @@ -61,6 +70,15 @@ func (w *Writer) DumpOut() { } } +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() diff --git a/vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go deleted file mode 100644 index e2065779..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package writer_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestWriter(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Writer Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go b/vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go deleted file mode 100644 index 3e1d17c6..00000000 --- a/vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go +++ /dev/null @@ -1,75 +0,0 @@ -package writer_test - -import ( - "github.com/onsi/gomega/gbytes" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/internal/writer" - . "github.com/onsi/gomega" -) - -var _ = Describe("Writer", func() { - var writer *Writer - var out *gbytes.Buffer - - BeforeEach(func() { - out = gbytes.NewBuffer() - writer = New(out) - }) - - It("should stream directly to the outbuffer by default", func() { - writer.Write([]byte("foo")) - Ω(out).Should(gbytes.Say("foo")) - }) - - It("should not emit the header when asked to DumpOutWitHeader", func() { - writer.Write([]byte("foo")) - writer.DumpOutWithHeader("my header") - Ω(out).ShouldNot(gbytes.Say("my header")) - Ω(out).Should(gbytes.Say("foo")) - }) - - Context("when told not to stream", func() { - BeforeEach(func() { - writer.SetStream(false) - }) - - It("should only write to the buffer when told to DumpOut", func() { - writer.Write([]byte("foo")) - Ω(out).ShouldNot(gbytes.Say("foo")) - writer.DumpOut() - Ω(out).Should(gbytes.Say("foo")) - }) - - It("should truncate the internal buffer when told to truncate", func() { - writer.Write([]byte("foo")) - writer.Truncate() - writer.DumpOut() - Ω(out).ShouldNot(gbytes.Say("foo")) - - writer.Write([]byte("bar")) - writer.DumpOut() - Ω(out).Should(gbytes.Say("bar")) - }) - - Describe("emitting a header", func() { - Context("when the buffer has content", func() { - It("should emit the header followed by the content", func() { - writer.Write([]byte("foo")) - writer.DumpOutWithHeader("my header") - - Ω(out).Should(gbytes.Say("my header")) - Ω(out).Should(gbytes.Say("foo")) - }) - }) - - Context("when the buffer has no content", func() { - It("should not emit the header", func() { - writer.DumpOutWithHeader("my header") - - Ω(out).ShouldNot(gbytes.Say("my header")) - }) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go index 044d2dfd..ac58dd5f 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go +++ b/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go @@ -29,9 +29,10 @@ func NewDefaultReporter(config config.DefaultReporterConfigType, stenographer st 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, summary.NumberOfTotalSpecs, summary.NumberOfSpecsBeforeParallelization, reporter.config.Succinct) + reporter.stenographer.AnnounceParallelRun(config.ParallelNode, config.ParallelTotal, reporter.config.Succinct) + } else { + reporter.stenographer.AnnounceNumberOfSpecs(summary.NumberOfSpecsThatWillBeRun, summary.NumberOfTotalSpecs, reporter.config.Succinct) } - reporter.stenographer.AnnounceNumberOfSpecs(summary.NumberOfSpecsThatWillBeRun, summary.NumberOfTotalSpecs, reporter.config.Succinct) } func (reporter *DefaultReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { @@ -65,7 +66,7 @@ func (reporter *DefaultReporter) SpecDidComplete(specSummary *types.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.FullTrace) + 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: diff --git a/vendor/github.com/onsi/ginkgo/reporters/default_reporter_test.go b/vendor/github.com/onsi/ginkgo/reporters/default_reporter_test.go deleted file mode 100644 index 7a877e86..00000000 --- a/vendor/github.com/onsi/ginkgo/reporters/default_reporter_test.go +++ /dev/null @@ -1,415 +0,0 @@ -package reporters_test - -import ( - "time" - - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/reporters" - st "github.com/onsi/ginkgo/reporters/stenographer" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" -) - -var _ = Describe("DefaultReporter", func() { - var ( - reporter *reporters.DefaultReporter - reporterConfig config.DefaultReporterConfigType - stenographer *st.FakeStenographer - - ginkgoConfig config.GinkgoConfigType - suite *types.SuiteSummary - spec *types.SpecSummary - ) - - BeforeEach(func() { - stenographer = st.NewFakeStenographer() - reporterConfig = config.DefaultReporterConfigType{ - NoColor: false, - SlowSpecThreshold: 0.1, - NoisyPendings: false, - Verbose: true, - FullTrace: true, - } - - reporter = reporters.NewDefaultReporter(reporterConfig, stenographer) - }) - - call := func(method string, args ...interface{}) st.FakeStenographerCall { - return st.NewFakeStenographerCall(method, args...) - } - - Describe("SpecSuiteWillBegin", func() { - BeforeEach(func() { - suite = &types.SuiteSummary{ - SuiteDescription: "A Sweet Suite", - NumberOfTotalSpecs: 10, - NumberOfSpecsThatWillBeRun: 8, - } - - ginkgoConfig = config.GinkgoConfigType{ - RandomSeed: 1138, - RandomizeAllSpecs: true, - } - }) - - Context("when a serial (non-parallel) suite begins", func() { - BeforeEach(func() { - ginkgoConfig.ParallelTotal = 1 - - reporter.SpecSuiteWillBegin(ginkgoConfig, suite) - }) - - It("should announce the suite, then announce the number of specs", func() { - Ω(stenographer.Calls()).Should(HaveLen(2)) - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuite", "A Sweet Suite", ginkgoConfig.RandomSeed, true, false))) - Ω(stenographer.Calls()[1]).Should(Equal(call("AnnounceNumberOfSpecs", 8, 10, false))) - }) - }) - - Context("when a parallel suite begins", func() { - BeforeEach(func() { - ginkgoConfig.ParallelTotal = 2 - ginkgoConfig.ParallelNode = 1 - suite.NumberOfSpecsBeforeParallelization = 20 - - reporter.SpecSuiteWillBegin(ginkgoConfig, suite) - }) - - It("should announce the suite, announce that it's a parallel run, then announce the number of specs", func() { - Ω(stenographer.Calls()).Should(HaveLen(3)) - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuite", "A Sweet Suite", ginkgoConfig.RandomSeed, true, false))) - Ω(stenographer.Calls()[1]).Should(Equal(call("AnnounceParallelRun", 1, 2, 10, 20, false))) - Ω(stenographer.Calls()[2]).Should(Equal(call("AnnounceNumberOfSpecs", 8, 10, false))) - }) - }) - }) - - Describe("BeforeSuiteDidRun", func() { - Context("when the BeforeSuite passes", func() { - It("should announce nothing", func() { - reporter.BeforeSuiteDidRun(&types.SetupSummary{ - State: types.SpecStatePassed, - }) - - Ω(stenographer.Calls()).Should(BeEmpty()) - }) - }) - - Context("when the BeforeSuite fails", func() { - It("should announce the failure", func() { - summary := &types.SetupSummary{ - State: types.SpecStateFailed, - } - reporter.BeforeSuiteDidRun(summary) - - Ω(stenographer.Calls()).Should(HaveLen(1)) - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceBeforeSuiteFailure", summary, false, true))) - }) - }) - }) - - Describe("AfterSuiteDidRun", func() { - Context("when the AfterSuite passes", func() { - It("should announce nothing", func() { - reporter.AfterSuiteDidRun(&types.SetupSummary{ - State: types.SpecStatePassed, - }) - - Ω(stenographer.Calls()).Should(BeEmpty()) - }) - }) - - Context("when the AfterSuite fails", func() { - It("should announce the failure", func() { - summary := &types.SetupSummary{ - State: types.SpecStateFailed, - } - reporter.AfterSuiteDidRun(summary) - - Ω(stenographer.Calls()).Should(HaveLen(1)) - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceAfterSuiteFailure", summary, false, true))) - }) - }) - }) - - Describe("SpecWillRun", func() { - Context("When running in verbose mode", func() { - Context("and the spec will run", func() { - BeforeEach(func() { - spec = &types.SpecSummary{} - reporter.SpecWillRun(spec) - }) - - It("should announce that the spec will run", func() { - Ω(stenographer.Calls()).Should(HaveLen(1)) - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSpecWillRun", spec))) - }) - }) - - Context("and the spec will not run", func() { - Context("because it is pending", func() { - BeforeEach(func() { - spec = &types.SpecSummary{ - State: types.SpecStatePending, - } - reporter.SpecWillRun(spec) - }) - - It("should announce nothing", func() { - Ω(stenographer.Calls()).Should(BeEmpty()) - }) - }) - - Context("because it is skipped", func() { - BeforeEach(func() { - spec = &types.SpecSummary{ - State: types.SpecStateSkipped, - } - reporter.SpecWillRun(spec) - }) - - It("should announce nothing", func() { - Ω(stenographer.Calls()).Should(BeEmpty()) - }) - }) - }) - }) - - Context("When running in verbose & succinct mode", func() { - BeforeEach(func() { - reporterConfig.Succinct = true - reporter = reporters.NewDefaultReporter(reporterConfig, stenographer) - spec = &types.SpecSummary{} - reporter.SpecWillRun(spec) - }) - - It("should announce nothing", func() { - Ω(stenographer.Calls()).Should(BeEmpty()) - }) - }) - - Context("When not running in verbose mode", func() { - BeforeEach(func() { - reporterConfig.Verbose = false - reporter = reporters.NewDefaultReporter(reporterConfig, stenographer) - spec = &types.SpecSummary{} - reporter.SpecWillRun(spec) - }) - - It("should announce nothing", func() { - Ω(stenographer.Calls()).Should(BeEmpty()) - }) - }) - }) - - Describe("SpecDidComplete", func() { - JustBeforeEach(func() { - reporter.SpecDidComplete(spec) - }) - - BeforeEach(func() { - spec = &types.SpecSummary{} - }) - - Context("When the spec passed", func() { - BeforeEach(func() { - spec.State = types.SpecStatePassed - }) - - Context("When the spec was a measurement", func() { - BeforeEach(func() { - spec.IsMeasurement = true - }) - - It("should announce the measurement", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuccesfulMeasurement", spec, false))) - }) - }) - - Context("When the spec is slow", func() { - BeforeEach(func() { - spec.RunTime = time.Second - }) - - It("should announce that it was slow", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuccesfulSlowSpec", spec, false))) - }) - }) - - Context("Otherwise", func() { - It("should announce the succesful spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuccesfulSpec", spec))) - }) - }) - }) - - Context("When the spec is pending", func() { - BeforeEach(func() { - spec.State = types.SpecStatePending - }) - - It("should announce the pending spec, succinctly", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnouncePendingSpec", spec, false))) - }) - }) - - Context("When the spec is skipped", func() { - BeforeEach(func() { - spec.State = types.SpecStateSkipped - }) - - It("should announce the skipped spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSkippedSpec", spec, false, true))) - }) - }) - - Context("When the spec timed out", func() { - BeforeEach(func() { - spec.State = types.SpecStateTimedOut - }) - - It("should announce the timedout spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSpecTimedOut", spec, false, true))) - }) - }) - - Context("When the spec panicked", func() { - BeforeEach(func() { - spec.State = types.SpecStatePanicked - }) - - It("should announce the panicked spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSpecPanicked", spec, false, true))) - }) - }) - - Context("When the spec failed", func() { - BeforeEach(func() { - spec.State = types.SpecStateFailed - }) - - It("should announce the failed spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSpecFailed", spec, false, true))) - }) - }) - - Context("in noisy pendings mode", func() { - BeforeEach(func() { - reporterConfig.Succinct = false - reporterConfig.NoisyPendings = true - reporter = reporters.NewDefaultReporter(reporterConfig, stenographer) - }) - - Context("When the spec is pending", func() { - BeforeEach(func() { - spec.State = types.SpecStatePending - }) - - It("should announce the pending spec, noisily", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnouncePendingSpec", spec, true))) - }) - }) - }) - - Context("in succinct mode", func() { - BeforeEach(func() { - reporterConfig.Succinct = true - reporter = reporters.NewDefaultReporter(reporterConfig, stenographer) - }) - - Context("When the spec passed", func() { - BeforeEach(func() { - spec.State = types.SpecStatePassed - }) - - Context("When the spec was a measurement", func() { - BeforeEach(func() { - spec.IsMeasurement = true - }) - - It("should announce the measurement", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuccesfulMeasurement", spec, true))) - }) - }) - - Context("When the spec is slow", func() { - BeforeEach(func() { - spec.RunTime = time.Second - }) - - It("should announce that it was slow", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuccesfulSlowSpec", spec, true))) - }) - }) - - Context("Otherwise", func() { - It("should announce the succesful spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSuccesfulSpec", spec))) - }) - }) - }) - - Context("When the spec is pending", func() { - BeforeEach(func() { - spec.State = types.SpecStatePending - }) - - It("should announce the pending spec, succinctly", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnouncePendingSpec", spec, false))) - }) - }) - - Context("When the spec is skipped", func() { - BeforeEach(func() { - spec.State = types.SpecStateSkipped - }) - - It("should announce the skipped spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSkippedSpec", spec, true, true))) - }) - }) - - Context("When the spec timed out", func() { - BeforeEach(func() { - spec.State = types.SpecStateTimedOut - }) - - It("should announce the timedout spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSpecTimedOut", spec, true, true))) - }) - }) - - Context("When the spec panicked", func() { - BeforeEach(func() { - spec.State = types.SpecStatePanicked - }) - - It("should announce the panicked spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSpecPanicked", spec, true, true))) - }) - }) - - Context("When the spec failed", func() { - BeforeEach(func() { - spec.State = types.SpecStateFailed - }) - - It("should announce the failed spec", func() { - Ω(stenographer.Calls()[0]).Should(Equal(call("AnnounceSpecFailed", spec, true, true))) - }) - }) - }) - }) - - Describe("SpecSuiteDidEnd", func() { - BeforeEach(func() { - suite = &types.SuiteSummary{} - reporter.SpecSuiteDidEnd(suite) - }) - - It("should announce the spec run's completion", func() { - Ω(stenographer.Calls()[1]).Should(Equal(call("AnnounceSpecRunCompletion", suite, false))) - }) - }) -}) diff --git a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go index 6cfe390b..65b8964e 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go +++ b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go @@ -11,17 +11,21 @@ package reporters import ( "encoding/xml" "fmt" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" + "math" "os" "strings" + + "github.com/onsi/ginkgo/config" + "github.com/onsi/ginkgo/types" ) type JUnitTestSuite struct { XMLName xml.Name `xml:"testsuite"` TestCases []JUnitTestCase `xml:"testcase"` + Name string `xml:"name,attr"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` + Errors int `xml:"errors,attr"` Time float64 `xml:"time,attr"` } @@ -31,6 +35,7 @@ type JUnitTestCase struct { FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"` Skipped *JUnitSkipped `xml:"skipped,omitempty"` Time float64 `xml:"time,attr"` + SystemOut string `xml:"system-out,omitempty"` } type JUnitFailureMessage struct { @@ -57,7 +62,7 @@ func NewJUnitReporter(filename string) *JUnitReporter { func (reporter *JUnitReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) { reporter.suite = JUnitTestSuite{ - Tests: summary.NumberOfSpecsThatWillBeRun, + Name: summary.SuiteDescription, TestCases: []JUnitTestCase{}, } reporter.testSuiteName = summary.SuiteDescription @@ -89,6 +94,7 @@ func (reporter *JUnitReporter) handleSetupSummary(name string, setupSummary *typ 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) } @@ -104,6 +110,7 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) { 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{} @@ -113,8 +120,10 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) { } func (reporter *JUnitReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { - reporter.suite.Time = summary.RunTime.Seconds() + reporter.suite.Tests = summary.NumberOfSpecsThatWillBeRun + reporter.suite.Time = math.Trunc(summary.RunTime.Seconds() * 1000 / 1000) reporter.suite.Failures = summary.NumberOfFailedSpecs + reporter.suite.Errors = 0 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()) diff --git a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go deleted file mode 100644 index 37a6daab..00000000 --- a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go +++ /dev/null @@ -1,247 +0,0 @@ -package reporters_test - -import ( - "encoding/xml" - "io/ioutil" - "os" - "time" - - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" -) - -var _ = Describe("JUnit Reporter", func() { - var ( - outputFile string - reporter Reporter - ) - - readOutputFile := func() reporters.JUnitTestSuite { - bytes, err := ioutil.ReadFile(outputFile) - Ω(err).ShouldNot(HaveOccurred()) - var suite reporters.JUnitTestSuite - err = xml.Unmarshal(bytes, &suite) - Ω(err).ShouldNot(HaveOccurred()) - return suite - } - - BeforeEach(func() { - f, err := ioutil.TempFile("", "output") - Ω(err).ShouldNot(HaveOccurred()) - f.Close() - outputFile = f.Name() - - reporter = reporters.NewJUnitReporter(outputFile) - - reporter.SpecSuiteWillBegin(config.GinkgoConfigType{}, &types.SuiteSummary{ - SuiteDescription: "My test suite", - NumberOfSpecsThatWillBeRun: 1, - }) - }) - - AfterEach(func() { - os.RemoveAll(outputFile) - }) - - Describe("a passing test", func() { - BeforeEach(func() { - beforeSuite := &types.SetupSummary{ - State: types.SpecStatePassed, - } - reporter.BeforeSuiteDidRun(beforeSuite) - - afterSuite := &types.SetupSummary{ - State: types.SpecStatePassed, - } - reporter.AfterSuiteDidRun(afterSuite) - - spec := &types.SpecSummary{ - ComponentTexts: []string{"[Top Level]", "A", "B", "C"}, - State: types.SpecStatePassed, - RunTime: 5 * time.Second, - } - reporter.SpecWillRun(spec) - reporter.SpecDidComplete(spec) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 0, - RunTime: 10 * time.Second, - }) - }) - - It("should record the test as passing", func() { - output := readOutputFile() - Ω(output.Tests).Should(Equal(1)) - Ω(output.Failures).Should(Equal(0)) - Ω(output.Time).Should(Equal(10.0)) - Ω(output.TestCases).Should(HaveLen(1)) - Ω(output.TestCases[0].Name).Should(Equal("A B C")) - Ω(output.TestCases[0].ClassName).Should(Equal("My test suite")) - Ω(output.TestCases[0].FailureMessage).Should(BeNil()) - Ω(output.TestCases[0].Skipped).Should(BeNil()) - Ω(output.TestCases[0].Time).Should(Equal(5.0)) - }) - }) - - Describe("when the BeforeSuite fails", func() { - var beforeSuite *types.SetupSummary - - BeforeEach(func() { - beforeSuite = &types.SetupSummary{ - State: types.SpecStateFailed, - RunTime: 3 * time.Second, - Failure: types.SpecFailure{ - Message: "failed to setup", - ComponentCodeLocation: codelocation.New(0), - Location: codelocation.New(2), - }, - } - reporter.BeforeSuiteDidRun(beforeSuite) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 1, - RunTime: 10 * time.Second, - }) - }) - - It("should record the test as having failed", func() { - output := readOutputFile() - Ω(output.Tests).Should(Equal(1)) - Ω(output.Failures).Should(Equal(1)) - Ω(output.Time).Should(Equal(10.0)) - Ω(output.TestCases[0].Name).Should(Equal("BeforeSuite")) - Ω(output.TestCases[0].Time).Should(Equal(3.0)) - Ω(output.TestCases[0].ClassName).Should(Equal("My test suite")) - Ω(output.TestCases[0].FailureMessage.Type).Should(Equal("Failure")) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring("failed to setup")) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring(beforeSuite.Failure.ComponentCodeLocation.String())) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring(beforeSuite.Failure.Location.String())) - Ω(output.TestCases[0].Skipped).Should(BeNil()) - }) - }) - - Describe("when the AfterSuite fails", func() { - var afterSuite *types.SetupSummary - - BeforeEach(func() { - afterSuite = &types.SetupSummary{ - State: types.SpecStateFailed, - RunTime: 3 * time.Second, - Failure: types.SpecFailure{ - Message: "failed to setup", - ComponentCodeLocation: codelocation.New(0), - Location: codelocation.New(2), - }, - } - reporter.AfterSuiteDidRun(afterSuite) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 1, - RunTime: 10 * time.Second, - }) - }) - - It("should record the test as having failed", func() { - output := readOutputFile() - Ω(output.Tests).Should(Equal(1)) - Ω(output.Failures).Should(Equal(1)) - Ω(output.Time).Should(Equal(10.0)) - Ω(output.TestCases[0].Name).Should(Equal("AfterSuite")) - Ω(output.TestCases[0].Time).Should(Equal(3.0)) - Ω(output.TestCases[0].ClassName).Should(Equal("My test suite")) - Ω(output.TestCases[0].FailureMessage.Type).Should(Equal("Failure")) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring("failed to setup")) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring(afterSuite.Failure.ComponentCodeLocation.String())) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring(afterSuite.Failure.Location.String())) - Ω(output.TestCases[0].Skipped).Should(BeNil()) - }) - }) - - specStateCases := []struct { - state types.SpecState - message string - }{ - {types.SpecStateFailed, "Failure"}, - {types.SpecStateTimedOut, "Timeout"}, - {types.SpecStatePanicked, "Panic"}, - } - - for _, specStateCase := range specStateCases { - specStateCase := specStateCase - Describe("a failing test", func() { - var spec *types.SpecSummary - BeforeEach(func() { - spec = &types.SpecSummary{ - ComponentTexts: []string{"[Top Level]", "A", "B", "C"}, - State: specStateCase.state, - RunTime: 5 * time.Second, - Failure: types.SpecFailure{ - ComponentCodeLocation: codelocation.New(0), - Location: codelocation.New(2), - Message: "I failed", - }, - } - reporter.SpecWillRun(spec) - reporter.SpecDidComplete(spec) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 1, - RunTime: 10 * time.Second, - }) - }) - - It("should record test as failing", func() { - output := readOutputFile() - Ω(output.Tests).Should(Equal(1)) - Ω(output.Failures).Should(Equal(1)) - Ω(output.Time).Should(Equal(10.0)) - Ω(output.TestCases[0].Name).Should(Equal("A B C")) - Ω(output.TestCases[0].ClassName).Should(Equal("My test suite")) - Ω(output.TestCases[0].FailureMessage.Type).Should(Equal(specStateCase.message)) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring("I failed")) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring(spec.Failure.ComponentCodeLocation.String())) - Ω(output.TestCases[0].FailureMessage.Message).Should(ContainSubstring(spec.Failure.Location.String())) - Ω(output.TestCases[0].Skipped).Should(BeNil()) - }) - }) - } - - for _, specStateCase := range []types.SpecState{types.SpecStatePending, types.SpecStateSkipped} { - specStateCase := specStateCase - Describe("a skipped test", func() { - var spec *types.SpecSummary - BeforeEach(func() { - spec = &types.SpecSummary{ - ComponentTexts: []string{"[Top Level]", "A", "B", "C"}, - State: specStateCase, - RunTime: 5 * time.Second, - } - reporter.SpecWillRun(spec) - reporter.SpecDidComplete(spec) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 0, - RunTime: 10 * time.Second, - }) - }) - - It("should record test as failing", func() { - output := readOutputFile() - Ω(output.Tests).Should(Equal(1)) - Ω(output.Failures).Should(Equal(0)) - Ω(output.Time).Should(Equal(10.0)) - Ω(output.TestCases[0].Name).Should(Equal("A B C")) - Ω(output.TestCases[0].Skipped).ShouldNot(BeNil()) - }) - }) - } -}) diff --git a/vendor/github.com/onsi/ginkgo/reporters/reporters_suite_test.go b/vendor/github.com/onsi/ginkgo/reporters/reporters_suite_test.go deleted file mode 100644 index cec5a4db..00000000 --- a/vendor/github.com/onsi/ginkgo/reporters/reporters_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package reporters_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestReporters(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Reporters Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go index 1ff6104c..98854e7d 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go +++ b/vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go @@ -74,14 +74,18 @@ func (stenographer *FakeStenographer) AnnounceAggregatedParallelRun(nodes int, s stenographer.registerCall("AnnounceAggregatedParallelRun", nodes, succinct) } -func (stenographer *FakeStenographer) AnnounceParallelRun(node int, nodes int, specsToRun int, totalSpecs int, succinct bool) { - stenographer.registerCall("AnnounceParallelRun", node, nodes, specsToRun, totalSpecs, 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) } diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go index e1d0a8c0..601c74d6 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go +++ b/vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go @@ -12,7 +12,6 @@ import ( "runtime" "strings" - "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable" "github.com/onsi/ginkgo/types" ) @@ -37,7 +36,8 @@ const ( type Stenographer interface { AnnounceSuite(description string, randomSeed int64, randomizingAll bool, succinct bool) AnnounceAggregatedParallelRun(nodes int, succinct bool) - AnnounceParallelRun(node int, nodes int, specsToRun int, totalSpecs 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) @@ -61,7 +61,7 @@ type Stenographer interface { SummarizeFailures(summaries []*types.SpecSummary) } -func New(color bool, enableFlakes bool) Stenographer { +func New(color bool, enableFlakes bool, writer io.Writer) Stenographer { denoter := "•" if runtime.GOOS == "windows" { denoter = "+" @@ -71,7 +71,7 @@ func New(color bool, enableFlakes bool) Stenographer { denoter: denoter, cursorState: cursorStateTop, enableFlakes: enableFlakes, - w: colorable.NewColorableStdout(), + w: writer, } } @@ -98,17 +98,15 @@ func (s *consoleStenographer) AnnounceSuite(description string, randomSeed int64 s.printNewLine() } -func (s *consoleStenographer) AnnounceParallelRun(node int, nodes int, specsToRun int, totalSpecs int, succinct bool) { +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. Assigned %s of %s specs.", + "Parallel test node %s/%s.", s.colorize(boldStyle, "%d", node), s.colorize(boldStyle, "%d", nodes), - s.colorize(boldStyle, "%d", specsToRun), - s.colorize(boldStyle, "%d", totalSpecs), ) s.printNewLine() } @@ -140,6 +138,20 @@ func (s *consoleStenographer) AnnounceNumberOfSpecs(specsToRun int, total int, s 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) @@ -165,7 +177,7 @@ func (s *consoleStenographer) AnnounceSpecRunCompletion(summary *types.SuiteSumm } s.print(0, - "%s -- %s | %s | %s | %s ", + "%s -- %s | %s | %s | %s\n", status, s.colorize(greenColor+boldStyle, "%d Passed", summary.NumberOfPassedSpecs), s.colorize(redColor+boldStyle, "%d Failed", summary.NumberOfFailedSpecs)+flakes, diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/README.md b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/README.md deleted file mode 100644 index 37de454f..00000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/README.md +++ /dev/null @@ -1,6 +0,0 @@ -## Colorize Windows - -These packages are used for colorize on Windows and contributed by mattn.jp@gmail.com - - * go-colorable: - * go-isatty: diff --git a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go index 657dfe72..36ee2a60 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go +++ b/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go @@ -10,10 +10,11 @@ package reporters import ( "fmt" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" "io" "strings" + + "github.com/onsi/ginkgo/config" + "github.com/onsi/ginkgo/types" ) const ( diff --git a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter_test.go b/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter_test.go deleted file mode 100644 index de877321..00000000 --- a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter_test.go +++ /dev/null @@ -1,213 +0,0 @@ -package reporters_test - -import ( - "bytes" - "fmt" - . "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" - . "github.com/onsi/gomega" - "time" -) - -var _ = Describe("TeamCity Reporter", func() { - var ( - buffer bytes.Buffer - reporter Reporter - ) - - BeforeEach(func() { - buffer.Truncate(0) - reporter = reporters.NewTeamCityReporter(&buffer) - reporter.SpecSuiteWillBegin(config.GinkgoConfigType{}, &types.SuiteSummary{ - SuiteDescription: "Foo's test suite", - NumberOfSpecsThatWillBeRun: 1, - }) - }) - - Describe("a passing test", func() { - BeforeEach(func() { - beforeSuite := &types.SetupSummary{ - State: types.SpecStatePassed, - } - reporter.BeforeSuiteDidRun(beforeSuite) - - afterSuite := &types.SetupSummary{ - State: types.SpecStatePassed, - } - reporter.AfterSuiteDidRun(afterSuite) - - spec := &types.SpecSummary{ - ComponentTexts: []string{"[Top Level]", "A", "B", "C"}, - State: types.SpecStatePassed, - RunTime: 5 * time.Second, - } - reporter.SpecWillRun(spec) - reporter.SpecDidComplete(spec) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 0, - RunTime: 10 * time.Second, - }) - }) - - It("should record the test as passing", func() { - actual := buffer.String() - expected := - "##teamcity[testSuiteStarted name='Foo|'s test suite']" + - "##teamcity[testStarted name='A B C']" + - "##teamcity[testFinished name='A B C' duration='5000']" + - "##teamcity[testSuiteFinished name='Foo|'s test suite']" - Ω(actual).Should(Equal(expected)) - }) - }) - - Describe("when the BeforeSuite fails", func() { - var beforeSuite *types.SetupSummary - - BeforeEach(func() { - beforeSuite = &types.SetupSummary{ - State: types.SpecStateFailed, - RunTime: 3 * time.Second, - Failure: types.SpecFailure{ - Message: "failed to setup\n", - ComponentCodeLocation: codelocation.New(0), - }, - } - reporter.BeforeSuiteDidRun(beforeSuite) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 1, - RunTime: 10 * time.Second, - }) - }) - - It("should record the test as having failed", func() { - actual := buffer.String() - expected := fmt.Sprintf( - "##teamcity[testSuiteStarted name='Foo|'s test suite']"+ - "##teamcity[testStarted name='BeforeSuite']"+ - "##teamcity[testFailed name='BeforeSuite' message='%s' details='failed to setup|n']"+ - "##teamcity[testFinished name='BeforeSuite' duration='3000']"+ - "##teamcity[testSuiteFinished name='Foo|'s test suite']", beforeSuite.Failure.ComponentCodeLocation.String(), - ) - Ω(actual).Should(Equal(expected)) - }) - }) - - Describe("when the AfterSuite fails", func() { - var afterSuite *types.SetupSummary - - BeforeEach(func() { - afterSuite = &types.SetupSummary{ - State: types.SpecStateFailed, - RunTime: 3 * time.Second, - Failure: types.SpecFailure{ - Message: "failed to setup\n", - ComponentCodeLocation: codelocation.New(0), - }, - } - reporter.AfterSuiteDidRun(afterSuite) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 1, - RunTime: 10 * time.Second, - }) - }) - - It("should record the test as having failed", func() { - actual := buffer.String() - expected := fmt.Sprintf( - "##teamcity[testSuiteStarted name='Foo|'s test suite']"+ - "##teamcity[testStarted name='AfterSuite']"+ - "##teamcity[testFailed name='AfterSuite' message='%s' details='failed to setup|n']"+ - "##teamcity[testFinished name='AfterSuite' duration='3000']"+ - "##teamcity[testSuiteFinished name='Foo|'s test suite']", afterSuite.Failure.ComponentCodeLocation.String(), - ) - Ω(actual).Should(Equal(expected)) - }) - }) - specStateCases := []struct { - state types.SpecState - message string - }{ - {types.SpecStateFailed, "Failure"}, - {types.SpecStateTimedOut, "Timeout"}, - {types.SpecStatePanicked, "Panic"}, - } - - for _, specStateCase := range specStateCases { - specStateCase := specStateCase - Describe("a failing test", func() { - var spec *types.SpecSummary - BeforeEach(func() { - spec = &types.SpecSummary{ - ComponentTexts: []string{"[Top Level]", "A", "B", "C"}, - State: specStateCase.state, - RunTime: 5 * time.Second, - Failure: types.SpecFailure{ - ComponentCodeLocation: codelocation.New(0), - Message: "I failed", - }, - } - reporter.SpecWillRun(spec) - reporter.SpecDidComplete(spec) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 1, - RunTime: 10 * time.Second, - }) - }) - - It("should record test as failing", func() { - actual := buffer.String() - expected := - fmt.Sprintf("##teamcity[testSuiteStarted name='Foo|'s test suite']"+ - "##teamcity[testStarted name='A B C']"+ - "##teamcity[testFailed name='A B C' message='%s' details='I failed']"+ - "##teamcity[testFinished name='A B C' duration='5000']"+ - "##teamcity[testSuiteFinished name='Foo|'s test suite']", spec.Failure.ComponentCodeLocation.String()) - Ω(actual).Should(Equal(expected)) - }) - }) - } - - for _, specStateCase := range []types.SpecState{types.SpecStatePending, types.SpecStateSkipped} { - specStateCase := specStateCase - Describe("a skipped test", func() { - var spec *types.SpecSummary - BeforeEach(func() { - spec = &types.SpecSummary{ - ComponentTexts: []string{"[Top Level]", "A", "B", "C"}, - State: specStateCase, - RunTime: 5 * time.Second, - } - reporter.SpecWillRun(spec) - reporter.SpecDidComplete(spec) - - reporter.SpecSuiteDidEnd(&types.SuiteSummary{ - NumberOfSpecsThatWillBeRun: 1, - NumberOfFailedSpecs: 0, - RunTime: 10 * time.Second, - }) - }) - - It("should record test as ignored", func() { - actual := buffer.String() - expected := - "##teamcity[testSuiteStarted name='Foo|'s test suite']" + - "##teamcity[testStarted name='A B C']" + - "##teamcity[testIgnored name='A B C']" + - "##teamcity[testFinished name='A B C' duration='5000']" + - "##teamcity[testSuiteFinished name='Foo|'s test suite']" - Ω(actual).Should(Equal(expected)) - }) - }) - } -}) diff --git a/vendor/github.com/onsi/ginkgo/types/types.go b/vendor/github.com/onsi/ginkgo/types/types.go index dcf95ba5..baf1bd1c 100644 --- a/vendor/github.com/onsi/ginkgo/types/types.go +++ b/vendor/github.com/onsi/ginkgo/types/types.go @@ -7,6 +7,19 @@ import ( 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 diff --git a/vendor/github.com/onsi/ginkgo/types/types_suite_test.go b/vendor/github.com/onsi/ginkgo/types/types_suite_test.go deleted file mode 100644 index b026169c..00000000 --- a/vendor/github.com/onsi/ginkgo/types/types_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package types_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestTypes(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Types Suite") -} diff --git a/vendor/github.com/onsi/ginkgo/types/types_test.go b/vendor/github.com/onsi/ginkgo/types/types_test.go deleted file mode 100644 index a0e161c8..00000000 --- a/vendor/github.com/onsi/ginkgo/types/types_test.go +++ /dev/null @@ -1,99 +0,0 @@ -package types_test - -import ( - . "github.com/onsi/ginkgo/types" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var specStates = []SpecState{ - SpecStatePassed, - SpecStateTimedOut, - SpecStatePanicked, - SpecStateFailed, - SpecStatePending, - SpecStateSkipped, -} - -func verifySpecSummary(caller func(SpecSummary) bool, trueStates ...SpecState) { - summary := SpecSummary{} - trueStateLookup := map[SpecState]bool{} - for _, state := range trueStates { - trueStateLookup[state] = true - summary.State = state - Ω(caller(summary)).Should(BeTrue()) - } - - for _, state := range specStates { - if trueStateLookup[state] { - continue - } - summary.State = state - Ω(caller(summary)).Should(BeFalse()) - } -} - -var _ = Describe("Types", func() { - Describe("IsFailureState", func() { - It("knows when it is in a failure-like state", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.State.IsFailure() - }, SpecStateTimedOut, SpecStatePanicked, SpecStateFailed) - }) - }) - - Describe("SpecSummary", func() { - It("knows when it is in a failure-like state", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.HasFailureState() - }, SpecStateTimedOut, SpecStatePanicked, SpecStateFailed) - }) - - It("knows when it passed", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.Passed() - }, SpecStatePassed) - }) - - It("knows when it has failed", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.Failed() - }, SpecStateFailed) - }) - - It("knows when it has panicked", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.Panicked() - }, SpecStatePanicked) - }) - - It("knows when it has timed out", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.TimedOut() - }, SpecStateTimedOut) - }) - - It("knows when it is pending", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.Pending() - }, SpecStatePending) - }) - - It("knows when it is skipped", func() { - verifySpecSummary(func(summary SpecSummary) bool { - return summary.Skipped() - }, SpecStateSkipped) - }) - }) - - Describe("SpecMeasurement", func() { - It("knows how to format values when the precision is 0", func() { - Ω(SpecMeasurement{}.PrecisionFmt()).Should(Equal("%f")) - }) - - It("knows how to format the values when the precision is 3", func() { - Ω(SpecMeasurement{Precision: 3}.PrecisionFmt()).Should(Equal("%.3f")) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/.gitignore b/vendor/github.com/onsi/gomega/.gitignore index 55145320..720c13cb 100644 --- a/vendor/github.com/onsi/gomega/.gitignore +++ b/vendor/github.com/onsi/gomega/.gitignore @@ -1,3 +1,5 @@ .DS_Store *.test . +.idea +gomega.iml diff --git a/vendor/github.com/onsi/gomega/.travis.yml b/vendor/github.com/onsi/gomega/.travis.yml index 2ecdf95a..4d71367f 100644 --- a/vendor/github.com/onsi/gomega/.travis.yml +++ b/vendor/github.com/onsi/gomega/.travis.yml @@ -1,10 +1,23 @@ language: go + go: - - 1.3 - + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + - 1.11.x + +env: + - GO111MODULE=on + install: - go get -v ./... + - go build ./... - go get github.com/onsi/ginkgo - go install github.com/onsi/ginkgo/ginkgo -script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --failOnPending --randomizeSuites --race +script: | + $HOME/gopath/bin/ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race && + go vet && + [ -z "`gofmt -l -e -s -w .`" ] diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index 5f2c1ed7..9153294f 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,4 +1,57 @@ -## HEAD +## 1.4.3 + +### Fixes: + +- ensure file name and line numbers are correctly reported for XUnit [6fff58f] +- Fixed matcher for content-type (#305) [69d9b43] + +## 1.4.2 + +### Fixes: + +- Add go.mod and go.sum files to define the gomega go module [f3de367, a085d30] +- Work around go vet issue with Go v1.11 (#300) [40dd6ad] +- Better output when using with go XUnit-style tests, fixes #255 (#297) [29a4b97] +- Fix MatchJSON fail to parse json.RawMessage (#298) [ae19f1b] +- show threshold in failure message of BeNumericallyMatcher (#293) [4bbecc8] + +## 1.4.1 + +### Fixes: + +- Update documentation formatting and examples (#289) [9be8410] +- allow 'Receive' matcher to be used with concrete types (#286) [41673fd] +- Fix data race in ghttp server (#283) [7ac6b01] +- Travis badge should only show master [cc102ab] + +## 1.4.0 + +### Features +- Make string pretty diff user configurable (#273) [eb112ce, 649b44d] + +### Fixes +- Use httputil.DumpRequest to pretty-print unhandled requests (#278) [a4ff0fc, b7d1a52] +- fix typo floa32 > float32 (#272) [041ae3b, 6e33911] +- Fix link to documentation on adding your own matchers (#270) [bb2c830, fcebc62] +- Use setters and getters to avoid race condition (#262) [13057c3, a9c79f1] +- Avoid sending a signal if the process is not alive (#259) [b8043e5, 4fc1762] +- Improve message from AssignableToTypeOf when expected value is nil (#281) [9c1fb20] + +## 1.3.0 + +Improvements: + +- The `Equal` matcher matches byte slices more performantly. +- Improved how `MatchError` matches error strings. +- `MatchXML` ignores the order of xml node attributes. +- Improve support for XUnit style golang tests. ([#254](https://github.com/onsi/gomega/issues/254)) + +Bug Fixes: + +- Diff generation now handles multi-byte sequences correctly. +- Multiple goroutines can now call `gexec.Build` concurrently. + +## 1.2.0 Improvements: @@ -8,6 +61,14 @@ Improvements: - Added `HavePrefix` and `HaveSuffix` matchers. - `ghttp` can now handle concurrent requests. - Added `Succeed` which allows one to write `Ω(MyFunction()).Should(Succeed())`. +- Improved `ghttp`'s behavior around failing assertions and panics: + - If a registered handler makes a failing assertion `ghttp` will return `500`. + - If a registered handler panics, `ghttp` will return `500` *and* fail the test. This is new behavior that may cause existing code to break. This code is almost certainly incorrect and creating a false positive. +- `ghttp` servers can take an `io.Writer`. `ghttp` will write a line to the writer when each request arrives. +- Added `WithTransform` matcher to allow munging input data before feeding into the relevant matcher +- Added boolean `And`, `Or`, and `Not` matchers to allow creating composite matchers +- Added `gbytes.TimeoutCloser`, `gbytes.TimeoutReader`, and `gbytes.TimeoutWriter` - these are convenience wrappers that timeout if the underlying Closer/Reader/Writer does not return within the alloted time. +- Added `gbytes.BufferReader` - this constructs a `gbytes.Buffer` that asynchronously reads the passed-in `io.Reader` into its buffer. Bug Fixes: - gexec: `session.Wait` now uses `EventuallyWithOffset` to get the right line number in the failure. diff --git a/vendor/github.com/onsi/gomega/CONTRIBUTING.md b/vendor/github.com/onsi/gomega/CONTRIBUTING.md new file mode 100644 index 00000000..0d7a0992 --- /dev/null +++ b/vendor/github.com/onsi/gomega/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contributing to Gomega + +Your contributions to Gomega are essential for its long-term maintenance and improvement. To make a contribution: + +- Please **open an issue first** - describe what problem you are trying to solve and give the community a forum for input and feedback ahead of investing time in writing code! +- Ensure adequate test coverage: + - Make sure to add appropriate unit tests + - Please run all tests locally (`ginkgo -r -p`) and make sure they go green before submitting the PR + - Please run following linter locally `go vet ./...` and make sure output does not contain any warnings +- Update the documentation. In addition to standard `godoc` comments Gomega has extensive documentation on the `gh-pages` branch. If relevant, please submit a docs PR to that branch alongside your code PR. + +If you're a committer, check out RELEASING.md to learn how to cut a release. + +Thanks for supporting Gomega! diff --git a/vendor/github.com/onsi/gomega/README.md b/vendor/github.com/onsi/gomega/README.md index c8255919..76aa6b55 100644 --- a/vendor/github.com/onsi/gomega/README.md +++ b/vendor/github.com/onsi/gomega/README.md @@ -1,15 +1,19 @@ ![Gomega: Ginkgo's Preferred Matcher Library](http://onsi.github.io/gomega/images/gomega.png) -[![Build Status](https://travis-ci.org/onsi/gomega.png)](https://travis-ci.org/onsi/gomega) +[![Build Status](https://travis-ci.org/onsi/gomega.svg?branch=master)](https://travis-ci.org/onsi/gomega) Jump straight to the [docs](http://onsi.github.io/gomega/) to learn about Gomega, including a list of [all available matchers](http://onsi.github.io/gomega/#provided-matchers). -To discuss Gomega and get updates, join the [google group](https://groups.google.com/d/forum/ginkgo-and-gomega). +If you have a question, comment, bug report, feature request, etc. please open a GitHub issue. ## [Ginkgo](http://github.com/onsi/ginkgo): a BDD Testing Framework for Golang Learn more about Ginkgo [here](http://onsi.github.io/ginkgo/) +## Community Matchers + +A collection of community matchers is available on the [wiki](https://github.com/onsi/gomega/wiki). + ## License Gomega is MIT-Licensed diff --git a/vendor/github.com/onsi/gomega/RELEASING.md b/vendor/github.com/onsi/gomega/RELEASING.md new file mode 100644 index 00000000..998d64ee --- /dev/null +++ b/vendor/github.com/onsi/gomega/RELEASING.md @@ -0,0 +1,12 @@ +A Gomega release is a tagged sha and a GitHub release. To cut a release: + +1. Ensure CHANGELOG.md is up to date. + - Use `git log --pretty=format:'- %s [%h]' HEAD...vX.X.X` to list all the commits since the last release + - Categorize the changes into + - Breaking Changes (requires a major version) + - New Features (minor version) + - Fixes (fix version) + - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact) +2. Update GOMEGA_VERSION in `gomega_dsl.go` +3. Push a commit with the version number as the commit message (e.g. `v1.3.0`) +4. Create a new [GitHub release](https://help.github.com/articles/creating-releases/) with the version number as the tag (e.g. `v1.3.0`). List the key changes in the release notes. diff --git a/vendor/github.com/onsi/gomega/format/format.go b/vendor/github.com/onsi/gomega/format/format.go index ec9c91a4..6559525f 100644 --- a/vendor/github.com/onsi/gomega/format/format.go +++ b/vendor/github.com/onsi/gomega/format/format.go @@ -6,7 +6,9 @@ package format import ( "fmt" "reflect" + "strconv" "strings" + "time" ) // Use MaxDepth to set the maximum recursion depth when printing deeply nested objects @@ -21,6 +23,28 @@ Note that GoString and String don't always have all the information you need to */ 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 + +// TruncatedDiff choose if we should display a truncated pretty diff or not +var TruncatedDiff = true + +// 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 = " " @@ -43,11 +67,85 @@ If expected is omited, then the message looks like: 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) - } else { - return fmt.Sprintf("Expected\n%s\n%s\n%s", Object(actual, 1), message, Object(expected[0], 1)) } + 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 TruncatedDiff && 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. @@ -56,6 +154,8 @@ Object recurses into deeply nested objects emitting pretty-printed representatio 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)) @@ -123,6 +223,12 @@ func formatValue(value reflect.Value, indentation uint) string { } } + if !PrintContextObjects { + if value.Type().Implements(contextType) && indentation > 1 { + return "" + } + } + switch value.Kind() { case reflect.Bool: return fmt.Sprintf("%v", value.Bool()) @@ -143,9 +249,6 @@ func formatValue(value reflect.Value, indentation uint) string { case reflect.Ptr: return formatValue(value.Elem(), indentation) case reflect.Slice: - if value.Type().Elem().Kind() == reflect.Uint8 { - return formatString(value.Bytes(), indentation) - } return formatSlice(value, indentation) case reflect.String: return formatString(value.String(), indentation) @@ -154,15 +257,18 @@ func formatValue(value reflect.Value, indentation uint) string { 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()) - } else { - return fmt.Sprintf("%#v", value) } + return fmt.Sprintf("%#v", value) } } @@ -189,6 +295,10 @@ func formatString(object interface{}, indentation uint) string { } 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 @@ -202,9 +312,8 @@ func formatSlice(v reflect.Value, indentation uint) string { 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) - } else { - return fmt.Sprintf("[%s]", strings.Join(result, ", ")) } + return fmt.Sprintf("[%s]", strings.Join(result, ", ")) } func formatMap(v reflect.Value, indentation uint) string { @@ -214,7 +323,7 @@ func formatMap(v reflect.Value, indentation uint) string { longest := 0 for i, key := range v.MapKeys() { value := v.MapIndex(key) - result[i] = fmt.Sprintf("%s: %s", formatValue(key, 0), formatValue(value, indentation+1)) + result[i] = fmt.Sprintf("%s: %s", formatValue(key, indentation+1), formatValue(value, indentation+1)) if len(result[i]) > longest { longest = len(result[i]) } @@ -223,9 +332,8 @@ func formatMap(v reflect.Value, indentation uint) string { 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) - } else { - return fmt.Sprintf("{%s}", strings.Join(result, ", ")) } + return fmt.Sprintf("{%s}", strings.Join(result, ", ")) } func formatStruct(v reflect.Value, indentation uint) string { @@ -246,9 +354,8 @@ func formatStruct(v reflect.Value, indentation uint) string { 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) - } else { - return fmt.Sprintf("{%s}", strings.Join(result, ", ")) } + return fmt.Sprintf("{%s}", strings.Join(result, ", ")) } func isNilValue(a reflect.Value) bool { @@ -262,15 +369,14 @@ func isNilValue(a reflect.Value) bool { return 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() +/* +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 false + return true } diff --git a/vendor/github.com/onsi/gomega/format/format_suite_test.go b/vendor/github.com/onsi/gomega/format/format_suite_test.go deleted file mode 100644 index 8e65a952..00000000 --- a/vendor/github.com/onsi/gomega/format/format_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package format_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestFormat(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Format Suite") -} diff --git a/vendor/github.com/onsi/gomega/format/format_test.go b/vendor/github.com/onsi/gomega/format/format_test.go deleted file mode 100644 index fd926f58..00000000 --- a/vendor/github.com/onsi/gomega/format/format_test.go +++ /dev/null @@ -1,449 +0,0 @@ -package format_test - -import ( - "fmt" - "strings" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/format" - "github.com/onsi/gomega/types" -) - -//recursive struct - -type StringAlias string -type ByteAlias []byte -type IntAlias int - -type AStruct struct { - Exported string -} - -type SimpleStruct struct { - Name string - Enumeration int - Veritas bool - Data []byte - secret uint32 -} - -type ComplexStruct struct { - Strings []string - SimpleThings []*SimpleStruct - DataMaps map[int]ByteAlias -} - -type SecretiveStruct struct { - boolValue bool - intValue int - uintValue uint - uintptrValue uintptr - floatValue float32 - complexValue complex64 - chanValue chan bool - funcValue func() - pointerValue *int - sliceValue []string - byteSliceValue []byte - stringValue string - arrValue [3]int - byteArrValue [3]byte - mapValue map[string]int - structValue AStruct - interfaceValue interface{} -} - -type GoStringer struct { -} - -func (g GoStringer) GoString() string { - return "go-string" -} - -func (g GoStringer) String() string { - return "string" -} - -type Stringer struct { -} - -func (g Stringer) String() string { - return "string" -} - -var _ = Describe("Format", func() { - match := func(typeRepresentation string, valueRepresentation string, args ...interface{}) types.GomegaMatcher { - if len(args) > 0 { - valueRepresentation = fmt.Sprintf(valueRepresentation, args...) - } - return Equal(fmt.Sprintf("%s<%s>: %s", Indent, typeRepresentation, valueRepresentation)) - } - - matchRegexp := func(typeRepresentation string, valueRepresentation string, args ...interface{}) types.GomegaMatcher { - if len(args) > 0 { - valueRepresentation = fmt.Sprintf(valueRepresentation, args...) - } - return MatchRegexp(fmt.Sprintf("%s<%s>: %s", Indent, typeRepresentation, valueRepresentation)) - } - - hashMatchingRegexp := func(entries ...string) string { - entriesSwitch := "(" + strings.Join(entries, "|") + ")" - arr := make([]string, len(entries)) - for i := range arr { - arr[i] = entriesSwitch - } - return "{" + strings.Join(arr, ", ") + "}" - } - - Describe("Message", func() { - Context("with only an actual value", func() { - It("should print out an indented formatted representation of the value and the message", func() { - Ω(Message(3, "to be three.")).Should(Equal("Expected\n : 3\nto be three.")) - }) - }) - - Context("with an actual and an expected value", func() { - It("should print out an indented formatted representatino of both values, and the message", func() { - Ω(Message(3, "to equal", 4)).Should(Equal("Expected\n : 3\nto equal\n : 4")) - }) - }) - }) - - Describe("IndentString", func() { - It("should indent the string", func() { - Ω(IndentString("foo\n bar\nbaz", 2)).Should(Equal(" foo\n bar\n baz")) - }) - }) - - Describe("Object", func() { - Describe("formatting boolean values", func() { - It("should give the type and format values correctly", func() { - Ω(Object(true, 1)).Should(match("bool", "true")) - Ω(Object(false, 1)).Should(match("bool", "false")) - }) - }) - - Describe("formatting numbers", func() { - It("should give the type and format values correctly", func() { - Ω(Object(int(3), 1)).Should(match("int", "3")) - Ω(Object(int8(3), 1)).Should(match("int8", "3")) - Ω(Object(int16(3), 1)).Should(match("int16", "3")) - Ω(Object(int32(3), 1)).Should(match("int32", "3")) - Ω(Object(int64(3), 1)).Should(match("int64", "3")) - - Ω(Object(uint(3), 1)).Should(match("uint", "3")) - Ω(Object(uint8(3), 1)).Should(match("uint8", "3")) - Ω(Object(uint16(3), 1)).Should(match("uint16", "3")) - Ω(Object(uint32(3), 1)).Should(match("uint32", "3")) - Ω(Object(uint64(3), 1)).Should(match("uint64", "3")) - }) - - It("should handle uintptr differently", func() { - Ω(Object(uintptr(3), 1)).Should(match("uintptr", "0x3")) - }) - }) - - Describe("formatting channels", func() { - It("should give the type and format values correctly", func() { - c := make(chan<- bool, 3) - c <- true - c <- false - Ω(Object(c, 1)).Should(match("chan<- bool | len:2, cap:3", "%v", c)) - }) - }) - - Describe("formatting strings", func() { - It("should give the type and format values correctly", func() { - s := "a\nb\nc" - Ω(Object(s, 1)).Should(match("string", `a - b - c`)) - }) - }) - - Describe("formatting []byte slices", func() { - It("should present them as strings", func() { - b := []byte("a\nb\nc") - Ω(Object(b, 1)).Should(matchRegexp(`\[\]uint8 \| len:5, cap:\d+`, `a - b - c`)) - }) - }) - - Describe("formatting functions", func() { - It("should give the type and format values correctly", func() { - f := func(a string, b []int) ([]byte, error) { - return []byte("abc"), nil - } - Ω(Object(f, 1)).Should(match("func(string, []int) ([]uint8, error)", "%v", f)) - }) - }) - - Describe("formatting pointers", func() { - It("should give the type and dereference the value to format it correctly", func() { - a := 3 - Ω(Object(&a, 1)).Should(match(fmt.Sprintf("*int | %p", &a), "3")) - }) - - Context("when there are pointers to pointers...", func() { - It("should recursively deference the pointer until it gets to a value", func() { - a := 3 - var b *int - var c **int - var d ***int - b = &a - c = &b - d = &c - - Ω(Object(d, 1)).Should(match(fmt.Sprintf("***int | %p", d), "3")) - }) - }) - - Context("when the pointer points to nil", func() { - It("should say nil and not explode", func() { - var a *AStruct - Ω(Object(a, 1)).Should(match("*format_test.AStruct | 0x0", "nil")) - }) - }) - }) - - Describe("formatting arrays", func() { - It("should give the type and format values correctly", func() { - w := [3]string{"Jed Bartlet", "Toby Ziegler", "CJ Cregg"} - Ω(Object(w, 1)).Should(match("[3]string", `["Jed Bartlet", "Toby Ziegler", "CJ Cregg"]`)) - }) - - Context("with byte arrays", func() { - It("should give the type and format values correctly", func() { - w := [3]byte{17, 28, 19} - Ω(Object(w, 1)).Should(match("[3]uint8", `[17, 28, 19]`)) - }) - }) - }) - - Describe("formatting slices", func() { - It("should include the length and capacity in the type information", func() { - s := make([]bool, 3, 4) - Ω(Object(s, 1)).Should(match("[]bool | len:3, cap:4", "[false, false, false]")) - }) - - Context("when the slice contains long entries", func() { - It("should format the entries with newlines", func() { - w := []string{"Josiah Edward Bartlet", "Toby Ziegler", "CJ Cregg"} - expected := `[ - "Josiah Edward Bartlet", - "Toby Ziegler", - "CJ Cregg", - ]` - Ω(Object(w, 1)).Should(match("[]string | len:3, cap:3", expected)) - }) - }) - }) - - Describe("formatting maps", func() { - It("should include the length in the type information", func() { - m := make(map[int]bool, 5) - m[3] = true - m[4] = false - Ω(Object(m, 1)).Should(matchRegexp(`map\[int\]bool \| len:2`, hashMatchingRegexp("3: true", "4: false"))) - }) - - Context("when the slice contains long entries", func() { - It("should format the entries with newlines", func() { - m := map[string][]byte{} - m["Josiah Edward Bartlet"] = []byte("Martin Sheen") - m["Toby Ziegler"] = []byte("Richard Schiff") - m["CJ Cregg"] = []byte("Allison Janney") - expected := `{ - ("Josiah Edward Bartlet": "Martin Sheen"|"Toby Ziegler": "Richard Schiff"|"CJ Cregg": "Allison Janney"), - ("Josiah Edward Bartlet": "Martin Sheen"|"Toby Ziegler": "Richard Schiff"|"CJ Cregg": "Allison Janney"), - ("Josiah Edward Bartlet": "Martin Sheen"|"Toby Ziegler": "Richard Schiff"|"CJ Cregg": "Allison Janney"), - }` - Ω(Object(m, 1)).Should(matchRegexp(`map\[string\]\[\]uint8 \| len:3`, expected)) - }) - }) - }) - - Describe("formatting structs", func() { - It("should include the struct name and the field names", func() { - s := SimpleStruct{ - Name: "Oswald", - Enumeration: 17, - Veritas: true, - Data: []byte("datum"), - secret: 1983, - } - - Ω(Object(s, 1)).Should(match("format_test.SimpleStruct", `{Name: "Oswald", Enumeration: 17, Veritas: true, Data: "datum", secret: 1983}`)) - }) - - Context("when the struct contains long entries", func() { - It("should format the entries with new lines", func() { - s := &SimpleStruct{ - Name: "Mithrandir Gandalf Greyhame", - Enumeration: 2021, - Veritas: true, - Data: []byte("wizard"), - secret: 3, - } - - Ω(Object(s, 1)).Should(match(fmt.Sprintf("*format_test.SimpleStruct | %p", s), `{ - Name: "Mithrandir Gandalf Greyhame", - Enumeration: 2021, - Veritas: true, - Data: "wizard", - secret: 3, - }`)) - }) - }) - }) - - Describe("formatting nil values", func() { - It("should print out nil", func() { - Ω(Object(nil, 1)).Should(match("nil", "nil")) - var typedNil *AStruct - Ω(Object(typedNil, 1)).Should(match("*format_test.AStruct | 0x0", "nil")) - var c chan<- bool - Ω(Object(c, 1)).Should(match("chan<- bool | len:0, cap:0", "nil")) - var s []string - Ω(Object(s, 1)).Should(match("[]string | len:0, cap:0", "nil")) - var m map[string]bool - Ω(Object(m, 1)).Should(match("map[string]bool | len:0", "nil")) - }) - }) - - Describe("formatting aliased types", func() { - It("should print out the correct alias type", func() { - Ω(Object(StringAlias("alias"), 1)).Should(match("format_test.StringAlias", `alias`)) - Ω(Object(ByteAlias("alias"), 1)).Should(matchRegexp(`format_test\.ByteAlias \| len:5, cap:\d+`, `alias`)) - Ω(Object(IntAlias(3), 1)).Should(match("format_test.IntAlias", "3")) - }) - }) - - Describe("handling nested things", func() { - It("should produce a correctly nested representation", func() { - s := ComplexStruct{ - Strings: []string{"lots", "of", "short", "strings"}, - SimpleThings: []*SimpleStruct{ - {"short", 7, true, []byte("succinct"), 17}, - {"something longer", 427, true, []byte("designed to wrap around nicely"), 30}, - }, - DataMaps: map[int]ByteAlias{ - 17: ByteAlias("some substantially longer chunks of data"), - 1138: ByteAlias("that should make things wrap"), - }, - } - expected := `{ - Strings: \["lots", "of", "short", "strings"\], - SimpleThings: \[ - {Name: "short", Enumeration: 7, Veritas: true, Data: "succinct", secret: 17}, - { - Name: "something longer", - Enumeration: 427, - Veritas: true, - Data: "designed to wrap around nicely", - secret: 30, - }, - \], - DataMaps: { - (17: "some substantially longer chunks of data"|1138: "that should make things wrap"), - (17: "some substantially longer chunks of data"|1138: "that should make things wrap"), - }, - }` - Ω(Object(s, 1)).Should(matchRegexp(`format_test\.ComplexStruct`, expected)) - }) - }) - }) - - Describe("Handling unexported fields in structs", func() { - It("should handle all the various types correctly", func() { - a := int(5) - s := SecretiveStruct{ - boolValue: true, - intValue: 3, - uintValue: 4, - uintptrValue: 5, - floatValue: 6.0, - complexValue: complex(5.0, 3.0), - chanValue: make(chan bool, 2), - funcValue: func() {}, - pointerValue: &a, - sliceValue: []string{"string", "slice"}, - byteSliceValue: []byte("bytes"), - stringValue: "a string", - arrValue: [3]int{11, 12, 13}, - byteArrValue: [3]byte{17, 20, 32}, - mapValue: map[string]int{"a key": 20, "b key": 30}, - structValue: AStruct{"exported"}, - interfaceValue: map[string]int{"a key": 17}, - } - - expected := fmt.Sprintf(`{ - boolValue: true, - intValue: 3, - uintValue: 4, - uintptrValue: 0x5, - floatValue: 6, - complexValue: \(5\+3i\), - chanValue: %p, - funcValue: %p, - pointerValue: 5, - sliceValue: \["string", "slice"\], - byteSliceValue: "bytes", - stringValue: "a string", - arrValue: \[11, 12, 13\], - byteArrValue: \[17, 20, 32\], - mapValue: %s, - structValue: {Exported: "exported"}, - interfaceValue: {"a key": 17}, - }`, s.chanValue, s.funcValue, hashMatchingRegexp(`"a key": 20`, `"b key": 30`)) - - Ω(Object(s, 1)).Should(matchRegexp(`format_test\.SecretiveStruct`, expected)) - }) - }) - - Describe("Handling interfaces", func() { - It("should unpack the interface", func() { - outerHash := map[string]interface{}{} - innerHash := map[string]int{} - - innerHash["inner"] = 3 - outerHash["integer"] = 2 - outerHash["map"] = innerHash - - expected := hashMatchingRegexp(`"integer": 2`, `"map": {"inner": 3}`) - Ω(Object(outerHash, 1)).Should(matchRegexp(`map\[string\]interface {} \| len:2`, expected)) - }) - }) - - Describe("Handling recursive things", func() { - It("should not go crazy...", func() { - m := map[string]interface{}{} - m["integer"] = 2 - m["map"] = m - Ω(Object(m, 1)).Should(ContainSubstring("...")) - }) - }) - - Describe("When instructed to use the Stringer representation", func() { - BeforeEach(func() { - UseStringerRepresentation = true - }) - - AfterEach(func() { - UseStringerRepresentation = false - }) - - Context("when passed a GoStringer", func() { - It("should use what GoString() returns", func() { - Ω(Object(GoStringer{}, 1)).Should(ContainSubstring(": go-string")) - }) - }) - - Context("when passed a stringer", func() { - It("should use what String() returns", func() { - Ω(Object(Stringer{}, 1)).Should(ContainSubstring(": string")) - }) - }) - }) -}) 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 8775b861..00000000 --- a/vendor/github.com/onsi/gomega/gbytes/buffer.go +++ /dev/null @@ -1,229 +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, - } -} - -/* -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 - } else { - return false, copyOfUnreadBytes - } -} diff --git a/vendor/github.com/onsi/gomega/gbytes/buffer_test.go b/vendor/github.com/onsi/gomega/gbytes/buffer_test.go deleted file mode 100644 index b1111389..00000000 --- a/vendor/github.com/onsi/gomega/gbytes/buffer_test.go +++ /dev/null @@ -1,158 +0,0 @@ -package gbytes_test - -import ( - "io" - "time" - - . "github.com/onsi/gomega/gbytes" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Buffer", func() { - var buffer *Buffer - - BeforeEach(func() { - buffer = NewBuffer() - }) - - Describe("dumping the entire contents of the buffer", func() { - It("should return everything that's been written", func() { - buffer.Write([]byte("abc")) - buffer.Write([]byte("def")) - Ω(buffer.Contents()).Should(Equal([]byte("abcdef"))) - - Ω(buffer).Should(Say("bcd")) - Ω(buffer.Contents()).Should(Equal([]byte("abcdef"))) - }) - }) - - Describe("creating a buffer with bytes", func() { - It("should create the buffer with the cursor set to the beginning", func() { - buffer := BufferWithBytes([]byte("abcdef")) - Ω(buffer.Contents()).Should(Equal([]byte("abcdef"))) - Ω(buffer).Should(Say("abc")) - Ω(buffer).ShouldNot(Say("abc")) - Ω(buffer).Should(Say("def")) - }) - }) - - Describe("reading from a buffer", func() { - It("should read the current contents of the buffer", func() { - buffer := BufferWithBytes([]byte("abcde")) - - dest := make([]byte, 3) - n, err := buffer.Read(dest) - Ω(err).ShouldNot(HaveOccurred()) - Ω(n).Should(Equal(3)) - Ω(string(dest)).Should(Equal("abc")) - - dest = make([]byte, 3) - n, err = buffer.Read(dest) - Ω(err).ShouldNot(HaveOccurred()) - Ω(n).Should(Equal(2)) - Ω(string(dest[:n])).Should(Equal("de")) - - n, err = buffer.Read(dest) - Ω(err).Should(Equal(io.EOF)) - Ω(n).Should(Equal(0)) - }) - - Context("after the buffer has been closed", func() { - It("returns an error", func() { - buffer := BufferWithBytes([]byte("abcde")) - - buffer.Close() - - dest := make([]byte, 3) - n, err := buffer.Read(dest) - Ω(err).Should(HaveOccurred()) - Ω(n).Should(Equal(0)) - }) - }) - }) - - Describe("detecting regular expressions", func() { - It("should fire the appropriate channel when the passed in pattern matches, then close it", func(done Done) { - go func() { - time.Sleep(10 * time.Millisecond) - buffer.Write([]byte("abcde")) - }() - - A := buffer.Detect("%s", "a.c") - B := buffer.Detect("def") - - var gotIt bool - select { - case gotIt = <-A: - case <-B: - Fail("should not have gotten here") - } - - Ω(gotIt).Should(BeTrue()) - Eventually(A).Should(BeClosed()) - - buffer.Write([]byte("f")) - Eventually(B).Should(Receive()) - Eventually(B).Should(BeClosed()) - - close(done) - }) - - It("should fast-forward the buffer upon detection", func(done Done) { - buffer.Write([]byte("abcde")) - <-buffer.Detect("abc") - Ω(buffer).ShouldNot(Say("abc")) - Ω(buffer).Should(Say("de")) - close(done) - }) - - It("should only fast-forward the buffer when the channel is read, and only if doing so would not rewind it", func(done Done) { - buffer.Write([]byte("abcde")) - A := buffer.Detect("abc") - time.Sleep(20 * time.Millisecond) //give the goroutine a chance to detect and write to the channel - Ω(buffer).Should(Say("abcd")) - <-A - Ω(buffer).ShouldNot(Say("d")) - Ω(buffer).Should(Say("e")) - Eventually(A).Should(BeClosed()) - close(done) - }) - - It("should be possible to cancel a detection", func(done Done) { - A := buffer.Detect("abc") - B := buffer.Detect("def") - buffer.CancelDetects() - buffer.Write([]byte("abcdef")) - Eventually(A).Should(BeClosed()) - Eventually(B).Should(BeClosed()) - - Ω(buffer).Should(Say("bcde")) - <-buffer.Detect("f") - close(done) - }) - }) - - Describe("closing the buffer", func() { - It("should error when further write attempts are made", func() { - _, err := buffer.Write([]byte("abc")) - Ω(err).ShouldNot(HaveOccurred()) - - buffer.Close() - - _, err = buffer.Write([]byte("def")) - Ω(err).Should(HaveOccurred()) - - Ω(buffer.Contents()).Should(Equal([]byte("abc"))) - }) - - It("should be closed", func() { - Ω(buffer.Closed()).Should(BeFalse()) - - buffer.Close() - - Ω(buffer.Closed()).Should(BeTrue()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/gbytes/gbuffer_suite_test.go b/vendor/github.com/onsi/gomega/gbytes/gbuffer_suite_test.go deleted file mode 100644 index 3a7dc061..00000000 --- a/vendor/github.com/onsi/gomega/gbytes/gbuffer_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package gbytes_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestGbytes(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Gbytes Suite") -} 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 ce5ebcbf..00000000 --- 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 asser 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/gbytes/say_matcher_test.go b/vendor/github.com/onsi/gomega/gbytes/say_matcher_test.go deleted file mode 100644 index d0ddf1f7..00000000 --- a/vendor/github.com/onsi/gomega/gbytes/say_matcher_test.go +++ /dev/null @@ -1,163 +0,0 @@ -package gbytes_test - -import ( - "time" - . "github.com/onsi/gomega/gbytes" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -type speaker struct { - buffer *Buffer -} - -func (s *speaker) Buffer() *Buffer { - return s.buffer -} - -var _ = Describe("SayMatcher", func() { - var buffer *Buffer - - BeforeEach(func() { - buffer = NewBuffer() - buffer.Write([]byte("abc")) - }) - - Context("when actual is not a gexec Buffer, or a BufferProvider", func() { - It("should error", func() { - failures := InterceptGomegaFailures(func() { - Ω("foo").Should(Say("foo")) - }) - Ω(failures[0]).Should(ContainSubstring("*gbytes.Buffer")) - }) - }) - - Context("when a match is found", func() { - It("should succeed", func() { - Ω(buffer).Should(Say("abc")) - }) - - It("should support printf-like formatting", func() { - Ω(buffer).Should(Say("a%sc", "b")) - }) - - It("should use a regular expression", func() { - Ω(buffer).Should(Say("a.c")) - }) - - It("should fastforward the buffer", func() { - buffer.Write([]byte("def")) - Ω(buffer).Should(Say("abcd")) - Ω(buffer).Should(Say("ef")) - Ω(buffer).ShouldNot(Say("[a-z]")) - }) - }) - - Context("when no match is found", func() { - It("should not error", func() { - Ω(buffer).ShouldNot(Say("def")) - }) - - Context("when the buffer is closed", func() { - BeforeEach(func() { - buffer.Close() - }) - - It("should abort an eventually", func() { - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(buffer).Should(Say("def")) - }) - Eventually(buffer).ShouldNot(Say("def")) - Ω(time.Since(t)).Should(BeNumerically("<", 500*time.Millisecond)) - Ω(failures).Should(HaveLen(1)) - - t = time.Now() - Eventually(buffer).Should(Say("abc")) - Ω(time.Since(t)).Should(BeNumerically("<", 500*time.Millisecond)) - }) - - It("should abort a consistently", func() { - t := time.Now() - Consistently(buffer, 2.0).ShouldNot(Say("def")) - Ω(time.Since(t)).Should(BeNumerically("<", 500*time.Millisecond)) - }) - - It("should not error with a synchronous matcher", func() { - Ω(buffer).ShouldNot(Say("def")) - Ω(buffer).Should(Say("abc")) - }) - }) - }) - - Context("when a positive match fails", func() { - It("should report where it got stuck", func() { - Ω(buffer).Should(Say("abc")) - buffer.Write([]byte("def")) - failures := InterceptGomegaFailures(func() { - Ω(buffer).Should(Say("abc")) - }) - Ω(failures[0]).Should(ContainSubstring("Got stuck at:")) - Ω(failures[0]).Should(ContainSubstring("def")) - }) - }) - - Context("when a negative match fails", func() { - It("should report where it got stuck", func() { - failures := InterceptGomegaFailures(func() { - Ω(buffer).ShouldNot(Say("abc")) - }) - Ω(failures[0]).Should(ContainSubstring("Saw:")) - Ω(failures[0]).Should(ContainSubstring("Which matches the unexpected:")) - Ω(failures[0]).Should(ContainSubstring("abc")) - }) - }) - - Context("when a match is not found", func() { - It("should not fastforward the buffer", func() { - Ω(buffer).ShouldNot(Say("def")) - Ω(buffer).Should(Say("abc")) - }) - }) - - Context("a nice real-life example", func() { - It("should behave well", func() { - Ω(buffer).Should(Say("abc")) - go func() { - time.Sleep(10 * time.Millisecond) - buffer.Write([]byte("def")) - }() - Ω(buffer).ShouldNot(Say("def")) - Eventually(buffer).Should(Say("def")) - }) - }) - - Context("when actual is a BufferProvider", func() { - It("should use actual's buffer", func() { - s := &speaker{ - buffer: NewBuffer(), - } - - Ω(s).ShouldNot(Say("abc")) - - s.Buffer().Write([]byte("abc")) - Ω(s).Should(Say("abc")) - }) - - It("should abort an eventually", func() { - s := &speaker{ - buffer: NewBuffer(), - } - - s.buffer.Close() - - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(s).Should(Say("def")) - }) - Ω(failures).Should(HaveLen(1)) - Ω(time.Since(t)).Should(BeNumerically("<", 500*time.Millisecond)) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/gexec/_fixture/firefly/main.go b/vendor/github.com/onsi/gomega/gexec/_fixture/firefly/main.go deleted file mode 100644 index 16091c22..00000000 --- a/vendor/github.com/onsi/gomega/gexec/_fixture/firefly/main.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - "fmt" - "math/rand" - "os" - "strconv" - "time" -) - -var outQuote = "We've done the impossible, and that makes us mighty." -var errQuote = "Ah, curse your sudden but inevitable betrayal!" - -var randomQuotes = []string{ - "Can we maybe vote on the whole murdering people issue?", - "I swear by my pretty floral bonnet, I will end you.", - "My work's illegal, but at least it's honest.", -} - -func main() { - fmt.Fprintln(os.Stdout, outQuote) - fmt.Fprintln(os.Stderr, errQuote) - - randomIndex := rand.New(rand.NewSource(time.Now().UnixNano())).Intn(len(randomQuotes)) - - time.Sleep(100 * time.Millisecond) - - fmt.Fprintln(os.Stdout, randomQuotes[randomIndex]) - - if len(os.Args) == 2 { - exitCode, _ := strconv.Atoi(os.Args[1]) - os.Exit(exitCode) - } else { - os.Exit(randomIndex) - } -} 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 3e9bf9f9..00000000 --- a/vendor/github.com/onsi/gomega/gexec/build.go +++ /dev/null @@ -1,78 +0,0 @@ -package gexec - -import ( - "errors" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "runtime" -) - -var 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. It passes the variadic args on to `go build`. -*/ -func Build(packagePath string, args ...string) (compiledPath string, err error) { - return BuildIn(os.Getenv("GOPATH"), packagePath, 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) { - 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 = append([]string{"GOPATH=" + gopath}, os.Environ()...) - - 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() { - if tmpDir != "" { - os.RemoveAll(tmpDir) - } -} - -func temporaryDirectory() (string, error) { - var err error - 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 e6f43294..00000000 --- a/vendor/github.com/onsi/gomega/gexec/exit_matcher.go +++ /dev/null @@ -1,88 +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." - } else { - 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." - } else { - 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/exit_matcher_test.go b/vendor/github.com/onsi/gomega/gexec/exit_matcher_test.go deleted file mode 100644 index 9f18e2d6..00000000 --- a/vendor/github.com/onsi/gomega/gexec/exit_matcher_test.go +++ /dev/null @@ -1,113 +0,0 @@ -package gexec_test - -import ( - "os/exec" - "time" - . "github.com/onsi/gomega/gexec" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -type NeverExits struct{} - -func (e NeverExits) ExitCode() int { - return -1 -} - -var _ = Describe("ExitMatcher", func() { - var command *exec.Cmd - var session *Session - - BeforeEach(func() { - var err error - command = exec.Command(fireflyPath, "0") - session, err = Start(command, nil, nil) - Ω(err).ShouldNot(HaveOccurred()) - }) - - Describe("when passed something that is an Exiter", func() { - It("should act normally", func() { - failures := InterceptGomegaFailures(func() { - Ω(NeverExits{}).Should(Exit()) - }) - - Ω(failures[0]).Should(ContainSubstring("Expected process to exit. It did not.")) - }) - }) - - Describe("when passed something that is not an Exiter", func() { - It("should error", func() { - failures := InterceptGomegaFailures(func() { - Ω("aardvark").Should(Exit()) - }) - - Ω(failures[0]).Should(ContainSubstring("Exit must be passed a gexec.Exiter")) - }) - }) - - Context("with no exit code", func() { - It("should say the right things when it fails", func() { - Ω(session).ShouldNot(Exit()) - - failures := InterceptGomegaFailures(func() { - Ω(session).Should(Exit()) - }) - - Ω(failures[0]).Should(ContainSubstring("Expected process to exit. It did not.")) - - Eventually(session).Should(Exit()) - - Ω(session).Should(Exit()) - - failures = InterceptGomegaFailures(func() { - Ω(session).ShouldNot(Exit()) - }) - - Ω(failures[0]).Should(ContainSubstring("Expected process not to exit. It did.")) - }) - }) - - Context("with an exit code", func() { - It("should say the right things when it fails", func() { - Ω(session).ShouldNot(Exit(0)) - Ω(session).ShouldNot(Exit(1)) - - failures := InterceptGomegaFailures(func() { - Ω(session).Should(Exit(0)) - }) - - Ω(failures[0]).Should(ContainSubstring("Expected process to exit. It did not.")) - - Eventually(session).Should(Exit(0)) - - Ω(session).Should(Exit(0)) - - failures = InterceptGomegaFailures(func() { - Ω(session).Should(Exit(1)) - }) - - Ω(failures[0]).Should(ContainSubstring("to match exit code:")) - - Ω(session).ShouldNot(Exit(1)) - - failures = InterceptGomegaFailures(func() { - Ω(session).ShouldNot(Exit(0)) - }) - - Ω(failures[0]).Should(ContainSubstring("not to match exit code:")) - }) - }) - - Describe("bailing out early", func() { - It("should bail out early once the process exits", func() { - t := time.Now() - - failures := InterceptGomegaFailures(func() { - Eventually(session).Should(Exit(1)) - }) - Ω(time.Since(t)).Should(BeNumerically("<=", 500*time.Millisecond)) - Ω(failures).Should(HaveLen(1)) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/gexec/gexec_suite_test.go b/vendor/github.com/onsi/gomega/gexec/gexec_suite_test.go deleted file mode 100644 index 87672aaf..00000000 --- a/vendor/github.com/onsi/gomega/gexec/gexec_suite_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package gexec_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" - - "testing" -) - -var fireflyPath string - -func TestGexec(t *testing.T) { - BeforeSuite(func() { - var err error - fireflyPath, err = gexec.Build("./_fixture/firefly") - Ω(err).ShouldNot(HaveOccurred()) - }) - - AfterSuite(func() { - gexec.CleanupBuildArtifacts() - }) - - RegisterFailHandler(Fail) - RunSpecs(t, "Gexec Suite") -} 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 05e695ab..00000000 --- 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/prefixed_writer_test.go b/vendor/github.com/onsi/gomega/gexec/prefixed_writer_test.go deleted file mode 100644 index 8657d0c9..00000000 --- a/vendor/github.com/onsi/gomega/gexec/prefixed_writer_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package gexec_test - -import ( - "bytes" - - . "github.com/onsi/gomega/gexec" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("PrefixedWriter", func() { - var buffer *bytes.Buffer - var writer *PrefixedWriter - BeforeEach(func() { - buffer = &bytes.Buffer{} - writer = NewPrefixedWriter("[p]", buffer) - }) - - It("should emit the prefix on newlines", func() { - writer.Write([]byte("abc")) - writer.Write([]byte("def\n")) - writer.Write([]byte("hij\n")) - writer.Write([]byte("\n\n")) - writer.Write([]byte("klm\n\nnop")) - writer.Write([]byte("")) - writer.Write([]byte("qrs")) - writer.Write([]byte("\ntuv\nwx")) - writer.Write([]byte("yz\n\n")) - - Ω(buffer.String()).Should(Equal(`[p]abcdef -[p]hij -[p] -[p] -[p]klm -[p] -[p]nopqrs -[p]tuv -[p]wxyz -[p] -`)) - }) -}) 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 46e71223..00000000 --- a/vendor/github.com/onsi/gomega/gexec/session.go +++ /dev/null @@ -1,214 +0,0 @@ -/* -Package gexec provides support for testing external processes. -*/ -package gexec - -import ( - "io" - "os" - "os/exec" - "reflect" - "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 fo 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 && !reflect.ValueOf(outWriter).IsNil() { - commandOut = io.MultiWriter(commandOut, outWriter) - } - - if errWriter != nil && !reflect.ValueOf(errWriter).IsNil() { - commandErr = io.MultiWriter(commandErr, errWriter) - } - - command.Stdout = commandOut - command.Stderr = commandErr - - err := command.Start() - if err == nil { - go session.monitorForExit(exited) - } - - 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) -} - -/* -Terminate 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) -} diff --git a/vendor/github.com/onsi/gomega/gexec/session_test.go b/vendor/github.com/onsi/gomega/gexec/session_test.go deleted file mode 100644 index 13cc3cd6..00000000 --- a/vendor/github.com/onsi/gomega/gexec/session_test.go +++ /dev/null @@ -1,178 +0,0 @@ -package gexec_test - -import ( - "os/exec" - "syscall" - "time" - - . "github.com/onsi/gomega/gbytes" - . "github.com/onsi/gomega/gexec" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Session", func() { - var command *exec.Cmd - var session *Session - - var outWriter, errWriter *Buffer - - BeforeEach(func() { - outWriter = nil - errWriter = nil - }) - - JustBeforeEach(func() { - command = exec.Command(fireflyPath) - var err error - session, err = Start(command, outWriter, errWriter) - Ω(err).ShouldNot(HaveOccurred()) - }) - - Context("running a command", func() { - It("should start the process", func() { - Ω(command.Process).ShouldNot(BeNil()) - }) - - It("should wrap the process's stdout and stderr with gbytes buffers", func(done Done) { - Eventually(session.Out).Should(Say("We've done the impossible, and that makes us mighty")) - Eventually(session.Err).Should(Say("Ah, curse your sudden but inevitable betrayal!")) - defer session.Out.CancelDetects() - - select { - case <-session.Out.Detect("Can we maybe vote on the whole murdering people issue"): - Eventually(session).Should(Exit(0)) - case <-session.Out.Detect("I swear by my pretty floral bonnet, I will end you."): - Eventually(session).Should(Exit(1)) - case <-session.Out.Detect("My work's illegal, but at least it's honest."): - Eventually(session).Should(Exit(2)) - } - - close(done) - }) - - It("should satisfy the gbytes.BufferProvider interface, passing Stdout", func() { - Eventually(session).Should(Say("We've done the impossible, and that makes us mighty")) - Eventually(session).Should(Exit()) - }) - }) - - Describe("providing the exit code", func() { - It("should provide the app's exit code", func() { - Ω(session.ExitCode()).Should(Equal(-1)) - - Eventually(session).Should(Exit()) - Ω(session.ExitCode()).Should(BeNumerically(">=", 0)) - Ω(session.ExitCode()).Should(BeNumerically("<", 3)) - }) - }) - - Describe("wait", func() { - It("should wait till the command exits", func() { - Ω(session.ExitCode()).Should(Equal(-1)) - Ω(session.Wait().ExitCode()).Should(BeNumerically(">=", 0)) - Ω(session.Wait().ExitCode()).Should(BeNumerically("<", 3)) - }) - }) - - Describe("exited", func() { - It("should close when the command exits", func() { - Eventually(session.Exited).Should(BeClosed()) - Ω(session.ExitCode()).ShouldNot(Equal(-1)) - }) - }) - - Describe("kill", func() { - It("should kill the command and wait for it to exit", func() { - session, err := Start(exec.Command("sleep", "10000000"), GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - - session.Kill() - Ω(session).ShouldNot(Exit(), "Should not exit immediately...") - Eventually(session).Should(Exit(128 + 9)) - }) - }) - - Describe("interrupt", func() { - It("should interrupt the command", func() { - session, err := Start(exec.Command("sleep", "10000000"), GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - - session.Interrupt() - Ω(session).ShouldNot(Exit(), "Should not exit immediately...") - Eventually(session).Should(Exit(128 + 2)) - }) - }) - - Describe("terminate", func() { - It("should terminate the command", func() { - session, err := Start(exec.Command("sleep", "10000000"), GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - - session.Terminate() - Ω(session).ShouldNot(Exit(), "Should not exit immediately...") - Eventually(session).Should(Exit(128 + 15)) - }) - }) - - Describe("signal", func() { - It("should send the signal to the command", func() { - session, err := Start(exec.Command("sleep", "10000000"), GinkgoWriter, GinkgoWriter) - Ω(err).ShouldNot(HaveOccurred()) - - session.Signal(syscall.SIGABRT) - Ω(session).ShouldNot(Exit(), "Should not exit immediately...") - Eventually(session).Should(Exit(128 + 6)) - }) - }) - - Context("when the command exits", func() { - It("should close the buffers", func() { - Eventually(session).Should(Exit()) - - Ω(session.Out.Closed()).Should(BeTrue()) - Ω(session.Err.Closed()).Should(BeTrue()) - - Ω(session.Out).Should(Say("We've done the impossible, and that makes us mighty")) - }) - - var So = It - - So("this means that eventually should short circuit", func() { - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(session).Should(Say("blah blah blah blah blah")) - }) - Ω(time.Since(t)).Should(BeNumerically("<=", 500*time.Millisecond)) - Ω(failures).Should(HaveLen(1)) - }) - }) - - Context("when wrapping out and err", func() { - BeforeEach(func() { - outWriter = NewBuffer() - errWriter = NewBuffer() - }) - - It("should route to both the provided writers and the gbytes buffers", func() { - Eventually(session.Out).Should(Say("We've done the impossible, and that makes us mighty")) - Eventually(session.Err).Should(Say("Ah, curse your sudden but inevitable betrayal!")) - - Ω(outWriter.Contents()).Should(ContainSubstring("We've done the impossible, and that makes us mighty")) - Ω(errWriter.Contents()).Should(ContainSubstring("Ah, curse your sudden but inevitable betrayal!")) - - Eventually(session).Should(Exit()) - - Ω(outWriter.Contents()).Should(Equal(session.Out.Contents())) - Ω(errWriter.Contents()).Should(Equal(session.Err.Contents())) - }) - }) - - Describe("when the command fails to start", func() { - It("should return an error", func() { - _, err := Start(exec.Command("agklsjdfas"), nil, nil) - Ω(err).Should(HaveOccurred()) - }) - }) -}) 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 424dab57..00000000 --- a/vendor/github.com/onsi/gomega/ghttp/handlers.go +++ /dev/null @@ -1,209 +0,0 @@ -package ghttp - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/url" - - . "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}) -} - -//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)), - ) -} - -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()) - return RespondWith(statusCode, string(data), optionalHeader...) -} - -/* -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()) - if len(optionalHeader) == 1 { - copyHeader(optionalHeader[0], w.Header()) - } - w.WriteHeader(*statusCode) - w.Write(data) - } -} 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 4bbb2e41..00000000 --- a/vendor/github.com/onsi/gomega/ghttp/test_server.go +++ /dev/null @@ -1,334 +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 ( - "io/ioutil" - "net/http" - "net/http/httptest" - "reflect" - "regexp" - "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 - - 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() - defer s.writeLock.Unlock() - - server := s.HTTPTestServer - s.HTTPTestServer = 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() { - recover() - }() - - 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] -} - -//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/ghttp/test_server_suite_test.go b/vendor/github.com/onsi/gomega/ghttp/test_server_suite_test.go deleted file mode 100644 index 7c123608..00000000 --- a/vendor/github.com/onsi/gomega/ghttp/test_server_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package ghttp_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestGHTTP(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "GHTTP Suite") -} diff --git a/vendor/github.com/onsi/gomega/ghttp/test_server_test.go b/vendor/github.com/onsi/gomega/ghttp/test_server_test.go deleted file mode 100644 index 31a2053a..00000000 --- a/vendor/github.com/onsi/gomega/ghttp/test_server_test.go +++ /dev/null @@ -1,604 +0,0 @@ -package ghttp_test - -import ( - "bytes" - "io/ioutil" - "net/http" - "net/url" - "regexp" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/ghttp" -) - -var _ = Describe("TestServer", func() { - var ( - resp *http.Response - err error - s *Server - ) - - BeforeEach(func() { - s = NewServer() - }) - - AfterEach(func() { - s.Close() - }) - - Describe("closing client connections", func() { - It("closes", func() { - s.AppendHandlers( - func(w http.ResponseWriter, req *http.Request) { - w.Write([]byte("hello")) - }, - func(w http.ResponseWriter, req *http.Request) { - s.CloseClientConnections() - }, - ) - - resp, err := http.Get(s.URL()) - Ω(err).ShouldNot(HaveOccurred()) - Ω(resp.StatusCode).Should(Equal(200)) - - body, err := ioutil.ReadAll(resp.Body) - resp.Body.Close() - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(Equal([]byte("hello"))) - - resp, err = http.Get(s.URL()) - Ω(err).Should(HaveOccurred()) - Ω(resp).Should(BeNil()) - }) - }) - - Describe("allowing unhandled requests", func() { - Context("when true", func() { - BeforeEach(func() { - s.AllowUnhandledRequests = true - s.UnhandledRequestStatusCode = http.StatusForbidden - resp, err = http.Get(s.URL() + "/foo") - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should allow unhandled requests and respond with the passed in status code", func() { - Ω(err).ShouldNot(HaveOccurred()) - Ω(resp.StatusCode).Should(Equal(http.StatusForbidden)) - - data, err := ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(data).Should(BeEmpty()) - }) - - It("should record the requests", func() { - Ω(s.ReceivedRequests()).Should(HaveLen(1)) - Ω(s.ReceivedRequests()[0].URL.Path).Should(Equal("/foo")) - }) - }) - - Context("when false", func() { - It("should fail when attempting a request", func() { - failures := InterceptGomegaFailures(func() { - http.Get(s.URL() + "/foo") - }) - - Ω(failures[0]).Should(ContainSubstring("Received Unhandled Request")) - }) - }) - }) - - Describe("Managing Handlers", func() { - var called []string - BeforeEach(func() { - called = []string{} - s.RouteToHandler("GET", "/routed", func(w http.ResponseWriter, req *http.Request) { - called = append(called, "r1") - }) - s.RouteToHandler("POST", regexp.MustCompile(`/routed\d`), func(w http.ResponseWriter, req *http.Request) { - called = append(called, "r2") - }) - s.AppendHandlers(func(w http.ResponseWriter, req *http.Request) { - called = append(called, "A") - }, func(w http.ResponseWriter, req *http.Request) { - called = append(called, "B") - }) - }) - - It("should prefer routed handlers if there is a match", func() { - http.Get(s.URL() + "/routed") - http.Post(s.URL()+"/routed7", "application/json", nil) - http.Get(s.URL() + "/foo") - http.Get(s.URL() + "/routed") - http.Post(s.URL()+"/routed9", "application/json", nil) - http.Get(s.URL() + "/bar") - - failures := InterceptGomegaFailures(func() { - http.Get(s.URL() + "/foo") - http.Get(s.URL() + "/routed/not/a/match") - http.Get(s.URL() + "/routed7") - http.Post(s.URL()+"/routed", "application/json", nil) - }) - - Ω(failures[0]).Should(ContainSubstring("Received Unhandled Request")) - Ω(failures).Should(HaveLen(4)) - - http.Post(s.URL()+"/routed3", "application/json", nil) - - Ω(called).Should(Equal([]string{"r1", "r2", "A", "r1", "r2", "B", "r2"})) - }) - - It("should override routed handlers when reregistered", func() { - s.RouteToHandler("GET", "/routed", func(w http.ResponseWriter, req *http.Request) { - called = append(called, "r3") - }) - s.RouteToHandler("POST", regexp.MustCompile(`/routed\d`), func(w http.ResponseWriter, req *http.Request) { - called = append(called, "r4") - }) - - http.Get(s.URL() + "/routed") - http.Post(s.URL()+"/routed7", "application/json", nil) - - Ω(called).Should(Equal([]string{"r3", "r4"})) - }) - - It("should call the appended handlers, in order, as requests come in", func() { - http.Get(s.URL() + "/foo") - Ω(called).Should(Equal([]string{"A"})) - - http.Get(s.URL() + "/foo") - Ω(called).Should(Equal([]string{"A", "B"})) - - failures := InterceptGomegaFailures(func() { - http.Get(s.URL() + "/foo") - }) - - Ω(failures[0]).Should(ContainSubstring("Received Unhandled Request")) - }) - - Describe("Overwriting an existing handler", func() { - BeforeEach(func() { - s.SetHandler(0, func(w http.ResponseWriter, req *http.Request) { - called = append(called, "C") - }) - }) - - It("should override the specified handler", func() { - http.Get(s.URL() + "/foo") - http.Get(s.URL() + "/foo") - Ω(called).Should(Equal([]string{"C", "B"})) - }) - }) - - Describe("Getting an existing handler", func() { - It("should return the handler func", func() { - s.GetHandler(1)(nil, nil) - Ω(called).Should(Equal([]string{"B"})) - }) - }) - - Describe("Wrapping an existing handler", func() { - BeforeEach(func() { - s.WrapHandler(0, func(w http.ResponseWriter, req *http.Request) { - called = append(called, "C") - }) - }) - - It("should wrap the existing handler in a new handler", func() { - http.Get(s.URL() + "/foo") - http.Get(s.URL() + "/foo") - Ω(called).Should(Equal([]string{"A", "C", "B"})) - }) - }) - }) - - Describe("Request Handlers", func() { - Describe("VerifyRequest", func() { - BeforeEach(func() { - s.AppendHandlers(VerifyRequest("GET", "/foo")) - }) - - It("should verify the method, path", func() { - resp, err = http.Get(s.URL() + "/foo?baz=bar") - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should verify the method, path", func() { - failures := InterceptGomegaFailures(func() { - http.Get(s.URL() + "/foo2") - }) - Ω(failures).Should(HaveLen(1)) - }) - - It("should verify the method, path", func() { - failures := InterceptGomegaFailures(func() { - http.Post(s.URL()+"/foo", "application/json", nil) - }) - Ω(failures).Should(HaveLen(1)) - }) - - Context("when passed a rawQuery", func() { - It("should also be possible to verify the rawQuery", func() { - s.SetHandler(0, VerifyRequest("GET", "/foo", "baz=bar")) - resp, err = http.Get(s.URL() + "/foo?baz=bar") - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should match irregardless of query parameter ordering", func() { - s.SetHandler(0, VerifyRequest("GET", "/foo", "type=get&name=money")) - u, _ := url.Parse(s.URL() + "/foo") - u.RawQuery = url.Values{ - "type": []string{"get"}, - "name": []string{"money"}, - }.Encode() - - resp, err = http.Get(u.String()) - Ω(err).ShouldNot(HaveOccurred()) - }) - }) - - Context("when passed a matcher for path", func() { - It("should apply the matcher", func() { - s.SetHandler(0, VerifyRequest("GET", MatchRegexp(`/foo/[a-f]*/3`))) - resp, err = http.Get(s.URL() + "/foo/abcdefa/3") - Ω(err).ShouldNot(HaveOccurred()) - }) - }) - }) - - Describe("VerifyContentType", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("GET", "/foo"), - VerifyContentType("application/octet-stream"), - )) - }) - - It("should verify the content type", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.Header.Set("Content-Type", "application/octet-stream") - - resp, err = http.DefaultClient.Do(req) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should verify the content type", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.Header.Set("Content-Type", "application/json") - - failures := InterceptGomegaFailures(func() { - http.DefaultClient.Do(req) - }) - Ω(failures).Should(HaveLen(1)) - }) - }) - - Describe("Verify BasicAuth", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("GET", "/foo"), - VerifyBasicAuth("bob", "password"), - )) - }) - - It("should verify basic auth", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.SetBasicAuth("bob", "password") - - resp, err = http.DefaultClient.Do(req) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should verify basic auth", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.SetBasicAuth("bob", "bassword") - - failures := InterceptGomegaFailures(func() { - http.DefaultClient.Do(req) - }) - Ω(failures).Should(HaveLen(1)) - }) - - It("should require basic auth header", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - - failures := InterceptGomegaFailures(func() { - http.DefaultClient.Do(req) - }) - Ω(failures).Should(HaveLen(1)) - }) - }) - - Describe("VerifyHeader", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("GET", "/foo"), - VerifyHeader(http.Header{ - "accept": []string{"jpeg", "png"}, - "cache-control": []string{"omicron"}, - "Return-Path": []string{"hobbiton"}, - }), - )) - }) - - It("should verify the headers", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.Header.Add("Accept", "jpeg") - req.Header.Add("Accept", "png") - req.Header.Add("Cache-Control", "omicron") - req.Header.Add("return-path", "hobbiton") - - resp, err = http.DefaultClient.Do(req) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should verify the headers", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.Header.Add("Schmaccept", "jpeg") - req.Header.Add("Schmaccept", "png") - req.Header.Add("Cache-Control", "omicron") - req.Header.Add("return-path", "hobbiton") - - failures := InterceptGomegaFailures(func() { - http.DefaultClient.Do(req) - }) - Ω(failures).Should(HaveLen(1)) - }) - }) - - Describe("VerifyHeaderKV", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("GET", "/foo"), - VerifyHeaderKV("accept", "jpeg", "png"), - VerifyHeaderKV("cache-control", "omicron"), - VerifyHeaderKV("Return-Path", "hobbiton"), - )) - }) - - It("should verify the headers", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.Header.Add("Accept", "jpeg") - req.Header.Add("Accept", "png") - req.Header.Add("Cache-Control", "omicron") - req.Header.Add("return-path", "hobbiton") - - resp, err = http.DefaultClient.Do(req) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should verify the headers", func() { - req, err := http.NewRequest("GET", s.URL()+"/foo", nil) - Ω(err).ShouldNot(HaveOccurred()) - req.Header.Add("Accept", "jpeg") - req.Header.Add("Cache-Control", "omicron") - req.Header.Add("return-path", "hobbiton") - - failures := InterceptGomegaFailures(func() { - http.DefaultClient.Do(req) - }) - Ω(failures).Should(HaveLen(1)) - }) - }) - - Describe("VerifyJSON", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("POST", "/foo"), - VerifyJSON(`{"a":3, "b":2}`), - )) - }) - - It("should verify the json body and the content type", func() { - resp, err = http.Post(s.URL()+"/foo", "application/json", bytes.NewReader([]byte(`{"b":2, "a":3}`))) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should verify the json body and the content type", func() { - failures := InterceptGomegaFailures(func() { - http.Post(s.URL()+"/foo", "application/json", bytes.NewReader([]byte(`{"b":2, "a":4}`))) - }) - Ω(failures).Should(HaveLen(1)) - }) - - It("should verify the json body and the content type", func() { - failures := InterceptGomegaFailures(func() { - http.Post(s.URL()+"/foo", "application/not-json", bytes.NewReader([]byte(`{"b":2, "a":3}`))) - }) - Ω(failures).Should(HaveLen(1)) - }) - }) - - Describe("VerifyJSONRepresenting", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("POST", "/foo"), - VerifyJSONRepresenting([]int{1, 3, 5}), - )) - }) - - It("should verify the json body and the content type", func() { - resp, err = http.Post(s.URL()+"/foo", "application/json", bytes.NewReader([]byte(`[1,3,5]`))) - Ω(err).ShouldNot(HaveOccurred()) - }) - - It("should verify the json body and the content type", func() { - failures := InterceptGomegaFailures(func() { - http.Post(s.URL()+"/foo", "application/json", bytes.NewReader([]byte(`[1,3]`))) - }) - Ω(failures).Should(HaveLen(1)) - }) - }) - - Describe("RespondWith", func() { - Context("without headers", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWith(http.StatusCreated, "sweet"), - ), CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWith(http.StatusOK, []byte("sour")), - )) - }) - - It("should return the response", func() { - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(resp.StatusCode).Should(Equal(http.StatusCreated)) - - body, err := ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(Equal([]byte("sweet"))) - - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(resp.StatusCode).Should(Equal(http.StatusOK)) - - body, err = ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(Equal([]byte("sour"))) - }) - }) - - Context("with headers", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWith(http.StatusCreated, "sweet", http.Header{"X-Custom-Header": []string{"my header"}}), - )) - }) - - It("should return the headers too", func() { - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(resp.StatusCode).Should(Equal(http.StatusCreated)) - Ω(ioutil.ReadAll(resp.Body)).Should(Equal([]byte("sweet"))) - Ω(resp.Header.Get("X-Custom-Header")).Should(Equal("my header")) - }) - }) - }) - - Describe("RespondWithPtr", func() { - var code int - var byteBody []byte - var stringBody string - BeforeEach(func() { - code = http.StatusOK - byteBody = []byte("sweet") - stringBody = "sour" - - s.AppendHandlers(CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWithPtr(&code, &byteBody), - ), CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWithPtr(&code, &stringBody), - )) - }) - - It("should return the response", func() { - code = http.StatusCreated - byteBody = []byte("tasty") - stringBody = "treat" - - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(resp.StatusCode).Should(Equal(http.StatusCreated)) - - body, err := ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(Equal([]byte("tasty"))) - - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(resp.StatusCode).Should(Equal(http.StatusCreated)) - - body, err = ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(Equal([]byte("treat"))) - }) - - Context("when passed a nil body", func() { - BeforeEach(func() { - s.SetHandler(0, CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWithPtr(&code, nil), - )) - }) - - It("should return an empty body and not explode", func() { - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - - Ω(err).ShouldNot(HaveOccurred()) - Ω(resp.StatusCode).Should(Equal(http.StatusOK)) - body, err := ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(BeEmpty()) - - Ω(s.ReceivedRequests()).Should(HaveLen(1)) - }) - }) - }) - - Describe("RespondWithJSON", func() { - BeforeEach(func() { - s.AppendHandlers(CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWithJSONEncoded(http.StatusCreated, []int{1, 2, 3}), - )) - }) - - It("should return the response", func() { - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(resp.StatusCode).Should(Equal(http.StatusCreated)) - - body, err := ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(MatchJSON("[1,2,3]")) - }) - }) - - Describe("RespondWithJSONPtr", func() { - var code int - var object interface{} - BeforeEach(func() { - code = http.StatusOK - object = []int{1, 2, 3} - - s.AppendHandlers(CombineHandlers( - VerifyRequest("POST", "/foo"), - RespondWithJSONEncodedPtr(&code, &object), - )) - }) - - It("should return the response", func() { - code = http.StatusCreated - object = []int{4, 5, 6} - resp, err = http.Post(s.URL()+"/foo", "application/json", nil) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(resp.StatusCode).Should(Equal(http.StatusCreated)) - - body, err := ioutil.ReadAll(resp.Body) - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(MatchJSON("[4,5,6]")) - }) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index 78bd188c..471f691a 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -24,14 +24,15 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.0" +const GOMEGA_VERSION = "1.4.3" 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 globalFailWrapper *types.GomegaFailWrapper var defaultEventuallyTimeout = time.Second var defaultEventuallyPollingInterval = 10 * time.Millisecond @@ -41,26 +42,57 @@ 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 + if handler == nil { + globalFailWrapper = nil + return + } + + globalFailWrapper = &types.GomegaFailWrapper{ + Fail: handler, + TWithHelper: testingtsupport.EmptyTWithHelper{}, + } +} + +func RegisterFailHandlerWithT(t types.TWithHelper, handler types.GomegaFailHandler) { + if handler == nil { + globalFailWrapper = nil + return + } + + globalFailWrapper = &types.GomegaFailWrapper{ + Fail: handler, + TWithHelper: t, + } } //RegisterTestingT connects Gomega to Golang's XUnit style -//Testing.T tests. You'll need to call this at the top of each XUnit style test: +//Testing.T tests. It is now deprecated and you should use NewGomegaWithT() instead. +// +//Legacy Documentation: // -// func TestFarmHasCow(t *testing.T) { -// RegisterTestingT(t) +//You'll need to call this at the top of each XUnit style test: // -// f := farm.New([]string{"Cow", "Horse"}) -// Expect(f.HasCow()).To(BeTrue(), "Farm should have cow") -// } +// 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)) + tWithHelper, hasHelper := t.(types.TWithHelper) + if !hasHelper { + RegisterFailHandler(testingtsupport.BuildTestingTGomegaFailWrapper(t).Fail) + return + } + RegisterFailHandlerWithT(tWithHelper, testingtsupport.BuildTestingTGomegaFailWrapper(t).Fail) } //InterceptGomegaHandlers runs a given callback and returns an array of @@ -73,7 +105,7 @@ func RegisterTestingT(t types.GomegaTestingT) { //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 + originalHandler := globalFailWrapper.Fail failures := []string{} RegisterFailHandler(func(message string, callerSkip ...int) { failures = append(failures, message) @@ -84,7 +116,7 @@ func InterceptGomegaFailures(f func()) []string { } //Ω wraps an actual value allowing assertions to be made on it: -// Ω("foo").Should(Equal("foo")) +// Ω("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. @@ -105,7 +137,7 @@ func Ω(actual interface{}, extra ...interface{}) GomegaAssertion { } //Expect wraps an actual value allowing assertions to be made on it: -// Expect("foo").To(Equal("foo")) +// 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. @@ -135,10 +167,10 @@ func Expect(actual interface{}, extra ...interface{}) GomegaAssertion { //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 { + if globalFailWrapper == nil { panic(nilFailHandlerPanic) } - return assertion.New(actual, globalFailHandler, offset, extra...) + return assertion.New(actual, globalFailWrapper, offset, extra...) } //Eventually wraps an actual value allowing assertions to be made on it. @@ -185,7 +217,7 @@ func Eventually(actual interface{}, intervals ...interface{}) GomegaAsyncAsserti //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 { + if globalFailWrapper == nil { panic(nilFailHandlerPanic) } timeoutInterval := defaultEventuallyTimeout @@ -196,7 +228,7 @@ func EventuallyWithOffset(offset int, actual interface{}, intervals ...interface if len(intervals) > 1 { pollingInterval = toDuration(intervals[1]) } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeEventually, actual, globalFailHandler, timeoutInterval, pollingInterval, offset) + return asyncassertion.New(asyncassertion.AsyncAssertionTypeEventually, actual, globalFailWrapper, timeoutInterval, pollingInterval, offset) } //Consistently wraps an actual value allowing assertions to be made on it. @@ -230,7 +262,7 @@ func Consistently(actual interface{}, intervals ...interface{}) GomegaAsyncAsser //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 { + if globalFailWrapper == nil { panic(nilFailHandlerPanic) } timeoutInterval := defaultConsistentlyDuration @@ -241,7 +273,7 @@ func ConsistentlyWithOffset(offset int, actual interface{}, intervals ...interfa if len(intervals) > 1 { pollingInterval = toDuration(intervals[1]) } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeConsistently, actual, globalFailHandler, timeoutInterval, pollingInterval, offset) + return asyncassertion.New(asyncassertion.AsyncAssertionTypeConsistently, actual, globalFailWrapper, timeoutInterval, pollingInterval, offset) } //Set the default timeout duration for Eventually. Eventually will repeatedly poll your condition until it succeeds, or until this timeout elapses. @@ -308,6 +340,60 @@ type GomegaAssertion interface { //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.BuildTestingTGomegaFailWrapper(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.BuildTestingTGomegaFailWrapper(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.BuildTestingTGomegaFailWrapper(g.t), timeoutInterval, pollingInterval, 0) +} + func toDuration(input interface{}) time.Duration { duration, ok := input.(time.Duration) if ok { diff --git a/vendor/github.com/onsi/gomega/internal/assertion/assertion.go b/vendor/github.com/onsi/gomega/internal/assertion/assertion.go index b73673f2..00197b67 100644 --- a/vendor/github.com/onsi/gomega/internal/assertion/assertion.go +++ b/vendor/github.com/onsi/gomega/internal/assertion/assertion.go @@ -9,37 +9,42 @@ import ( type Assertion struct { actualInput interface{} - fail types.GomegaFailHandler + failWrapper *types.GomegaFailWrapper offset int extra []interface{} } -func New(actualInput interface{}, fail types.GomegaFailHandler, offset int, extra ...interface{}) *Assertion { +func New(actualInput interface{}, failWrapper *types.GomegaFailWrapper, offset int, extra ...interface{}) *Assertion { return &Assertion{ actualInput: actualInput, - fail: fail, + failWrapper: failWrapper, offset: offset, extra: extra, } } func (assertion *Assertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.failWrapper.TWithHelper.Helper() return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, true, optionalDescription...) } func (assertion *Assertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.failWrapper.TWithHelper.Helper() return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, false, optionalDescription...) } func (assertion *Assertion) To(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.failWrapper.TWithHelper.Helper() return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, true, optionalDescription...) } func (assertion *Assertion) ToNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.failWrapper.TWithHelper.Helper() return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, false, optionalDescription...) } func (assertion *Assertion) NotTo(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.failWrapper.TWithHelper.Helper() return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, false, optionalDescription...) } @@ -55,8 +60,9 @@ func (assertion *Assertion) buildDescription(optionalDescription ...interface{}) func (assertion *Assertion) match(matcher types.GomegaMatcher, desiredMatch bool, optionalDescription ...interface{}) bool { matches, err := matcher.Match(assertion.actualInput) description := assertion.buildDescription(optionalDescription...) + assertion.failWrapper.TWithHelper.Helper() if err != nil { - assertion.fail(description+err.Error(), 2+assertion.offset) + assertion.failWrapper.Fail(description+err.Error(), 2+assertion.offset) return false } if matches != desiredMatch { @@ -66,7 +72,7 @@ func (assertion *Assertion) match(matcher types.GomegaMatcher, desiredMatch bool } else { message = matcher.NegatedFailureMessage(assertion.actualInput) } - assertion.fail(description+message, 2+assertion.offset) + assertion.failWrapper.Fail(description+message, 2+assertion.offset) return false } @@ -80,7 +86,8 @@ func (assertion *Assertion) vetExtras(optionalDescription ...interface{}) bool { } description := assertion.buildDescription(optionalDescription...) - assertion.fail(description+message, 2+assertion.offset) + assertion.failWrapper.TWithHelper.Helper() + assertion.failWrapper.Fail(description+message, 2+assertion.offset) return false } diff --git a/vendor/github.com/onsi/gomega/internal/assertion/assertion_suite_test.go b/vendor/github.com/onsi/gomega/internal/assertion/assertion_suite_test.go deleted file mode 100644 index dae47a48..00000000 --- a/vendor/github.com/onsi/gomega/internal/assertion/assertion_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package assertion_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestAssertion(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Assertion Suite") -} diff --git a/vendor/github.com/onsi/gomega/internal/assertion/assertion_test.go b/vendor/github.com/onsi/gomega/internal/assertion/assertion_test.go deleted file mode 100644 index de9eff2d..00000000 --- a/vendor/github.com/onsi/gomega/internal/assertion/assertion_test.go +++ /dev/null @@ -1,252 +0,0 @@ -package assertion_test - -import ( - "errors" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/internal/assertion" - "github.com/onsi/gomega/internal/fakematcher" -) - -var _ = Describe("Assertion", func() { - var ( - a *Assertion - failureMessage string - failureCallerSkip int - matcher *fakematcher.FakeMatcher - ) - - input := "The thing I'm testing" - - var fakeFailHandler = func(message string, callerSkip ...int) { - failureMessage = message - if len(callerSkip) == 1 { - failureCallerSkip = callerSkip[0] - } - } - - BeforeEach(func() { - matcher = &fakematcher.FakeMatcher{} - failureMessage = "" - failureCallerSkip = 0 - a = New(input, fakeFailHandler, 1) - }) - - Context("when called", func() { - It("should pass the provided input value to the matcher", func() { - a.Should(matcher) - - Ω(matcher.ReceivedActual).Should(Equal(input)) - matcher.ReceivedActual = "" - - a.ShouldNot(matcher) - - Ω(matcher.ReceivedActual).Should(Equal(input)) - matcher.ReceivedActual = "" - - a.To(matcher) - - Ω(matcher.ReceivedActual).Should(Equal(input)) - matcher.ReceivedActual = "" - - a.ToNot(matcher) - - Ω(matcher.ReceivedActual).Should(Equal(input)) - matcher.ReceivedActual = "" - - a.NotTo(matcher) - - Ω(matcher.ReceivedActual).Should(Equal(input)) - }) - }) - - Context("when the matcher succeeds", func() { - BeforeEach(func() { - matcher.MatchesToReturn = true - matcher.ErrToReturn = nil - }) - - Context("and a positive assertion is being made", func() { - It("should not call the failure callback", func() { - a.Should(matcher) - Ω(failureMessage).Should(Equal("")) - }) - - It("should be true", func() { - Ω(a.Should(matcher)).Should(BeTrue()) - }) - }) - - Context("and a negative assertion is being made", func() { - It("should call the failure callback", func() { - a.ShouldNot(matcher) - Ω(failureMessage).Should(Equal("negative: The thing I'm testing")) - Ω(failureCallerSkip).Should(Equal(3)) - }) - - It("should be false", func() { - Ω(a.ShouldNot(matcher)).Should(BeFalse()) - }) - }) - }) - - Context("when the matcher fails", func() { - BeforeEach(func() { - matcher.MatchesToReturn = false - matcher.ErrToReturn = nil - }) - - Context("and a positive assertion is being made", func() { - It("should call the failure callback", func() { - a.Should(matcher) - Ω(failureMessage).Should(Equal("positive: The thing I'm testing")) - Ω(failureCallerSkip).Should(Equal(3)) - }) - - It("should be false", func() { - Ω(a.Should(matcher)).Should(BeFalse()) - }) - }) - - Context("and a negative assertion is being made", func() { - It("should not call the failure callback", func() { - a.ShouldNot(matcher) - Ω(failureMessage).Should(Equal("")) - }) - - It("should be true", func() { - Ω(a.ShouldNot(matcher)).Should(BeTrue()) - }) - }) - }) - - Context("When reporting a failure", func() { - BeforeEach(func() { - matcher.MatchesToReturn = false - matcher.ErrToReturn = nil - }) - - Context("and there is an optional description", func() { - It("should append the description to the failure message", func() { - a.Should(matcher, "A description") - Ω(failureMessage).Should(Equal("A description\npositive: The thing I'm testing")) - Ω(failureCallerSkip).Should(Equal(3)) - }) - }) - - Context("and there are multiple arguments to the optional description", func() { - It("should append the formatted description to the failure message", func() { - a.Should(matcher, "A description of [%d]", 3) - Ω(failureMessage).Should(Equal("A description of [3]\npositive: The thing I'm testing")) - Ω(failureCallerSkip).Should(Equal(3)) - }) - }) - }) - - Context("When the matcher returns an error", func() { - BeforeEach(func() { - matcher.ErrToReturn = errors.New("Kaboom!") - }) - - Context("and a positive assertion is being made", func() { - It("should call the failure callback", func() { - matcher.MatchesToReturn = true - a.Should(matcher) - Ω(failureMessage).Should(Equal("Kaboom!")) - Ω(failureCallerSkip).Should(Equal(3)) - }) - }) - - Context("and a negative assertion is being made", func() { - It("should call the failure callback", func() { - matcher.MatchesToReturn = false - a.ShouldNot(matcher) - Ω(failureMessage).Should(Equal("Kaboom!")) - Ω(failureCallerSkip).Should(Equal(3)) - }) - }) - - It("should always be false", func() { - Ω(a.Should(matcher)).Should(BeFalse()) - Ω(a.ShouldNot(matcher)).Should(BeFalse()) - }) - }) - - Context("when there are extra parameters", func() { - It("(a simple example)", func() { - Ω(func() (string, int, error) { - return "foo", 0, nil - }()).Should(Equal("foo")) - }) - - Context("when the parameters are all nil or zero", func() { - It("should invoke the matcher", func() { - matcher.MatchesToReturn = true - matcher.ErrToReturn = nil - - var typedNil []string - a = New(input, fakeFailHandler, 1, 0, nil, typedNil) - - result := a.Should(matcher) - Ω(result).Should(BeTrue()) - Ω(matcher.ReceivedActual).Should(Equal(input)) - - Ω(failureMessage).Should(BeZero()) - }) - }) - - Context("when any of the parameters are not nil or zero", func() { - It("should call the failure callback", func() { - matcher.MatchesToReturn = false - matcher.ErrToReturn = nil - - a = New(input, fakeFailHandler, 1, errors.New("foo")) - result := a.Should(matcher) - Ω(result).Should(BeFalse()) - Ω(matcher.ReceivedActual).Should(BeZero(), "The matcher doesn't even get called") - Ω(failureMessage).Should(ContainSubstring("foo")) - failureMessage = "" - - a = New(input, fakeFailHandler, 1, nil, 1) - result = a.ShouldNot(matcher) - Ω(result).Should(BeFalse()) - Ω(failureMessage).Should(ContainSubstring("1")) - failureMessage = "" - - a = New(input, fakeFailHandler, 1, nil, 0, []string{"foo"}) - result = a.To(matcher) - Ω(result).Should(BeFalse()) - Ω(failureMessage).Should(ContainSubstring("foo")) - failureMessage = "" - - a = New(input, fakeFailHandler, 1, nil, 0, []string{"foo"}) - result = a.ToNot(matcher) - Ω(result).Should(BeFalse()) - Ω(failureMessage).Should(ContainSubstring("foo")) - failureMessage = "" - - a = New(input, fakeFailHandler, 1, nil, 0, []string{"foo"}) - result = a.NotTo(matcher) - Ω(result).Should(BeFalse()) - Ω(failureMessage).Should(ContainSubstring("foo")) - Ω(failureCallerSkip).Should(Equal(3)) - }) - }) - }) - - Context("Making an assertion without a registered fail handler", func() { - It("should panic", func() { - defer func() { - e := recover() - RegisterFailHandler(Fail) - if e == nil { - Fail("expected a panic to have occured") - } - }() - - RegisterFailHandler(nil) - Ω(true).Should(BeTrue()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go b/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go index 7bbec43b..cdab233e 100644 --- a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go +++ b/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go @@ -6,6 +6,7 @@ import ( "reflect" "time" + "github.com/onsi/gomega/internal/oraclematcher" "github.com/onsi/gomega/types" ) @@ -21,11 +22,11 @@ type AsyncAssertion struct { actualInput interface{} timeoutInterval time.Duration pollingInterval time.Duration - fail types.GomegaFailHandler + failWrapper *types.GomegaFailWrapper offset int } -func New(asyncType AsyncAssertionType, actualInput interface{}, fail types.GomegaFailHandler, timeoutInterval time.Duration, pollingInterval time.Duration, offset int) *AsyncAssertion { +func New(asyncType AsyncAssertionType, actualInput interface{}, failWrapper *types.GomegaFailWrapper, 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 { @@ -36,7 +37,7 @@ func New(asyncType AsyncAssertionType, actualInput interface{}, fail types.Gomeg return &AsyncAssertion{ asyncType: asyncType, actualInput: actualInput, - fail: fail, + failWrapper: failWrapper, timeoutInterval: timeoutInterval, pollingInterval: pollingInterval, offset: offset, @@ -44,10 +45,12 @@ func New(asyncType AsyncAssertionType, actualInput interface{}, fail types.Gomeg } func (assertion *AsyncAssertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.failWrapper.TWithHelper.Helper() return assertion.match(matcher, true, optionalDescription...) } func (assertion *AsyncAssertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { + assertion.failWrapper.TWithHelper.Helper() return assertion.match(matcher, false, optionalDescription...) } @@ -86,21 +89,12 @@ func (assertion *AsyncAssertion) pollActual() (interface{}, error) { return assertion.actualInput, nil } -type oracleMatcher interface { - MatchMayChangeInTheFuture(actual interface{}) bool -} - func (assertion *AsyncAssertion) matcherMayChange(matcher types.GomegaMatcher, value interface{}) bool { if assertion.actualInputIsAFunction() { return true } - oracleMatcher, ok := matcher.(oracleMatcher) - if !ok { - return true - } - - return oracleMatcher.MatchMayChangeInTheFuture(value) + return oraclematcher.MatchMayChangeInTheFuture(matcher, value) } func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch bool, optionalDescription ...interface{}) bool { @@ -118,6 +112,8 @@ func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch matches, err = matcher.Match(value) } + assertion.failWrapper.TWithHelper.Helper() + fail := func(preamble string) { errMsg := "" message := "" @@ -130,7 +126,8 @@ func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch 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) + assertion.failWrapper.TWithHelper.Helper() + assertion.failWrapper.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 { diff --git a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_suite_test.go b/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_suite_test.go deleted file mode 100644 index bdb0c3d2..00000000 --- a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package asyncassertion_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestAsyncAssertion(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "AsyncAssertion Suite") -} diff --git a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_test.go b/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_test.go deleted file mode 100644 index 4288d4da..00000000 --- a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion_test.go +++ /dev/null @@ -1,345 +0,0 @@ -package asyncassertion_test - -import ( - "errors" - "time" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/internal/asyncassertion" -) - -var _ = Describe("Async Assertion", func() { - var ( - failureMessage string - callerSkip int - ) - - var fakeFailHandler = func(message string, skip ...int) { - failureMessage = message - callerSkip = skip[0] - } - - BeforeEach(func() { - failureMessage = "" - callerSkip = 0 - }) - - Describe("Eventually", func() { - Context("the positive case", func() { - It("should poll the function and matcher", func() { - counter := 0 - a := New(AsyncAssertionTypeEventually, func() int { - counter++ - return counter - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.Should(BeNumerically("==", 5)) - Ω(failureMessage).Should(BeZero()) - }) - - It("should continue when the matcher errors", func() { - counter := 0 - a := New(AsyncAssertionTypeEventually, func() interface{} { - counter++ - if counter == 5 { - return "not-a-number" //this should cause the matcher to error - } - return counter - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.Should(BeNumerically("==", 5), "My description %d", 2) - - Ω(failureMessage).Should(ContainSubstring("Timed out after")) - Ω(failureMessage).Should(ContainSubstring("My description 2")) - Ω(callerSkip).Should(Equal(4)) - }) - - It("should be able to timeout", func() { - counter := 0 - a := New(AsyncAssertionTypeEventually, func() int { - counter++ - return counter - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.Should(BeNumerically(">", 100), "My description %d", 2) - - Ω(counter).Should(BeNumerically(">", 8)) - Ω(counter).Should(BeNumerically("<=", 10)) - Ω(failureMessage).Should(ContainSubstring("Timed out after")) - Ω(failureMessage).Should(MatchRegexp(`\: \d`), "Should pass the correct value to the matcher message formatter.") - Ω(failureMessage).Should(ContainSubstring("My description 2")) - Ω(callerSkip).Should(Equal(4)) - }) - }) - - Context("the negative case", func() { - It("should poll the function and matcher", func() { - counter := 0 - a := New(AsyncAssertionTypeEventually, func() int { - counter += 1 - return counter - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.ShouldNot(BeNumerically("<", 3)) - - Ω(counter).Should(Equal(3)) - Ω(failureMessage).Should(BeZero()) - }) - - It("should timeout when the matcher errors", func() { - a := New(AsyncAssertionTypeEventually, func() interface{} { - return 0 //this should cause the matcher to error - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.ShouldNot(HaveLen(0), "My description %d", 2) - - Ω(failureMessage).Should(ContainSubstring("Timed out after")) - Ω(failureMessage).Should(ContainSubstring("Error:")) - Ω(failureMessage).Should(ContainSubstring("My description 2")) - Ω(callerSkip).Should(Equal(4)) - }) - - It("should be able to timeout", func() { - a := New(AsyncAssertionTypeEventually, func() int { - return 0 - }, fakeFailHandler, time.Duration(0.1*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.ShouldNot(Equal(0), "My description %d", 2) - - Ω(failureMessage).Should(ContainSubstring("Timed out after")) - Ω(failureMessage).Should(ContainSubstring(": 0"), "Should pass the correct value to the matcher message formatter.") - Ω(failureMessage).Should(ContainSubstring("My description 2")) - Ω(callerSkip).Should(Equal(4)) - }) - }) - - Context("with a function that returns multiple values", func() { - It("should eventually succeed if the additional arguments are nil", func() { - i := 0 - Eventually(func() (int, error) { - i++ - return i, nil - }).Should(Equal(10)) - }) - - It("should eventually timeout if the additional arguments are not nil", func() { - i := 0 - a := New(AsyncAssertionTypeEventually, func() (int, error) { - i++ - return i, errors.New("bam") - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - a.Should(Equal(2)) - - Ω(failureMessage).Should(ContainSubstring("Timed out after")) - Ω(failureMessage).Should(ContainSubstring("Error:")) - Ω(failureMessage).Should(ContainSubstring("bam")) - Ω(callerSkip).Should(Equal(4)) - }) - }) - - Context("Making an assertion without a registered fail handler", func() { - It("should panic", func() { - defer func() { - e := recover() - RegisterFailHandler(Fail) - if e == nil { - Fail("expected a panic to have occured") - } - }() - - RegisterFailHandler(nil) - c := make(chan bool, 1) - c <- true - Eventually(c).Should(Receive()) - }) - }) - }) - - Describe("Consistently", func() { - Describe("The positive case", func() { - Context("when the matcher consistently passes for the duration", func() { - It("should pass", func() { - calls := 0 - a := New(AsyncAssertionTypeConsistently, func() string { - calls++ - return "foo" - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.Should(Equal("foo")) - Ω(calls).Should(BeNumerically(">", 8)) - Ω(calls).Should(BeNumerically("<=", 10)) - Ω(failureMessage).Should(BeZero()) - }) - }) - - Context("when the matcher fails at some point", func() { - It("should fail", func() { - calls := 0 - a := New(AsyncAssertionTypeConsistently, func() interface{} { - calls++ - if calls > 5 { - return "bar" - } - return "foo" - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.Should(Equal("foo")) - Ω(failureMessage).Should(ContainSubstring("to equal")) - Ω(callerSkip).Should(Equal(4)) - }) - }) - - Context("when the matcher errors at some point", func() { - It("should fail", func() { - calls := 0 - a := New(AsyncAssertionTypeConsistently, func() interface{} { - calls++ - if calls > 5 { - return 3 - } - return []int{1, 2, 3} - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.Should(HaveLen(3)) - Ω(failureMessage).Should(ContainSubstring("HaveLen matcher expects")) - Ω(callerSkip).Should(Equal(4)) - }) - }) - }) - - Describe("The negative case", func() { - Context("when the matcher consistently passes for the duration", func() { - It("should pass", func() { - c := make(chan bool) - a := New(AsyncAssertionTypeConsistently, c, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.ShouldNot(Receive()) - Ω(failureMessage).Should(BeZero()) - }) - }) - - Context("when the matcher fails at some point", func() { - It("should fail", func() { - c := make(chan bool) - go func() { - time.Sleep(time.Duration(100 * time.Millisecond)) - c <- true - }() - - a := New(AsyncAssertionTypeConsistently, c, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.ShouldNot(Receive()) - Ω(failureMessage).Should(ContainSubstring("not to receive anything")) - }) - }) - - Context("when the matcher errors at some point", func() { - It("should fail", func() { - calls := 0 - a := New(AsyncAssertionTypeConsistently, func() interface{} { - calls++ - return calls - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - - a.ShouldNot(BeNumerically(">", 5)) - Ω(failureMessage).Should(ContainSubstring("not to be >")) - Ω(callerSkip).Should(Equal(4)) - }) - }) - }) - - Context("with a function that returns multiple values", func() { - It("should consistently succeed if the additional arguments are nil", func() { - i := 2 - Consistently(func() (int, error) { - i++ - return i, nil - }).Should(BeNumerically(">=", 2)) - }) - - It("should eventually timeout if the additional arguments are not nil", func() { - i := 2 - a := New(AsyncAssertionTypeEventually, func() (int, error) { - i++ - return i, errors.New("bam") - }, fakeFailHandler, time.Duration(0.2*float64(time.Second)), time.Duration(0.02*float64(time.Second)), 1) - a.Should(BeNumerically(">=", 2)) - - Ω(failureMessage).Should(ContainSubstring("Error:")) - Ω(failureMessage).Should(ContainSubstring("bam")) - Ω(callerSkip).Should(Equal(4)) - }) - }) - - Context("Making an assertion without a registered fail handler", func() { - It("should panic", func() { - defer func() { - e := recover() - RegisterFailHandler(Fail) - if e == nil { - Fail("expected a panic to have occured") - } - }() - - RegisterFailHandler(nil) - c := make(chan bool) - Consistently(c).ShouldNot(Receive()) - }) - }) - }) - - Context("when passed a function with the wrong # or arguments & returns", func() { - It("should panic", func() { - Ω(func() { - New(AsyncAssertionTypeEventually, func() {}, fakeFailHandler, 0, 0, 1) - }).Should(Panic()) - - Ω(func() { - New(AsyncAssertionTypeEventually, func(a string) int { return 0 }, fakeFailHandler, 0, 0, 1) - }).Should(Panic()) - - Ω(func() { - New(AsyncAssertionTypeEventually, func() int { return 0 }, fakeFailHandler, 0, 0, 1) - }).ShouldNot(Panic()) - - Ω(func() { - New(AsyncAssertionTypeEventually, func() (int, error) { return 0, nil }, fakeFailHandler, 0, 0, 1) - }).ShouldNot(Panic()) - }) - }) - - Describe("bailing early", func() { - Context("when actual is a value", func() { - It("Eventually should bail out and fail early if the matcher says to", func() { - c := make(chan bool) - close(c) - - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(c, 0.1).Should(Receive()) - }) - Ω(time.Since(t)).Should(BeNumerically("<", 90*time.Millisecond)) - - Ω(failures).Should(HaveLen(1)) - }) - }) - - Context("when actual is a function", func() { - It("should never bail early", func() { - c := make(chan bool) - close(c) - - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(func() chan bool { - return c - }, 0.1).Should(Receive()) - }) - Ω(time.Since(t)).Should(BeNumerically(">=", 90*time.Millisecond)) - - Ω(failures).Should(HaveLen(1)) - }) - }) - }) -}) 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 6e351a7d..00000000 --- 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 new file mode 100644 index 00000000..66cad88a --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/oraclematcher/oracle_matcher.go @@ -0,0 +1,25 @@ +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 index 7871fd43..bb27032f 100644 --- a/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go +++ b/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go @@ -8,30 +8,50 @@ import ( "github.com/onsi/gomega/types" ) +var StackTracePruneRE = regexp.MustCompile(`\/gomega\/|\/ginkgo\/|\/pkg\/testing\/|\/pkg\/runtime\/`) + +type EmptyTWithHelper struct{} + +func (e EmptyTWithHelper) Helper() {} + type gomegaTestingT interface { - Errorf(format string, args ...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] +func BuildTestingTGomegaFailWrapper(t gomegaTestingT) *types.GomegaFailWrapper { + tWithHelper, hasHelper := t.(types.TWithHelper) + if !hasHelper { + tWithHelper = EmptyTWithHelper{} + } + + fail := func(message string, callerSkip ...int) { + if hasHelper { + tWithHelper.Helper() + t.Fatalf("\n%s", message) + } else { + skip := 2 + if len(callerSkip) > 0 { + skip += callerSkip[0] + } + stackTrace := pruneStack(string(debug.Stack()), skip) + t.Fatalf("\n%s\n%s\n", stackTrace, message) } - stackTrace := pruneStack(string(debug.Stack()), skip) - t.Errorf("\n%s\n%s", stackTrace, message) + } + + return &types.GomegaFailWrapper{ + Fail: fail, + TWithHelper: tWithHelper, } } func pruneStack(fullStackTrace string, skip int) string { - stack := strings.Split(fullStackTrace, "\n") - if len(stack) > 2*(skip+1) { - stack = stack[2*(skip+1):] + stack := strings.Split(fullStackTrace, "\n")[1:] + if len(stack) > 2*skip { + stack = stack[2*skip:] } 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])) { + if !StackTracePruneRE.Match([]byte(stack[i*2])) { prunedStack = append(prunedStack, stack[i*2]) prunedStack = append(prunedStack, stack[i*2+1]) } diff --git a/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support_test.go b/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support_test.go deleted file mode 100644 index b9fbd6c6..00000000 --- a/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support_test.go +++ /dev/null @@ -1,12 +0,0 @@ -package testingtsupport_test - -import ( - . "github.com/onsi/gomega" - - "testing" -) - -func TestTestingT(t *testing.T) { - RegisterTestingT(t) - Ω(true).Should(BeTrue()) -} diff --git a/vendor/github.com/onsi/gomega/matchers.go b/vendor/github.com/onsi/gomega/matchers.go index 307f88a4..c3a326dd 100644 --- a/vendor/github.com/onsi/gomega/matchers.go +++ b/vendor/github.com/onsi/gomega/matchers.go @@ -26,6 +26,15 @@ func BeEquivalentTo(expected interface{}) types.GomegaMatcher { } } +//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{} @@ -44,7 +53,7 @@ func BeFalse() types.GomegaMatcher { //HaveOccurred succeeds if actual is a non-nil error //The typical Go error checking pattern looks like: // err := SomethingThatMightFail() -// Ω(err).ShouldNot(HaveOccurred()) +// Expect(err).ShouldNot(HaveOccurred()) func HaveOccurred() types.GomegaMatcher { return &matchers.HaveOccurredMatcher{} } @@ -52,10 +61,10 @@ func HaveOccurred() types.GomegaMatcher { //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()) +// Expect(err).ShouldNot(HaveOccurred()) // //You can write: -// Ω(SomethingThatMightFail()).Should(Succeed()) +// Expect(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. @@ -67,8 +76,8 @@ func Succeed() types.GomegaMatcher { //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) +// Expect(err).Should(MatchError("an error")) //asserts that err.Error() == "an error" +// Expect(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 { @@ -97,11 +106,11 @@ func BeClosed() types.GomegaMatcher { // //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 there is nothing on the channel `c` then Expect(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 the channel `c` is closed then Expect(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 there is something on the channel `c` ready to be read, then Expect(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()) @@ -112,7 +121,7 @@ func BeClosed() types.GomegaMatcher { // 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"))) +// Expect(c).Should(Receive(Equal("foo"))) // //When given a matcher, `Receive` will always fail if there is nothing to be received on the channel. // @@ -125,8 +134,8 @@ func BeClosed() types.GomegaMatcher { //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()) +// Expect(myThing.Sprocket).Should(Equal("foo")) +// Expect(myThing.IsValid()).Should(BeTrue()) func Receive(args ...interface{}) types.GomegaMatcher { var arg interface{} if len(args) > 0 { @@ -144,9 +153,9 @@ func Receive(args ...interface{}) types.GomegaMatcher { // //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 not ready to receive then Expect(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 +//- If the channel `c` is closed then Expect(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. @@ -167,7 +176,7 @@ func MatchRegexp(regexp string, args ...interface{}) types.GomegaMatcher { } //ContainSubstring succeeds if actual is a string or stringer that contains the -//passed-in regexp. Optional arguments can be provided to construct the substring +//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{ @@ -205,6 +214,24 @@ func MatchJSON(json interface{}) types.GomegaMatcher { } } +//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{} @@ -217,6 +244,13 @@ func HaveLen(count int) types.GomegaMatcher { } } +//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{} @@ -225,7 +259,7 @@ func BeZero() types.GomegaMatcher { //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"))) +// Expect([]string{"Foo", "FooBar"}).Should(ContainElement(ContainSubstring("Bar"))) // //Actual must be an array, slice or map. //For maps, ContainElement searches through the map's values. @@ -235,22 +269,21 @@ func ContainElement(element interface{}) types.GomegaMatcher { } } -//ConsistOf succeeds if actual contains preciely the elements passed into the matcher. The ordering of the elements does not matter. +//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"))) +// Expect([]string{"Foo", "FooBar"}).Should(ConsistOf("FooBar", "Foo")) +// Expect([]string{"Foo", "FooBar"}).Should(ConsistOf(ContainSubstring("Bar"), "Foo")) +// Expect([]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"})) +// Expect([]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, @@ -260,7 +293,7 @@ func ConsistOf(elements ...interface{}) types.GomegaMatcher { //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$`))) +// Expect(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKey(MatchRegexp(`.+Foo$`))) func HaveKey(key interface{}) types.GomegaMatcher { return &matchers.HaveKeyMatcher{ Key: key, @@ -270,8 +303,8 @@ func HaveKey(key interface{}) types.GomegaMatcher { //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")) +// Expect(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKeyWithValue("Foo", "Bar")) +// Expect(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, @@ -281,15 +314,15 @@ func HaveKeyWithValue(key interface{}, value interface{}) types.GomegaMatcher { //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...). +//number is irrelevant (float32, 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)) +// Expect(1.0).Should(BeNumerically("==", 1)) +// Expect(1.0).Should(BeNumerically("~", 0.999, 0.01)) +// Expect(1.0).Should(BeNumerically(">", 0.9)) +// Expect(1.0).Should(BeNumerically(">=", 1.0)) +// Expect(1.0).Should(BeNumerically("<", 3)) +// Expect(1.0).Should(BeNumerically("<=", 1.0)) func BeNumerically(comparator string, compareTo ...interface{}) types.GomegaMatcher { return &matchers.BeNumericallyMatcher{ Comparator: comparator, @@ -299,8 +332,8 @@ func BeNumerically(comparator string, compareTo ...interface{}) types.GomegaMatc //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)) +// Expect(time.Now()).Should(BeTemporally(">", time.Time{})) +// Expect(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, @@ -311,10 +344,10 @@ func BeTemporally(comparator string, compareTo time.Time, threshold ...time.Dura //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 }{})) +// Expect(0).Should(BeAssignableToTypeOf(0)) // Same values +// Expect(5).Should(BeAssignableToTypeOf(-1)) // different values same type +// Expect("foo").Should(BeAssignableToTypeOf("bar")) // different values same type +// Expect(struct{ Foo string }{}).Should(BeAssignableToTypeOf(struct{ Foo string }{})) func BeAssignableToTypeOf(expected interface{}) types.GomegaMatcher { return &matchers.AssignableToTypeOfMatcher{ Expected: expected, @@ -326,3 +359,69 @@ func BeAssignableToTypeOf(expected interface{}) types.GomegaMatcher { 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(). +// Expect("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 new file mode 100644 index 00000000..d83a2916 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/and.go @@ -0,0 +1,63 @@ +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 index 7f8897b3..51f8be6a 100644 --- 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 @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type AssignableToTypeOfMatcher struct { @@ -11,8 +12,12 @@ type AssignableToTypeOfMatcher struct { } func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success bool, err error) { - if actual == nil || matcher.Expected == nil { - return false, fmt.Errorf("Refusing to compare to .") + 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.") + } else if matcher.Expected == nil { + return false, fmt.Errorf("Refusing to compare type to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") + } else if actual == nil { + return false, nil } actualType := reflect.TypeOf(actual) diff --git a/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher_test.go deleted file mode 100644 index d2280e05..00000000 --- a/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("AssignableToTypeOf", func() { - Context("When asserting assignability between types", func() { - It("should do the right thing", func() { - Ω(0).Should(BeAssignableToTypeOf(0)) - Ω(5).Should(BeAssignableToTypeOf(-1)) - Ω("foo").Should(BeAssignableToTypeOf("bar")) - Ω(struct{ Foo string }{}).Should(BeAssignableToTypeOf(struct{ Foo string }{})) - - Ω(0).ShouldNot(BeAssignableToTypeOf("bar")) - Ω(5).ShouldNot(BeAssignableToTypeOf(struct{ Foo string }{})) - Ω("foo").ShouldNot(BeAssignableToTypeOf(42)) - }) - }) - - Context("When asserting nil values", func() { - It("should error", func() { - success, err := (&AssignableToTypeOfMatcher{Expected: nil}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/attributes_slice.go b/vendor/github.com/onsi/gomega/matchers/attributes_slice.go new file mode 100644 index 00000000..355b362f --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/attributes_slice.go @@ -0,0 +1,14 @@ +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 new file mode 100644 index 00000000..7b6975e4 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_a_directory.go @@ -0,0 +1,54 @@ +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 new file mode 100644 index 00000000..e239131f --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go @@ -0,0 +1,54 @@ +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 new file mode 100644 index 00000000..d42eba22 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go @@ -0,0 +1,38 @@ +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 index c1b49959..80c9c8bb 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type BeClosedMatcher struct { @@ -22,8 +23,8 @@ func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err err } winnerIndex, _, open := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectRecv, Chan: channelValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, + {Dir: reflect.SelectRecv, Chan: channelValue}, + {Dir: reflect.SelectDefault}, }) var closed bool diff --git a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_closed_matcher_test.go deleted file mode 100644 index b2c40c91..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("BeClosedMatcher", func() { - Context("when passed a channel", func() { - It("should do the right thing", func() { - openChannel := make(chan bool) - Ω(openChannel).ShouldNot(BeClosed()) - - var openReaderChannel <-chan bool - openReaderChannel = openChannel - Ω(openReaderChannel).ShouldNot(BeClosed()) - - closedChannel := make(chan bool) - close(closedChannel) - - Ω(closedChannel).Should(BeClosed()) - - var closedReaderChannel <-chan bool - closedReaderChannel = closedChannel - Ω(closedReaderChannel).Should(BeClosed()) - }) - }) - - Context("when passed a send-only channel", func() { - It("should error", func() { - openChannel := make(chan bool) - var openWriterChannel chan<- bool - openWriterChannel = openChannel - - success, err := (&BeClosedMatcher{}).Match(openWriterChannel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - closedChannel := make(chan bool) - close(closedChannel) - - var closedWriterChannel chan<- bool - closedWriterChannel = closedChannel - - success, err = (&BeClosedMatcher{}).Match(closedWriterChannel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - }) - }) - - Context("when passed something else", func() { - It("should error", func() { - var nilChannel chan bool - - success, err := (&BeClosedMatcher{}).Match(nilChannel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeClosedMatcher{}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeClosedMatcher{}).Match(7) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go index 55bdd7d1..8b00311b 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go @@ -2,6 +2,7 @@ package matchers import ( "fmt" + "github.com/onsi/gomega/format" ) diff --git a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go deleted file mode 100644 index 541c1b95..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("BeEmpty", func() { - Context("when passed a supported type", func() { - It("should do the right thing", func() { - Ω("").Should(BeEmpty()) - Ω(" ").ShouldNot(BeEmpty()) - - Ω([0]int{}).Should(BeEmpty()) - Ω([1]int{1}).ShouldNot(BeEmpty()) - - Ω([]int{}).Should(BeEmpty()) - Ω([]int{1}).ShouldNot(BeEmpty()) - - Ω(map[string]int{}).Should(BeEmpty()) - Ω(map[string]int{"a": 1}).ShouldNot(BeEmpty()) - - c := make(chan bool, 1) - Ω(c).Should(BeEmpty()) - c <- true - Ω(c).ShouldNot(BeEmpty()) - }) - }) - - Context("when passed a correctly typed nil", func() { - It("should be true", func() { - var nilSlice []int - Ω(nilSlice).Should(BeEmpty()) - - var nilMap map[int]string - Ω(nilMap).Should(BeEmpty()) - }) - }) - - Context("when passed an unsupported type", func() { - It("should error", func() { - success, err := (&BeEmptyMatcher{}).Match(0) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeEmptyMatcher{}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) 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 index 32a0c310..97ab20a4 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type BeEquivalentToMatcher struct { diff --git a/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher_test.go deleted file mode 100644 index def5104f..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("BeEquivalentTo", func() { - Context("when asserting that nil is equivalent to nil", func() { - It("should error", func() { - success, err := (&BeEquivalentToMatcher{Expected: nil}).Match(nil) - - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("When asserting on nil", func() { - It("should do the right thing", func() { - Ω("foo").ShouldNot(BeEquivalentTo(nil)) - Ω(nil).ShouldNot(BeEquivalentTo(3)) - Ω([]int{1, 2}).ShouldNot(BeEquivalentTo(nil)) - }) - }) - - Context("When asserting on type aliases", func() { - It("should the right thing", func() { - Ω(StringAlias("foo")).Should(BeEquivalentTo("foo")) - Ω("foo").Should(BeEquivalentTo(StringAlias("foo"))) - Ω(StringAlias("foo")).ShouldNot(BeEquivalentTo("bar")) - Ω("foo").ShouldNot(BeEquivalentTo(StringAlias("bar"))) - }) - }) - - Context("When asserting on numbers", func() { - It("should convert actual to expected and do the right thing", func() { - Ω(5).Should(BeEquivalentTo(5)) - Ω(5.0).Should(BeEquivalentTo(5.0)) - Ω(5).Should(BeEquivalentTo(5.0)) - - Ω(5).ShouldNot(BeEquivalentTo("5")) - Ω(5).ShouldNot(BeEquivalentTo(3)) - - //Here be dragons! - Ω(5.1).Should(BeEquivalentTo(5)) - Ω(5).ShouldNot(BeEquivalentTo(5.1)) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go index 0b224cbb..91d3b779 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go @@ -2,6 +2,7 @@ package matchers import ( "fmt" + "github.com/onsi/gomega/format" ) diff --git a/vendor/github.com/onsi/gomega/matchers/be_false_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_false_matcher_test.go deleted file mode 100644 index 3965a2c5..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_false_matcher_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("BeFalse", func() { - It("should handle true and false correctly", func() { - Ω(true).ShouldNot(BeFalse()) - Ω(false).Should(BeFalse()) - }) - - It("should only support booleans", func() { - success, err := (&BeFalseMatcher{}).Match("foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_identical_to.go b/vendor/github.com/onsi/gomega/matchers/be_identical_to.go new file mode 100644 index 00000000..fdcda4d1 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_identical_to.go @@ -0,0 +1,37 @@ +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_test.go b/vendor/github.com/onsi/gomega/matchers/be_nil_matcher_test.go deleted file mode 100644 index 75332536..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_nil_matcher_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("BeNil", func() { - It("should succeed when passed nil", func() { - Ω(nil).Should(BeNil()) - }) - - It("should succeed when passed a typed nil", func() { - var a []int - Ω(a).Should(BeNil()) - }) - - It("should succeed when passing nil pointer", func() { - var f *struct{} - Ω(f).Should(BeNil()) - }) - - It("should not succeed when not passed nil", func() { - Ω(0).ShouldNot(BeNil()) - Ω(false).ShouldNot(BeNil()) - Ω("").ShouldNot(BeNil()) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go index 52f83fe3..9f4f77ee 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "math" + + "github.com/onsi/gomega/format" ) type BeNumericallyMatcher struct { @@ -12,11 +13,23 @@ type BeNumericallyMatcher struct { } func (matcher *BeNumericallyMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("to be %s", matcher.Comparator), matcher.CompareTo[0]) + return matcher.FormatFailureMessage(actual, false) } func (matcher *BeNumericallyMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("not to be %s", matcher.Comparator), matcher.CompareTo[0]) + return matcher.FormatFailureMessage(actual, true) +} + +func (matcher *BeNumericallyMatcher) FormatFailureMessage(actual interface{}, negated bool) (message string) { + if len(matcher.CompareTo) == 1 { + message = fmt.Sprintf("to be %s", matcher.Comparator) + } else { + message = fmt.Sprintf("to be within %v of %s", matcher.CompareTo[1], matcher.Comparator) + } + if negated { + message = "not " + message + } + return format.Message(actual, message, matcher.CompareTo[0]) } func (matcher *BeNumericallyMatcher) Match(actual interface{}) (success bool, err error) { diff --git a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go deleted file mode 100644 index 43fdb1fe..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go +++ /dev/null @@ -1,148 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("BeNumerically", func() { - Context("when passed a number", func() { - It("should support ==", func() { - Ω(uint32(5)).Should(BeNumerically("==", 5)) - Ω(float64(5.0)).Should(BeNumerically("==", 5)) - Ω(int8(5)).Should(BeNumerically("==", 5)) - }) - - It("should not have false positives", func() { - Ω(5.1).ShouldNot(BeNumerically("==", 5)) - Ω(5).ShouldNot(BeNumerically("==", 5.1)) - }) - - It("should support >", func() { - Ω(uint32(5)).Should(BeNumerically(">", 4)) - Ω(float64(5.0)).Should(BeNumerically(">", 4.9)) - Ω(int8(5)).Should(BeNumerically(">", 4)) - - Ω(uint32(5)).ShouldNot(BeNumerically(">", 5)) - Ω(float64(5.0)).ShouldNot(BeNumerically(">", 5.0)) - Ω(int8(5)).ShouldNot(BeNumerically(">", 5)) - }) - - It("should support <", func() { - Ω(uint32(5)).Should(BeNumerically("<", 6)) - Ω(float64(5.0)).Should(BeNumerically("<", 5.1)) - Ω(int8(5)).Should(BeNumerically("<", 6)) - - Ω(uint32(5)).ShouldNot(BeNumerically("<", 5)) - Ω(float64(5.0)).ShouldNot(BeNumerically("<", 5.0)) - Ω(int8(5)).ShouldNot(BeNumerically("<", 5)) - }) - - It("should support >=", func() { - Ω(uint32(5)).Should(BeNumerically(">=", 4)) - Ω(float64(5.0)).Should(BeNumerically(">=", 4.9)) - Ω(int8(5)).Should(BeNumerically(">=", 4)) - - Ω(uint32(5)).Should(BeNumerically(">=", 5)) - Ω(float64(5.0)).Should(BeNumerically(">=", 5.0)) - Ω(int8(5)).Should(BeNumerically(">=", 5)) - - Ω(uint32(5)).ShouldNot(BeNumerically(">=", 6)) - Ω(float64(5.0)).ShouldNot(BeNumerically(">=", 5.1)) - Ω(int8(5)).ShouldNot(BeNumerically(">=", 6)) - }) - - It("should support <=", func() { - Ω(uint32(5)).Should(BeNumerically("<=", 6)) - Ω(float64(5.0)).Should(BeNumerically("<=", 5.1)) - Ω(int8(5)).Should(BeNumerically("<=", 6)) - - Ω(uint32(5)).Should(BeNumerically("<=", 5)) - Ω(float64(5.0)).Should(BeNumerically("<=", 5.0)) - Ω(int8(5)).Should(BeNumerically("<=", 5)) - - Ω(uint32(5)).ShouldNot(BeNumerically("<=", 4)) - Ω(float64(5.0)).ShouldNot(BeNumerically("<=", 4.9)) - Ω(int8(5)).Should(BeNumerically("<=", 5)) - }) - - Context("when passed ~", func() { - Context("when passed a float", func() { - Context("and there is no precision parameter", func() { - It("should default to 1e-8", func() { - Ω(5.00000001).Should(BeNumerically("~", 5.00000002)) - Ω(5.00000001).ShouldNot(BeNumerically("~", 5.0000001)) - }) - }) - - Context("and there is a precision parameter", func() { - It("should use the precision parameter", func() { - Ω(5.1).Should(BeNumerically("~", 5.19, 0.1)) - Ω(5.1).Should(BeNumerically("~", 5.01, 0.1)) - Ω(5.1).ShouldNot(BeNumerically("~", 5.22, 0.1)) - Ω(5.1).ShouldNot(BeNumerically("~", 4.98, 0.1)) - }) - }) - }) - - Context("when passed an int/uint", func() { - Context("and there is no precision parameter", func() { - It("should just do strict equality", func() { - Ω(5).Should(BeNumerically("~", 5)) - Ω(5).ShouldNot(BeNumerically("~", 6)) - Ω(uint(5)).ShouldNot(BeNumerically("~", 6)) - }) - }) - - Context("and there is a precision parameter", func() { - It("should use precision paramter", func() { - Ω(5).Should(BeNumerically("~", 6, 2)) - Ω(5).ShouldNot(BeNumerically("~", 8, 2)) - Ω(uint(5)).Should(BeNumerically("~", 6, 1)) - }) - }) - }) - }) - }) - - Context("when passed a non-number", func() { - It("should error", func() { - success, err := (&BeNumericallyMatcher{Comparator: "==", CompareTo: []interface{}{5}}).Match("foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeNumericallyMatcher{Comparator: "=="}).Match(5) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeNumericallyMatcher{Comparator: "~", CompareTo: []interface{}{3.0, "foo"}}).Match(5.0) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeNumericallyMatcher{Comparator: "==", CompareTo: []interface{}{"bar"}}).Match(5) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeNumericallyMatcher{Comparator: "==", CompareTo: []interface{}{"bar"}}).Match("foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeNumericallyMatcher{Comparator: "==", CompareTo: []interface{}{nil}}).Match(0) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeNumericallyMatcher{Comparator: "==", CompareTo: []interface{}{0}}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed an unsupported comparator", func() { - It("should error", func() { - success, err := (&BeNumericallyMatcher{Comparator: "!=", CompareTo: []interface{}{5}}).Match(4) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go index d7c32233..302dd1a0 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go @@ -42,8 +42,8 @@ func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error }() winnerIndex, _, _ := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectSend, Chan: channelValue, Send: argValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, + {Dir: reflect.SelectSend, Chan: channelValue, Send: argValue}, + {Dir: reflect.SelectDefault}, }) var didSend bool diff --git a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher_test.go deleted file mode 100644 index 381c2b40..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher_test.go +++ /dev/null @@ -1,106 +0,0 @@ -package matchers_test - -import ( - "time" - . "github.com/onsi/gomega/matchers" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("BeSent", func() { - Context("when passed a channel and a matching type", func() { - Context("when the channel is ready to receive", func() { - It("should succeed and send the value down the channel", func() { - c := make(chan string) - d := make(chan string) - go func() { - val := <-c - d <- val - }() - - time.Sleep(10 * time.Millisecond) - - Ω(c).Should(BeSent("foo")) - Eventually(d).Should(Receive(Equal("foo"))) - }) - - It("should succeed (with a buffered channel)", func() { - c := make(chan string, 1) - Ω(c).Should(BeSent("foo")) - Ω(<-c).Should(Equal("foo")) - }) - }) - - Context("when the channel is not ready to receive", func() { - It("should fail and not send down the channel", func() { - c := make(chan string) - Ω(c).ShouldNot(BeSent("foo")) - Consistently(c).ShouldNot(Receive()) - }) - }) - - Context("when the channel is eventually ready to receive", func() { - It("should succeed", func() { - c := make(chan string) - d := make(chan string) - go func() { - time.Sleep(30 * time.Millisecond) - val := <-c - d <- val - }() - - Eventually(c).Should(BeSent("foo")) - Eventually(d).Should(Receive(Equal("foo"))) - }) - }) - - Context("when the channel is closed", func() { - It("should error", func() { - c := make(chan string) - close(c) - success, err := (&BeSentMatcher{Arg: "foo"}).Match(c) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - - It("should short-circuit Eventually", func() { - c := make(chan string) - close(c) - - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(c, 10.0).Should(BeSent("foo")) - }) - Ω(failures).Should(HaveLen(1)) - Ω(time.Since(t)).Should(BeNumerically("<", time.Second)) - }) - }) - }) - - Context("when passed a channel and a non-matching type", func() { - It("should error", func() { - success, err := (&BeSentMatcher{Arg: "foo"}).Match(make(chan int, 1)) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed a receive-only channel", func() { - It("should error", func() { - var c <-chan string - c = make(chan string, 1) - success, err := (&BeSentMatcher{Arg: "foo"}).Match(c) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed a nonchannel", func() { - It("should error", func() { - success, err := (&BeSentMatcher{Arg: "foo"}).Match("bar") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go index abda4eb1..cb7c038e 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "time" + + "github.com/onsi/gomega/format" ) type BeTemporallyMatcher struct { diff --git a/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher_test.go deleted file mode 100644 index feb33e5d..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" - "time" -) - -var _ = Describe("BeTemporally", func() { - - var t0, t1, t2 time.Time - BeforeEach(func() { - t0 = time.Now() - t1 = t0.Add(time.Second) - t2 = t0.Add(-time.Second) - }) - - Context("When comparing times", func() { - - It("should support ==", func() { - Ω(t0).Should(BeTemporally("==", t0)) - Ω(t1).ShouldNot(BeTemporally("==", t0)) - Ω(t0).ShouldNot(BeTemporally("==", t1)) - Ω(t0).ShouldNot(BeTemporally("==", time.Time{})) - }) - - It("should support >", func() { - Ω(t0).Should(BeTemporally(">", t2)) - Ω(t0).ShouldNot(BeTemporally(">", t0)) - Ω(t2).ShouldNot(BeTemporally(">", t0)) - }) - - It("should support <", func() { - Ω(t0).Should(BeTemporally("<", t1)) - Ω(t0).ShouldNot(BeTemporally("<", t0)) - Ω(t1).ShouldNot(BeTemporally("<", t0)) - }) - - It("should support >=", func() { - Ω(t0).Should(BeTemporally(">=", t2)) - Ω(t0).Should(BeTemporally(">=", t0)) - Ω(t0).ShouldNot(BeTemporally(">=", t1)) - }) - - It("should support <=", func() { - Ω(t0).Should(BeTemporally("<=", t1)) - Ω(t0).Should(BeTemporally("<=", t0)) - Ω(t0).ShouldNot(BeTemporally("<=", t2)) - }) - - Context("when passed ~", func() { - Context("and there is no precision parameter", func() { - BeforeEach(func() { - t1 = t0.Add(time.Millisecond / 2) - t2 = t0.Add(-2 * time.Millisecond) - }) - It("should approximate", func() { - Ω(t0).Should(BeTemporally("~", t0)) - Ω(t0).Should(BeTemporally("~", t1)) - Ω(t0).ShouldNot(BeTemporally("~", t2)) - }) - }) - - Context("and there is a precision parameter", func() { - BeforeEach(func() { - t2 = t0.Add(3 * time.Second) - }) - It("should use precision paramter", func() { - d := 2 * time.Second - Ω(t0).Should(BeTemporally("~", t0, d)) - Ω(t0).Should(BeTemporally("~", t1, d)) - Ω(t0).ShouldNot(BeTemporally("~", t2, d)) - }) - }) - }) - }) - - Context("when passed a non-time", func() { - It("should error", func() { - success, err := (&BeTemporallyMatcher{Comparator: "==", CompareTo: t0}).Match("foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&BeTemporallyMatcher{Comparator: "=="}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed an unsupported comparator", func() { - It("should error", func() { - success, err := (&BeTemporallyMatcher{Comparator: "!=", CompareTo: t0}).Match(t2) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go index 1275e5fc..ec57c5db 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go @@ -2,6 +2,7 @@ package matchers import ( "fmt" + "github.com/onsi/gomega/format" ) diff --git a/vendor/github.com/onsi/gomega/matchers/be_true_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_true_matcher_test.go deleted file mode 100644 index ca32e56b..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_true_matcher_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("BeTrue", func() { - It("should handle true and false correctly", func() { - Ω(true).Should(BeTrue()) - Ω(false).ShouldNot(BeTrue()) - }) - - It("should only support booleans", func() { - success, err := (&BeTrueMatcher{}).Match("foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go index b39c9144..26196f16 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go @@ -1,8 +1,9 @@ package matchers import ( - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type BeZeroMatcher struct { diff --git a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go deleted file mode 100644 index 8ec3643c..00000000 --- a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("BeZero", func() { - It("should succeed if the passed in object is the zero value for its type", func() { - Ω(nil).Should(BeZero()) - - Ω("").Should(BeZero()) - Ω(" ").ShouldNot(BeZero()) - - Ω(0).Should(BeZero()) - Ω(1).ShouldNot(BeZero()) - - Ω(0.0).Should(BeZero()) - Ω(0.1).ShouldNot(BeZero()) - - // Ω([]int{}).Should(BeZero()) - Ω([]int{1}).ShouldNot(BeZero()) - - // Ω(map[string]int{}).Should(BeZero()) - Ω(map[string]int{"a": 1}).ShouldNot(BeZero()) - - Ω(myCustomType{}).Should(BeZero()) - Ω(myCustomType{s: "a"}).ShouldNot(BeZero()) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/consist_of_test.go b/vendor/github.com/onsi/gomega/matchers/consist_of_test.go deleted file mode 100644 index 0b230e39..00000000 --- a/vendor/github.com/onsi/gomega/matchers/consist_of_test.go +++ /dev/null @@ -1,75 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("ConsistOf", func() { - Context("with a slice", func() { - It("should do the right thing", func() { - Ω([]string{"foo", "bar", "baz"}).Should(ConsistOf("foo", "bar", "baz")) - Ω([]string{"foo", "bar", "baz"}).Should(ConsistOf("foo", "bar", "baz")) - Ω([]string{"foo", "bar", "baz"}).Should(ConsistOf("baz", "bar", "foo")) - Ω([]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("baz", "bar", "foo", "foo")) - Ω([]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("baz", "foo")) - }) - }) - - Context("with an array", func() { - It("should do the right thing", func() { - Ω([3]string{"foo", "bar", "baz"}).Should(ConsistOf("foo", "bar", "baz")) - Ω([3]string{"foo", "bar", "baz"}).Should(ConsistOf("baz", "bar", "foo")) - Ω([3]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("baz", "bar", "foo", "foo")) - Ω([3]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("baz", "foo")) - }) - }) - - Context("with a map", func() { - It("should apply to the values", func() { - Ω(map[int]string{1: "foo", 2: "bar", 3: "baz"}).Should(ConsistOf("foo", "bar", "baz")) - Ω(map[int]string{1: "foo", 2: "bar", 3: "baz"}).Should(ConsistOf("baz", "bar", "foo")) - Ω(map[int]string{1: "foo", 2: "bar", 3: "baz"}).ShouldNot(ConsistOf("baz", "bar", "foo", "foo")) - Ω(map[int]string{1: "foo", 2: "bar", 3: "baz"}).ShouldNot(ConsistOf("baz", "foo")) - }) - - }) - - Context("with anything else", func() { - It("should error", func() { - failures := InterceptGomegaFailures(func() { - Ω("foo").Should(ConsistOf("f", "o", "o")) - }) - - Ω(failures).Should(HaveLen(1)) - }) - }) - - Context("when passed matchers", func() { - It("should pass if the matchers pass", func() { - Ω([]string{"foo", "bar", "baz"}).Should(ConsistOf("foo", MatchRegexp("^ba"), "baz")) - Ω([]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("foo", MatchRegexp("^ba"))) - Ω([]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("foo", MatchRegexp("^ba"), MatchRegexp("foo"))) - Ω([]string{"foo", "bar", "baz"}).Should(ConsistOf("foo", MatchRegexp("^ba"), MatchRegexp("^ba"))) - Ω([]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("foo", MatchRegexp("^ba"), MatchRegexp("turducken"))) - }) - - It("should not depend on the order of the matchers", func() { - Ω([][]int{[]int{1, 2}, []int{2}}).Should(ConsistOf(ContainElement(1), ContainElement(2))) - Ω([][]int{[]int{1, 2}, []int{2}}).Should(ConsistOf(ContainElement(2), ContainElement(1))) - }) - - Context("when a matcher errors", func() { - It("should soldier on", func() { - Ω([]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf(BeFalse(), "foo", "bar")) - Ω([]interface{}{"foo", "bar", false}).Should(ConsistOf(BeFalse(), ContainSubstring("foo"), "bar")) - }) - }) - }) - - Context("when passed exactly one argument, and that argument is a slice", func() { - It("should match against the elements of that argument", func() { - Ω([]string{"foo", "bar", "baz"}).Should(ConsistOf([]string{"foo", "bar", "baz"})) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/contain_element_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/contain_element_matcher_test.go deleted file mode 100644 index 38ee518f..00000000 --- a/vendor/github.com/onsi/gomega/matchers/contain_element_matcher_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("ContainElement", func() { - Context("when passed a supported type", func() { - Context("and expecting a non-matcher", func() { - It("should do the right thing", func() { - Ω([2]int{1, 2}).Should(ContainElement(2)) - Ω([2]int{1, 2}).ShouldNot(ContainElement(3)) - - Ω([]int{1, 2}).Should(ContainElement(2)) - Ω([]int{1, 2}).ShouldNot(ContainElement(3)) - - Ω(map[string]int{"foo": 1, "bar": 2}).Should(ContainElement(2)) - Ω(map[int]int{3: 1, 4: 2}).ShouldNot(ContainElement(3)) - - arr := make([]myCustomType, 2) - arr[0] = myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}} - arr[1] = myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "c"}} - Ω(arr).Should(ContainElement(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}})) - Ω(arr).ShouldNot(ContainElement(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"b", "c"}})) - }) - }) - - Context("and expecting a matcher", func() { - It("should pass each element through the matcher", func() { - Ω([]int{1, 2, 3}).Should(ContainElement(BeNumerically(">=", 3))) - Ω([]int{1, 2, 3}).ShouldNot(ContainElement(BeNumerically(">", 3))) - Ω(map[string]int{"foo": 1, "bar": 2}).Should(ContainElement(BeNumerically(">=", 2))) - Ω(map[string]int{"foo": 1, "bar": 2}).ShouldNot(ContainElement(BeNumerically(">", 2))) - }) - - It("should power through even if the matcher ever fails", func() { - Ω([]interface{}{1, 2, "3", 4}).Should(ContainElement(BeNumerically(">=", 3))) - }) - - It("should fail if the matcher fails", func() { - actual := []interface{}{1, 2, "3", "4"} - success, err := (&ContainElementMatcher{Element: BeNumerically(">=", 3)}).Match(actual) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - }) - - Context("when passed a correctly typed nil", func() { - It("should operate succesfully on the passed in value", func() { - var nilSlice []int - Ω(nilSlice).ShouldNot(ContainElement(1)) - - var nilMap map[int]string - Ω(nilMap).ShouldNot(ContainElement("foo")) - }) - }) - - Context("when passed an unsupported type", func() { - It("should error", func() { - success, err := (&ContainElementMatcher{Element: 0}).Match(0) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&ContainElementMatcher{Element: 0}).Match("abc") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&ContainElementMatcher{Element: 0}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go b/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go index 2e760892..f8dc41e7 100644 --- a/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "strings" + + "github.com/onsi/gomega/format" ) type ContainSubstringMatcher struct { diff --git a/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher_test.go deleted file mode 100644 index 6935168e..00000000 --- a/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("ContainSubstringMatcher", func() { - Context("when actual is a string", func() { - It("should match against the string", func() { - Ω("Marvelous").Should(ContainSubstring("rve")) - Ω("Marvelous").ShouldNot(ContainSubstring("boo")) - }) - }) - - Context("when the matcher is called with multiple arguments", func() { - It("should pass the string and arguments to sprintf", func() { - Ω("Marvelous3").Should(ContainSubstring("velous%d", 3)) - }) - }) - - Context("when actual is a stringer", func() { - It("should call the stringer and match agains the returned string", func() { - Ω(&myStringer{a: "Abc3"}).Should(ContainSubstring("bc3")) - }) - }) - - Context("when actual is neither a string nor a stringer", func() { - It("should error", func() { - success, err := (&ContainSubstringMatcher{Substr: "2"}).Match(2) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/equal_matcher.go b/vendor/github.com/onsi/gomega/matchers/equal_matcher.go index 9f8f80a8..befb7bdf 100644 --- a/vendor/github.com/onsi/gomega/matchers/equal_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/equal_matcher.go @@ -1,9 +1,11 @@ package matchers import ( + "bytes" "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type EqualMatcher struct { @@ -12,12 +14,26 @@ type EqualMatcher struct { func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) { if actual == nil && matcher.Expected == nil { - return false, fmt.Errorf("Refusing to compare to .") + 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) } diff --git a/vendor/github.com/onsi/gomega/matchers/equal_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/equal_matcher_test.go deleted file mode 100644 index ef0d137d..00000000 --- a/vendor/github.com/onsi/gomega/matchers/equal_matcher_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package matchers_test - -import ( - "errors" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("Equal", func() { - Context("when asserting that nil equals nil", func() { - It("should error", func() { - success, err := (&EqualMatcher{Expected: nil}).Match(nil) - - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("When asserting equality between objects", func() { - It("should do the right thing", func() { - Ω(5).Should(Equal(5)) - Ω(5.0).Should(Equal(5.0)) - - Ω(5).ShouldNot(Equal("5")) - Ω(5).ShouldNot(Equal(5.0)) - Ω(5).ShouldNot(Equal(3)) - - Ω("5").Should(Equal("5")) - Ω([]int{1, 2}).Should(Equal([]int{1, 2})) - Ω([]int{1, 2}).ShouldNot(Equal([]int{2, 1})) - Ω(map[string]string{"a": "b", "c": "d"}).Should(Equal(map[string]string{"a": "b", "c": "d"})) - Ω(map[string]string{"a": "b", "c": "d"}).ShouldNot(Equal(map[string]string{"a": "b", "c": "e"})) - Ω(errors.New("foo")).Should(Equal(errors.New("foo"))) - Ω(errors.New("foo")).ShouldNot(Equal(errors.New("bar"))) - - Ω(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}}).Should(Equal(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}})) - Ω(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}}).ShouldNot(Equal(myCustomType{s: "bar", n: 3, f: 2.0, arr: []string{"a", "b"}})) - Ω(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}}).ShouldNot(Equal(myCustomType{s: "foo", n: 2, f: 2.0, arr: []string{"a", "b"}})) - Ω(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}}).ShouldNot(Equal(myCustomType{s: "foo", n: 3, f: 3.0, arr: []string{"a", "b"}})) - Ω(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b"}}).ShouldNot(Equal(myCustomType{s: "foo", n: 3, f: 2.0, arr: []string{"a", "b", "c"}})) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go new file mode 100644 index 00000000..7ace93dc --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go @@ -0,0 +1,28 @@ +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 index 5701ba6e..ea5b9233 100644 --- a/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type HaveKeyMatcher struct { diff --git a/vendor/github.com/onsi/gomega/matchers/have_key_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/have_key_matcher_test.go deleted file mode 100644 index c663e302..00000000 --- a/vendor/github.com/onsi/gomega/matchers/have_key_matcher_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("HaveKey", func() { - var ( - stringKeys map[string]int - intKeys map[int]string - objKeys map[*myCustomType]string - - customA *myCustomType - customB *myCustomType - ) - BeforeEach(func() { - stringKeys = map[string]int{"foo": 2, "bar": 3} - intKeys = map[int]string{2: "foo", 3: "bar"} - - customA = &myCustomType{s: "a", n: 2, f: 2.3, arr: []string{"ice", "cream"}} - customB = &myCustomType{s: "b", n: 4, f: 3.1, arr: []string{"cake"}} - objKeys = map[*myCustomType]string{customA: "aardvark", customB: "kangaroo"} - }) - - Context("when passed a map", func() { - It("should do the right thing", func() { - Ω(stringKeys).Should(HaveKey("foo")) - Ω(stringKeys).ShouldNot(HaveKey("baz")) - - Ω(intKeys).Should(HaveKey(2)) - Ω(intKeys).ShouldNot(HaveKey(4)) - - Ω(objKeys).Should(HaveKey(customA)) - Ω(objKeys).Should(HaveKey(&myCustomType{s: "b", n: 4, f: 3.1, arr: []string{"cake"}})) - Ω(objKeys).ShouldNot(HaveKey(&myCustomType{s: "b", n: 4, f: 3.1, arr: []string{"apple", "pie"}})) - }) - }) - - Context("when passed a correctly typed nil", func() { - It("should operate succesfully on the passed in value", func() { - var nilMap map[int]string - Ω(nilMap).ShouldNot(HaveKey("foo")) - }) - }) - - Context("when the passed in key is actually a matcher", func() { - It("should pass each element through the matcher", func() { - Ω(stringKeys).Should(HaveKey(ContainSubstring("oo"))) - Ω(stringKeys).ShouldNot(HaveKey(ContainSubstring("foobar"))) - }) - - It("should fail if the matcher ever fails", func() { - actual := map[int]string{1: "a", 3: "b", 2: "c"} - success, err := (&HaveKeyMatcher{Key: ContainSubstring("ar")}).Match(actual) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed something that is not a map", func() { - It("should error", func() { - success, err := (&HaveKeyMatcher{Key: "foo"}).Match([]string{"foo"}) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&HaveKeyMatcher{Key: "foo"}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) 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 index 464ac187..06355b1e 100644 --- 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 @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type HaveKeyWithValueMatcher struct { diff --git a/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher_test.go deleted file mode 100644 index 06a2242a..00000000 --- a/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("HaveKeyWithValue", func() { - var ( - stringKeys map[string]int - intKeys map[int]string - objKeys map[*myCustomType]*myCustomType - - customA *myCustomType - customB *myCustomType - ) - BeforeEach(func() { - stringKeys = map[string]int{"foo": 2, "bar": 3} - intKeys = map[int]string{2: "foo", 3: "bar"} - - customA = &myCustomType{s: "a", n: 2, f: 2.3, arr: []string{"ice", "cream"}} - customB = &myCustomType{s: "b", n: 4, f: 3.1, arr: []string{"cake"}} - objKeys = map[*myCustomType]*myCustomType{customA: customA, customB: customA} - }) - - Context("when passed a map", func() { - It("should do the right thing", func() { - Ω(stringKeys).Should(HaveKeyWithValue("foo", 2)) - Ω(stringKeys).ShouldNot(HaveKeyWithValue("foo", 1)) - Ω(stringKeys).ShouldNot(HaveKeyWithValue("baz", 2)) - Ω(stringKeys).ShouldNot(HaveKeyWithValue("baz", 1)) - - Ω(intKeys).Should(HaveKeyWithValue(2, "foo")) - Ω(intKeys).ShouldNot(HaveKeyWithValue(4, "foo")) - Ω(intKeys).ShouldNot(HaveKeyWithValue(2, "baz")) - - Ω(objKeys).Should(HaveKeyWithValue(customA, customA)) - Ω(objKeys).Should(HaveKeyWithValue(&myCustomType{s: "b", n: 4, f: 3.1, arr: []string{"cake"}}, &myCustomType{s: "a", n: 2, f: 2.3, arr: []string{"ice", "cream"}})) - Ω(objKeys).ShouldNot(HaveKeyWithValue(&myCustomType{s: "b", n: 4, f: 3.1, arr: []string{"apple", "pie"}}, customA)) - }) - }) - - Context("when passed a correctly typed nil", func() { - It("should operate succesfully on the passed in value", func() { - var nilMap map[int]string - Ω(nilMap).ShouldNot(HaveKeyWithValue("foo", "bar")) - }) - }) - - Context("when the passed in key or value is actually a matcher", func() { - It("should pass each element through the matcher", func() { - Ω(stringKeys).Should(HaveKeyWithValue(ContainSubstring("oo"), 2)) - Ω(intKeys).Should(HaveKeyWithValue(2, ContainSubstring("oo"))) - Ω(stringKeys).ShouldNot(HaveKeyWithValue(ContainSubstring("foobar"), 2)) - }) - - It("should fail if the matcher ever fails", func() { - actual := map[int]string{1: "a", 3: "b", 2: "c"} - success, err := (&HaveKeyWithValueMatcher{Key: ContainSubstring("ar"), Value: 2}).Match(actual) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - otherActual := map[string]int{"a": 1, "b": 2, "c": 3} - success, err = (&HaveKeyWithValueMatcher{Key: "a", Value: ContainSubstring("1")}).Match(otherActual) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed something that is not a map", func() { - It("should error", func() { - success, err := (&HaveKeyWithValueMatcher{Key: "foo", Value: "bar"}).Match([]string{"foo"}) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&HaveKeyWithValueMatcher{Key: "foo", Value: "bar"}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go index a1837755..ee427618 100644 --- a/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go @@ -2,6 +2,7 @@ package matchers import ( "fmt" + "github.com/onsi/gomega/format" ) diff --git a/vendor/github.com/onsi/gomega/matchers/have_len_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/have_len_matcher_test.go deleted file mode 100644 index 1e6aa69d..00000000 --- a/vendor/github.com/onsi/gomega/matchers/have_len_matcher_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("HaveLen", func() { - Context("when passed a supported type", func() { - It("should do the right thing", func() { - Ω("").Should(HaveLen(0)) - Ω("AA").Should(HaveLen(2)) - - Ω([0]int{}).Should(HaveLen(0)) - Ω([2]int{1, 2}).Should(HaveLen(2)) - - Ω([]int{}).Should(HaveLen(0)) - Ω([]int{1, 2, 3}).Should(HaveLen(3)) - - Ω(map[string]int{}).Should(HaveLen(0)) - Ω(map[string]int{"a": 1, "b": 2, "c": 3, "d": 4}).Should(HaveLen(4)) - - c := make(chan bool, 3) - Ω(c).Should(HaveLen(0)) - c <- true - c <- true - Ω(c).Should(HaveLen(2)) - }) - }) - - Context("when passed a correctly typed nil", func() { - It("should operate succesfully on the passed in value", func() { - var nilSlice []int - Ω(nilSlice).Should(HaveLen(0)) - - var nilMap map[int]string - Ω(nilMap).Should(HaveLen(0)) - }) - }) - - Context("when passed an unsupported type", func() { - It("should error", func() { - success, err := (&HaveLenMatcher{Count: 0}).Match(0) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&HaveLenMatcher{Count: 0}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go index b5095f11..ebdd7178 100644 --- a/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go @@ -2,6 +2,7 @@ package matchers import ( "fmt" + "github.com/onsi/gomega/format" ) @@ -9,19 +10,22 @@ type HaveOccurredMatcher struct { } func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err error) { + // is purely nil? if actual == nil { return false, nil } - if isError(actual) { - 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)) } - return false, fmt.Errorf("Expected an error. 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 occured. Got:\n%s", format.Object(actual, 1)) + return fmt.Sprintf("Expected an error to have occurred. Got:\n%s", format.Object(actual, 1)) } func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual interface{}) (message string) { diff --git a/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher_test.go deleted file mode 100644 index ef971aa6..00000000 --- a/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package matchers_test - -import ( - "errors" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("HaveOccurred", func() { - It("should succeed if matching an error", func() { - Ω(errors.New("Foo")).Should(HaveOccurred()) - }) - - It("should not succeed with nil", func() { - Ω(nil).ShouldNot(HaveOccurred()) - }) - - It("should only support errors and nil", func() { - success, err := (&HaveOccurredMatcher{}).Match("foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&HaveOccurredMatcher{}).Match("") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go index 8b63a899..1d8e8027 100644 --- a/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go @@ -2,6 +2,7 @@ package matchers import ( "fmt" + "github.com/onsi/gomega/format" ) diff --git a/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher_test.go deleted file mode 100644 index bec3f975..00000000 --- a/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("HavePrefixMatcher", func() { - Context("when actual is a string", func() { - It("should match a string prefix", func() { - Ω("Ab").Should(HavePrefix("A")) - Ω("A").ShouldNot(HavePrefix("Ab")) - }) - }) - - Context("when the matcher is called with multiple arguments", func() { - It("should pass the string and arguments to sprintf", func() { - Ω("C3PO").Should(HavePrefix("C%dP", 3)) - }) - }) - - Context("when actual is a stringer", func() { - It("should call the stringer and match against the returned string", func() { - Ω(&myStringer{a: "Ab"}).Should(HavePrefix("A")) - }) - }) - - Context("when actual is neither a string nor a stringer", func() { - It("should error", func() { - success, err := (&HavePrefixMatcher{Prefix: "2"}).Match(2) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go index eb1b284d..40a3526e 100644 --- a/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go @@ -2,6 +2,7 @@ package matchers import ( "fmt" + "github.com/onsi/gomega/format" ) @@ -16,7 +17,7 @@ func (matcher *HaveSuffixMatcher) Match(actual interface{}) (success bool, err e 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 + return len(actualString) >= len(suffix) && actualString[len(actualString)-len(suffix):] == suffix, nil } func (matcher *HaveSuffixMatcher) suffix() string { diff --git a/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher_test.go deleted file mode 100644 index 72e8975b..00000000 --- a/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("HaveSuffixMatcher", func() { - Context("when actual is a string", func() { - It("should match a string suffix", func() { - Ω("Ab").Should(HaveSuffix("b")) - Ω("A").ShouldNot(HaveSuffix("Ab")) - }) - }) - - Context("when the matcher is called with multiple arguments", func() { - It("should pass the string and arguments to sprintf", func() { - Ω("C3PO").Should(HaveSuffix("%dPO", 3)) - }) - }) - - Context("when actual is a stringer", func() { - It("should call the stringer and match against the returned string", func() { - Ω(&myStringer{a: "Ab"}).Should(HaveSuffix("b")) - }) - }) - - Context("when actual is neither a string nor a stringer", func() { - It("should error", func() { - success, err := (&HaveSuffixMatcher{Suffix: "2"}).Match(2) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go index 03cdf045..07499ac9 100644 --- a/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) type MatchErrorMatcher struct { @@ -21,14 +22,14 @@ func (matcher *MatchErrorMatcher) Match(actual interface{}) (success bool, err e actualErr := actual.(error) - if isString(matcher.Expected) { - return reflect.DeepEqual(actualErr.Error(), matcher.Expected), nil - } - 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 { diff --git a/vendor/github.com/onsi/gomega/matchers/match_error_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/match_error_matcher_test.go deleted file mode 100644 index 338b5129..00000000 --- a/vendor/github.com/onsi/gomega/matchers/match_error_matcher_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package matchers_test - -import ( - "errors" - "fmt" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -type CustomError struct { -} - -func (c CustomError) Error() string { - return "an error" -} - -var _ = Describe("MatchErrorMatcher", func() { - Context("When asserting against an error", func() { - It("should succeed when matching with an error", func() { - err := errors.New("an error") - fmtErr := fmt.Errorf("an error") - customErr := CustomError{} - - Ω(err).Should(MatchError(errors.New("an error"))) - Ω(err).ShouldNot(MatchError(errors.New("another error"))) - - Ω(fmtErr).Should(MatchError(errors.New("an error"))) - Ω(customErr).Should(MatchError(CustomError{})) - }) - - It("should succeed when matching with a string", func() { - err := errors.New("an error") - fmtErr := fmt.Errorf("an error") - customErr := CustomError{} - - Ω(err).Should(MatchError("an error")) - Ω(err).ShouldNot(MatchError("another error")) - - Ω(fmtErr).Should(MatchError("an error")) - Ω(customErr).Should(MatchError("an error")) - }) - - Context("when passed a matcher", func() { - It("should pass if the matcher passes against the error string", func() { - err := errors.New("error 123 abc") - - Ω(err).Should(MatchError(MatchRegexp(`\d{3}`))) - }) - - It("should fail if the matcher fails against the error string", func() { - err := errors.New("no digits") - Ω(err).ShouldNot(MatchError(MatchRegexp(`\d`))) - }) - }) - - It("should fail when passed anything else", func() { - actualErr := errors.New("an error") - _, err := (&MatchErrorMatcher{ - Expected: []byte("an error"), - }).Match(actualErr) - Ω(err).Should(HaveOccurred()) - - _, err = (&MatchErrorMatcher{ - Expected: 3, - }).Match(actualErr) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed nil", func() { - It("should fail", func() { - _, err := (&MatchErrorMatcher{ - Expected: "an error", - }).Match(nil) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed a non-error", func() { - It("should fail", func() { - _, err := (&MatchErrorMatcher{ - Expected: "an error", - }).Match("an error") - Ω(err).Should(HaveOccurred()) - - _, err = (&MatchErrorMatcher{ - Expected: "an error", - }).Match(3) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go index efc5e154..f962f139 100644 --- a/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go @@ -4,12 +4,13 @@ import ( "bytes" "encoding/json" "fmt" + "github.com/onsi/gomega/format" - "reflect" ) type MatchJSONMatcher struct { - JSONToMatch interface{} + JSONToMatch interface{} + firstFailurePath []interface{} } func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bool, err error) { @@ -24,37 +25,40 @@ func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bool, err er // this is guarded by prettyPrint json.Unmarshal([]byte(actualString), &aval) json.Unmarshal([]byte(expectedString), &eval) - - return reflect.DeepEqual(aval, eval), nil + 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 format.Message(actualString, "to match JSON of", expectedString) + 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 format.Message(actualString, "not to match JSON of", expectedString) + return formattedMessage(format.Message(actualString, "not to match JSON of", expectedString), matcher.firstFailurePath) } func (matcher *MatchJSONMatcher) prettyPrint(actual interface{}) (actualFormatted, expectedFormatted string, err error) { - actualString, aok := toString(actual) - expectedString, eok := toString(matcher.JSONToMatch) - - if !(aok && eok) { - return "", "", fmt.Errorf("MatchJSONMatcher matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) + 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 "", "", err + 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 "", "", err + return "", "", fmt.Errorf("Expected '%s' should be valid JSON, but it is not.\nUnderlying error:%s", expectedString, err) } return abuf.String(), ebuf.String(), nil diff --git a/vendor/github.com/onsi/gomega/matchers/match_json_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/match_json_matcher_test.go deleted file mode 100644 index c1924baa..00000000 --- a/vendor/github.com/onsi/gomega/matchers/match_json_matcher_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("MatchJSONMatcher", func() { - Context("When passed stringifiables", func() { - It("should succeed if the JSON matches", func() { - Ω("{}").Should(MatchJSON("{}")) - Ω(`{"a":1}`).Should(MatchJSON(`{"a":1}`)) - Ω(`{ - "a":1 - }`).Should(MatchJSON(`{"a":1}`)) - Ω(`{"a":1, "b":2}`).Should(MatchJSON(`{"b":2, "a":1}`)) - Ω(`{"a":1}`).ShouldNot(MatchJSON(`{"b":2, "a":1}`)) - }) - - It("should work with byte arrays", func() { - Ω([]byte("{}")).Should(MatchJSON([]byte("{}"))) - Ω("{}").Should(MatchJSON([]byte("{}"))) - Ω([]byte("{}")).Should(MatchJSON("{}")) - }) - }) - - Context("when either side is not valid JSON", func() { - It("should error", func() { - success, err := (&MatchJSONMatcher{JSONToMatch: `oops`}).Match(`{}`) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&MatchJSONMatcher{JSONToMatch: `{}`}).Match(`oops`) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when either side is neither a string nor a stringer", func() { - It("should error", func() { - success, err := (&MatchJSONMatcher{JSONToMatch: "{}"}).Match(2) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&MatchJSONMatcher{JSONToMatch: 2}).Match("{}") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&MatchJSONMatcher{JSONToMatch: nil}).Match("{}") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&MatchJSONMatcher{JSONToMatch: 2}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go index 7ca79a15..adac5db6 100644 --- a/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go @@ -2,8 +2,9 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "regexp" + + "github.com/onsi/gomega/format" ) type MatchRegexpMatcher struct { diff --git a/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher_test.go deleted file mode 100644 index bb521cce..00000000 --- a/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("MatchRegexp", func() { - Context("when actual is a string", func() { - It("should match against the string", func() { - Ω(" a2!bla").Should(MatchRegexp(`\d!`)) - Ω(" a2!bla").ShouldNot(MatchRegexp(`[A-Z]`)) - }) - }) - - Context("when actual is a stringer", func() { - It("should call the stringer and match agains the returned string", func() { - Ω(&myStringer{a: "Abc3"}).Should(MatchRegexp(`[A-Z][a-z]+\d`)) - }) - }) - - Context("when the matcher is called with multiple arguments", func() { - It("should pass the string and arguments to sprintf", func() { - Ω(" a23!bla").Should(MatchRegexp(`\d%d!`, 3)) - }) - }) - - Context("when actual is neither a string nor a stringer", func() { - It("should error", func() { - success, err := (&MatchRegexpMatcher{Regexp: `\d`}).Match(2) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when the passed in regexp fails to compile", func() { - It("should error", func() { - success, err := (&MatchRegexpMatcher{Regexp: "("}).Match("Foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go new file mode 100644 index 00000000..3b412ce8 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go @@ -0,0 +1,134 @@ +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 new file mode 100644 index 00000000..0c83c2b6 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go @@ -0,0 +1,76 @@ +package matchers + +import ( + "fmt" + "strings" + + "github.com/onsi/gomega/format" + "gopkg.in/yaml.v2" +) + +type MatchYAMLMatcher struct { + YAMLToMatch interface{} + firstFailurePath []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) + } + + var equal bool + equal, matcher.firstFailurePath = deepEqual(aval, eval) + return equal, nil +} + +func (matcher *MatchYAMLMatcher) FailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.toNormalisedStrings(actual) + return formattedMessage(format.Message(actualString, "to match YAML of", expectedString), matcher.firstFailurePath) +} + +func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.toNormalisedStrings(actual) + return formattedMessage(format.Message(actualString, "not to match YAML of", expectedString), matcher.firstFailurePath) +} + +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) // unreachable since Match already calls Unmarshal + } + output, err := yaml.Marshal(val) + if err != nil { + panic(err) // untested section, unreachable since we Unmarshal above + } + 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/matcher_tests_suite_test.go b/vendor/github.com/onsi/gomega/matchers/matcher_tests_suite_test.go deleted file mode 100644 index 4bc6d9d0..00000000 --- a/vendor/github.com/onsi/gomega/matchers/matcher_tests_suite_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package matchers_test - -import ( - "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -type myStringer struct { - a string -} - -func (s *myStringer) String() string { - return s.a -} - -type StringAlias string - -type myCustomType struct { - s string - n int - f float32 - arr []string -} - -func Test(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Gomega") -} diff --git a/vendor/github.com/onsi/gomega/matchers/not.go b/vendor/github.com/onsi/gomega/matchers/not.go new file mode 100644 index 00000000..2c91670b --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/not.go @@ -0,0 +1,30 @@ +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 new file mode 100644 index 00000000..3bf79980 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/or.go @@ -0,0 +1,67 @@ +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 index 75ab251b..640f4db1 100644 --- a/vendor/github.com/onsi/gomega/matchers/panic_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/panic_matcher.go @@ -2,11 +2,14 @@ package matchers import ( "fmt" - "github.com/onsi/gomega/format" "reflect" + + "github.com/onsi/gomega/format" ) -type PanicMatcher struct{} +type PanicMatcher struct { + object interface{} +} func (matcher *PanicMatcher) Match(actual interface{}) (success bool, err error) { if actual == nil { @@ -24,6 +27,7 @@ func (matcher *PanicMatcher) Match(actual interface{}) (success bool, err error) success = false defer func() { if e := recover(); e != nil { + matcher.object = e success = true } }() @@ -38,5 +42,5 @@ func (matcher *PanicMatcher) FailureMessage(actual interface{}) (message string) } func (matcher *PanicMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to panic") + 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/panic_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/panic_matcher_test.go deleted file mode 100644 index 17f3935e..00000000 --- a/vendor/github.com/onsi/gomega/matchers/panic_matcher_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package matchers_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("Panic", func() { - Context("when passed something that's not a function that takes zero arguments and returns nothing", func() { - It("should error", func() { - success, err := (&PanicMatcher{}).Match("foo") - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&PanicMatcher{}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&PanicMatcher{}).Match(func(foo string) {}) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&PanicMatcher{}).Match(func() string { return "bar" }) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when passed a function of the correct type", func() { - It("should call the function and pass if the function panics", func() { - Ω(func() { panic("ack!") }).Should(Panic()) - Ω(func() {}).ShouldNot(Panic()) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/receive_matcher.go b/vendor/github.com/onsi/gomega/matchers/receive_matcher.go index 7a8c2cda..2018a612 100644 --- a/vendor/github.com/onsi/gomega/matchers/receive_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/receive_matcher.go @@ -35,17 +35,12 @@ func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err erro 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}, + {Dir: reflect.SelectRecv, Chan: channelValue}, + {Dir: reflect.SelectDefault}, }) var closed bool @@ -64,21 +59,30 @@ func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err erro if didReceive { matcher.receivedValue = value return subMatcher.Match(matcher.receivedValue.Interface()) - } else { - return false, nil } + return false, nil } if didReceive { if matcher.Arg != nil { outValue := reflect.ValueOf(matcher.Arg) - reflect.Indirect(outValue).Set(value) + + if value.Type().AssignableTo(outValue.Elem().Type()) { + outValue.Elem().Set(value) + return true, nil + } + if value.Type().Kind() == reflect.Interface && value.Elem().Type().AssignableTo(outValue.Elem().Type()) { + outValue.Elem().Set(value.Elem()) + return true, nil + } else { + return false, fmt.Errorf("Cannot assign a value from the channel:\n%s\nType:\n%s\nTo:\n%s", format.Object(actual, 1), format.Object(value.Interface(), 1), format.Object(matcher.Arg, 1)) + } + } return true, nil - } else { - return false, nil } + return false, nil } func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message string) { @@ -94,9 +98,8 @@ func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message strin return subMatcher.FailureMessage(matcher.receivedValue.Interface()) } return "When passed a matcher, ReceiveMatcher's channel *must* receive something." - } else { - return format.Message(actual, "to receive something."+closedAddendum) } + return format.Message(actual, "to receive something."+closedAddendum) } func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (message string) { @@ -112,9 +115,8 @@ func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (messag return subMatcher.NegatedFailureMessage(matcher.receivedValue.Interface()) } return "When passed a matcher, ReceiveMatcher's channel *must* receive something." - } else { - return format.Message(actual, "not to receive anything."+closedAddendum) } + return format.Message(actual, "not to receive anything."+closedAddendum) } func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { diff --git a/vendor/github.com/onsi/gomega/matchers/receive_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/receive_matcher_test.go deleted file mode 100644 index 938c078e..00000000 --- a/vendor/github.com/onsi/gomega/matchers/receive_matcher_test.go +++ /dev/null @@ -1,280 +0,0 @@ -package matchers_test - -import ( - "time" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -type kungFuActor interface { - DrunkenMaster() bool -} - -type jackie struct { - name string -} - -func (j *jackie) DrunkenMaster() bool { - return true -} - -var _ = Describe("ReceiveMatcher", func() { - Context("with no argument", func() { - Context("for a buffered channel", func() { - It("should succeed", func() { - channel := make(chan bool, 1) - - Ω(channel).ShouldNot(Receive()) - - channel <- true - - Ω(channel).Should(Receive()) - }) - }) - - Context("for an unbuffered channel", func() { - It("should succeed (eventually)", func() { - channel := make(chan bool) - - Ω(channel).ShouldNot(Receive()) - - go func() { - time.Sleep(10 * time.Millisecond) - channel <- true - }() - - Eventually(channel).Should(Receive()) - }) - }) - }) - - Context("with a pointer argument", func() { - Context("of the correct type", func() { - It("should write the value received on the channel to the pointer", func() { - channel := make(chan int, 1) - - var value int - - Ω(channel).ShouldNot(Receive(&value)) - Ω(value).Should(BeZero()) - - channel <- 17 - - Ω(channel).Should(Receive(&value)) - Ω(value).Should(Equal(17)) - }) - }) - - Context("to various types of objects", func() { - It("should work", func() { - //channels of strings - stringChan := make(chan string, 1) - stringChan <- "foo" - - var s string - Ω(stringChan).Should(Receive(&s)) - Ω(s).Should(Equal("foo")) - - //channels of slices - sliceChan := make(chan []bool, 1) - sliceChan <- []bool{true, true, false} - - var sl []bool - Ω(sliceChan).Should(Receive(&sl)) - Ω(sl).Should(Equal([]bool{true, true, false})) - - //channels of channels - chanChan := make(chan chan bool, 1) - c := make(chan bool) - chanChan <- c - - var receivedC chan bool - Ω(chanChan).Should(Receive(&receivedC)) - Ω(receivedC).Should(Equal(c)) - - //channels of interfaces - jackieChan := make(chan kungFuActor, 1) - aJackie := &jackie{name: "Jackie Chan"} - jackieChan <- aJackie - - var theJackie kungFuActor - Ω(jackieChan).Should(Receive(&theJackie)) - Ω(theJackie).Should(Equal(aJackie)) - }) - }) - - Context("of the wrong type", func() { - It("should error", func() { - channel := make(chan int) - var incorrectType bool - - success, err := (&ReceiveMatcher{Arg: &incorrectType}).Match(channel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - var notAPointer int - success, err = (&ReceiveMatcher{Arg: notAPointer}).Match(channel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - }) - - Context("with a matcher", func() { - It("should defer to the underlying matcher", func() { - intChannel := make(chan int, 1) - intChannel <- 3 - Ω(intChannel).Should(Receive(Equal(3))) - - intChannel <- 2 - Ω(intChannel).ShouldNot(Receive(Equal(3))) - - stringChannel := make(chan []string, 1) - stringChannel <- []string{"foo", "bar", "baz"} - Ω(stringChannel).Should(Receive(ContainElement(ContainSubstring("fo")))) - - stringChannel <- []string{"foo", "bar", "baz"} - Ω(stringChannel).ShouldNot(Receive(ContainElement(ContainSubstring("archipelago")))) - }) - - It("should defer to the underlying matcher for the message", func() { - matcher := Receive(Equal(3)) - channel := make(chan int, 1) - channel <- 2 - matcher.Match(channel) - Ω(matcher.FailureMessage(channel)).Should(MatchRegexp(`Expected\s+: 2\s+to equal\s+: 3`)) - - channel <- 3 - matcher.Match(channel) - Ω(matcher.NegatedFailureMessage(channel)).Should(MatchRegexp(`Expected\s+: 3\s+not to equal\s+: 3`)) - }) - - It("should work just fine with Eventually", func() { - stringChannel := make(chan string) - - go func() { - time.Sleep(5 * time.Millisecond) - stringChannel <- "A" - time.Sleep(5 * time.Millisecond) - stringChannel <- "B" - }() - - Eventually(stringChannel).Should(Receive(Equal("B"))) - }) - - Context("if the matcher errors", func() { - It("should error", func() { - channel := make(chan int, 1) - channel <- 3 - success, err := (&ReceiveMatcher{Arg: ContainSubstring("three")}).Match(channel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("if nothing is received", func() { - It("should fail", func() { - channel := make(chan int, 1) - success, err := (&ReceiveMatcher{Arg: Equal(1)}).Match(channel) - Ω(success).Should(BeFalse()) - Ω(err).ShouldNot(HaveOccurred()) - }) - }) - }) - - Context("When actual is a *closed* channel", func() { - Context("for a buffered channel", func() { - It("should work until it hits the end of the buffer", func() { - channel := make(chan bool, 1) - channel <- true - - close(channel) - - Ω(channel).Should(Receive()) - Ω(channel).ShouldNot(Receive()) - }) - }) - - Context("for an unbuffered channel", func() { - It("should always fail", func() { - channel := make(chan bool) - close(channel) - - Ω(channel).ShouldNot(Receive()) - }) - }) - }) - - Context("When actual is a send-only channel", func() { - It("should error", func() { - channel := make(chan bool) - - var writerChannel chan<- bool - writerChannel = channel - - success, err := (&ReceiveMatcher{}).Match(writerChannel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Context("when acutal is a non-channel", func() { - It("should error", func() { - var nilChannel chan bool - - success, err := (&ReceiveMatcher{}).Match(nilChannel) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&ReceiveMatcher{}).Match(nil) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - - success, err = (&ReceiveMatcher{}).Match(3) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - Describe("when used with eventually and a custom matcher", func() { - It("should return the matcher's error when a failing value is received on the channel, instead of the must receive something failure", func() { - failures := InterceptGomegaFailures(func() { - c := make(chan string, 0) - Eventually(c, 0.01).Should(Receive(Equal("hello"))) - }) - Ω(failures[0]).Should(ContainSubstring("When passed a matcher, ReceiveMatcher's channel *must* receive something.")) - - failures = InterceptGomegaFailures(func() { - c := make(chan string, 1) - c <- "hi" - Eventually(c, 0.01).Should(Receive(Equal("hello"))) - }) - Ω(failures[0]).Should(ContainSubstring(": hello")) - }) - }) - - Describe("Bailing early", func() { - It("should bail early when passed a closed channel", func() { - c := make(chan bool) - close(c) - - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(c).Should(Receive()) - }) - Ω(time.Since(t)).Should(BeNumerically("<", 500*time.Millisecond)) - Ω(failures).Should(HaveLen(1)) - }) - - It("should bail early when passed a non-channel", func() { - t := time.Now() - failures := InterceptGomegaFailures(func() { - Eventually(3).Should(Receive()) - }) - Ω(time.Since(t)).Should(BeNumerically("<", 500*time.Millisecond)) - Ω(failures).Should(HaveLen(1)) - }) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go b/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go new file mode 100644 index 00000000..63929568 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go @@ -0,0 +1,92 @@ +package matchers + +import ( + "fmt" + "reflect" + "strings" +) + +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 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[interface{}]interface{}: + if len(a.(map[interface{}]interface{})) != len(b.(map[interface{}]interface{})) { + return false, errorPath + } + + for k, v1 := range a.(map[interface{}]interface{}) { + v2, ok := b.(map[interface{}]interface{})[k] + if !ok { + return false, errorPath + } + elementEqual, keyPath := deepEqual(v1, v2) + if !elementEqual { + return false, append(keyPath, k) + } + } + 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/succeed_matcher.go b/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go index f7dd8534..721ed552 100644 --- a/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go @@ -10,15 +10,18 @@ type SucceedMatcher struct { } func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err error) { + // is purely nil? if actual == nil { return true, nil } - if isError(actual) { - 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)) } - 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) { diff --git a/vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go deleted file mode 100644 index 3562e704..00000000 --- a/vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package matchers_test - -import ( - "errors" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -func Erroring() error { - return errors.New("bam") -} - -func NotErroring() error { - return nil -} - -type AnyType struct{} - -func Invalid() *AnyType { - return nil -} - -var _ = Describe("Succeed", func() { - It("should succeed if the function succeeds", func() { - Ω(NotErroring()).Should(Succeed()) - }) - - It("should succeed (in the negated) if the function errored", func() { - Ω(Erroring()).ShouldNot(Succeed()) - }) - - It("should not if passed a non-error", func() { - success, err := (&SucceedMatcher{}).Match(Invalid()) - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) -}) diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/MIT.LICENSE b/vendor/github.com/onsi/gomega/matchers/support/goraph/MIT.LICENSE deleted file mode 100644 index 8edd8175..00000000 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/MIT.LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Amit Kumar Gupta - -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/matchers/support/goraph/bipartitegraph/bipartitegraph.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go index 119d21ef..8aaf8759 100644 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go @@ -14,13 +14,13 @@ type BipartiteGraph struct { func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(interface{}, interface{}) (bool, error)) (*BipartiteGraph, error) { left := NodeOrderedSet{} - for i, _ := range leftValues { - left = append(left, Node{i}) + for i := range leftValues { + left = append(left, Node{Id: i}) } right := NodeOrderedSet{} - for j, _ := range rightValues { - right = append(right, Node{j + len(left)}) + for j := range rightValues { + right = append(right, Node{Id: j + len(left)}) } edges := EdgeSet{} @@ -32,7 +32,7 @@ func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(in } if neighbours { - edges = append(edges, Edge{left[i], right[j]}) + edges = append(edges, Edge{Node1: left[i], Node2: right[j]}) } } } 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 index 32529c51..8181f43a 100644 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go @@ -101,9 +101,8 @@ func (bg *BipartiteGraph) createSLAPGuideLayers(matching EdgeSet) (guideLayers [ if len(currentLayer) == 0 { return []NodeOrderedSet{} - } else { - guideLayers = append(guideLayers, currentLayer) } + guideLayers = append(guideLayers, currentLayer) done := false @@ -152,9 +151,8 @@ func (bg *BipartiteGraph) createSLAPGuideLayers(matching EdgeSet) (guideLayers [ if len(currentLayer) == 0 { return []NodeOrderedSet{} - } else { - guideLayers = append(guideLayers, currentLayer) } + guideLayers = append(guideLayers, currentLayer) } return 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 index a24cd275..d76a1ee0 100644 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go @@ -3,5 +3,5 @@ package util import "math" func Odd(n int) bool { - return math.Mod(float64(n), 2.0) == 1.0 -} + 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 index ef9b4483..75afcd84 100644 --- a/vendor/github.com/onsi/gomega/matchers/type_support.go +++ b/vendor/github.com/onsi/gomega/matchers/type_support.go @@ -9,6 +9,7 @@ http://onsi.github.io/gomega/ package matchers import ( + "encoding/json" "fmt" "reflect" ) @@ -53,9 +54,8 @@ func toInteger(a interface{}) int64 { return int64(reflect.ValueOf(a).Uint()) } else if isFloat(a) { return int64(reflect.ValueOf(a).Float()) - } else { - panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) } + panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) } func toUnsignedInteger(a interface{}) uint64 { @@ -65,9 +65,8 @@ func toUnsignedInteger(a interface{}) uint64 { return reflect.ValueOf(a).Uint() } else if isFloat(a) { return uint64(reflect.ValueOf(a).Float()) - } else { - panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) } + panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) } func toFloat(a interface{}) float64 { @@ -77,9 +76,8 @@ func toFloat(a interface{}) float64 { return float64(reflect.ValueOf(a).Uint()) } else if isFloat(a) { return reflect.ValueOf(a).Float() - } else { - panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) } + panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) } func isError(a interface{}) bool { @@ -136,6 +134,11 @@ func toString(a interface{}) (string, bool) { return aStringer.String(), true } + aJSONRawMessage, isJSONRawMessage := a.(json.RawMessage) + if isJSONRawMessage { + return string(aJSONRawMessage), true + } + return "", false } @@ -150,6 +153,17 @@ func lengthOf(a interface{}) (int, bool) { 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 { diff --git a/vendor/github.com/onsi/gomega/matchers/with_transform.go b/vendor/github.com/onsi/gomega/matchers/with_transform.go new file mode 100644 index 00000000..8e58d8a0 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/with_transform.go @@ -0,0 +1,72 @@ +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 index 1c632ade..ac59a3a5 100644 --- a/vendor/github.com/onsi/gomega/types/types.go +++ b/vendor/github.com/onsi/gomega/types/types.go @@ -1,15 +1,24 @@ package types +type TWithHelper interface { + Helper() +} + type GomegaFailHandler func(message string, callerSkip ...int) +type GomegaFailWrapper struct { + Fail GomegaFailHandler + TWithHelper TWithHelper +} + //A simple *testing.T interface wrapper type GomegaTestingT interface { - Errorf(format string, args ...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 +//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) diff --git a/vendor/github.com/pkg/errors/bench_test.go b/vendor/github.com/pkg/errors/bench_test.go deleted file mode 100644 index 903b5f2d..00000000 --- a/vendor/github.com/pkg/errors/bench_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// +build go1.7 - -package errors - -import ( - "fmt" - "testing" - - stderrors "errors" -) - -func noErrors(at, depth int) error { - if at >= depth { - return stderrors.New("no error") - } - return noErrors(at+1, depth) -} - -func yesErrors(at, depth int) error { - if at >= depth { - return New("ye error") - } - return yesErrors(at+1, depth) -} - -// GlobalE is an exported global to store the result of benchmark results, -// preventing the compiler from optimising the benchmark functions away. -var GlobalE error - -func BenchmarkErrors(b *testing.B) { - type run struct { - stack int - std bool - } - runs := []run{ - {10, false}, - {10, true}, - {100, false}, - {100, true}, - {1000, false}, - {1000, true}, - } - for _, r := range runs { - part := "pkg/errors" - if r.std { - part = "errors" - } - name := fmt.Sprintf("%s-stack-%d", part, r.stack) - b.Run(name, func(b *testing.B) { - var err error - f := yesErrors - if r.std { - f = noErrors - } - b.ReportAllocs() - for i := 0; i < b.N; i++ { - err = f(0, r.stack) - } - b.StopTimer() - GlobalE = err - }) - } -} diff --git a/vendor/github.com/pkg/errors/errors_test.go b/vendor/github.com/pkg/errors/errors_test.go deleted file mode 100644 index 2089b2f7..00000000 --- a/vendor/github.com/pkg/errors/errors_test.go +++ /dev/null @@ -1,251 +0,0 @@ -package errors - -import ( - "errors" - "fmt" - "io" - "reflect" - "testing" -) - -func TestNew(t *testing.T) { - tests := []struct { - err string - want error - }{ - {"", fmt.Errorf("")}, - {"foo", fmt.Errorf("foo")}, - {"foo", New("foo")}, - {"string with format specifiers: %v", errors.New("string with format specifiers: %v")}, - } - - for _, tt := range tests { - got := New(tt.err) - if got.Error() != tt.want.Error() { - t.Errorf("New.Error(): got: %q, want %q", got, tt.want) - } - } -} - -func TestWrapNil(t *testing.T) { - got := Wrap(nil, "no error") - if got != nil { - t.Errorf("Wrap(nil, \"no error\"): got %#v, expected nil", got) - } -} - -func TestWrap(t *testing.T) { - tests := []struct { - err error - message string - want string - }{ - {io.EOF, "read error", "read error: EOF"}, - {Wrap(io.EOF, "read error"), "client error", "client error: read error: EOF"}, - } - - for _, tt := range tests { - got := Wrap(tt.err, tt.message).Error() - if got != tt.want { - t.Errorf("Wrap(%v, %q): got: %v, want %v", tt.err, tt.message, got, tt.want) - } - } -} - -type nilError struct{} - -func (nilError) Error() string { return "nil error" } - -func TestCause(t *testing.T) { - x := New("error") - tests := []struct { - err error - want error - }{{ - // nil error is nil - err: nil, - want: nil, - }, { - // explicit nil error is nil - err: (error)(nil), - want: nil, - }, { - // typed nil is nil - err: (*nilError)(nil), - want: (*nilError)(nil), - }, { - // uncaused error is unaffected - err: io.EOF, - want: io.EOF, - }, { - // caused error returns cause - err: Wrap(io.EOF, "ignored"), - want: io.EOF, - }, { - err: x, // return from errors.New - want: x, - }, { - WithMessage(nil, "whoops"), - nil, - }, { - WithMessage(io.EOF, "whoops"), - io.EOF, - }, { - WithStack(nil), - nil, - }, { - WithStack(io.EOF), - io.EOF, - }} - - for i, tt := range tests { - got := Cause(tt.err) - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("test %d: got %#v, want %#v", i+1, got, tt.want) - } - } -} - -func TestWrapfNil(t *testing.T) { - got := Wrapf(nil, "no error") - if got != nil { - t.Errorf("Wrapf(nil, \"no error\"): got %#v, expected nil", got) - } -} - -func TestWrapf(t *testing.T) { - tests := []struct { - err error - message string - want string - }{ - {io.EOF, "read error", "read error: EOF"}, - {Wrapf(io.EOF, "read error without format specifiers"), "client error", "client error: read error without format specifiers: EOF"}, - {Wrapf(io.EOF, "read error with %d format specifier", 1), "client error", "client error: read error with 1 format specifier: EOF"}, - } - - for _, tt := range tests { - got := Wrapf(tt.err, tt.message).Error() - if got != tt.want { - t.Errorf("Wrapf(%v, %q): got: %v, want %v", tt.err, tt.message, got, tt.want) - } - } -} - -func TestErrorf(t *testing.T) { - tests := []struct { - err error - want string - }{ - {Errorf("read error without format specifiers"), "read error without format specifiers"}, - {Errorf("read error with %d format specifier", 1), "read error with 1 format specifier"}, - } - - for _, tt := range tests { - got := tt.err.Error() - if got != tt.want { - t.Errorf("Errorf(%v): got: %q, want %q", tt.err, got, tt.want) - } - } -} - -func TestWithStackNil(t *testing.T) { - got := WithStack(nil) - if got != nil { - t.Errorf("WithStack(nil): got %#v, expected nil", got) - } -} - -func TestWithStack(t *testing.T) { - tests := []struct { - err error - want string - }{ - {io.EOF, "EOF"}, - {WithStack(io.EOF), "EOF"}, - } - - for _, tt := range tests { - got := WithStack(tt.err).Error() - if got != tt.want { - t.Errorf("WithStack(%v): got: %v, want %v", tt.err, got, tt.want) - } - } -} - -func TestWithMessageNil(t *testing.T) { - got := WithMessage(nil, "no error") - if got != nil { - t.Errorf("WithMessage(nil, \"no error\"): got %#v, expected nil", got) - } -} - -func TestWithMessage(t *testing.T) { - tests := []struct { - err error - message string - want string - }{ - {io.EOF, "read error", "read error: EOF"}, - {WithMessage(io.EOF, "read error"), "client error", "client error: read error: EOF"}, - } - - for _, tt := range tests { - got := WithMessage(tt.err, tt.message).Error() - if got != tt.want { - t.Errorf("WithMessage(%v, %q): got: %q, want %q", tt.err, tt.message, got, tt.want) - } - } -} - -func TestWithMessagefNil(t *testing.T) { - got := WithMessagef(nil, "no error") - if got != nil { - t.Errorf("WithMessage(nil, \"no error\"): got %#v, expected nil", got) - } -} - -func TestWithMessagef(t *testing.T) { - tests := []struct { - err error - message string - want string - }{ - {io.EOF, "read error", "read error: EOF"}, - {WithMessagef(io.EOF, "read error without format specifier"), "client error", "client error: read error without format specifier: EOF"}, - {WithMessagef(io.EOF, "read error with %d format specifier", 1), "client error", "client error: read error with 1 format specifier: EOF"}, - } - - for _, tt := range tests { - got := WithMessagef(tt.err, tt.message).Error() - if got != tt.want { - t.Errorf("WithMessage(%v, %q): got: %q, want %q", tt.err, tt.message, got, tt.want) - } - } -} - -// errors.New, etc values are not expected to be compared by value -// but the change in errors#27 made them incomparable. Assert that -// various kinds of errors have a functional equality operator, even -// if the result of that equality is always false. -func TestErrorEquality(t *testing.T) { - vals := []error{ - nil, - io.EOF, - errors.New("EOF"), - New("EOF"), - Errorf("EOF"), - Wrap(io.EOF, "EOF"), - Wrapf(io.EOF, "EOF%d", 2), - WithMessage(nil, "whoops"), - WithMessage(io.EOF, "whoops"), - WithStack(io.EOF), - WithStack(nil), - } - - for i := range vals { - for j := range vals { - _ = vals[i] == vals[j] // mustn't panic - } - } -} diff --git a/vendor/github.com/pkg/errors/example_test.go b/vendor/github.com/pkg/errors/example_test.go deleted file mode 100644 index c1fc13e3..00000000 --- a/vendor/github.com/pkg/errors/example_test.go +++ /dev/null @@ -1,205 +0,0 @@ -package errors_test - -import ( - "fmt" - - "github.com/pkg/errors" -) - -func ExampleNew() { - err := errors.New("whoops") - fmt.Println(err) - - // Output: whoops -} - -func ExampleNew_printf() { - err := errors.New("whoops") - fmt.Printf("%+v", err) - - // Example output: - // whoops - // github.com/pkg/errors_test.ExampleNew_printf - // /home/dfc/src/github.com/pkg/errors/example_test.go:17 - // testing.runExample - // /home/dfc/go/src/testing/example.go:114 - // testing.RunExamples - // /home/dfc/go/src/testing/example.go:38 - // testing.(*M).Run - // /home/dfc/go/src/testing/testing.go:744 - // main.main - // /github.com/pkg/errors/_test/_testmain.go:106 - // runtime.main - // /home/dfc/go/src/runtime/proc.go:183 - // runtime.goexit - // /home/dfc/go/src/runtime/asm_amd64.s:2059 -} - -func ExampleWithMessage() { - cause := errors.New("whoops") - err := errors.WithMessage(cause, "oh noes") - fmt.Println(err) - - // Output: oh noes: whoops -} - -func ExampleWithStack() { - cause := errors.New("whoops") - err := errors.WithStack(cause) - fmt.Println(err) - - // Output: whoops -} - -func ExampleWithStack_printf() { - cause := errors.New("whoops") - err := errors.WithStack(cause) - fmt.Printf("%+v", err) - - // Example Output: - // whoops - // github.com/pkg/errors_test.ExampleWithStack_printf - // /home/fabstu/go/src/github.com/pkg/errors/example_test.go:55 - // testing.runExample - // /usr/lib/go/src/testing/example.go:114 - // testing.RunExamples - // /usr/lib/go/src/testing/example.go:38 - // testing.(*M).Run - // /usr/lib/go/src/testing/testing.go:744 - // main.main - // github.com/pkg/errors/_test/_testmain.go:106 - // runtime.main - // /usr/lib/go/src/runtime/proc.go:183 - // runtime.goexit - // /usr/lib/go/src/runtime/asm_amd64.s:2086 - // github.com/pkg/errors_test.ExampleWithStack_printf - // /home/fabstu/go/src/github.com/pkg/errors/example_test.go:56 - // testing.runExample - // /usr/lib/go/src/testing/example.go:114 - // testing.RunExamples - // /usr/lib/go/src/testing/example.go:38 - // testing.(*M).Run - // /usr/lib/go/src/testing/testing.go:744 - // main.main - // github.com/pkg/errors/_test/_testmain.go:106 - // runtime.main - // /usr/lib/go/src/runtime/proc.go:183 - // runtime.goexit - // /usr/lib/go/src/runtime/asm_amd64.s:2086 -} - -func ExampleWrap() { - cause := errors.New("whoops") - err := errors.Wrap(cause, "oh noes") - fmt.Println(err) - - // Output: oh noes: whoops -} - -func fn() error { - e1 := errors.New("error") - e2 := errors.Wrap(e1, "inner") - e3 := errors.Wrap(e2, "middle") - return errors.Wrap(e3, "outer") -} - -func ExampleCause() { - err := fn() - fmt.Println(err) - fmt.Println(errors.Cause(err)) - - // Output: outer: middle: inner: error - // error -} - -func ExampleWrap_extended() { - err := fn() - fmt.Printf("%+v\n", err) - - // Example output: - // error - // github.com/pkg/errors_test.fn - // /home/dfc/src/github.com/pkg/errors/example_test.go:47 - // github.com/pkg/errors_test.ExampleCause_printf - // /home/dfc/src/github.com/pkg/errors/example_test.go:63 - // testing.runExample - // /home/dfc/go/src/testing/example.go:114 - // testing.RunExamples - // /home/dfc/go/src/testing/example.go:38 - // testing.(*M).Run - // /home/dfc/go/src/testing/testing.go:744 - // main.main - // /github.com/pkg/errors/_test/_testmain.go:104 - // runtime.main - // /home/dfc/go/src/runtime/proc.go:183 - // runtime.goexit - // /home/dfc/go/src/runtime/asm_amd64.s:2059 - // github.com/pkg/errors_test.fn - // /home/dfc/src/github.com/pkg/errors/example_test.go:48: inner - // github.com/pkg/errors_test.fn - // /home/dfc/src/github.com/pkg/errors/example_test.go:49: middle - // github.com/pkg/errors_test.fn - // /home/dfc/src/github.com/pkg/errors/example_test.go:50: outer -} - -func ExampleWrapf() { - cause := errors.New("whoops") - err := errors.Wrapf(cause, "oh noes #%d", 2) - fmt.Println(err) - - // Output: oh noes #2: whoops -} - -func ExampleErrorf_extended() { - err := errors.Errorf("whoops: %s", "foo") - fmt.Printf("%+v", err) - - // Example output: - // whoops: foo - // github.com/pkg/errors_test.ExampleErrorf - // /home/dfc/src/github.com/pkg/errors/example_test.go:101 - // testing.runExample - // /home/dfc/go/src/testing/example.go:114 - // testing.RunExamples - // /home/dfc/go/src/testing/example.go:38 - // testing.(*M).Run - // /home/dfc/go/src/testing/testing.go:744 - // main.main - // /github.com/pkg/errors/_test/_testmain.go:102 - // runtime.main - // /home/dfc/go/src/runtime/proc.go:183 - // runtime.goexit - // /home/dfc/go/src/runtime/asm_amd64.s:2059 -} - -func Example_stackTrace() { - type stackTracer interface { - StackTrace() errors.StackTrace - } - - err, ok := errors.Cause(fn()).(stackTracer) - if !ok { - panic("oops, err does not implement stackTracer") - } - - st := err.StackTrace() - fmt.Printf("%+v", st[0:2]) // top two frames - - // Example output: - // github.com/pkg/errors_test.fn - // /home/dfc/src/github.com/pkg/errors/example_test.go:47 - // github.com/pkg/errors_test.Example_stackTrace - // /home/dfc/src/github.com/pkg/errors/example_test.go:127 -} - -func ExampleCause_printf() { - err := errors.Wrap(func() error { - return func() error { - return errors.Errorf("hello %s", fmt.Sprintf("world")) - }() - }(), "failed") - - fmt.Printf("%v", err) - - // Output: failed: hello world -} diff --git a/vendor/github.com/pkg/errors/format_test.go b/vendor/github.com/pkg/errors/format_test.go deleted file mode 100644 index c2eef5f0..00000000 --- a/vendor/github.com/pkg/errors/format_test.go +++ /dev/null @@ -1,535 +0,0 @@ -package errors - -import ( - "errors" - "fmt" - "io" - "regexp" - "strings" - "testing" -) - -func TestFormatNew(t *testing.T) { - tests := []struct { - error - format string - want string - }{{ - New("error"), - "%s", - "error", - }, { - New("error"), - "%v", - "error", - }, { - New("error"), - "%+v", - "error\n" + - "github.com/pkg/errors.TestFormatNew\n" + - "\t.+/github.com/pkg/errors/format_test.go:26", - }, { - New("error"), - "%q", - `"error"`, - }} - - for i, tt := range tests { - testFormatRegexp(t, i, tt.error, tt.format, tt.want) - } -} - -func TestFormatErrorf(t *testing.T) { - tests := []struct { - error - format string - want string - }{{ - Errorf("%s", "error"), - "%s", - "error", - }, { - Errorf("%s", "error"), - "%v", - "error", - }, { - Errorf("%s", "error"), - "%+v", - "error\n" + - "github.com/pkg/errors.TestFormatErrorf\n" + - "\t.+/github.com/pkg/errors/format_test.go:56", - }} - - for i, tt := range tests { - testFormatRegexp(t, i, tt.error, tt.format, tt.want) - } -} - -func TestFormatWrap(t *testing.T) { - tests := []struct { - error - format string - want string - }{{ - Wrap(New("error"), "error2"), - "%s", - "error2: error", - }, { - Wrap(New("error"), "error2"), - "%v", - "error2: error", - }, { - Wrap(New("error"), "error2"), - "%+v", - "error\n" + - "github.com/pkg/errors.TestFormatWrap\n" + - "\t.+/github.com/pkg/errors/format_test.go:82", - }, { - Wrap(io.EOF, "error"), - "%s", - "error: EOF", - }, { - Wrap(io.EOF, "error"), - "%v", - "error: EOF", - }, { - Wrap(io.EOF, "error"), - "%+v", - "EOF\n" + - "error\n" + - "github.com/pkg/errors.TestFormatWrap\n" + - "\t.+/github.com/pkg/errors/format_test.go:96", - }, { - Wrap(Wrap(io.EOF, "error1"), "error2"), - "%+v", - "EOF\n" + - "error1\n" + - "github.com/pkg/errors.TestFormatWrap\n" + - "\t.+/github.com/pkg/errors/format_test.go:103\n", - }, { - Wrap(New("error with space"), "context"), - "%q", - `"context: error with space"`, - }} - - for i, tt := range tests { - testFormatRegexp(t, i, tt.error, tt.format, tt.want) - } -} - -func TestFormatWrapf(t *testing.T) { - tests := []struct { - error - format string - want string - }{{ - Wrapf(io.EOF, "error%d", 2), - "%s", - "error2: EOF", - }, { - Wrapf(io.EOF, "error%d", 2), - "%v", - "error2: EOF", - }, { - Wrapf(io.EOF, "error%d", 2), - "%+v", - "EOF\n" + - "error2\n" + - "github.com/pkg/errors.TestFormatWrapf\n" + - "\t.+/github.com/pkg/errors/format_test.go:134", - }, { - Wrapf(New("error"), "error%d", 2), - "%s", - "error2: error", - }, { - Wrapf(New("error"), "error%d", 2), - "%v", - "error2: error", - }, { - Wrapf(New("error"), "error%d", 2), - "%+v", - "error\n" + - "github.com/pkg/errors.TestFormatWrapf\n" + - "\t.+/github.com/pkg/errors/format_test.go:149", - }} - - for i, tt := range tests { - testFormatRegexp(t, i, tt.error, tt.format, tt.want) - } -} - -func TestFormatWithStack(t *testing.T) { - tests := []struct { - error - format string - want []string - }{{ - WithStack(io.EOF), - "%s", - []string{"EOF"}, - }, { - WithStack(io.EOF), - "%v", - []string{"EOF"}, - }, { - WithStack(io.EOF), - "%+v", - []string{"EOF", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:175"}, - }, { - WithStack(New("error")), - "%s", - []string{"error"}, - }, { - WithStack(New("error")), - "%v", - []string{"error"}, - }, { - WithStack(New("error")), - "%+v", - []string{"error", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:189", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:189"}, - }, { - WithStack(WithStack(io.EOF)), - "%+v", - []string{"EOF", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:197", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:197"}, - }, { - WithStack(WithStack(Wrapf(io.EOF, "message"))), - "%+v", - []string{"EOF", - "message", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:205", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:205", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:205"}, - }, { - WithStack(Errorf("error%d", 1)), - "%+v", - []string{"error1", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:216", - "github.com/pkg/errors.TestFormatWithStack\n" + - "\t.+/github.com/pkg/errors/format_test.go:216"}, - }} - - for i, tt := range tests { - testFormatCompleteCompare(t, i, tt.error, tt.format, tt.want, true) - } -} - -func TestFormatWithMessage(t *testing.T) { - tests := []struct { - error - format string - want []string - }{{ - WithMessage(New("error"), "error2"), - "%s", - []string{"error2: error"}, - }, { - WithMessage(New("error"), "error2"), - "%v", - []string{"error2: error"}, - }, { - WithMessage(New("error"), "error2"), - "%+v", - []string{ - "error", - "github.com/pkg/errors.TestFormatWithMessage\n" + - "\t.+/github.com/pkg/errors/format_test.go:244", - "error2"}, - }, { - WithMessage(io.EOF, "addition1"), - "%s", - []string{"addition1: EOF"}, - }, { - WithMessage(io.EOF, "addition1"), - "%v", - []string{"addition1: EOF"}, - }, { - WithMessage(io.EOF, "addition1"), - "%+v", - []string{"EOF", "addition1"}, - }, { - WithMessage(WithMessage(io.EOF, "addition1"), "addition2"), - "%v", - []string{"addition2: addition1: EOF"}, - }, { - WithMessage(WithMessage(io.EOF, "addition1"), "addition2"), - "%+v", - []string{"EOF", "addition1", "addition2"}, - }, { - Wrap(WithMessage(io.EOF, "error1"), "error2"), - "%+v", - []string{"EOF", "error1", "error2", - "github.com/pkg/errors.TestFormatWithMessage\n" + - "\t.+/github.com/pkg/errors/format_test.go:272"}, - }, { - WithMessage(Errorf("error%d", 1), "error2"), - "%+v", - []string{"error1", - "github.com/pkg/errors.TestFormatWithMessage\n" + - "\t.+/github.com/pkg/errors/format_test.go:278", - "error2"}, - }, { - WithMessage(WithStack(io.EOF), "error"), - "%+v", - []string{ - "EOF", - "github.com/pkg/errors.TestFormatWithMessage\n" + - "\t.+/github.com/pkg/errors/format_test.go:285", - "error"}, - }, { - WithMessage(Wrap(WithStack(io.EOF), "inside-error"), "outside-error"), - "%+v", - []string{ - "EOF", - "github.com/pkg/errors.TestFormatWithMessage\n" + - "\t.+/github.com/pkg/errors/format_test.go:293", - "inside-error", - "github.com/pkg/errors.TestFormatWithMessage\n" + - "\t.+/github.com/pkg/errors/format_test.go:293", - "outside-error"}, - }} - - for i, tt := range tests { - testFormatCompleteCompare(t, i, tt.error, tt.format, tt.want, true) - } -} - -func TestFormatGeneric(t *testing.T) { - starts := []struct { - err error - want []string - }{ - {New("new-error"), []string{ - "new-error", - "github.com/pkg/errors.TestFormatGeneric\n" + - "\t.+/github.com/pkg/errors/format_test.go:315"}, - }, {Errorf("errorf-error"), []string{ - "errorf-error", - "github.com/pkg/errors.TestFormatGeneric\n" + - "\t.+/github.com/pkg/errors/format_test.go:319"}, - }, {errors.New("errors-new-error"), []string{ - "errors-new-error"}, - }, - } - - wrappers := []wrapper{ - { - func(err error) error { return WithMessage(err, "with-message") }, - []string{"with-message"}, - }, { - func(err error) error { return WithStack(err) }, - []string{ - "github.com/pkg/errors.(func·002|TestFormatGeneric.func2)\n\t" + - ".+/github.com/pkg/errors/format_test.go:333", - }, - }, { - func(err error) error { return Wrap(err, "wrap-error") }, - []string{ - "wrap-error", - "github.com/pkg/errors.(func·003|TestFormatGeneric.func3)\n\t" + - ".+/github.com/pkg/errors/format_test.go:339", - }, - }, { - func(err error) error { return Wrapf(err, "wrapf-error%d", 1) }, - []string{ - "wrapf-error1", - "github.com/pkg/errors.(func·004|TestFormatGeneric.func4)\n\t" + - ".+/github.com/pkg/errors/format_test.go:346", - }, - }, - } - - for s := range starts { - err := starts[s].err - want := starts[s].want - testFormatCompleteCompare(t, s, err, "%+v", want, false) - testGenericRecursive(t, err, want, wrappers, 3) - } -} - -func testFormatRegexp(t *testing.T, n int, arg interface{}, format, want string) { - got := fmt.Sprintf(format, arg) - gotLines := strings.SplitN(got, "\n", -1) - wantLines := strings.SplitN(want, "\n", -1) - - if len(wantLines) > len(gotLines) { - t.Errorf("test %d: wantLines(%d) > gotLines(%d):\n got: %q\nwant: %q", n+1, len(wantLines), len(gotLines), got, want) - return - } - - for i, w := range wantLines { - match, err := regexp.MatchString(w, gotLines[i]) - if err != nil { - t.Fatal(err) - } - if !match { - t.Errorf("test %d: line %d: fmt.Sprintf(%q, err):\n got: %q\nwant: %q", n+1, i+1, format, got, want) - } - } -} - -var stackLineR = regexp.MustCompile(`\.`) - -// parseBlocks parses input into a slice, where: -// - incase entry contains a newline, its a stacktrace -// - incase entry contains no newline, its a solo line. -// -// Detecting stack boundaries only works incase the WithStack-calls are -// to be found on the same line, thats why it is optionally here. -// -// Example use: -// -// for _, e := range blocks { -// if strings.ContainsAny(e, "\n") { -// // Match as stack -// } else { -// // Match as line -// } -// } -// -func parseBlocks(input string, detectStackboundaries bool) ([]string, error) { - var blocks []string - - stack := "" - wasStack := false - lines := map[string]bool{} // already found lines - - for _, l := range strings.Split(input, "\n") { - isStackLine := stackLineR.MatchString(l) - - switch { - case !isStackLine && wasStack: - blocks = append(blocks, stack, l) - stack = "" - lines = map[string]bool{} - case isStackLine: - if wasStack { - // Detecting two stacks after another, possible cause lines match in - // our tests due to WithStack(WithStack(io.EOF)) on same line. - if detectStackboundaries { - if lines[l] { - if len(stack) == 0 { - return nil, errors.New("len of block must not be zero here") - } - - blocks = append(blocks, stack) - stack = l - lines = map[string]bool{l: true} - continue - } - } - - stack = stack + "\n" + l - } else { - stack = l - } - lines[l] = true - case !isStackLine && !wasStack: - blocks = append(blocks, l) - default: - return nil, errors.New("must not happen") - } - - wasStack = isStackLine - } - - // Use up stack - if stack != "" { - blocks = append(blocks, stack) - } - return blocks, nil -} - -func testFormatCompleteCompare(t *testing.T, n int, arg interface{}, format string, want []string, detectStackBoundaries bool) { - gotStr := fmt.Sprintf(format, arg) - - got, err := parseBlocks(gotStr, detectStackBoundaries) - if err != nil { - t.Fatal(err) - } - - if len(got) != len(want) { - t.Fatalf("test %d: fmt.Sprintf(%s, err) -> wrong number of blocks: got(%d) want(%d)\n got: %s\nwant: %s\ngotStr: %q", - n+1, format, len(got), len(want), prettyBlocks(got), prettyBlocks(want), gotStr) - } - - for i := range got { - if strings.ContainsAny(want[i], "\n") { - // Match as stack - match, err := regexp.MatchString(want[i], got[i]) - if err != nil { - t.Fatal(err) - } - if !match { - t.Fatalf("test %d: block %d: fmt.Sprintf(%q, err):\ngot:\n%q\nwant:\n%q\nall-got:\n%s\nall-want:\n%s\n", - n+1, i+1, format, got[i], want[i], prettyBlocks(got), prettyBlocks(want)) - } - } else { - // Match as message - if got[i] != want[i] { - t.Fatalf("test %d: fmt.Sprintf(%s, err) at block %d got != want:\n got: %q\nwant: %q", n+1, format, i+1, got[i], want[i]) - } - } - } -} - -type wrapper struct { - wrap func(err error) error - want []string -} - -func prettyBlocks(blocks []string) string { - var out []string - - for _, b := range blocks { - out = append(out, fmt.Sprintf("%v", b)) - } - - return " " + strings.Join(out, "\n ") -} - -func testGenericRecursive(t *testing.T, beforeErr error, beforeWant []string, list []wrapper, maxDepth int) { - if len(beforeWant) == 0 { - panic("beforeWant must not be empty") - } - for _, w := range list { - if len(w.want) == 0 { - panic("want must not be empty") - } - - err := w.wrap(beforeErr) - - // Copy required cause append(beforeWant, ..) modified beforeWant subtly. - beforeCopy := make([]string, len(beforeWant)) - copy(beforeCopy, beforeWant) - - beforeWant := beforeCopy - last := len(beforeWant) - 1 - var want []string - - // Merge two stacks behind each other. - if strings.ContainsAny(beforeWant[last], "\n") && strings.ContainsAny(w.want[0], "\n") { - want = append(beforeWant[:last], append([]string{beforeWant[last] + "((?s).*)" + w.want[0]}, w.want[1:]...)...) - } else { - want = append(beforeWant, w.want...) - } - - testFormatCompleteCompare(t, maxDepth, err, "%+v", want, false) - if maxDepth > 0 { - testGenericRecursive(t, err, want, list, maxDepth-1) - } - } -} diff --git a/vendor/github.com/pkg/errors/stack_test.go b/vendor/github.com/pkg/errors/stack_test.go deleted file mode 100644 index 85fc4195..00000000 --- a/vendor/github.com/pkg/errors/stack_test.go +++ /dev/null @@ -1,274 +0,0 @@ -package errors - -import ( - "fmt" - "runtime" - "testing" -) - -var initpc, _, _, _ = runtime.Caller(0) - -func TestFrameLine(t *testing.T) { - var tests = []struct { - Frame - want int - }{{ - Frame(initpc), - 9, - }, { - func() Frame { - var pc, _, _, _ = runtime.Caller(0) - return Frame(pc) - }(), - 20, - }, { - func() Frame { - var pc, _, _, _ = runtime.Caller(1) - return Frame(pc) - }(), - 28, - }, { - Frame(0), // invalid PC - 0, - }} - - for _, tt := range tests { - got := tt.Frame.line() - want := tt.want - if want != got { - t.Errorf("Frame(%v): want: %v, got: %v", uintptr(tt.Frame), want, got) - } - } -} - -type X struct{} - -func (x X) val() Frame { - var pc, _, _, _ = runtime.Caller(0) - return Frame(pc) -} - -func (x *X) ptr() Frame { - var pc, _, _, _ = runtime.Caller(0) - return Frame(pc) -} - -func TestFrameFormat(t *testing.T) { - var tests = []struct { - Frame - format string - want string - }{{ - Frame(initpc), - "%s", - "stack_test.go", - }, { - Frame(initpc), - "%+s", - "github.com/pkg/errors.init\n" + - "\t.+/github.com/pkg/errors/stack_test.go", - }, { - Frame(0), - "%s", - "unknown", - }, { - Frame(0), - "%+s", - "unknown", - }, { - Frame(initpc), - "%d", - "9", - }, { - Frame(0), - "%d", - "0", - }, { - Frame(initpc), - "%n", - "init", - }, { - func() Frame { - var x X - return x.ptr() - }(), - "%n", - `\(\*X\).ptr`, - }, { - func() Frame { - var x X - return x.val() - }(), - "%n", - "X.val", - }, { - Frame(0), - "%n", - "", - }, { - Frame(initpc), - "%v", - "stack_test.go:9", - }, { - Frame(initpc), - "%+v", - "github.com/pkg/errors.init\n" + - "\t.+/github.com/pkg/errors/stack_test.go:9", - }, { - Frame(0), - "%v", - "unknown:0", - }} - - for i, tt := range tests { - testFormatRegexp(t, i, tt.Frame, tt.format, tt.want) - } -} - -func TestFuncname(t *testing.T) { - tests := []struct { - name, want string - }{ - {"", ""}, - {"runtime.main", "main"}, - {"github.com/pkg/errors.funcname", "funcname"}, - {"funcname", "funcname"}, - {"io.copyBuffer", "copyBuffer"}, - {"main.(*R).Write", "(*R).Write"}, - } - - for _, tt := range tests { - got := funcname(tt.name) - want := tt.want - if got != want { - t.Errorf("funcname(%q): want: %q, got %q", tt.name, want, got) - } - } -} - -func TestStackTrace(t *testing.T) { - tests := []struct { - err error - want []string - }{{ - New("ooh"), []string{ - "github.com/pkg/errors.TestStackTrace\n" + - "\t.+/github.com/pkg/errors/stack_test.go:154", - }, - }, { - Wrap(New("ooh"), "ahh"), []string{ - "github.com/pkg/errors.TestStackTrace\n" + - "\t.+/github.com/pkg/errors/stack_test.go:159", // this is the stack of Wrap, not New - }, - }, { - Cause(Wrap(New("ooh"), "ahh")), []string{ - "github.com/pkg/errors.TestStackTrace\n" + - "\t.+/github.com/pkg/errors/stack_test.go:164", // this is the stack of New - }, - }, { - func() error { return New("ooh") }(), []string{ - `github.com/pkg/errors.(func·009|TestStackTrace.func1)` + - "\n\t.+/github.com/pkg/errors/stack_test.go:169", // this is the stack of New - "github.com/pkg/errors.TestStackTrace\n" + - "\t.+/github.com/pkg/errors/stack_test.go:169", // this is the stack of New's caller - }, - }, { - Cause(func() error { - return func() error { - return Errorf("hello %s", fmt.Sprintf("world")) - }() - }()), []string{ - `github.com/pkg/errors.(func·010|TestStackTrace.func2.1)` + - "\n\t.+/github.com/pkg/errors/stack_test.go:178", // this is the stack of Errorf - `github.com/pkg/errors.(func·011|TestStackTrace.func2)` + - "\n\t.+/github.com/pkg/errors/stack_test.go:179", // this is the stack of Errorf's caller - "github.com/pkg/errors.TestStackTrace\n" + - "\t.+/github.com/pkg/errors/stack_test.go:180", // this is the stack of Errorf's caller's caller - }, - }} - for i, tt := range tests { - x, ok := tt.err.(interface { - StackTrace() StackTrace - }) - if !ok { - t.Errorf("expected %#v to implement StackTrace() StackTrace", tt.err) - continue - } - st := x.StackTrace() - for j, want := range tt.want { - testFormatRegexp(t, i, st[j], "%+v", want) - } - } -} - -func stackTrace() StackTrace { - const depth = 8 - var pcs [depth]uintptr - n := runtime.Callers(1, pcs[:]) - var st stack = pcs[0:n] - return st.StackTrace() -} - -func TestStackTraceFormat(t *testing.T) { - tests := []struct { - StackTrace - format string - want string - }{{ - nil, - "%s", - `\[\]`, - }, { - nil, - "%v", - `\[\]`, - }, { - nil, - "%+v", - "", - }, { - nil, - "%#v", - `\[\]errors.Frame\(nil\)`, - }, { - make(StackTrace, 0), - "%s", - `\[\]`, - }, { - make(StackTrace, 0), - "%v", - `\[\]`, - }, { - make(StackTrace, 0), - "%+v", - "", - }, { - make(StackTrace, 0), - "%#v", - `\[\]errors.Frame{}`, - }, { - stackTrace()[:2], - "%s", - `\[stack_test.go stack_test.go\]`, - }, { - stackTrace()[:2], - "%v", - `\[stack_test.go:207 stack_test.go:254\]`, - }, { - stackTrace()[:2], - "%+v", - "\n" + - "github.com/pkg/errors.stackTrace\n" + - "\t.+/github.com/pkg/errors/stack_test.go:207\n" + - "github.com/pkg/errors.TestStackTraceFormat\n" + - "\t.+/github.com/pkg/errors/stack_test.go:258", - }, { - stackTrace()[:2], - "%#v", - `\[\]errors.Frame{stack_test.go:207, stack_test.go:266}`, - }} - - for i, tt := range tests { - testFormatRegexp(t, i, tt.StackTrace, tt.format, tt.want) - } -} diff --git a/vendor/github.com/Sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore similarity index 100% rename from vendor/github.com/Sirupsen/logrus/.gitignore rename to vendor/github.com/sirupsen/logrus/.gitignore diff --git a/vendor/github.com/Sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml similarity index 100% rename from vendor/github.com/Sirupsen/logrus/.travis.yml rename to vendor/github.com/sirupsen/logrus/.travis.yml diff --git a/vendor/github.com/Sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md similarity index 100% rename from vendor/github.com/Sirupsen/logrus/CHANGELOG.md rename to vendor/github.com/sirupsen/logrus/CHANGELOG.md diff --git a/vendor/github.com/Sirupsen/logrus/LICENSE b/vendor/github.com/sirupsen/logrus/LICENSE similarity index 100% rename from vendor/github.com/Sirupsen/logrus/LICENSE rename to vendor/github.com/sirupsen/logrus/LICENSE diff --git a/vendor/github.com/Sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md similarity index 100% rename from vendor/github.com/Sirupsen/logrus/README.md rename to vendor/github.com/sirupsen/logrus/README.md diff --git a/vendor/github.com/Sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/doc.go rename to vendor/github.com/sirupsen/logrus/doc.go diff --git a/vendor/github.com/Sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/entry.go rename to vendor/github.com/sirupsen/logrus/entry.go diff --git a/vendor/github.com/Sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/exported.go rename to vendor/github.com/sirupsen/logrus/exported.go diff --git a/vendor/github.com/Sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/formatter.go rename to vendor/github.com/sirupsen/logrus/formatter.go diff --git a/vendor/github.com/Sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/hooks.go rename to vendor/github.com/sirupsen/logrus/hooks.go diff --git a/vendor/github.com/Sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/json_formatter.go rename to vendor/github.com/sirupsen/logrus/json_formatter.go diff --git a/vendor/github.com/Sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/logger.go rename to vendor/github.com/sirupsen/logrus/logger.go diff --git a/vendor/github.com/Sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/logrus.go rename to vendor/github.com/sirupsen/logrus/logrus.go diff --git a/vendor/github.com/Sirupsen/logrus/terminal_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_bsd.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/terminal_bsd.go rename to vendor/github.com/sirupsen/logrus/terminal_bsd.go diff --git a/vendor/github.com/Sirupsen/logrus/terminal_linux.go b/vendor/github.com/sirupsen/logrus/terminal_linux.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/terminal_linux.go rename to vendor/github.com/sirupsen/logrus/terminal_linux.go diff --git a/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go b/vendor/github.com/sirupsen/logrus/terminal_notwindows.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/terminal_notwindows.go rename to vendor/github.com/sirupsen/logrus/terminal_notwindows.go diff --git a/vendor/github.com/Sirupsen/logrus/terminal_solaris.go b/vendor/github.com/sirupsen/logrus/terminal_solaris.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/terminal_solaris.go rename to vendor/github.com/sirupsen/logrus/terminal_solaris.go diff --git a/vendor/github.com/Sirupsen/logrus/terminal_windows.go b/vendor/github.com/sirupsen/logrus/terminal_windows.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/terminal_windows.go rename to vendor/github.com/sirupsen/logrus/terminal_windows.go diff --git a/vendor/github.com/Sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/text_formatter.go rename to vendor/github.com/sirupsen/logrus/text_formatter.go diff --git a/vendor/github.com/Sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go similarity index 100% rename from vendor/github.com/Sirupsen/logrus/writer.go rename to vendor/github.com/sirupsen/logrus/writer.go diff --git a/vendor/go.etcd.io/bbolt/.gitignore b/vendor/go.etcd.io/bbolt/.gitignore new file mode 100644 index 00000000..18312f00 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/.gitignore @@ -0,0 +1,7 @@ +*.prof +*.test +*.swp +/bin/ +cover.out +/.idea +*.iml diff --git a/vendor/go.etcd.io/bbolt/.travis.yml b/vendor/go.etcd.io/bbolt/.travis.yml new file mode 100644 index 00000000..452601e4 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/.travis.yml @@ -0,0 +1,18 @@ +language: go +go_import_path: go.etcd.io/bbolt + +sudo: false + +go: +- 1.15 + +before_install: +- go get -v golang.org/x/sys/unix +- go get -v honnef.co/go/tools/... +- go get -v github.com/kisielk/errcheck + +script: +- make fmt +- make test +- make race +# - make errcheck diff --git a/vendor/github.com/boltdb/bolt/LICENSE b/vendor/go.etcd.io/bbolt/LICENSE similarity index 100% rename from vendor/github.com/boltdb/bolt/LICENSE rename to vendor/go.etcd.io/bbolt/LICENSE diff --git a/vendor/go.etcd.io/bbolt/Makefile b/vendor/go.etcd.io/bbolt/Makefile new file mode 100644 index 00000000..21ecf48f --- /dev/null +++ b/vendor/go.etcd.io/bbolt/Makefile @@ -0,0 +1,36 @@ +BRANCH=`git rev-parse --abbrev-ref HEAD` +COMMIT=`git rev-parse --short HEAD` +GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" + +race: + @TEST_FREELIST_TYPE=hashmap go test -v -race -test.run="TestSimulate_(100op|1000op)" + @echo "array freelist test" + @TEST_FREELIST_TYPE=array go test -v -race -test.run="TestSimulate_(100op|1000op)" + +fmt: + !(gofmt -l -s -d $(shell find . -name \*.go) | grep '[a-z]') + +# go get honnef.co/go/tools/simple +gosimple: + gosimple ./... + +# go get honnef.co/go/tools/unused +unused: + unused ./... + +# go get github.com/kisielk/errcheck +errcheck: + @errcheck -ignorepkg=bytes -ignore=os:Remove go.etcd.io/bbolt + +test: + TEST_FREELIST_TYPE=hashmap go test -timeout 20m -v -coverprofile cover.out -covermode atomic + # Note: gets "program not an importable package" in out of path builds + TEST_FREELIST_TYPE=hashmap go test -v ./cmd/bbolt + + @echo "array freelist test" + + @TEST_FREELIST_TYPE=array go test -timeout 20m -v -coverprofile cover.out -covermode atomic + # Note: gets "program not an importable package" in out of path builds + @TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt + +.PHONY: race fmt errcheck test gosimple unused diff --git a/vendor/go.etcd.io/bbolt/README.md b/vendor/go.etcd.io/bbolt/README.md new file mode 100644 index 00000000..f1b4a7b2 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/README.md @@ -0,0 +1,958 @@ +bbolt +===== + +[![Go Report Card](https://goreportcard.com/badge/github.com/etcd-io/bbolt?style=flat-square)](https://goreportcard.com/report/github.com/etcd-io/bbolt) +[![Coverage](https://codecov.io/gh/etcd-io/bbolt/branch/master/graph/badge.svg)](https://codecov.io/gh/etcd-io/bbolt) +[![Build Status Travis](https://img.shields.io/travis/etcd-io/bboltlabs.svg?style=flat-square&&branch=master)](https://travis-ci.com/etcd-io/bbolt) +[![Godoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/etcd-io/bbolt) +[![Releases](https://img.shields.io/github/release/etcd-io/bbolt/all.svg?style=flat-square)](https://github.com/etcd-io/bbolt/releases) +[![LICENSE](https://img.shields.io/github/license/etcd-io/bbolt.svg?style=flat-square)](https://github.com/etcd-io/bbolt/blob/master/LICENSE) + +bbolt is a fork of [Ben Johnson's][gh_ben] [Bolt][bolt] key/value +store. The purpose of this fork is to provide the Go community with an active +maintenance and development target for Bolt; the goal is improved reliability +and stability. bbolt includes bug fixes, performance enhancements, and features +not found in Bolt while preserving backwards compatibility with the Bolt API. + +Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] +[LMDB project][lmdb]. The goal of the project is to provide a simple, +fast, and reliable database for projects that don't require a full database +server such as Postgres or MySQL. + +Since Bolt is meant to be used as such a low-level piece of functionality, +simplicity is key. The API will be small and only focus on getting values +and setting values. That's it. + +[gh_ben]: https://github.com/benbjohnson +[bolt]: https://github.com/boltdb/bolt +[hyc_symas]: https://twitter.com/hyc_symas +[lmdb]: http://symas.com/mdb/ + +## Project Status + +Bolt is stable, the API is fixed, and the file format is fixed. Full unit +test coverage and randomized black box testing are used to ensure database +consistency and thread safety. Bolt is currently used in high-load production +environments serving databases as large as 1TB. Many companies such as +Shopify and Heroku use Bolt-backed services every day. + +## Project versioning + +bbolt uses [semantic versioning](http://semver.org). +API should not change between patch and minor releases. +New minor versions may add additional features to the API. + +## Table of Contents + + - [Getting Started](#getting-started) + - [Installing](#installing) + - [Opening a database](#opening-a-database) + - [Transactions](#transactions) + - [Read-write transactions](#read-write-transactions) + - [Read-only transactions](#read-only-transactions) + - [Batch read-write transactions](#batch-read-write-transactions) + - [Managing transactions manually](#managing-transactions-manually) + - [Using buckets](#using-buckets) + - [Using key/value pairs](#using-keyvalue-pairs) + - [Autoincrementing integer for the bucket](#autoincrementing-integer-for-the-bucket) + - [Iterating over keys](#iterating-over-keys) + - [Prefix scans](#prefix-scans) + - [Range scans](#range-scans) + - [ForEach()](#foreach) + - [Nested buckets](#nested-buckets) + - [Database backups](#database-backups) + - [Statistics](#statistics) + - [Read-Only Mode](#read-only-mode) + - [Mobile Use (iOS/Android)](#mobile-use-iosandroid) + - [Resources](#resources) + - [Comparison with other databases](#comparison-with-other-databases) + - [Postgres, MySQL, & other relational databases](#postgres-mysql--other-relational-databases) + - [LevelDB, RocksDB](#leveldb-rocksdb) + - [LMDB](#lmdb) + - [Caveats & Limitations](#caveats--limitations) + - [Reading the Source](#reading-the-source) + - [Other Projects Using Bolt](#other-projects-using-bolt) + +## Getting Started + +### Installing + +To start using Bolt, install Go and run `go get`: + +```sh +$ go get go.etcd.io/bbolt/... +``` + +This will retrieve the library and install the `bolt` command line utility into +your `$GOBIN` path. + + +### Importing bbolt + +To use bbolt as an embedded key-value store, import as: + +```go +import bolt "go.etcd.io/bbolt" + +db, err := bolt.Open(path, 0666, nil) +if err != nil { + return err +} +defer db.Close() +``` + + +### Opening a database + +The top-level object in Bolt is a `DB`. It is represented as a single file on +your disk and represents a consistent snapshot of your data. + +To open your database, simply use the `bolt.Open()` function: + +```go +package main + +import ( + "log" + + bolt "go.etcd.io/bbolt" +) + +func main() { + // Open the my.db data file in your current directory. + // It will be created if it doesn't exist. + db, err := bolt.Open("my.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + defer db.Close() + + ... +} +``` + +Please note that Bolt obtains a file lock on the data file so multiple processes +cannot open the same database at the same time. Opening an already open Bolt +database will cause it to hang until the other process closes it. To prevent +an indefinite wait you can pass a timeout option to the `Open()` function: + +```go +db, err := bolt.Open("my.db", 0600, &bolt.Options{Timeout: 1 * time.Second}) +``` + + +### Transactions + +Bolt allows only one read-write transaction at a time but allows as many +read-only transactions as you want at a time. Each transaction has a consistent +view of the data as it existed when the transaction started. + +Individual transactions and all objects created from them (e.g. buckets, keys) +are not thread safe. To work with data in multiple goroutines you must start +a transaction for each one or use locking to ensure only one goroutine accesses +a transaction at a time. Creating transaction from the `DB` is thread safe. + +Transactions should not depend on one another and generally shouldn't be opened +simultaneously in the same goroutine. This can cause a deadlock as the read-write +transaction needs to periodically re-map the data file but it cannot do so while +any read-only transaction is open. Even a nested read-only transaction can cause +a deadlock, as the child transaction can block the parent transaction from releasing +its resources. + +#### Read-write transactions + +To start a read-write transaction, you can use the `DB.Update()` function: + +```go +err := db.Update(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Inside the closure, you have a consistent view of the database. You commit the +transaction by returning `nil` at the end. You can also rollback the transaction +at any point by returning an error. All database operations are allowed inside +a read-write transaction. + +Always check the return error as it will report any disk failures that can cause +your transaction to not complete. If you return an error within your closure +it will be passed through. + + +#### Read-only transactions + +To start a read-only transaction, you can use the `DB.View()` function: + +```go +err := db.View(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +You also get a consistent view of the database within this closure, however, +no mutating operations are allowed within a read-only transaction. You can only +retrieve buckets, retrieve values, and copy the database within a read-only +transaction. + + +#### Batch read-write transactions + +Each `DB.Update()` waits for disk to commit the writes. This overhead +can be minimized by combining multiple updates with the `DB.Batch()` +function: + +```go +err := db.Batch(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Concurrent Batch calls are opportunistically combined into larger +transactions. Batch is only useful when there are multiple goroutines +calling it. + +The trade-off is that `Batch` can call the given +function multiple times, if parts of the transaction fail. The +function must be idempotent and side effects must take effect only +after a successful return from `DB.Batch()`. + +For example: don't display messages from inside the function, instead +set variables in the enclosing scope: + +```go +var id uint64 +err := db.Batch(func(tx *bolt.Tx) error { + // Find last key in bucket, decode as bigendian uint64, increment + // by one, encode back to []byte, and add new key. + ... + id = newValue + return nil +}) +if err != nil { + return ... +} +fmt.Println("Allocated ID %d", id) +``` + + +#### Managing transactions manually + +The `DB.View()` and `DB.Update()` functions are wrappers around the `DB.Begin()` +function. These helper functions will start the transaction, execute a function, +and then safely close your transaction if an error is returned. This is the +recommended way to use Bolt transactions. + +However, sometimes you may want to manually start and end your transactions. +You can use the `DB.Begin()` function directly but **please** be sure to close +the transaction. + +```go +// Start a writable transaction. +tx, err := db.Begin(true) +if err != nil { + return err +} +defer tx.Rollback() + +// Use the transaction... +_, err := tx.CreateBucket([]byte("MyBucket")) +if err != nil { + return err +} + +// Commit the transaction and check for error. +if err := tx.Commit(); err != nil { + return err +} +``` + +The first argument to `DB.Begin()` is a boolean stating if the transaction +should be writable. + + +### Using buckets + +Buckets are collections of key/value pairs within the database. All keys in a +bucket must be unique. You can create a bucket using the `Tx.CreateBucket()` +function: + +```go +db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("MyBucket")) + if err != nil { + return fmt.Errorf("create bucket: %s", err) + } + return nil +}) +``` + +You can also create a bucket only if it doesn't exist by using the +`Tx.CreateBucketIfNotExists()` function. It's a common pattern to call this +function for all your top-level buckets after you open your database so you can +guarantee that they exist for future transactions. + +To delete a bucket, simply call the `Tx.DeleteBucket()` function. + + +### Using key/value pairs + +To save a key/value pair to a bucket, use the `Bucket.Put()` function: + +```go +db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + err := b.Put([]byte("answer"), []byte("42")) + return err +}) +``` + +This will set the value of the `"answer"` key to `"42"` in the `MyBucket` +bucket. To retrieve this value, we can use the `Bucket.Get()` function: + +```go +db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + v := b.Get([]byte("answer")) + fmt.Printf("The answer is: %s\n", v) + return nil +}) +``` + +The `Get()` function does not return an error because its operation is +guaranteed to work (unless there is some kind of system failure). If the key +exists then it will return its byte slice value. If it doesn't exist then it +will return `nil`. It's important to note that you can have a zero-length value +set to a key which is different than the key not existing. + +Use the `Bucket.Delete()` function to delete a key from the bucket. + +Please note that values returned from `Get()` are only valid while the +transaction is open. If you need to use a value outside of the transaction +then you must use `copy()` to copy it to another byte slice. + + +### Autoincrementing integer for the bucket +By using the `NextSequence()` function, you can let Bolt determine a sequence +which can be used as the unique identifier for your key/value pairs. See the +example below. + +```go +// CreateUser saves u to the store. The new user ID is set on u once the data is persisted. +func (s *Store) CreateUser(u *User) error { + return s.db.Update(func(tx *bolt.Tx) error { + // Retrieve the users bucket. + // This should be created when the DB is first opened. + b := tx.Bucket([]byte("users")) + + // Generate ID for the user. + // This returns an error only if the Tx is closed or not writeable. + // That can't happen in an Update() call so I ignore the error check. + id, _ := b.NextSequence() + u.ID = int(id) + + // Marshal user data into bytes. + buf, err := json.Marshal(u) + if err != nil { + return err + } + + // Persist bytes to users bucket. + return b.Put(itob(u.ID), buf) + }) +} + +// itob returns an 8-byte big endian representation of v. +func itob(v int) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(v)) + return b +} + +type User struct { + ID int + ... +} +``` + +### Iterating over keys + +Bolt stores its keys in byte-sorted order within a bucket. This makes sequential +iteration over these keys extremely fast. To iterate over keys we'll use a +`Cursor`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + c := b.Cursor() + + for k, v := c.First(); k != nil; k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +The cursor allows you to move to a specific point in the list of keys and move +forward or backward through the keys one at a time. + +The following functions are available on the cursor: + +``` +First() Move to the first key. +Last() Move to the last key. +Seek() Move to a specific key. +Next() Move to the next key. +Prev() Move to the previous key. +``` + +Each of those functions has a return signature of `(key []byte, value []byte)`. +When you have iterated to the end of the cursor then `Next()` will return a +`nil` key. You must seek to a position using `First()`, `Last()`, or `Seek()` +before calling `Next()` or `Prev()`. If you do not seek to a position then +these functions will return a `nil` key. + +During iteration, if the key is non-`nil` but the value is `nil`, that means +the key refers to a bucket rather than a value. Use `Bucket.Bucket()` to +access the sub-bucket. + + +#### Prefix scans + +To iterate over a key prefix, you can combine `Seek()` and `bytes.HasPrefix()`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + c := tx.Bucket([]byte("MyBucket")).Cursor() + + prefix := []byte("1234") + for k, v := c.Seek(prefix); k != nil && bytes.HasPrefix(k, prefix); k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +#### Range scans + +Another common use case is scanning over a range such as a time range. If you +use a sortable time encoding such as RFC3339 then you can query a specific +date range like this: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume our events bucket exists and has RFC3339 encoded time keys. + c := tx.Bucket([]byte("Events")).Cursor() + + // Our time range spans the 90's decade. + min := []byte("1990-01-01T00:00:00Z") + max := []byte("2000-01-01T00:00:00Z") + + // Iterate over the 90's. + for k, v := c.Seek(min); k != nil && bytes.Compare(k, max) <= 0; k, v = c.Next() { + fmt.Printf("%s: %s\n", k, v) + } + + return nil +}) +``` + +Note that, while RFC3339 is sortable, the Golang implementation of RFC3339Nano does not use a fixed number of digits after the decimal point and is therefore not sortable. + + +#### ForEach() + +You can also use the function `ForEach()` if you know you'll be iterating over +all the keys in a bucket: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + b.ForEach(func(k, v []byte) error { + fmt.Printf("key=%s, value=%s\n", k, v) + return nil + }) + return nil +}) +``` + +Please note that keys and values in `ForEach()` are only valid while +the transaction is open. If you need to use a key or value outside of +the transaction, you must use `copy()` to copy it to another byte +slice. + +### Nested buckets + +You can also store a bucket in a key to create nested buckets. The API is the +same as the bucket management API on the `DB` object: + +```go +func (*Bucket) CreateBucket(key []byte) (*Bucket, error) +func (*Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) +func (*Bucket) DeleteBucket(key []byte) error +``` + +Say you had a multi-tenant application where the root level bucket was the account bucket. Inside of this bucket was a sequence of accounts which themselves are buckets. And inside the sequence bucket you could have many buckets pertaining to the Account itself (Users, Notes, etc) isolating the information into logical groupings. + +```go + +// createUser creates a new user in the given account. +func createUser(accountID int, u *User) error { + // Start the transaction. + tx, err := db.Begin(true) + if err != nil { + return err + } + defer tx.Rollback() + + // Retrieve the root bucket for the account. + // Assume this has already been created when the account was set up. + root := tx.Bucket([]byte(strconv.FormatUint(accountID, 10))) + + // Setup the users bucket. + bkt, err := root.CreateBucketIfNotExists([]byte("USERS")) + if err != nil { + return err + } + + // Generate an ID for the new user. + userID, err := bkt.NextSequence() + if err != nil { + return err + } + u.ID = userID + + // Marshal and save the encoded user. + if buf, err := json.Marshal(u); err != nil { + return err + } else if err := bkt.Put([]byte(strconv.FormatUint(u.ID, 10)), buf); err != nil { + return err + } + + // Commit the transaction. + if err := tx.Commit(); err != nil { + return err + } + + return nil +} + +``` + + + + +### Database backups + +Bolt is a single file so it's easy to backup. You can use the `Tx.WriteTo()` +function to write a consistent view of the database to a writer. If you call +this from a read-only transaction, it will perform a hot backup and not block +your other database reads and writes. + +By default, it will use a regular file handle which will utilize the operating +system's page cache. See the [`Tx`](https://godoc.org/go.etcd.io/bbolt#Tx) +documentation for information about optimizing for larger-than-RAM datasets. + +One common use case is to backup over HTTP so you can use tools like `cURL` to +do database backups: + +```go +func BackupHandleFunc(w http.ResponseWriter, req *http.Request) { + err := db.View(func(tx *bolt.Tx) error { + w.Header().Set("Content-Type", "application/octet-stream") + w.Header().Set("Content-Disposition", `attachment; filename="my.db"`) + w.Header().Set("Content-Length", strconv.Itoa(int(tx.Size()))) + _, err := tx.WriteTo(w) + return err + }) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } +} +``` + +Then you can backup using this command: + +```sh +$ curl http://localhost/backup > my.db +``` + +Or you can open your browser to `http://localhost/backup` and it will download +automatically. + +If you want to backup to another file you can use the `Tx.CopyFile()` helper +function. + + +### Statistics + +The database keeps a running count of many of the internal operations it +performs so you can better understand what's going on. By grabbing a snapshot +of these stats at two points in time we can see what operations were performed +in that time range. + +For example, we could start a goroutine to log stats every 10 seconds: + +```go +go func() { + // Grab the initial stats. + prev := db.Stats() + + for { + // Wait for 10s. + time.Sleep(10 * time.Second) + + // Grab the current stats and diff them. + stats := db.Stats() + diff := stats.Sub(&prev) + + // Encode stats to JSON and print to STDERR. + json.NewEncoder(os.Stderr).Encode(diff) + + // Save stats for the next loop. + prev = stats + } +}() +``` + +It's also useful to pipe these stats to a service such as statsd for monitoring +or to provide an HTTP endpoint that will perform a fixed-length sample. + + +### Read-Only Mode + +Sometimes it is useful to create a shared, read-only Bolt database. To this, +set the `Options.ReadOnly` flag when opening your database. Read-only mode +uses a shared lock to allow multiple processes to read from the database but +it will block any processes from opening the database in read-write mode. + +```go +db, err := bolt.Open("my.db", 0666, &bolt.Options{ReadOnly: true}) +if err != nil { + log.Fatal(err) +} +``` + +### Mobile Use (iOS/Android) + +Bolt is able to run on mobile devices by leveraging the binding feature of the +[gomobile](https://github.com/golang/mobile) tool. Create a struct that will +contain your database logic and a reference to a `*bolt.DB` with a initializing +constructor that takes in a filepath where the database file will be stored. +Neither Android nor iOS require extra permissions or cleanup from using this method. + +```go +func NewBoltDB(filepath string) *BoltDB { + db, err := bolt.Open(filepath+"/demo.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + + return &BoltDB{db} +} + +type BoltDB struct { + db *bolt.DB + ... +} + +func (b *BoltDB) Path() string { + return b.db.Path() +} + +func (b *BoltDB) Close() { + b.db.Close() +} +``` + +Database logic should be defined as methods on this wrapper struct. + +To initialize this struct from the native language (both platforms now sync +their local storage to the cloud. These snippets disable that functionality for the +database file): + +#### Android + +```java +String path; +if (android.os.Build.VERSION.SDK_INT >=android.os.Build.VERSION_CODES.LOLLIPOP){ + path = getNoBackupFilesDir().getAbsolutePath(); +} else{ + path = getFilesDir().getAbsolutePath(); +} +Boltmobiledemo.BoltDB boltDB = Boltmobiledemo.NewBoltDB(path) +``` + +#### iOS + +```objc +- (void)demo { + NSString* path = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, + NSUserDomainMask, + YES) objectAtIndex:0]; + GoBoltmobiledemoBoltDB * demo = GoBoltmobiledemoNewBoltDB(path); + [self addSkipBackupAttributeToItemAtPath:demo.path]; + //Some DB Logic would go here + [demo close]; +} + +- (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *) filePathString +{ + NSURL* URL= [NSURL fileURLWithPath: filePathString]; + assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); + + NSError *error = nil; + BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] + forKey: NSURLIsExcludedFromBackupKey error: &error]; + if(!success){ + NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); + } + return success; +} + +``` + +## Resources + +For more information on getting started with Bolt, check out the following articles: + +* [Intro to BoltDB: Painless Performant Persistence](http://npf.io/2014/07/intro-to-boltdb-painless-performant-persistence/) by [Nate Finch](https://github.com/natefinch). +* [Bolt -- an embedded key/value database for Go](https://www.progville.com/go/bolt-embedded-db-golang/) by Progville + + +## Comparison with other databases + +### Postgres, MySQL, & other relational databases + +Relational databases structure data into rows and are only accessible through +the use of SQL. This approach provides flexibility in how you store and query +your data but also incurs overhead in parsing and planning SQL statements. Bolt +accesses all data by a byte slice key. This makes Bolt fast to read and write +data by key but provides no built-in support for joining values together. + +Most relational databases (with the exception of SQLite) are standalone servers +that run separately from your application. This gives your systems +flexibility to connect multiple application servers to a single database +server but also adds overhead in serializing and transporting data over the +network. Bolt runs as a library included in your application so all data access +has to go through your application's process. This brings data closer to your +application but limits multi-process access to the data. + + +### LevelDB, RocksDB + +LevelDB and its derivatives (RocksDB, HyperLevelDB) are similar to Bolt in that +they are libraries bundled into the application, however, their underlying +structure is a log-structured merge-tree (LSM tree). An LSM tree optimizes +random writes by using a write ahead log and multi-tiered, sorted files called +SSTables. Bolt uses a B+tree internally and only a single file. Both approaches +have trade-offs. + +If you require a high random write throughput (>10,000 w/sec) or you need to use +spinning disks then LevelDB could be a good choice. If your application is +read-heavy or does a lot of range scans then Bolt could be a good choice. + +One other important consideration is that LevelDB does not have transactions. +It supports batch writing of key/values pairs and it supports read snapshots +but it will not give you the ability to do a compare-and-swap operation safely. +Bolt supports fully serializable ACID transactions. + + +### LMDB + +Bolt was originally a port of LMDB so it is architecturally similar. Both use +a B+tree, have ACID semantics with fully serializable transactions, and support +lock-free MVCC using a single writer and multiple readers. + +The two projects have somewhat diverged. LMDB heavily focuses on raw performance +while Bolt has focused on simplicity and ease of use. For example, LMDB allows +several unsafe actions such as direct writes for the sake of performance. Bolt +opts to disallow actions which can leave the database in a corrupted state. The +only exception to this in Bolt is `DB.NoSync`. + +There are also a few differences in API. LMDB requires a maximum mmap size when +opening an `mdb_env` whereas Bolt will handle incremental mmap resizing +automatically. LMDB overloads the getter and setter functions with multiple +flags whereas Bolt splits these specialized cases into their own functions. + + +## Caveats & Limitations + +It's important to pick the right tool for the job and Bolt is no exception. +Here are a few things to note when evaluating and using Bolt: + +* Bolt is good for read intensive workloads. Sequential write performance is + also fast but random writes can be slow. You can use `DB.Batch()` or add a + write-ahead log to help mitigate this issue. + +* Bolt uses a B+tree internally so there can be a lot of random page access. + SSDs provide a significant performance boost over spinning disks. + +* Try to avoid long running read transactions. Bolt uses copy-on-write so + old pages cannot be reclaimed while an old transaction is using them. + +* Byte slices returned from Bolt are only valid during a transaction. Once the + transaction has been committed or rolled back then the memory they point to + can be reused by a new page or can be unmapped from virtual memory and you'll + see an `unexpected fault address` panic when accessing it. + +* Bolt uses an exclusive write lock on the database file so it cannot be + shared by multiple processes. + +* Be careful when using `Bucket.FillPercent`. Setting a high fill percent for + buckets that have random inserts will cause your database to have very poor + page utilization. + +* Use larger buckets in general. Smaller buckets causes poor page utilization + once they become larger than the page size (typically 4KB). + +* Bulk loading a lot of random writes into a new bucket can be slow as the + page will not split until the transaction is committed. Randomly inserting + more than 100,000 key/value pairs into a single new bucket in a single + transaction is not advised. + +* Bolt uses a memory-mapped file so the underlying operating system handles the + caching of the data. Typically, the OS will cache as much of the file as it + can in memory and will release memory as needed to other processes. This means + that Bolt can show very high memory usage when working with large databases. + However, this is expected and the OS will release memory as needed. Bolt can + handle databases much larger than the available physical RAM, provided its + memory-map fits in the process virtual address space. It may be problematic + on 32-bits systems. + +* The data structures in the Bolt database are memory mapped so the data file + will be endian specific. This means that you cannot copy a Bolt file from a + little endian machine to a big endian machine and have it work. For most + users this is not a concern since most modern CPUs are little endian. + +* Because of the way pages are laid out on disk, Bolt cannot truncate data files + and return free pages back to the disk. Instead, Bolt maintains a free list + of unused pages within its data file. These free pages can be reused by later + transactions. This works well for many use cases as databases generally tend + to grow. However, it's important to note that deleting large chunks of data + will not allow you to reclaim that space on disk. + + For more information on page allocation, [see this comment][page-allocation]. + +[page-allocation]: https://github.com/boltdb/bolt/issues/308#issuecomment-74811638 + + +## Reading the Source + +Bolt is a relatively small code base (<5KLOC) for an embedded, serializable, +transactional key/value database so it can be a good starting point for people +interested in how databases work. + +The best places to start are the main entry points into Bolt: + +- `Open()` - Initializes the reference to the database. It's responsible for + creating the database if it doesn't exist, obtaining an exclusive lock on the + file, reading the meta pages, & memory-mapping the file. + +- `DB.Begin()` - Starts a read-only or read-write transaction depending on the + value of the `writable` argument. This requires briefly obtaining the "meta" + lock to keep track of open transactions. Only one read-write transaction can + exist at a time so the "rwlock" is acquired during the life of a read-write + transaction. + +- `Bucket.Put()` - Writes a key/value pair into a bucket. After validating the + arguments, a cursor is used to traverse the B+tree to the page and position + where they key & value will be written. Once the position is found, the bucket + materializes the underlying page and the page's parent pages into memory as + "nodes". These nodes are where mutations occur during read-write transactions. + These changes get flushed to disk during commit. + +- `Bucket.Get()` - Retrieves a key/value pair from a bucket. This uses a cursor + to move to the page & position of a key/value pair. During a read-only + transaction, the key and value data is returned as a direct reference to the + underlying mmap file so there's no allocation overhead. For read-write + transactions, this data may reference the mmap file or one of the in-memory + node values. + +- `Cursor` - This object is simply for traversing the B+tree of on-disk pages + or in-memory nodes. It can seek to a specific key, move to the first or last + value, or it can move forward or backward. The cursor handles the movement up + and down the B+tree transparently to the end user. + +- `Tx.Commit()` - Converts the in-memory dirty nodes and the list of free pages + into pages to be written to disk. Writing to disk then occurs in two phases. + First, the dirty pages are written to disk and an `fsync()` occurs. Second, a + new meta page with an incremented transaction ID is written and another + `fsync()` occurs. This two phase write ensures that partially written data + pages are ignored in the event of a crash since the meta page pointing to them + is never written. Partially written meta pages are invalidated because they + are written with a checksum. + +If you have additional notes that could be helpful for others, please submit +them via pull request. + + +## Other Projects Using Bolt + +Below is a list of public, open source projects that use Bolt: + +* [Algernon](https://github.com/xyproto/algernon) - A HTTP/2 web server with built-in support for Lua. Uses BoltDB as the default database backend. +* [Bazil](https://bazil.org/) - A file system that lets your data reside where it is most convenient for it to reside. +* [bolter](https://github.com/hasit/bolter) - Command-line app for viewing BoltDB file in your terminal. +* [boltcli](https://github.com/spacewander/boltcli) - the redis-cli for boltdb with Lua script support. +* [BoltHold](https://github.com/timshannon/bolthold) - An embeddable NoSQL store for Go types built on BoltDB +* [BoltStore](https://github.com/yosssi/boltstore) - Session store using Bolt. +* [Boltdb Boilerplate](https://github.com/bobintornado/boltdb-boilerplate) - Boilerplate wrapper around bolt aiming to make simple calls one-liners. +* [BoltDbWeb](https://github.com/evnix/boltdbweb) - A web based GUI for BoltDB files. +* [BoltDB Viewer](https://github.com/zc310/rich_boltdb) - A BoltDB Viewer Can run on Windows、Linux、Android system. +* [bleve](http://www.blevesearch.com/) - A pure Go search engine similar to ElasticSearch that uses Bolt as the default storage backend. +* [btcwallet](https://github.com/btcsuite/btcwallet) - A bitcoin wallet. +* [buckets](https://github.com/joyrexus/buckets) - a bolt wrapper streamlining + simple tx and key scans. +* [cayley](https://github.com/google/cayley) - Cayley is an open-source graph database using Bolt as optional backend. +* [ChainStore](https://github.com/pressly/chainstore) - Simple key-value interface to a variety of storage engines organized as a chain of operations. +* [🌰 Chestnut](https://github.com/jrapoport/chestnut) - Chestnut is encrypted storage for Go. +* [Consul](https://github.com/hashicorp/consul) - Consul is service discovery and configuration made easy. Distributed, highly available, and datacenter-aware. +* [DVID](https://github.com/janelia-flyem/dvid) - Added Bolt as optional storage engine and testing it against Basho-tuned leveldb. +* [dcrwallet](https://github.com/decred/dcrwallet) - A wallet for the Decred cryptocurrency. +* [drive](https://github.com/odeke-em/drive) - drive is an unofficial Google Drive command line client for \*NIX operating systems. +* [event-shuttle](https://github.com/sclasen/event-shuttle) - A Unix system service to collect and reliably deliver messages to Kafka. +* [Freehold](http://tshannon.bitbucket.org/freehold/) - An open, secure, and lightweight platform for your files and data. +* [Go Report Card](https://goreportcard.com/) - Go code quality report cards as a (free and open source) service. +* [GoWebApp](https://github.com/josephspurrier/gowebapp) - A basic MVC web application in Go using BoltDB. +* [GoShort](https://github.com/pankajkhairnar/goShort) - GoShort is a URL shortener written in Golang and BoltDB for persistent key/value storage and for routing it's using high performent HTTPRouter. +* [gopherpit](https://github.com/gopherpit/gopherpit) - A web service to manage Go remote import paths with custom domains +* [gokv](https://github.com/philippgille/gokv) - Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more) +* [Gitchain](https://github.com/gitchain/gitchain) - Decentralized, peer-to-peer Git repositories aka "Git meets Bitcoin". +* [InfluxDB](https://influxdata.com) - Scalable datastore for metrics, events, and real-time analytics. +* [ipLocator](https://github.com/AndreasBriese/ipLocator) - A fast ip-geo-location-server using bolt with bloom filters. +* [ipxed](https://github.com/kelseyhightower/ipxed) - Web interface and api for ipxed. +* [Ironsmith](https://github.com/timshannon/ironsmith) - A simple, script-driven continuous integration (build - > test -> release) tool, with no external dependencies +* [Kala](https://github.com/ajvb/kala) - Kala is a modern job scheduler optimized to run on a single node. It is persistent, JSON over HTTP API, ISO 8601 duration notation, and dependent jobs. +* [Key Value Access Langusge (KVAL)](https://github.com/kval-access-language) - A proposed grammar for key-value datastores offering a bbolt binding. +* [LedisDB](https://github.com/siddontang/ledisdb) - A high performance NoSQL, using Bolt as optional storage. +* [lru](https://github.com/crowdriff/lru) - Easy to use Bolt-backed Least-Recently-Used (LRU) read-through cache with chainable remote stores. +* [mbuckets](https://github.com/abhigupta912/mbuckets) - A Bolt wrapper that allows easy operations on multi level (nested) buckets. +* [MetricBase](https://github.com/msiebuhr/MetricBase) - Single-binary version of Graphite. +* [MuLiFS](https://github.com/dankomiocevic/mulifs) - Music Library Filesystem creates a filesystem to organise your music files. +* [NATS](https://github.com/nats-io/nats-streaming-server) - NATS Streaming uses bbolt for message and metadata storage. +* [Prometheus Annotation Server](https://github.com/oliver006/prom_annotation_server) - Annotation server for PromDash & Prometheus service monitoring system. +* [Rain](https://github.com/cenkalti/rain) - BitTorrent client and library. +* [reef-pi](https://github.com/reef-pi/reef-pi) - reef-pi is an award winning, modular, DIY reef tank controller using easy to learn electronics based on a Raspberry Pi. +* [Request Baskets](https://github.com/darklynx/request-baskets) - A web service to collect arbitrary HTTP requests and inspect them via REST API or simple web UI, similar to [RequestBin](http://requestb.in/) service +* [Seaweed File System](https://github.com/chrislusf/seaweedfs) - Highly scalable distributed key~file system with O(1) disk read. +* [stow](https://github.com/djherbis/stow) - a persistence manager for objects + backed by boltdb. +* [Storm](https://github.com/asdine/storm) - Simple and powerful ORM for BoltDB. +* [SimpleBolt](https://github.com/xyproto/simplebolt) - A simple way to use BoltDB. Deals mainly with strings. +* [Skybox Analytics](https://github.com/skybox/skybox) - A standalone funnel analysis tool for web analytics. +* [Scuttlebutt](https://github.com/benbjohnson/scuttlebutt) - Uses Bolt to store and process all Twitter mentions of GitHub projects. +* [tentacool](https://github.com/optiflows/tentacool) - REST api server to manage system stuff (IP, DNS, Gateway...) on a linux server. +* [torrent](https://github.com/anacrolix/torrent) - Full-featured BitTorrent client package and utilities in Go. BoltDB is a storage backend in development. +* [Wiki](https://github.com/peterhellberg/wiki) - A tiny wiki using Goji, BoltDB and Blackfriday. + +If you are using Bolt in a project please send a pull request to add it to the list. diff --git a/vendor/github.com/boltdb/bolt/bolt_386.go b/vendor/go.etcd.io/bbolt/bolt_386.go similarity index 93% rename from vendor/github.com/boltdb/bolt/bolt_386.go rename to vendor/go.etcd.io/bbolt/bolt_386.go index e659bfb9..aee25960 100644 --- a/vendor/github.com/boltdb/bolt/bolt_386.go +++ b/vendor/go.etcd.io/bbolt/bolt_386.go @@ -1,4 +1,4 @@ -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0x7FFFFFFF // 2GB diff --git a/vendor/github.com/boltdb/bolt/bolt_amd64.go b/vendor/go.etcd.io/bbolt/bolt_amd64.go similarity index 93% rename from vendor/github.com/boltdb/bolt/bolt_amd64.go rename to vendor/go.etcd.io/bbolt/bolt_amd64.go index cca6b7eb..5dd8f3f2 100644 --- a/vendor/github.com/boltdb/bolt/bolt_amd64.go +++ b/vendor/go.etcd.io/bbolt/bolt_amd64.go @@ -1,4 +1,4 @@ -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0xFFFFFFFFFFFF // 256TB diff --git a/vendor/github.com/boltdb/bolt/bolt_arm.go b/vendor/go.etcd.io/bbolt/bolt_arm.go similarity index 93% rename from vendor/github.com/boltdb/bolt/bolt_arm.go rename to vendor/go.etcd.io/bbolt/bolt_arm.go index e659bfb9..aee25960 100644 --- a/vendor/github.com/boltdb/bolt/bolt_arm.go +++ b/vendor/go.etcd.io/bbolt/bolt_arm.go @@ -1,4 +1,4 @@ -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0x7FFFFFFF // 2GB diff --git a/vendor/go.etcd.io/bbolt/bolt_arm64.go b/vendor/go.etcd.io/bbolt/bolt_arm64.go new file mode 100644 index 00000000..810dfd55 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_arm64.go @@ -0,0 +1,9 @@ +// +build arm64 + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_linux.go b/vendor/go.etcd.io/bbolt/bolt_linux.go similarity index 77% rename from vendor/github.com/boltdb/bolt/bolt_linux.go rename to vendor/go.etcd.io/bbolt/bolt_linux.go index e9d1c907..7707bcac 100644 --- a/vendor/github.com/boltdb/bolt/bolt_linux.go +++ b/vendor/go.etcd.io/bbolt/bolt_linux.go @@ -1,11 +1,9 @@ -package bolt +package bbolt import ( "syscall" ) -var odirect = syscall.O_DIRECT - // fdatasync flushes written data to a file descriptor. func fdatasync(db *DB) error { return syscall.Fdatasync(int(db.file.Fd())) diff --git a/vendor/go.etcd.io/bbolt/bolt_mips64x.go b/vendor/go.etcd.io/bbolt/bolt_mips64x.go new file mode 100644 index 00000000..dd8ffe12 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_mips64x.go @@ -0,0 +1,9 @@ +// +build mips64 mips64le + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x8000000000 // 512GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/go.etcd.io/bbolt/bolt_mipsx.go b/vendor/go.etcd.io/bbolt/bolt_mipsx.go new file mode 100644 index 00000000..a669703a --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_mipsx.go @@ -0,0 +1,9 @@ +// +build mips mipsle + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x40000000 // 1GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_openbsd.go b/vendor/go.etcd.io/bbolt/bolt_openbsd.go similarity index 94% rename from vendor/github.com/boltdb/bolt/bolt_openbsd.go rename to vendor/go.etcd.io/bbolt/bolt_openbsd.go index 7c1bef1a..d7f50358 100644 --- a/vendor/github.com/boltdb/bolt/bolt_openbsd.go +++ b/vendor/go.etcd.io/bbolt/bolt_openbsd.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "syscall" @@ -11,8 +11,6 @@ const ( msInvalidate // invalidate cached data ) -var odirect int - func msync(db *DB) error { _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate) if errno != 0 { diff --git a/vendor/go.etcd.io/bbolt/bolt_ppc.go b/vendor/go.etcd.io/bbolt/bolt_ppc.go new file mode 100644 index 00000000..84e545ef --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_ppc.go @@ -0,0 +1,9 @@ +// +build ppc + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x7FFFFFFF // 2GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF diff --git a/vendor/go.etcd.io/bbolt/bolt_ppc64.go b/vendor/go.etcd.io/bbolt/bolt_ppc64.go new file mode 100644 index 00000000..a7612090 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_ppc64.go @@ -0,0 +1,9 @@ +// +build ppc64 + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/go.etcd.io/bbolt/bolt_ppc64le.go b/vendor/go.etcd.io/bbolt/bolt_ppc64le.go new file mode 100644 index 00000000..c830f2fc --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_ppc64le.go @@ -0,0 +1,9 @@ +// +build ppc64le + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/go.etcd.io/bbolt/bolt_riscv64.go b/vendor/go.etcd.io/bbolt/bolt_riscv64.go new file mode 100644 index 00000000..c967613b --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_riscv64.go @@ -0,0 +1,9 @@ +// +build riscv64 + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/go.etcd.io/bbolt/bolt_s390x.go b/vendor/go.etcd.io/bbolt/bolt_s390x.go new file mode 100644 index 00000000..ff2a5609 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_s390x.go @@ -0,0 +1,9 @@ +// +build s390x + +package bbolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/go.etcd.io/bbolt/bolt_unix.go b/vendor/go.etcd.io/bbolt/bolt_unix.go new file mode 100644 index 00000000..4e5f65cc --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_unix.go @@ -0,0 +1,86 @@ +// +build !windows,!plan9,!solaris,!aix + +package bbolt + +import ( + "fmt" + "syscall" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, exclusive bool, timeout time.Duration) error { + var t time.Time + if timeout != 0 { + t = time.Now() + } + fd := db.file.Fd() + flag := syscall.LOCK_NB + if exclusive { + flag |= syscall.LOCK_EX + } else { + flag |= syscall.LOCK_SH + } + for { + // Attempt to obtain an exclusive lock. + err := syscall.Flock(int(fd), flag) + if err == nil { + return nil + } else if err != syscall.EWOULDBLOCK { + return err + } + + // If we timed out then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + return syscall.Flock(int(db.file.Fd()), syscall.LOCK_UN) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + err = unix.Madvise(b, syscall.MADV_RANDOM) + if err != nil && err != syscall.ENOSYS { + // Ignore not implemented error in kernel because it still works. + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := unix.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} diff --git a/vendor/go.etcd.io/bbolt/bolt_unix_aix.go b/vendor/go.etcd.io/bbolt/bolt_unix_aix.go new file mode 100644 index 00000000..a64c16f5 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_unix_aix.go @@ -0,0 +1,90 @@ +// +build aix + +package bbolt + +import ( + "fmt" + "syscall" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, exclusive bool, timeout time.Duration) error { + var t time.Time + if timeout != 0 { + t = time.Now() + } + fd := db.file.Fd() + var lockType int16 + if exclusive { + lockType = syscall.F_WRLCK + } else { + lockType = syscall.F_RDLCK + } + for { + // Attempt to obtain an exclusive lock. + lock := syscall.Flock_t{Type: lockType} + err := syscall.FcntlFlock(fd, syscall.F_SETLK, &lock) + if err == nil { + return nil + } else if err != syscall.EAGAIN { + return err + } + + // If we timed out then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Type = syscall.F_UNLCK + lock.Whence = 0 + return syscall.FcntlFlock(uintptr(db.file.Fd()), syscall.F_SETLK, &lock) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + if err := unix.Madvise(b, syscall.MADV_RANDOM); err != nil { + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := unix.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} diff --git a/vendor/go.etcd.io/bbolt/bolt_unix_solaris.go b/vendor/go.etcd.io/bbolt/bolt_unix_solaris.go new file mode 100644 index 00000000..babad657 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_unix_solaris.go @@ -0,0 +1,88 @@ +package bbolt + +import ( + "fmt" + "syscall" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, exclusive bool, timeout time.Duration) error { + var t time.Time + if timeout != 0 { + t = time.Now() + } + fd := db.file.Fd() + var lockType int16 + if exclusive { + lockType = syscall.F_WRLCK + } else { + lockType = syscall.F_RDLCK + } + for { + // Attempt to obtain an exclusive lock. + lock := syscall.Flock_t{Type: lockType} + err := syscall.FcntlFlock(fd, syscall.F_SETLK, &lock) + if err == nil { + return nil + } else if err != syscall.EAGAIN { + return err + } + + // If we timed out then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Type = syscall.F_UNLCK + lock.Whence = 0 + return syscall.FcntlFlock(uintptr(db.file.Fd()), syscall.F_SETLK, &lock) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + if err := unix.Madvise(b, syscall.MADV_RANDOM); err != nil { + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := unix.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} diff --git a/vendor/go.etcd.io/bbolt/bolt_windows.go b/vendor/go.etcd.io/bbolt/bolt_windows.go new file mode 100644 index 00000000..fca178bd --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_windows.go @@ -0,0 +1,141 @@ +package bbolt + +import ( + "fmt" + "os" + "syscall" + "time" + "unsafe" +) + +// LockFileEx code derived from golang build filemutex_windows.go @ v1.5.1 +var ( + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + procLockFileEx = modkernel32.NewProc("LockFileEx") + procUnlockFileEx = modkernel32.NewProc("UnlockFileEx") +) + +const ( + // see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx + flagLockExclusive = 2 + flagLockFailImmediately = 1 + + // see https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx + errLockViolation syscall.Errno = 0x21 +) + +func lockFileEx(h syscall.Handle, flags, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procLockFileEx.Call(uintptr(h), uintptr(flags), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol))) + if r == 0 { + return err + } + return nil +} + +func unlockFileEx(h syscall.Handle, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procUnlockFileEx.Call(uintptr(h), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)), 0) + if r == 0 { + return err + } + return nil +} + +// fdatasync flushes written data to a file descriptor. +func fdatasync(db *DB) error { + return db.file.Sync() +} + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, exclusive bool, timeout time.Duration) error { + var t time.Time + if timeout != 0 { + t = time.Now() + } + var flag uint32 = flagLockFailImmediately + if exclusive { + flag |= flagLockExclusive + } + for { + // Fix for https://github.com/etcd-io/bbolt/issues/121. Use byte-range + // -1..0 as the lock on the database file. + var m1 uint32 = (1 << 32) - 1 // -1 in a uint32 + err := lockFileEx(syscall.Handle(db.file.Fd()), flag, 0, 1, 0, &syscall.Overlapped{ + Offset: m1, + OffsetHigh: m1, + }) + + if err == nil { + return nil + } else if err != errLockViolation { + return err + } + + // If we timed oumercit then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + var m1 uint32 = (1 << 32) - 1 // -1 in a uint32 + err := unlockFileEx(syscall.Handle(db.file.Fd()), 0, 1, 0, &syscall.Overlapped{ + Offset: m1, + OffsetHigh: m1, + }) + return err +} + +// mmap memory maps a DB's data file. +// Based on: https://github.com/edsrzf/mmap-go +func mmap(db *DB, sz int) error { + if !db.readOnly { + // Truncate the database to the size of the mmap. + if err := db.file.Truncate(int64(sz)); err != nil { + return fmt.Errorf("truncate: %s", err) + } + } + + // Open a file mapping handle. + sizelo := uint32(sz >> 32) + sizehi := uint32(sz) & 0xffffffff + h, errno := syscall.CreateFileMapping(syscall.Handle(db.file.Fd()), nil, syscall.PAGE_READONLY, sizelo, sizehi, nil) + if h == 0 { + return os.NewSyscallError("CreateFileMapping", errno) + } + + // Create the memory map. + addr, errno := syscall.MapViewOfFile(h, syscall.FILE_MAP_READ, 0, 0, uintptr(sz)) + if addr == 0 { + return os.NewSyscallError("MapViewOfFile", errno) + } + + // Close mapping handle. + if err := syscall.CloseHandle(syscall.Handle(h)); err != nil { + return os.NewSyscallError("CloseHandle", err) + } + + // Convert to a byte array. + db.data = ((*[maxMapSize]byte)(unsafe.Pointer(addr))) + db.datasz = sz + + return nil +} + +// munmap unmaps a pointer from a file. +// Based on: https://github.com/edsrzf/mmap-go +func munmap(db *DB) error { + if db.data == nil { + return nil + } + + addr := (uintptr)(unsafe.Pointer(&db.data[0])) + if err := syscall.UnmapViewOfFile(addr); err != nil { + return os.NewSyscallError("UnmapViewOfFile", err) + } + return nil +} diff --git a/vendor/github.com/boltdb/bolt/boltsync_unix.go b/vendor/go.etcd.io/bbolt/boltsync_unix.go similarity index 83% rename from vendor/github.com/boltdb/bolt/boltsync_unix.go rename to vendor/go.etcd.io/bbolt/boltsync_unix.go index 8db89776..9587afef 100644 --- a/vendor/github.com/boltdb/bolt/boltsync_unix.go +++ b/vendor/go.etcd.io/bbolt/boltsync_unix.go @@ -1,8 +1,6 @@ // +build !windows,!plan9,!linux,!openbsd -package bolt - -var odirect int +package bbolt // fdatasync flushes written data to a file descriptor. func fdatasync(db *DB) error { diff --git a/vendor/github.com/boltdb/bolt/bucket.go b/vendor/go.etcd.io/bbolt/bucket.go similarity index 89% rename from vendor/github.com/boltdb/bolt/bucket.go rename to vendor/go.etcd.io/bbolt/bucket.go index 470689ba..d8750b14 100644 --- a/vendor/github.com/boltdb/bolt/bucket.go +++ b/vendor/go.etcd.io/bbolt/bucket.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "bytes" @@ -11,14 +11,7 @@ const ( MaxKeySize = 32768 // MaxValueSize is the maximum length of a value, in bytes. - MaxValueSize = 4294967295 -) - -const ( - maxUint = ^uint(0) - minUint = 0 - maxInt = int(^uint(0) >> 1) - minInt = -maxInt - 1 + MaxValueSize = (1 << 31) - 2 ) const bucketHeaderSize = int(unsafe.Sizeof(bucket{})) @@ -99,6 +92,7 @@ func (b *Bucket) Cursor() *Cursor { // Bucket retrieves a nested bucket by name. // Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. func (b *Bucket) Bucket(name []byte) *Bucket { if b.buckets != nil { if child := b.buckets[string(name)]; child != nil { @@ -129,9 +123,19 @@ func (b *Bucket) Bucket(name []byte) *Bucket { func (b *Bucket) openBucket(value []byte) *Bucket { var child = newBucket(b.tx) + // Unaligned access requires a copy to be made. + const unalignedMask = unsafe.Alignof(struct { + bucket + page + }{}) - 1 + unaligned := uintptr(unsafe.Pointer(&value[0]))&unalignedMask != 0 + if unaligned { + value = cloneBytes(value) + } + // If this is a writable transaction then we need to copy the bucket entry. // Read-only transactions can point directly at the mmap entry. - if b.tx.writable { + if b.tx.writable && !unaligned { child.bucket = &bucket{} *child.bucket = *(*bucket)(unsafe.Pointer(&value[0])) } else { @@ -148,6 +152,7 @@ func (b *Bucket) openBucket(value []byte) *Bucket { // CreateBucket creates a new bucket at the given key and returns the new bucket. // Returns an error if the key already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { if b.tx.db == nil { return nil, ErrTxClosed @@ -165,9 +170,8 @@ func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { if bytes.Equal(key, k) { if (flags & bucketLeafFlag) != 0 { return nil, ErrBucketExists - } else { - return nil, ErrIncompatibleValue } + return nil, ErrIncompatibleValue } // Create empty, inline bucket. @@ -192,6 +196,7 @@ func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { // CreateBucketIfNotExists creates a new bucket if it doesn't already exist and returns a reference to it. // Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) { child, err := b.CreateBucket(key) if err == ErrBucketExists { @@ -203,7 +208,7 @@ func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) { } // DeleteBucket deletes a bucket at the given key. -// Returns an error if the bucket does not exists, or if the key represents a non-bucket value. +// Returns an error if the bucket does not exist, or if the key represents a non-bucket value. func (b *Bucket) DeleteBucket(key []byte) error { if b.tx.db == nil { return ErrTxClosed @@ -225,7 +230,7 @@ func (b *Bucket) DeleteBucket(key []byte) error { // Recursively delete all child buckets. child := b.Bucket(key) err := child.ForEach(func(k, v []byte) error { - if v == nil { + if _, _, childFlags := child.Cursor().seek(k); (childFlags & bucketLeafFlag) != 0 { if err := child.DeleteBucket(k); err != nil { return fmt.Errorf("delete bucket: %s", err) } @@ -252,6 +257,7 @@ func (b *Bucket) DeleteBucket(key []byte) error { // Get retrieves the value for a key in the bucket. // Returns a nil value if the key does not exist or if the key is a nested bucket. +// The returned value is only valid for the life of the transaction. func (b *Bucket) Get(key []byte) []byte { k, v, flags := b.Cursor().seek(key) @@ -269,6 +275,7 @@ func (b *Bucket) Get(key []byte) []byte { // Put sets the value for a key in the bucket. // If the key exist then its previous value will be overwritten. +// Supplied value must remain valid for the life of the transaction. // Returns an error if the bucket was created from a read-only transaction, if the key is blank, if the key is too large, or if the value is too large. func (b *Bucket) Put(key []byte, value []byte) error { if b.tx.db == nil { @@ -311,7 +318,12 @@ func (b *Bucket) Delete(key []byte) error { // Move cursor to correct position. c := b.Cursor() - _, _, flags := c.seek(key) + k, _, flags := c.seek(key) + + // Return nil if the key doesn't exist. + if !bytes.Equal(key, k) { + return nil + } // Return an error if there is already existing bucket value. if (flags & bucketLeafFlag) != 0 { @@ -324,6 +336,28 @@ func (b *Bucket) Delete(key []byte) error { return nil } +// Sequence returns the current integer for the bucket without incrementing it. +func (b *Bucket) Sequence() uint64 { return b.bucket.sequence } + +// SetSequence updates the sequence number for the bucket. +func (b *Bucket) SetSequence(v uint64) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } + + // Materialize the root node if it hasn't been already so that the + // bucket will be saved during commit. + if b.rootNode == nil { + _ = b.node(b.root, nil) + } + + // Increment and return the sequence. + b.bucket.sequence = v + return nil +} + // NextSequence returns an autoincrementing integer for the bucket. func (b *Bucket) NextSequence() (uint64, error) { if b.tx.db == nil { @@ -345,7 +379,8 @@ func (b *Bucket) NextSequence() (uint64, error) { // ForEach executes a function for each key/value pair in a bucket. // If the provided function returns an error then the iteration is stopped and -// the error is returned to the caller. +// the error is returned to the caller. The provided function must not modify +// the bucket; this will result in undefined behavior. func (b *Bucket) ForEach(fn func(k, v []byte) error) error { if b.tx.db == nil { return ErrTxClosed @@ -376,7 +411,7 @@ func (b *Bucket) Stats() BucketStats { if p.count != 0 { // If page has any elements, add all element headers. - used += leafPageElementSize * int(p.count-1) + used += leafPageElementSize * uintptr(p.count-1) // Add all element key, value sizes. // The computation takes advantage of the fact that the position @@ -384,16 +419,16 @@ func (b *Bucket) Stats() BucketStats { // of all previous elements' keys and values. // It also includes the last element's header. lastElement := p.leafPageElement(p.count - 1) - used += int(lastElement.pos + lastElement.ksize + lastElement.vsize) + used += uintptr(lastElement.pos + lastElement.ksize + lastElement.vsize) } if b.root == 0 { // For inlined bucket just update the inline stats - s.InlineBucketInuse += used + s.InlineBucketInuse += int(used) } else { // For non-inlined bucket update all the leaf stats s.LeafPageN++ - s.LeafInuse += used + s.LeafInuse += int(used) s.LeafOverflowN += int(p.overflow) // Collect stats from sub-buckets. @@ -414,13 +449,13 @@ func (b *Bucket) Stats() BucketStats { // used totals the used bytes for the page // Add header and all element headers. - used := pageHeaderSize + (branchPageElementSize * int(p.count-1)) + used := pageHeaderSize + (branchPageElementSize * uintptr(p.count-1)) // Add size of all keys and values. // Again, use the fact that last element's position equals to // the total of key, value sizes of all previous elements. - used += int(lastElement.pos + lastElement.ksize) - s.BranchInuse += used + used += uintptr(lastElement.pos + lastElement.ksize) + s.BranchInuse += int(used) s.BranchOverflowN += int(p.overflow) } @@ -560,7 +595,7 @@ func (b *Bucket) inlineable() bool { // our threshold for inline bucket size. var size = pageHeaderSize for _, inode := range n.inodes { - size += leafPageElementSize + len(inode.key) + len(inode.value) + size += leafPageElementSize + uintptr(len(inode.key)) + uintptr(len(inode.value)) if inode.flags&bucketLeafFlag != 0 { return false @@ -573,8 +608,8 @@ func (b *Bucket) inlineable() bool { } // Returns the maximum total size of a bucket to make it a candidate for inlining. -func (b *Bucket) maxInlineBucketSize() int { - return b.tx.db.pageSize / 4 +func (b *Bucket) maxInlineBucketSize() uintptr { + return uintptr(b.tx.db.pageSize / 4) } // write allocates and writes a bucket to a byte slice. diff --git a/vendor/go.etcd.io/bbolt/compact.go b/vendor/go.etcd.io/bbolt/compact.go new file mode 100644 index 00000000..e4fe91b0 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/compact.go @@ -0,0 +1,114 @@ +package bbolt + +// Compact will create a copy of the source DB and in the destination DB. This may +// reclaim space that the source database no longer has use for. txMaxSize can be +// used to limit the transactions size of this process and may trigger intermittent +// commits. A value of zero will ignore transaction sizes. +// TODO: merge with: https://github.com/etcd-io/etcd/blob/b7f0f52a16dbf83f18ca1d803f7892d750366a94/mvcc/backend/backend.go#L349 +func Compact(dst, src *DB, txMaxSize int64) error { + // commit regularly, or we'll run out of memory for large datasets if using one transaction. + var size int64 + tx, err := dst.Begin(true) + if err != nil { + return err + } + defer tx.Rollback() + + if err := walk(src, func(keys [][]byte, k, v []byte, seq uint64) error { + // On each key/value, check if we have exceeded tx size. + sz := int64(len(k) + len(v)) + if size+sz > txMaxSize && txMaxSize != 0 { + // Commit previous transaction. + if err := tx.Commit(); err != nil { + return err + } + + // Start new transaction. + tx, err = dst.Begin(true) + if err != nil { + return err + } + size = 0 + } + size += sz + + // Create bucket on the root transaction if this is the first level. + nk := len(keys) + if nk == 0 { + bkt, err := tx.CreateBucket(k) + if err != nil { + return err + } + if err := bkt.SetSequence(seq); err != nil { + return err + } + return nil + } + + // Create buckets on subsequent levels, if necessary. + b := tx.Bucket(keys[0]) + if nk > 1 { + for _, k := range keys[1:] { + b = b.Bucket(k) + } + } + + // Fill the entire page for best compaction. + b.FillPercent = 1.0 + + // If there is no value then this is a bucket call. + if v == nil { + bkt, err := b.CreateBucket(k) + if err != nil { + return err + } + if err := bkt.SetSequence(seq); err != nil { + return err + } + return nil + } + + // Otherwise treat it as a key/value pair. + return b.Put(k, v) + }); err != nil { + return err + } + + return tx.Commit() +} + +// walkFunc is the type of the function called for keys (buckets and "normal" +// values) discovered by Walk. keys is the list of keys to descend to the bucket +// owning the discovered key/value pair k/v. +type walkFunc func(keys [][]byte, k, v []byte, seq uint64) error + +// walk walks recursively the bolt database db, calling walkFn for each key it finds. +func walk(db *DB, walkFn walkFunc) error { + return db.View(func(tx *Tx) error { + return tx.ForEach(func(name []byte, b *Bucket) error { + return walkBucket(b, nil, name, nil, b.Sequence(), walkFn) + }) + }) +} + +func walkBucket(b *Bucket, keypath [][]byte, k, v []byte, seq uint64, fn walkFunc) error { + // Execute callback. + if err := fn(keypath, k, v, seq); err != nil { + return err + } + + // If this is not a bucket then stop. + if v != nil { + return nil + } + + // Iterate over each child key/value. + keypath = append(keypath, k) + return b.ForEach(func(k, v []byte) error { + if v == nil { + bkt := b.Bucket(k) + return walkBucket(bkt, keypath, k, nil, bkt.Sequence(), fn) + } + return walkBucket(b, keypath, k, v, b.Sequence(), fn) + }) +} diff --git a/vendor/github.com/boltdb/bolt/cursor.go b/vendor/go.etcd.io/bbolt/cursor.go similarity index 86% rename from vendor/github.com/boltdb/bolt/cursor.go rename to vendor/go.etcd.io/bbolt/cursor.go index 0d8ed165..98aeb449 100644 --- a/vendor/github.com/boltdb/bolt/cursor.go +++ b/vendor/go.etcd.io/bbolt/cursor.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "bytes" @@ -10,6 +10,8 @@ import ( // Cursors see nested buckets with value == nil. // Cursors can be obtained from a transaction and are valid as long as the transaction is open. // +// Keys and values returned from the cursor are only valid for the life of the transaction. +// // Changing data while traversing with a cursor may cause it to be invalidated // and return unexpected keys and/or values. You must reposition your cursor // after mutating data. @@ -25,12 +27,20 @@ func (c *Cursor) Bucket() *Bucket { // First moves the cursor to the first item in the bucket and returns its key and value. // If the bucket is empty then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. func (c *Cursor) First() (key []byte, value []byte) { _assert(c.bucket.tx.db != nil, "tx closed") c.stack = c.stack[:0] p, n := c.bucket.pageNode(c.bucket.root) c.stack = append(c.stack, elemRef{page: p, node: n, index: 0}) c.first() + + // If we land on an empty page then move to the next value. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + c.next() + } + k, v, flags := c.keyValue() if (flags & uint32(bucketLeafFlag)) != 0 { return k, nil @@ -41,6 +51,7 @@ func (c *Cursor) First() (key []byte, value []byte) { // Last moves the cursor to the last item in the bucket and returns its key and value. // If the bucket is empty then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. func (c *Cursor) Last() (key []byte, value []byte) { _assert(c.bucket.tx.db != nil, "tx closed") c.stack = c.stack[:0] @@ -58,6 +69,7 @@ func (c *Cursor) Last() (key []byte, value []byte) { // Next moves the cursor to the next item in the bucket and returns its key and value. // If the cursor is at the end of the bucket then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. func (c *Cursor) Next() (key []byte, value []byte) { _assert(c.bucket.tx.db != nil, "tx closed") k, v, flags := c.next() @@ -69,6 +81,7 @@ func (c *Cursor) Next() (key []byte, value []byte) { // Prev moves the cursor to the previous item in the bucket and returns its key and value. // If the cursor is at the beginning of the bucket then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. func (c *Cursor) Prev() (key []byte, value []byte) { _assert(c.bucket.tx.db != nil, "tx closed") @@ -100,6 +113,7 @@ func (c *Cursor) Prev() (key []byte, value []byte) { // Seek moves the cursor to a given key and returns it. // If the key does not exist then the next key is used. If no keys // follow, a nil key is returned. +// The returned key and value are only valid for the life of the transaction. func (c *Cursor) Seek(seek []byte) (key []byte, value []byte) { k, v, flags := c.seek(seek) @@ -143,12 +157,6 @@ func (c *Cursor) seek(seek []byte) (key []byte, value []byte, flags uint32) { // Start from root page/node and traverse to correct page. c.stack = c.stack[:0] c.search(seek, c.bucket.root) - ref := &c.stack[len(c.stack)-1] - - // If the cursor is pointing to the end of page/node then return nil. - if ref.index >= ref.count() { - return nil, nil, 0 - } // If this is a bucket then return a nil value. return c.keyValue() @@ -202,28 +210,37 @@ func (c *Cursor) last() { // next moves to the next leaf element and returns the key and value. // If the cursor is at the last leaf element then it stays there and returns nil. func (c *Cursor) next() (key []byte, value []byte, flags uint32) { - // Attempt to move over one element until we're successful. - // Move up the stack as we hit the end of each page in our stack. - var i int - for i = len(c.stack) - 1; i >= 0; i-- { - elem := &c.stack[i] - if elem.index < elem.count()-1 { - elem.index++ - break + for { + // Attempt to move over one element until we're successful. + // Move up the stack as we hit the end of each page in our stack. + var i int + for i = len(c.stack) - 1; i >= 0; i-- { + elem := &c.stack[i] + if elem.index < elem.count()-1 { + elem.index++ + break + } } - } - // If we've hit the root page then stop and return. This will leave the - // cursor on the last element of the last page. - if i == -1 { - return nil, nil, 0 - } + // If we've hit the root page then stop and return. This will leave the + // cursor on the last element of the last page. + if i == -1 { + return nil, nil, 0 + } - // Otherwise start from where we left off in the stack and find the - // first element of the first leaf page. - c.stack = c.stack[:i+1] - c.first() - return c.keyValue() + // Otherwise start from where we left off in the stack and find the + // first element of the first leaf page. + c.stack = c.stack[:i+1] + c.first() + + // If this is an empty page then restart and move back up the stack. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + continue + } + + return c.keyValue() + } } // search recursively performs a binary search against a given page/node until it finds a given key. @@ -316,6 +333,8 @@ func (c *Cursor) nsearch(key []byte) { // keyValue returns the key and value of the current leaf element. func (c *Cursor) keyValue() ([]byte, []byte, uint32) { ref := &c.stack[len(c.stack)-1] + + // If the cursor is pointing to the end of page/node then return nil. if ref.count() == 0 || ref.index >= ref.count() { return nil, nil, 0 } @@ -347,7 +366,7 @@ func (c *Cursor) node() *node { } for _, ref := range c.stack[:len(c.stack)-1] { _assert(!n.isLeaf, "expected branch node") - n = n.childAt(int(ref.index)) + n = n.childAt(ref.index) } _assert(n.isLeaf, "expected leaf node") return n diff --git a/vendor/go.etcd.io/bbolt/db.go b/vendor/go.etcd.io/bbolt/db.go new file mode 100644 index 00000000..a798c390 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/db.go @@ -0,0 +1,1232 @@ +package bbolt + +import ( + "errors" + "fmt" + "hash/fnv" + "log" + "os" + "runtime" + "sort" + "sync" + "time" + "unsafe" +) + +// The largest step that can be taken when remapping the mmap. +const maxMmapStep = 1 << 30 // 1GB + +// The data file format version. +const version = 2 + +// Represents a marker value to indicate that a file is a Bolt DB. +const magic uint32 = 0xED0CDAED + +const pgidNoFreelist pgid = 0xffffffffffffffff + +// IgnoreNoSync specifies whether the NoSync field of a DB is ignored when +// syncing changes to a file. This is required as some operating systems, +// such as OpenBSD, do not have a unified buffer cache (UBC) and writes +// must be synchronized using the msync(2) syscall. +const IgnoreNoSync = runtime.GOOS == "openbsd" + +// Default values if not set in a DB instance. +const ( + DefaultMaxBatchSize int = 1000 + DefaultMaxBatchDelay = 10 * time.Millisecond + DefaultAllocSize = 16 * 1024 * 1024 +) + +// default page size for db is set to the OS page size. +var defaultPageSize = os.Getpagesize() + +// The time elapsed between consecutive file locking attempts. +const flockRetryTimeout = 50 * time.Millisecond + +// FreelistType is the type of the freelist backend +type FreelistType string + +const ( + // FreelistArrayType indicates backend freelist type is array + FreelistArrayType = FreelistType("array") + // FreelistMapType indicates backend freelist type is hashmap + FreelistMapType = FreelistType("hashmap") +) + +// DB represents a collection of buckets persisted to a file on disk. +// All data access is performed through transactions which can be obtained through the DB. +// All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called. +type DB struct { + // When enabled, the database will perform a Check() after every commit. + // A panic is issued if the database is in an inconsistent state. This + // flag has a large performance impact so it should only be used for + // debugging purposes. + StrictMode bool + + // Setting the NoSync flag will cause the database to skip fsync() + // calls after each commit. This can be useful when bulk loading data + // into a database and you can restart the bulk load in the event of + // a system failure or database corruption. Do not set this flag for + // normal use. + // + // If the package global IgnoreNoSync constant is true, this value is + // ignored. See the comment on that constant for more details. + // + // THIS IS UNSAFE. PLEASE USE WITH CAUTION. + NoSync bool + + // When true, skips syncing freelist to disk. This improves the database + // write performance under normal operation, but requires a full database + // re-sync during recovery. + NoFreelistSync bool + + // FreelistType sets the backend freelist type. There are two options. Array which is simple but endures + // dramatic performance degradation if database is large and framentation in freelist is common. + // The alternative one is using hashmap, it is faster in almost all circumstances + // but it doesn't guarantee that it offers the smallest page id available. In normal case it is safe. + // The default type is array + FreelistType FreelistType + + // When true, skips the truncate call when growing the database. + // Setting this to true is only safe on non-ext3/ext4 systems. + // Skipping truncation avoids preallocation of hard drive space and + // bypasses a truncate() and fsync() syscall on remapping. + // + // https://github.com/boltdb/bolt/issues/284 + NoGrowSync bool + + // If you want to read the entire database fast, you can set MmapFlag to + // syscall.MAP_POPULATE on Linux 2.6.23+ for sequential read-ahead. + MmapFlags int + + // MaxBatchSize is the maximum size of a batch. Default value is + // copied from DefaultMaxBatchSize in Open. + // + // If <=0, disables batching. + // + // Do not change concurrently with calls to Batch. + MaxBatchSize int + + // MaxBatchDelay is the maximum delay before a batch starts. + // Default value is copied from DefaultMaxBatchDelay in Open. + // + // If <=0, effectively disables batching. + // + // Do not change concurrently with calls to Batch. + MaxBatchDelay time.Duration + + // AllocSize is the amount of space allocated when the database + // needs to create new pages. This is done to amortize the cost + // of truncate() and fsync() when growing the data file. + AllocSize int + + // Mlock locks database file in memory when set to true. + // It prevents major page faults, however used memory can't be reclaimed. + // + // Supported only on Unix via mlock/munlock syscalls. + Mlock bool + + path string + openFile func(string, int, os.FileMode) (*os.File, error) + file *os.File + dataref []byte // mmap'ed readonly, write throws SEGV + data *[maxMapSize]byte + datasz int + filesz int // current on disk file size + meta0 *meta + meta1 *meta + pageSize int + opened bool + rwtx *Tx + txs []*Tx + stats Stats + + freelist *freelist + freelistLoad sync.Once + + pagePool sync.Pool + + batchMu sync.Mutex + batch *batch + + rwlock sync.Mutex // Allows only one writer at a time. + metalock sync.Mutex // Protects meta page access. + mmaplock sync.RWMutex // Protects mmap access during remapping. + statlock sync.RWMutex // Protects stats access. + + ops struct { + writeAt func(b []byte, off int64) (n int, err error) + } + + // Read only mode. + // When true, Update() and Begin(true) return ErrDatabaseReadOnly immediately. + readOnly bool +} + +// Path returns the path to currently open database file. +func (db *DB) Path() string { + return db.path +} + +// GoString returns the Go string representation of the database. +func (db *DB) GoString() string { + return fmt.Sprintf("bolt.DB{path:%q}", db.path) +} + +// String returns the string representation of the database. +func (db *DB) String() string { + return fmt.Sprintf("DB<%q>", db.path) +} + +// Open creates and opens a database at the given path. +// If the file does not exist then it will be created automatically. +// Passing in nil options will cause Bolt to open the database with the default options. +func Open(path string, mode os.FileMode, options *Options) (*DB, error) { + db := &DB{ + opened: true, + } + // Set default options if no options are provided. + if options == nil { + options = DefaultOptions + } + db.NoSync = options.NoSync + db.NoGrowSync = options.NoGrowSync + db.MmapFlags = options.MmapFlags + db.NoFreelistSync = options.NoFreelistSync + db.FreelistType = options.FreelistType + db.Mlock = options.Mlock + + // Set default values for later DB operations. + db.MaxBatchSize = DefaultMaxBatchSize + db.MaxBatchDelay = DefaultMaxBatchDelay + db.AllocSize = DefaultAllocSize + + flag := os.O_RDWR + if options.ReadOnly { + flag = os.O_RDONLY + db.readOnly = true + } + + db.openFile = options.OpenFile + if db.openFile == nil { + db.openFile = os.OpenFile + } + + // Open data file and separate sync handler for metadata writes. + var err error + if db.file, err = db.openFile(path, flag|os.O_CREATE, mode); err != nil { + _ = db.close() + return nil, err + } + db.path = db.file.Name() + + // Lock file so that other processes using Bolt in read-write mode cannot + // use the database at the same time. This would cause corruption since + // the two processes would write meta pages and free pages separately. + // The database file is locked exclusively (only one process can grab the lock) + // if !options.ReadOnly. + // The database file is locked using the shared lock (more than one process may + // hold a lock at the same time) otherwise (options.ReadOnly is set). + if err := flock(db, !db.readOnly, options.Timeout); err != nil { + _ = db.close() + return nil, err + } + + // Default values for test hooks + db.ops.writeAt = db.file.WriteAt + + if db.pageSize = options.PageSize; db.pageSize == 0 { + // Set the default page size to the OS page size. + db.pageSize = defaultPageSize + } + + // Initialize the database if it doesn't exist. + if info, err := db.file.Stat(); err != nil { + _ = db.close() + return nil, err + } else if info.Size() == 0 { + // Initialize new files with meta pages. + if err := db.init(); err != nil { + // clean up file descriptor on initialization fail + _ = db.close() + return nil, err + } + } else { + // Read the first meta page to determine the page size. + var buf [0x1000]byte + // If we can't read the page size, but can read a page, assume + // it's the same as the OS or one given -- since that's how the + // page size was chosen in the first place. + // + // If the first page is invalid and this OS uses a different + // page size than what the database was created with then we + // are out of luck and cannot access the database. + // + // TODO: scan for next page + if bw, err := db.file.ReadAt(buf[:], 0); err == nil && bw == len(buf) { + if m := db.pageInBuffer(buf[:], 0).meta(); m.validate() == nil { + db.pageSize = int(m.pageSize) + } + } else { + _ = db.close() + return nil, ErrInvalid + } + } + + // Initialize page pool. + db.pagePool = sync.Pool{ + New: func() interface{} { + return make([]byte, db.pageSize) + }, + } + + // Memory map the data file. + if err := db.mmap(options.InitialMmapSize); err != nil { + _ = db.close() + return nil, err + } + + if db.readOnly { + return db, nil + } + + db.loadFreelist() + + // Flush freelist when transitioning from no sync to sync so + // NoFreelistSync unaware boltdb can open the db later. + if !db.NoFreelistSync && !db.hasSyncedFreelist() { + tx, err := db.Begin(true) + if tx != nil { + err = tx.Commit() + } + if err != nil { + _ = db.close() + return nil, err + } + } + + // Mark the database as opened and return. + return db, nil +} + +// loadFreelist reads the freelist if it is synced, or reconstructs it +// by scanning the DB if it is not synced. It assumes there are no +// concurrent accesses being made to the freelist. +func (db *DB) loadFreelist() { + db.freelistLoad.Do(func() { + db.freelist = newFreelist(db.FreelistType) + if !db.hasSyncedFreelist() { + // Reconstruct free list by scanning the DB. + db.freelist.readIDs(db.freepages()) + } else { + // Read free list from freelist page. + db.freelist.read(db.page(db.meta().freelist)) + } + db.stats.FreePageN = db.freelist.free_count() + }) +} + +func (db *DB) hasSyncedFreelist() bool { + return db.meta().freelist != pgidNoFreelist +} + +// mmap opens the underlying memory-mapped file and initializes the meta references. +// minsz is the minimum size that the new mmap can be. +func (db *DB) mmap(minsz int) error { + db.mmaplock.Lock() + defer db.mmaplock.Unlock() + + info, err := db.file.Stat() + if err != nil { + return fmt.Errorf("mmap stat error: %s", err) + } else if int(info.Size()) < db.pageSize*2 { + return fmt.Errorf("file size too small") + } + + // Ensure the size is at least the minimum size. + fileSize := int(info.Size()) + var size = fileSize + if size < minsz { + size = minsz + } + size, err = db.mmapSize(size) + if err != nil { + return err + } + + if db.Mlock { + // Unlock db memory + if err := db.munlock(fileSize); err != nil { + return err + } + } + + // Dereference all mmap references before unmapping. + if db.rwtx != nil { + db.rwtx.root.dereference() + } + + // Unmap existing data before continuing. + if err := db.munmap(); err != nil { + return err + } + + // Memory-map the data file as a byte slice. + if err := mmap(db, size); err != nil { + return err + } + + if db.Mlock { + // Don't allow swapping of data file + if err := db.mlock(fileSize); err != nil { + return err + } + } + + // Save references to the meta pages. + db.meta0 = db.page(0).meta() + db.meta1 = db.page(1).meta() + + // Validate the meta pages. We only return an error if both meta pages fail + // validation, since meta0 failing validation means that it wasn't saved + // properly -- but we can recover using meta1. And vice-versa. + err0 := db.meta0.validate() + err1 := db.meta1.validate() + if err0 != nil && err1 != nil { + return err0 + } + + return nil +} + +// munmap unmaps the data file from memory. +func (db *DB) munmap() error { + if err := munmap(db); err != nil { + return fmt.Errorf("unmap error: " + err.Error()) + } + return nil +} + +// mmapSize determines the appropriate size for the mmap given the current size +// of the database. The minimum size is 32KB and doubles until it reaches 1GB. +// Returns an error if the new mmap size is greater than the max allowed. +func (db *DB) mmapSize(size int) (int, error) { + // Double the size from 32KB until 1GB. + for i := uint(15); i <= 30; i++ { + if size <= 1< maxMapSize { + return 0, fmt.Errorf("mmap too large") + } + + // If larger than 1GB then grow by 1GB at a time. + sz := int64(size) + if remainder := sz % int64(maxMmapStep); remainder > 0 { + sz += int64(maxMmapStep) - remainder + } + + // Ensure that the mmap size is a multiple of the page size. + // This should always be true since we're incrementing in MBs. + pageSize := int64(db.pageSize) + if (sz % pageSize) != 0 { + sz = ((sz / pageSize) + 1) * pageSize + } + + // If we've exceeded the max size then only grow up to the max size. + if sz > maxMapSize { + sz = maxMapSize + } + + return int(sz), nil +} + +func (db *DB) munlock(fileSize int) error { + if err := munlock(db, fileSize); err != nil { + return fmt.Errorf("munlock error: " + err.Error()) + } + return nil +} + +func (db *DB) mlock(fileSize int) error { + if err := mlock(db, fileSize); err != nil { + return fmt.Errorf("mlock error: " + err.Error()) + } + return nil +} + +func (db *DB) mrelock(fileSizeFrom, fileSizeTo int) error { + if err := db.munlock(fileSizeFrom); err != nil { + return err + } + if err := db.mlock(fileSizeTo); err != nil { + return err + } + return nil +} + +// init creates a new database file and initializes its meta pages. +func (db *DB) init() error { + // Create two meta pages on a buffer. + buf := make([]byte, db.pageSize*4) + for i := 0; i < 2; i++ { + p := db.pageInBuffer(buf, pgid(i)) + p.id = pgid(i) + p.flags = metaPageFlag + + // Initialize the meta page. + m := p.meta() + m.magic = magic + m.version = version + m.pageSize = uint32(db.pageSize) + m.freelist = 2 + m.root = bucket{root: 3} + m.pgid = 4 + m.txid = txid(i) + m.checksum = m.sum64() + } + + // Write an empty freelist at page 3. + p := db.pageInBuffer(buf, pgid(2)) + p.id = pgid(2) + p.flags = freelistPageFlag + p.count = 0 + + // Write an empty leaf page at page 4. + p = db.pageInBuffer(buf, pgid(3)) + p.id = pgid(3) + p.flags = leafPageFlag + p.count = 0 + + // Write the buffer to our data file. + if _, err := db.ops.writeAt(buf, 0); err != nil { + return err + } + if err := fdatasync(db); err != nil { + return err + } + db.filesz = len(buf) + + return nil +} + +// Close releases all database resources. +// It will block waiting for any open transactions to finish +// before closing the database and returning. +func (db *DB) Close() error { + db.rwlock.Lock() + defer db.rwlock.Unlock() + + db.metalock.Lock() + defer db.metalock.Unlock() + + db.mmaplock.Lock() + defer db.mmaplock.Unlock() + + return db.close() +} + +func (db *DB) close() error { + if !db.opened { + return nil + } + + db.opened = false + + db.freelist = nil + + // Clear ops. + db.ops.writeAt = nil + + // Close the mmap. + if err := db.munmap(); err != nil { + return err + } + + // Close file handles. + if db.file != nil { + // No need to unlock read-only file. + if !db.readOnly { + // Unlock the file. + if err := funlock(db); err != nil { + log.Printf("bolt.Close(): funlock error: %s", err) + } + } + + // Close the file descriptor. + if err := db.file.Close(); err != nil { + return fmt.Errorf("db file close: %s", err) + } + db.file = nil + } + + db.path = "" + return nil +} + +// Begin starts a new transaction. +// Multiple read-only transactions can be used concurrently but only one +// write transaction can be used at a time. Starting multiple write transactions +// will cause the calls to block and be serialized until the current write +// transaction finishes. +// +// Transactions should not be dependent on one another. Opening a read +// transaction and a write transaction in the same goroutine can cause the +// writer to deadlock because the database periodically needs to re-mmap itself +// as it grows and it cannot do that while a read transaction is open. +// +// If a long running read transaction (for example, a snapshot transaction) is +// needed, you might want to set DB.InitialMmapSize to a large enough value +// to avoid potential blocking of write transaction. +// +// IMPORTANT: You must close read-only transactions after you are finished or +// else the database will not reclaim old pages. +func (db *DB) Begin(writable bool) (*Tx, error) { + if writable { + return db.beginRWTx() + } + return db.beginTx() +} + +func (db *DB) beginTx() (*Tx, error) { + // Lock the meta pages while we initialize the transaction. We obtain + // the meta lock before the mmap lock because that's the order that the + // write transaction will obtain them. + db.metalock.Lock() + + // Obtain a read-only lock on the mmap. When the mmap is remapped it will + // obtain a write lock so all transactions must finish before it can be + // remapped. + db.mmaplock.RLock() + + // Exit if the database is not open yet. + if !db.opened { + db.mmaplock.RUnlock() + db.metalock.Unlock() + return nil, ErrDatabaseNotOpen + } + + // Create a transaction associated with the database. + t := &Tx{} + t.init(db) + + // Keep track of transaction until it closes. + db.txs = append(db.txs, t) + n := len(db.txs) + + // Unlock the meta pages. + db.metalock.Unlock() + + // Update the transaction stats. + db.statlock.Lock() + db.stats.TxN++ + db.stats.OpenTxN = n + db.statlock.Unlock() + + return t, nil +} + +func (db *DB) beginRWTx() (*Tx, error) { + // If the database was opened with Options.ReadOnly, return an error. + if db.readOnly { + return nil, ErrDatabaseReadOnly + } + + // Obtain writer lock. This is released by the transaction when it closes. + // This enforces only one writer transaction at a time. + db.rwlock.Lock() + + // Once we have the writer lock then we can lock the meta pages so that + // we can set up the transaction. + db.metalock.Lock() + defer db.metalock.Unlock() + + // Exit if the database is not open yet. + if !db.opened { + db.rwlock.Unlock() + return nil, ErrDatabaseNotOpen + } + + // Create a transaction associated with the database. + t := &Tx{writable: true} + t.init(db) + db.rwtx = t + db.freePages() + return t, nil +} + +// freePages releases any pages associated with closed read-only transactions. +func (db *DB) freePages() { + // Free all pending pages prior to earliest open transaction. + sort.Sort(txsById(db.txs)) + minid := txid(0xFFFFFFFFFFFFFFFF) + if len(db.txs) > 0 { + minid = db.txs[0].meta.txid + } + if minid > 0 { + db.freelist.release(minid - 1) + } + // Release unused txid extents. + for _, t := range db.txs { + db.freelist.releaseRange(minid, t.meta.txid-1) + minid = t.meta.txid + 1 + } + db.freelist.releaseRange(minid, txid(0xFFFFFFFFFFFFFFFF)) + // Any page both allocated and freed in an extent is safe to release. +} + +type txsById []*Tx + +func (t txsById) Len() int { return len(t) } +func (t txsById) Swap(i, j int) { t[i], t[j] = t[j], t[i] } +func (t txsById) Less(i, j int) bool { return t[i].meta.txid < t[j].meta.txid } + +// removeTx removes a transaction from the database. +func (db *DB) removeTx(tx *Tx) { + // Release the read lock on the mmap. + db.mmaplock.RUnlock() + + // Use the meta lock to restrict access to the DB object. + db.metalock.Lock() + + // Remove the transaction. + for i, t := range db.txs { + if t == tx { + last := len(db.txs) - 1 + db.txs[i] = db.txs[last] + db.txs[last] = nil + db.txs = db.txs[:last] + break + } + } + n := len(db.txs) + + // Unlock the meta pages. + db.metalock.Unlock() + + // Merge statistics. + db.statlock.Lock() + db.stats.OpenTxN = n + db.stats.TxStats.add(&tx.stats) + db.statlock.Unlock() +} + +// Update executes a function within the context of a read-write managed transaction. +// If no error is returned from the function then the transaction is committed. +// If an error is returned then the entire transaction is rolled back. +// Any error that is returned from the function or returned from the commit is +// returned from the Update() method. +// +// Attempting to manually commit or rollback within the function will cause a panic. +func (db *DB) Update(fn func(*Tx) error) error { + t, err := db.Begin(true) + if err != nil { + return err + } + + // Make sure the transaction rolls back in the event of a panic. + defer func() { + if t.db != nil { + t.rollback() + } + }() + + // Mark as a managed tx so that the inner function cannot manually commit. + t.managed = true + + // If an error is returned from the function then rollback and return error. + err = fn(t) + t.managed = false + if err != nil { + _ = t.Rollback() + return err + } + + return t.Commit() +} + +// View executes a function within the context of a managed read-only transaction. +// Any error that is returned from the function is returned from the View() method. +// +// Attempting to manually rollback within the function will cause a panic. +func (db *DB) View(fn func(*Tx) error) error { + t, err := db.Begin(false) + if err != nil { + return err + } + + // Make sure the transaction rolls back in the event of a panic. + defer func() { + if t.db != nil { + t.rollback() + } + }() + + // Mark as a managed tx so that the inner function cannot manually rollback. + t.managed = true + + // If an error is returned from the function then pass it through. + err = fn(t) + t.managed = false + if err != nil { + _ = t.Rollback() + return err + } + + return t.Rollback() +} + +// Batch calls fn as part of a batch. It behaves similar to Update, +// except: +// +// 1. concurrent Batch calls can be combined into a single Bolt +// transaction. +// +// 2. the function passed to Batch may be called multiple times, +// regardless of whether it returns error or not. +// +// This means that Batch function side effects must be idempotent and +// take permanent effect only after a successful return is seen in +// caller. +// +// The maximum batch size and delay can be adjusted with DB.MaxBatchSize +// and DB.MaxBatchDelay, respectively. +// +// Batch is only useful when there are multiple goroutines calling it. +func (db *DB) Batch(fn func(*Tx) error) error { + errCh := make(chan error, 1) + + db.batchMu.Lock() + if (db.batch == nil) || (db.batch != nil && len(db.batch.calls) >= db.MaxBatchSize) { + // There is no existing batch, or the existing batch is full; start a new one. + db.batch = &batch{ + db: db, + } + db.batch.timer = time.AfterFunc(db.MaxBatchDelay, db.batch.trigger) + } + db.batch.calls = append(db.batch.calls, call{fn: fn, err: errCh}) + if len(db.batch.calls) >= db.MaxBatchSize { + // wake up batch, it's ready to run + go db.batch.trigger() + } + db.batchMu.Unlock() + + err := <-errCh + if err == trySolo { + err = db.Update(fn) + } + return err +} + +type call struct { + fn func(*Tx) error + err chan<- error +} + +type batch struct { + db *DB + timer *time.Timer + start sync.Once + calls []call +} + +// trigger runs the batch if it hasn't already been run. +func (b *batch) trigger() { + b.start.Do(b.run) +} + +// run performs the transactions in the batch and communicates results +// back to DB.Batch. +func (b *batch) run() { + b.db.batchMu.Lock() + b.timer.Stop() + // Make sure no new work is added to this batch, but don't break + // other batches. + if b.db.batch == b { + b.db.batch = nil + } + b.db.batchMu.Unlock() + +retry: + for len(b.calls) > 0 { + var failIdx = -1 + err := b.db.Update(func(tx *Tx) error { + for i, c := range b.calls { + if err := safelyCall(c.fn, tx); err != nil { + failIdx = i + return err + } + } + return nil + }) + + if failIdx >= 0 { + // take the failing transaction out of the batch. it's + // safe to shorten b.calls here because db.batch no longer + // points to us, and we hold the mutex anyway. + c := b.calls[failIdx] + b.calls[failIdx], b.calls = b.calls[len(b.calls)-1], b.calls[:len(b.calls)-1] + // tell the submitter re-run it solo, continue with the rest of the batch + c.err <- trySolo + continue retry + } + + // pass success, or bolt internal errors, to all callers + for _, c := range b.calls { + c.err <- err + } + break retry + } +} + +// trySolo is a special sentinel error value used for signaling that a +// transaction function should be re-run. It should never be seen by +// callers. +var trySolo = errors.New("batch function returned an error and should be re-run solo") + +type panicked struct { + reason interface{} +} + +func (p panicked) Error() string { + if err, ok := p.reason.(error); ok { + return err.Error() + } + return fmt.Sprintf("panic: %v", p.reason) +} + +func safelyCall(fn func(*Tx) error, tx *Tx) (err error) { + defer func() { + if p := recover(); p != nil { + err = panicked{p} + } + }() + return fn(tx) +} + +// Sync executes fdatasync() against the database file handle. +// +// This is not necessary under normal operation, however, if you use NoSync +// then it allows you to force the database file to sync against the disk. +func (db *DB) Sync() error { return fdatasync(db) } + +// Stats retrieves ongoing performance stats for the database. +// This is only updated when a transaction closes. +func (db *DB) Stats() Stats { + db.statlock.RLock() + defer db.statlock.RUnlock() + return db.stats +} + +// This is for internal access to the raw data bytes from the C cursor, use +// carefully, or not at all. +func (db *DB) Info() *Info { + return &Info{uintptr(unsafe.Pointer(&db.data[0])), db.pageSize} +} + +// page retrieves a page reference from the mmap based on the current page size. +func (db *DB) page(id pgid) *page { + pos := id * pgid(db.pageSize) + return (*page)(unsafe.Pointer(&db.data[pos])) +} + +// pageInBuffer retrieves a page reference from a given byte array based on the current page size. +func (db *DB) pageInBuffer(b []byte, id pgid) *page { + return (*page)(unsafe.Pointer(&b[id*pgid(db.pageSize)])) +} + +// meta retrieves the current meta page reference. +func (db *DB) meta() *meta { + // We have to return the meta with the highest txid which doesn't fail + // validation. Otherwise, we can cause errors when in fact the database is + // in a consistent state. metaA is the one with the higher txid. + metaA := db.meta0 + metaB := db.meta1 + if db.meta1.txid > db.meta0.txid { + metaA = db.meta1 + metaB = db.meta0 + } + + // Use higher meta page if valid. Otherwise fallback to previous, if valid. + if err := metaA.validate(); err == nil { + return metaA + } else if err := metaB.validate(); err == nil { + return metaB + } + + // This should never be reached, because both meta1 and meta0 were validated + // on mmap() and we do fsync() on every write. + panic("bolt.DB.meta(): invalid meta pages") +} + +// allocate returns a contiguous block of memory starting at a given page. +func (db *DB) allocate(txid txid, count int) (*page, error) { + // Allocate a temporary buffer for the page. + var buf []byte + if count == 1 { + buf = db.pagePool.Get().([]byte) + } else { + buf = make([]byte, count*db.pageSize) + } + p := (*page)(unsafe.Pointer(&buf[0])) + p.overflow = uint32(count - 1) + + // Use pages from the freelist if they are available. + if p.id = db.freelist.allocate(txid, count); p.id != 0 { + return p, nil + } + + // Resize mmap() if we're at the end. + p.id = db.rwtx.meta.pgid + var minsz = int((p.id+pgid(count))+1) * db.pageSize + if minsz >= db.datasz { + if err := db.mmap(minsz); err != nil { + return nil, fmt.Errorf("mmap allocate error: %s", err) + } + } + + // Move the page id high water mark. + db.rwtx.meta.pgid += pgid(count) + + return p, nil +} + +// grow grows the size of the database to the given sz. +func (db *DB) grow(sz int) error { + // Ignore if the new size is less than available file size. + if sz <= db.filesz { + return nil + } + + // If the data is smaller than the alloc size then only allocate what's needed. + // Once it goes over the allocation size then allocate in chunks. + if db.datasz < db.AllocSize { + sz = db.datasz + } else { + sz += db.AllocSize + } + + // Truncate and fsync to ensure file size metadata is flushed. + // https://github.com/boltdb/bolt/issues/284 + if !db.NoGrowSync && !db.readOnly { + if runtime.GOOS != "windows" { + if err := db.file.Truncate(int64(sz)); err != nil { + return fmt.Errorf("file resize error: %s", err) + } + } + if err := db.file.Sync(); err != nil { + return fmt.Errorf("file sync error: %s", err) + } + if db.Mlock { + // unlock old file and lock new one + if err := db.mrelock(db.filesz, sz); err != nil { + return fmt.Errorf("mlock/munlock error: %s", err) + } + } + } + + db.filesz = sz + return nil +} + +func (db *DB) IsReadOnly() bool { + return db.readOnly +} + +func (db *DB) freepages() []pgid { + tx, err := db.beginTx() + defer func() { + err = tx.Rollback() + if err != nil { + panic("freepages: failed to rollback tx") + } + }() + if err != nil { + panic("freepages: failed to open read only tx") + } + + reachable := make(map[pgid]*page) + nofreed := make(map[pgid]bool) + ech := make(chan error) + go func() { + for e := range ech { + panic(fmt.Sprintf("freepages: failed to get all reachable pages (%v)", e)) + } + }() + tx.checkBucket(&tx.root, reachable, nofreed, ech) + close(ech) + + var fids []pgid + for i := pgid(2); i < db.meta().pgid; i++ { + if _, ok := reachable[i]; !ok { + fids = append(fids, i) + } + } + return fids +} + +// Options represents the options that can be set when opening a database. +type Options struct { + // Timeout is the amount of time to wait to obtain a file lock. + // When set to zero it will wait indefinitely. This option is only + // available on Darwin and Linux. + Timeout time.Duration + + // Sets the DB.NoGrowSync flag before memory mapping the file. + NoGrowSync bool + + // Do not sync freelist to disk. This improves the database write performance + // under normal operation, but requires a full database re-sync during recovery. + NoFreelistSync bool + + // FreelistType sets the backend freelist type. There are two options. Array which is simple but endures + // dramatic performance degradation if database is large and framentation in freelist is common. + // The alternative one is using hashmap, it is faster in almost all circumstances + // but it doesn't guarantee that it offers the smallest page id available. In normal case it is safe. + // The default type is array + FreelistType FreelistType + + // Open database in read-only mode. Uses flock(..., LOCK_SH |LOCK_NB) to + // grab a shared lock (UNIX). + ReadOnly bool + + // Sets the DB.MmapFlags flag before memory mapping the file. + MmapFlags int + + // InitialMmapSize is the initial mmap size of the database + // in bytes. Read transactions won't block write transaction + // if the InitialMmapSize is large enough to hold database mmap + // size. (See DB.Begin for more information) + // + // If <=0, the initial map size is 0. + // If initialMmapSize is smaller than the previous database size, + // it takes no effect. + InitialMmapSize int + + // PageSize overrides the default OS page size. + PageSize int + + // NoSync sets the initial value of DB.NoSync. Normally this can just be + // set directly on the DB itself when returned from Open(), but this option + // is useful in APIs which expose Options but not the underlying DB. + NoSync bool + + // OpenFile is used to open files. It defaults to os.OpenFile. This option + // is useful for writing hermetic tests. + OpenFile func(string, int, os.FileMode) (*os.File, error) + + // Mlock locks database file in memory when set to true. + // It prevents potential page faults, however + // used memory can't be reclaimed. (UNIX only) + Mlock bool +} + +// DefaultOptions represent the options used if nil options are passed into Open(). +// No timeout is used which will cause Bolt to wait indefinitely for a lock. +var DefaultOptions = &Options{ + Timeout: 0, + NoGrowSync: false, + FreelistType: FreelistArrayType, +} + +// Stats represents statistics about the database. +type Stats struct { + // Freelist stats + FreePageN int // total number of free pages on the freelist + PendingPageN int // total number of pending pages on the freelist + FreeAlloc int // total bytes allocated in free pages + FreelistInuse int // total bytes used by the freelist + + // Transaction stats + TxN int // total number of started read transactions + OpenTxN int // number of currently open read transactions + + TxStats TxStats // global, ongoing stats. +} + +// Sub calculates and returns the difference between two sets of database stats. +// This is useful when obtaining stats at two different points and time and +// you need the performance counters that occurred within that time span. +func (s *Stats) Sub(other *Stats) Stats { + if other == nil { + return *s + } + var diff Stats + diff.FreePageN = s.FreePageN + diff.PendingPageN = s.PendingPageN + diff.FreeAlloc = s.FreeAlloc + diff.FreelistInuse = s.FreelistInuse + diff.TxN = s.TxN - other.TxN + diff.TxStats = s.TxStats.Sub(&other.TxStats) + return diff +} + +type Info struct { + Data uintptr + PageSize int +} + +type meta struct { + magic uint32 + version uint32 + pageSize uint32 + flags uint32 + root bucket + freelist pgid + pgid pgid + txid txid + checksum uint64 +} + +// validate checks the marker bytes and version of the meta page to ensure it matches this binary. +func (m *meta) validate() error { + if m.magic != magic { + return ErrInvalid + } else if m.version != version { + return ErrVersionMismatch + } else if m.checksum != 0 && m.checksum != m.sum64() { + return ErrChecksum + } + return nil +} + +// copy copies one meta object to another. +func (m *meta) copy(dest *meta) { + *dest = *m +} + +// write writes the meta onto a page. +func (m *meta) write(p *page) { + if m.root.root >= m.pgid { + panic(fmt.Sprintf("root bucket pgid (%d) above high water mark (%d)", m.root.root, m.pgid)) + } else if m.freelist >= m.pgid && m.freelist != pgidNoFreelist { + // TODO: reject pgidNoFreeList if !NoFreelistSync + panic(fmt.Sprintf("freelist pgid (%d) above high water mark (%d)", m.freelist, m.pgid)) + } + + // Page id is either going to be 0 or 1 which we can determine by the transaction ID. + p.id = pgid(m.txid % 2) + p.flags |= metaPageFlag + + // Calculate the checksum. + m.checksum = m.sum64() + + m.copy(p.meta()) +} + +// generates the checksum for the meta. +func (m *meta) sum64() uint64 { + var h = fnv.New64a() + _, _ = h.Write((*[unsafe.Offsetof(meta{}.checksum)]byte)(unsafe.Pointer(m))[:]) + return h.Sum64() +} + +// _assert will panic with a given formatted message if the given condition is false. +func _assert(condition bool, msg string, v ...interface{}) { + if !condition { + panic(fmt.Sprintf("assertion failed: "+msg, v...)) + } +} diff --git a/vendor/github.com/boltdb/bolt/doc.go b/vendor/go.etcd.io/bbolt/doc.go similarity index 94% rename from vendor/github.com/boltdb/bolt/doc.go rename to vendor/go.etcd.io/bbolt/doc.go index cc937845..95f25f01 100644 --- a/vendor/github.com/boltdb/bolt/doc.go +++ b/vendor/go.etcd.io/bbolt/doc.go @@ -1,5 +1,5 @@ /* -Package bolt implements a low-level key/value store in pure Go. It supports +package bbolt implements a low-level key/value store in pure Go. It supports fully serializable transactions, ACID semantics, and lock-free MVCC with multiple readers and a single writer. Bolt can be used for projects that want a simple data store without the need to add large dependencies such as @@ -41,4 +41,4 @@ point to different data or can point to invalid memory which will cause a panic. */ -package bolt +package bbolt diff --git a/vendor/github.com/boltdb/bolt/errors.go b/vendor/go.etcd.io/bbolt/errors.go similarity index 88% rename from vendor/github.com/boltdb/bolt/errors.go rename to vendor/go.etcd.io/bbolt/errors.go index aa504f13..48758ca5 100644 --- a/vendor/github.com/boltdb/bolt/errors.go +++ b/vendor/go.etcd.io/bbolt/errors.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import "errors" @@ -12,7 +12,8 @@ var ( // already open. ErrDatabaseOpen = errors.New("database already open") - // ErrInvalid is returned when a data file is not a Bolt-formatted database. + // ErrInvalid is returned when both meta pages on a database are invalid. + // This typically occurs when a file is not a bolt database. ErrInvalid = errors.New("invalid database") // ErrVersionMismatch is returned when the data file was created with a @@ -36,6 +37,10 @@ var ( // ErrTxClosed is returned when committing or rolling back a transaction // that has already been committed or rolled back. ErrTxClosed = errors.New("tx closed") + + // ErrDatabaseReadOnly is returned when a mutating transaction is started on a + // read-only database. + ErrDatabaseReadOnly = errors.New("database is in read-only mode") ) // These errors can occur when putting or deleting a value or a bucket. diff --git a/vendor/go.etcd.io/bbolt/freelist.go b/vendor/go.etcd.io/bbolt/freelist.go new file mode 100644 index 00000000..697a4696 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/freelist.go @@ -0,0 +1,404 @@ +package bbolt + +import ( + "fmt" + "sort" + "unsafe" +) + +// txPending holds a list of pgids and corresponding allocation txns +// that are pending to be freed. +type txPending struct { + ids []pgid + alloctx []txid // txids allocating the ids + lastReleaseBegin txid // beginning txid of last matching releaseRange +} + +// pidSet holds the set of starting pgids which have the same span size +type pidSet map[pgid]struct{} + +// freelist represents a list of all pages that are available for allocation. +// It also tracks pages that have been freed but are still in use by open transactions. +type freelist struct { + freelistType FreelistType // freelist type + ids []pgid // all free and available free page ids. + allocs map[pgid]txid // mapping of txid that allocated a pgid. + pending map[txid]*txPending // mapping of soon-to-be free page ids by tx. + cache map[pgid]bool // fast lookup of all free and pending page ids. + freemaps map[uint64]pidSet // key is the size of continuous pages(span), value is a set which contains the starting pgids of same size + forwardMap map[pgid]uint64 // key is start pgid, value is its span size + backwardMap map[pgid]uint64 // key is end pgid, value is its span size + allocate func(txid txid, n int) pgid // the freelist allocate func + free_count func() int // the function which gives you free page number + mergeSpans func(ids pgids) // the mergeSpan func + getFreePageIDs func() []pgid // get free pgids func + readIDs func(pgids []pgid) // readIDs func reads list of pages and init the freelist +} + +// newFreelist returns an empty, initialized freelist. +func newFreelist(freelistType FreelistType) *freelist { + f := &freelist{ + freelistType: freelistType, + allocs: make(map[pgid]txid), + pending: make(map[txid]*txPending), + cache: make(map[pgid]bool), + freemaps: make(map[uint64]pidSet), + forwardMap: make(map[pgid]uint64), + backwardMap: make(map[pgid]uint64), + } + + if freelistType == FreelistMapType { + f.allocate = f.hashmapAllocate + f.free_count = f.hashmapFreeCount + f.mergeSpans = f.hashmapMergeSpans + f.getFreePageIDs = f.hashmapGetFreePageIDs + f.readIDs = f.hashmapReadIDs + } else { + f.allocate = f.arrayAllocate + f.free_count = f.arrayFreeCount + f.mergeSpans = f.arrayMergeSpans + f.getFreePageIDs = f.arrayGetFreePageIDs + f.readIDs = f.arrayReadIDs + } + + return f +} + +// size returns the size of the page after serialization. +func (f *freelist) size() int { + n := f.count() + if n >= 0xFFFF { + // The first element will be used to store the count. See freelist.write. + n++ + } + return int(pageHeaderSize) + (int(unsafe.Sizeof(pgid(0))) * n) +} + +// count returns count of pages on the freelist +func (f *freelist) count() int { + return f.free_count() + f.pending_count() +} + +// arrayFreeCount returns count of free pages(array version) +func (f *freelist) arrayFreeCount() int { + return len(f.ids) +} + +// pending_count returns count of pending pages +func (f *freelist) pending_count() int { + var count int + for _, txp := range f.pending { + count += len(txp.ids) + } + return count +} + +// copyall copies a list of all free ids and all pending ids in one sorted list. +// f.count returns the minimum length required for dst. +func (f *freelist) copyall(dst []pgid) { + m := make(pgids, 0, f.pending_count()) + for _, txp := range f.pending { + m = append(m, txp.ids...) + } + sort.Sort(m) + mergepgids(dst, f.getFreePageIDs(), m) +} + +// arrayAllocate returns the starting page id of a contiguous list of pages of a given size. +// If a contiguous block cannot be found then 0 is returned. +func (f *freelist) arrayAllocate(txid txid, n int) pgid { + if len(f.ids) == 0 { + return 0 + } + + var initial, previd pgid + for i, id := range f.ids { + if id <= 1 { + panic(fmt.Sprintf("invalid page allocation: %d", id)) + } + + // Reset initial page if this is not contiguous. + if previd == 0 || id-previd != 1 { + initial = id + } + + // If we found a contiguous block then remove it and return it. + if (id-initial)+1 == pgid(n) { + // If we're allocating off the beginning then take the fast path + // and just adjust the existing slice. This will use extra memory + // temporarily but the append() in free() will realloc the slice + // as is necessary. + if (i + 1) == n { + f.ids = f.ids[i+1:] + } else { + copy(f.ids[i-n+1:], f.ids[i+1:]) + f.ids = f.ids[:len(f.ids)-n] + } + + // Remove from the free cache. + for i := pgid(0); i < pgid(n); i++ { + delete(f.cache, initial+i) + } + f.allocs[initial] = txid + return initial + } + + previd = id + } + return 0 +} + +// free releases a page and its overflow for a given transaction id. +// If the page is already free then a panic will occur. +func (f *freelist) free(txid txid, p *page) { + if p.id <= 1 { + panic(fmt.Sprintf("cannot free page 0 or 1: %d", p.id)) + } + + // Free page and all its overflow pages. + txp := f.pending[txid] + if txp == nil { + txp = &txPending{} + f.pending[txid] = txp + } + allocTxid, ok := f.allocs[p.id] + if ok { + delete(f.allocs, p.id) + } else if (p.flags & freelistPageFlag) != 0 { + // Freelist is always allocated by prior tx. + allocTxid = txid - 1 + } + + for id := p.id; id <= p.id+pgid(p.overflow); id++ { + // Verify that page is not already free. + if f.cache[id] { + panic(fmt.Sprintf("page %d already freed", id)) + } + // Add to the freelist and cache. + txp.ids = append(txp.ids, id) + txp.alloctx = append(txp.alloctx, allocTxid) + f.cache[id] = true + } +} + +// release moves all page ids for a transaction id (or older) to the freelist. +func (f *freelist) release(txid txid) { + m := make(pgids, 0) + for tid, txp := range f.pending { + if tid <= txid { + // Move transaction's pending pages to the available freelist. + // Don't remove from the cache since the page is still free. + m = append(m, txp.ids...) + delete(f.pending, tid) + } + } + f.mergeSpans(m) +} + +// releaseRange moves pending pages allocated within an extent [begin,end] to the free list. +func (f *freelist) releaseRange(begin, end txid) { + if begin > end { + return + } + var m pgids + for tid, txp := range f.pending { + if tid < begin || tid > end { + continue + } + // Don't recompute freed pages if ranges haven't updated. + if txp.lastReleaseBegin == begin { + continue + } + for i := 0; i < len(txp.ids); i++ { + if atx := txp.alloctx[i]; atx < begin || atx > end { + continue + } + m = append(m, txp.ids[i]) + txp.ids[i] = txp.ids[len(txp.ids)-1] + txp.ids = txp.ids[:len(txp.ids)-1] + txp.alloctx[i] = txp.alloctx[len(txp.alloctx)-1] + txp.alloctx = txp.alloctx[:len(txp.alloctx)-1] + i-- + } + txp.lastReleaseBegin = begin + if len(txp.ids) == 0 { + delete(f.pending, tid) + } + } + f.mergeSpans(m) +} + +// rollback removes the pages from a given pending tx. +func (f *freelist) rollback(txid txid) { + // Remove page ids from cache. + txp := f.pending[txid] + if txp == nil { + return + } + var m pgids + for i, pgid := range txp.ids { + delete(f.cache, pgid) + tx := txp.alloctx[i] + if tx == 0 { + continue + } + if tx != txid { + // Pending free aborted; restore page back to alloc list. + f.allocs[pgid] = tx + } else { + // Freed page was allocated by this txn; OK to throw away. + m = append(m, pgid) + } + } + // Remove pages from pending list and mark as free if allocated by txid. + delete(f.pending, txid) + f.mergeSpans(m) +} + +// freed returns whether a given page is in the free list. +func (f *freelist) freed(pgid pgid) bool { + return f.cache[pgid] +} + +// read initializes the freelist from a freelist page. +func (f *freelist) read(p *page) { + if (p.flags & freelistPageFlag) == 0 { + panic(fmt.Sprintf("invalid freelist page: %d, page type is %s", p.id, p.typ())) + } + // If the page.count is at the max uint16 value (64k) then it's considered + // an overflow and the size of the freelist is stored as the first element. + var idx, count = 0, int(p.count) + if count == 0xFFFF { + idx = 1 + c := *(*pgid)(unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))) + count = int(c) + if count < 0 { + panic(fmt.Sprintf("leading element count %d overflows int", c)) + } + } + + // Copy the list of page ids from the freelist. + if count == 0 { + f.ids = nil + } else { + var ids []pgid + data := unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), unsafe.Sizeof(ids[0]), idx) + unsafeSlice(unsafe.Pointer(&ids), data, count) + + // copy the ids, so we don't modify on the freelist page directly + idsCopy := make([]pgid, count) + copy(idsCopy, ids) + // Make sure they're sorted. + sort.Sort(pgids(idsCopy)) + + f.readIDs(idsCopy) + } +} + +// arrayReadIDs initializes the freelist from a given list of ids. +func (f *freelist) arrayReadIDs(ids []pgid) { + f.ids = ids + f.reindex() +} + +func (f *freelist) arrayGetFreePageIDs() []pgid { + return f.ids +} + +// write writes the page ids onto a freelist page. All free and pending ids are +// saved to disk since in the event of a program crash, all pending ids will +// become free. +func (f *freelist) write(p *page) error { + // Combine the old free pgids and pgids waiting on an open transaction. + + // Update the header flag. + p.flags |= freelistPageFlag + + // The page.count can only hold up to 64k elements so if we overflow that + // number then we handle it by putting the size in the first element. + l := f.count() + if l == 0 { + p.count = uint16(l) + } else if l < 0xFFFF { + p.count = uint16(l) + var ids []pgid + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&ids), data, l) + f.copyall(ids) + } else { + p.count = 0xFFFF + var ids []pgid + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&ids), data, l+1) + ids[0] = pgid(l) + f.copyall(ids[1:]) + } + + return nil +} + +// reload reads the freelist from a page and filters out pending items. +func (f *freelist) reload(p *page) { + f.read(p) + + // Build a cache of only pending pages. + pcache := make(map[pgid]bool) + for _, txp := range f.pending { + for _, pendingID := range txp.ids { + pcache[pendingID] = true + } + } + + // Check each page in the freelist and build a new available freelist + // with any pages not in the pending lists. + var a []pgid + for _, id := range f.getFreePageIDs() { + if !pcache[id] { + a = append(a, id) + } + } + + f.readIDs(a) +} + +// noSyncReload reads the freelist from pgids and filters out pending items. +func (f *freelist) noSyncReload(pgids []pgid) { + // Build a cache of only pending pages. + pcache := make(map[pgid]bool) + for _, txp := range f.pending { + for _, pendingID := range txp.ids { + pcache[pendingID] = true + } + } + + // Check each page in the freelist and build a new available freelist + // with any pages not in the pending lists. + var a []pgid + for _, id := range pgids { + if !pcache[id] { + a = append(a, id) + } + } + + f.readIDs(a) +} + +// reindex rebuilds the free cache based on available and pending free lists. +func (f *freelist) reindex() { + ids := f.getFreePageIDs() + f.cache = make(map[pgid]bool, len(ids)) + for _, id := range ids { + f.cache[id] = true + } + for _, txp := range f.pending { + for _, pendingID := range txp.ids { + f.cache[pendingID] = true + } + } +} + +// arrayMergeSpans try to merge list of pages(represented by pgids) with existing spans but using array +func (f *freelist) arrayMergeSpans(ids pgids) { + sort.Sort(ids) + f.ids = pgids(f.ids).merge(ids) +} diff --git a/vendor/go.etcd.io/bbolt/freelist_hmap.go b/vendor/go.etcd.io/bbolt/freelist_hmap.go new file mode 100644 index 00000000..dbd67a1e --- /dev/null +++ b/vendor/go.etcd.io/bbolt/freelist_hmap.go @@ -0,0 +1,178 @@ +package bbolt + +import "sort" + +// hashmapFreeCount returns count of free pages(hashmap version) +func (f *freelist) hashmapFreeCount() int { + // use the forwardMap to get the total count + count := 0 + for _, size := range f.forwardMap { + count += int(size) + } + return count +} + +// hashmapAllocate serves the same purpose as arrayAllocate, but use hashmap as backend +func (f *freelist) hashmapAllocate(txid txid, n int) pgid { + if n == 0 { + return 0 + } + + // if we have a exact size match just return short path + if bm, ok := f.freemaps[uint64(n)]; ok { + for pid := range bm { + // remove the span + f.delSpan(pid, uint64(n)) + + f.allocs[pid] = txid + + for i := pgid(0); i < pgid(n); i++ { + delete(f.cache, pid+i) + } + return pid + } + } + + // lookup the map to find larger span + for size, bm := range f.freemaps { + if size < uint64(n) { + continue + } + + for pid := range bm { + // remove the initial + f.delSpan(pid, size) + + f.allocs[pid] = txid + + remain := size - uint64(n) + + // add remain span + f.addSpan(pid+pgid(n), remain) + + for i := pgid(0); i < pgid(n); i++ { + delete(f.cache, pid+i) + } + return pid + } + } + + return 0 +} + +// hashmapReadIDs reads pgids as input an initial the freelist(hashmap version) +func (f *freelist) hashmapReadIDs(pgids []pgid) { + f.init(pgids) + + // Rebuild the page cache. + f.reindex() +} + +// hashmapGetFreePageIDs returns the sorted free page ids +func (f *freelist) hashmapGetFreePageIDs() []pgid { + count := f.free_count() + if count == 0 { + return nil + } + + m := make([]pgid, 0, count) + for start, size := range f.forwardMap { + for i := 0; i < int(size); i++ { + m = append(m, start+pgid(i)) + } + } + sort.Sort(pgids(m)) + + return m +} + +// hashmapMergeSpans try to merge list of pages(represented by pgids) with existing spans +func (f *freelist) hashmapMergeSpans(ids pgids) { + for _, id := range ids { + // try to see if we can merge and update + f.mergeWithExistingSpan(id) + } +} + +// mergeWithExistingSpan merges pid to the existing free spans, try to merge it backward and forward +func (f *freelist) mergeWithExistingSpan(pid pgid) { + prev := pid - 1 + next := pid + 1 + + preSize, mergeWithPrev := f.backwardMap[prev] + nextSize, mergeWithNext := f.forwardMap[next] + newStart := pid + newSize := uint64(1) + + if mergeWithPrev { + //merge with previous span + start := prev + 1 - pgid(preSize) + f.delSpan(start, preSize) + + newStart -= pgid(preSize) + newSize += preSize + } + + if mergeWithNext { + // merge with next span + f.delSpan(next, nextSize) + newSize += nextSize + } + + f.addSpan(newStart, newSize) +} + +func (f *freelist) addSpan(start pgid, size uint64) { + f.backwardMap[start-1+pgid(size)] = size + f.forwardMap[start] = size + if _, ok := f.freemaps[size]; !ok { + f.freemaps[size] = make(map[pgid]struct{}) + } + + f.freemaps[size][start] = struct{}{} +} + +func (f *freelist) delSpan(start pgid, size uint64) { + delete(f.forwardMap, start) + delete(f.backwardMap, start+pgid(size-1)) + delete(f.freemaps[size], start) + if len(f.freemaps[size]) == 0 { + delete(f.freemaps, size) + } +} + +// initial from pgids using when use hashmap version +// pgids must be sorted +func (f *freelist) init(pgids []pgid) { + if len(pgids) == 0 { + return + } + + size := uint64(1) + start := pgids[0] + + if !sort.SliceIsSorted([]pgid(pgids), func(i, j int) bool { return pgids[i] < pgids[j] }) { + panic("pgids not sorted") + } + + f.freemaps = make(map[uint64]pidSet) + f.forwardMap = make(map[pgid]uint64) + f.backwardMap = make(map[pgid]uint64) + + for i := 1; i < len(pgids); i++ { + // continuous page + if pgids[i] == pgids[i-1]+1 { + size++ + } else { + f.addSpan(start, size) + + size = 1 + start = pgids[i] + } + } + + // init the tail + if size != 0 && start != 0 { + f.addSpan(start, size) + } +} diff --git a/vendor/go.etcd.io/bbolt/mlock_unix.go b/vendor/go.etcd.io/bbolt/mlock_unix.go new file mode 100644 index 00000000..6a6c7b35 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/mlock_unix.go @@ -0,0 +1,36 @@ +// +build !windows + +package bbolt + +import "golang.org/x/sys/unix" + +// mlock locks memory of db file +func mlock(db *DB, fileSize int) error { + sizeToLock := fileSize + if sizeToLock > db.datasz { + // Can't lock more than mmaped slice + sizeToLock = db.datasz + } + if err := unix.Mlock(db.dataref[:sizeToLock]); err != nil { + return err + } + return nil +} + +//munlock unlocks memory of db file +func munlock(db *DB, fileSize int) error { + if db.dataref == nil { + return nil + } + + sizeToUnlock := fileSize + if sizeToUnlock > db.datasz { + // Can't unlock more than mmaped slice + sizeToUnlock = db.datasz + } + + if err := unix.Munlock(db.dataref[:sizeToUnlock]); err != nil { + return err + } + return nil +} diff --git a/vendor/go.etcd.io/bbolt/mlock_windows.go b/vendor/go.etcd.io/bbolt/mlock_windows.go new file mode 100644 index 00000000..b4a36a49 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/mlock_windows.go @@ -0,0 +1,11 @@ +package bbolt + +// mlock locks memory of db file +func mlock(_ *DB, _ int) error { + panic("mlock is supported only on UNIX systems") +} + +//munlock unlocks memory of db file +func munlock(_ *DB, _ int) error { + panic("munlock is supported only on UNIX systems") +} diff --git a/vendor/github.com/boltdb/bolt/node.go b/vendor/go.etcd.io/bbolt/node.go similarity index 86% rename from vendor/github.com/boltdb/bolt/node.go rename to vendor/go.etcd.io/bbolt/node.go index 05aefb8a..73988b5c 100644 --- a/vendor/github.com/boltdb/bolt/node.go +++ b/vendor/go.etcd.io/bbolt/node.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "bytes" @@ -41,19 +41,19 @@ func (n *node) size() int { sz, elsz := pageHeaderSize, n.pageElementSize() for i := 0; i < len(n.inodes); i++ { item := &n.inodes[i] - sz += elsz + len(item.key) + len(item.value) + sz += elsz + uintptr(len(item.key)) + uintptr(len(item.value)) } - return sz + return int(sz) } // sizeLessThan returns true if the node is less than a given size. // This is an optimization to avoid calculating a large node when we only need // to know if it fits inside a certain page size. -func (n *node) sizeLessThan(v int) bool { +func (n *node) sizeLessThan(v uintptr) bool { sz, elsz := pageHeaderSize, n.pageElementSize() for i := 0; i < len(n.inodes); i++ { item := &n.inodes[i] - sz += elsz + len(item.key) + len(item.value) + sz += elsz + uintptr(len(item.key)) + uintptr(len(item.value)) if sz >= v { return false } @@ -62,7 +62,7 @@ func (n *node) sizeLessThan(v int) bool { } // pageElementSize returns the size of each page element based on the type of node. -func (n *node) pageElementSize() int { +func (n *node) pageElementSize() uintptr { if n.isLeaf { return leafPageElementSize } @@ -201,11 +201,23 @@ func (n *node) write(p *page) { } p.count = uint16(len(n.inodes)) + // Stop here if there are no items to write. + if p.count == 0 { + return + } + // Loop over each item and write it to the page. - b := (*[maxAllocSize]byte)(unsafe.Pointer(&p.ptr))[n.pageElementSize()*len(n.inodes):] + // off tracks the offset into p of the start of the next data. + off := unsafe.Sizeof(*p) + n.pageElementSize()*uintptr(len(n.inodes)) for i, item := range n.inodes { _assert(len(item.key) > 0, "write: zero-length inode key") + // Create a slice to write into of needed size and advance + // byte pointer for next iteration. + sz := len(item.key) + len(item.value) + b := unsafeByteSlice(unsafe.Pointer(p), off, 0, sz) + off += uintptr(sz) + // Write the page element. if n.isLeaf { elem := p.leafPageElement(uint16(i)) @@ -222,10 +234,8 @@ func (n *node) write(p *page) { } // Write data for the element to the end of the page. - copy(b[0:], item.key) - b = b[len(item.key):] - copy(b[0:], item.value) - b = b[len(item.value):] + l := copy(b, item.key) + copy(b[l:], item.value) } // DEBUG ONLY: n.dump() @@ -233,7 +243,7 @@ func (n *node) write(p *page) { // split breaks up a node into multiple smaller nodes, if appropriate. // This should only be called from the spill() function. -func (n *node) split(pageSize int) []*node { +func (n *node) split(pageSize uintptr) []*node { var nodes []*node node := n @@ -256,7 +266,7 @@ func (n *node) split(pageSize int) []*node { // splitTwo breaks up a node into two smaller nodes, if appropriate. // This should only be called from the split() function. -func (n *node) splitTwo(pageSize int) (*node, *node) { +func (n *node) splitTwo(pageSize uintptr) (*node, *node) { // Ignore the split if the page doesn't have at least enough nodes for // two pages or if the nodes can fit in a single page. if len(n.inodes) <= (minKeysPerPage*2) || n.sizeLessThan(pageSize) { @@ -298,18 +308,18 @@ func (n *node) splitTwo(pageSize int) (*node, *node) { // splitIndex finds the position where a page will fill a given threshold. // It returns the index as well as the size of the first page. // This is only be called from split(). -func (n *node) splitIndex(threshold int) (index, sz int) { +func (n *node) splitIndex(threshold int) (index, sz uintptr) { sz = pageHeaderSize // Loop until we only have the minimum number of keys required for the second page. for i := 0; i < len(n.inodes)-minKeysPerPage; i++ { - index = i + index = uintptr(i) inode := n.inodes[i] - elsize := n.pageElementSize() + len(inode.key) + len(inode.value) + elsize := n.pageElementSize() + uintptr(len(inode.key)) + uintptr(len(inode.value)) // If we have at least the minimum number of keys and adding another // node would put us over the threshold then exit and return. - if i >= minKeysPerPage && sz+elsize > threshold { + if index >= minKeysPerPage && sz+elsize > uintptr(threshold) { break } @@ -342,7 +352,7 @@ func (n *node) spill() error { n.children = nil // Split nodes into appropriate sizes. The first node will always be n. - var nodes = n.split(tx.db.pageSize) + var nodes = n.split(uintptr(tx.db.pageSize)) for _, node := range nodes { // Add node's page to the freelist if it's not new. if node.pgid > 0 { @@ -351,7 +361,7 @@ func (n *node) spill() error { } // Allocate contiguous space for the node. - p, err := tx.allocate((node.size() / tx.db.pageSize) + 1) + p, err := tx.allocate((node.size() + tx.db.pageSize - 1) / tx.db.pageSize) if err != nil { return err } @@ -454,43 +464,6 @@ func (n *node) rebalance() { target = n.prevSibling() } - // If target node has extra nodes then just move one over. - if target.numChildren() > target.minKeys() { - if useNextSibling { - // Reparent and move node. - if child, ok := n.bucket.nodes[target.inodes[0].pgid]; ok { - child.parent.removeChild(child) - child.parent = n - child.parent.children = append(child.parent.children, child) - } - n.inodes = append(n.inodes, target.inodes[0]) - target.inodes = target.inodes[1:] - - // Update target key on parent. - target.parent.put(target.key, target.inodes[0].key, nil, target.pgid, 0) - target.key = target.inodes[0].key - _assert(len(target.key) > 0, "rebalance(1): zero-length node key") - } else { - // Reparent and move node. - if child, ok := n.bucket.nodes[target.inodes[len(target.inodes)-1].pgid]; ok { - child.parent.removeChild(child) - child.parent = n - child.parent.children = append(child.parent.children, child) - } - n.inodes = append(n.inodes, inode{}) - copy(n.inodes[1:], n.inodes) - n.inodes[0] = target.inodes[len(target.inodes)-1] - target.inodes = target.inodes[:len(target.inodes)-1] - } - - // Update parent key for node. - n.parent.put(n.key, n.inodes[0].key, nil, n.pgid, 0) - n.key = n.inodes[0].key - _assert(len(n.key) > 0, "rebalance(2): zero-length node key") - - return - } - // If both this node and the target node are too small then merge them. if useNextSibling { // Reparent all child nodes being moved. @@ -610,9 +583,11 @@ func (n *node) dump() { type nodes []*node -func (s nodes) Len() int { return len(s) } -func (s nodes) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s nodes) Less(i, j int) bool { return bytes.Compare(s[i].inodes[0].key, s[j].inodes[0].key) == -1 } +func (s nodes) Len() int { return len(s) } +func (s nodes) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s nodes) Less(i, j int) bool { + return bytes.Compare(s[i].inodes[0].key, s[j].inodes[0].key) == -1 +} // inode represents an internal node inside of a node. // It can be used to point to elements in a page or point diff --git a/vendor/go.etcd.io/bbolt/page.go b/vendor/go.etcd.io/bbolt/page.go new file mode 100644 index 00000000..c9a158fb --- /dev/null +++ b/vendor/go.etcd.io/bbolt/page.go @@ -0,0 +1,204 @@ +package bbolt + +import ( + "fmt" + "os" + "sort" + "unsafe" +) + +const pageHeaderSize = unsafe.Sizeof(page{}) + +const minKeysPerPage = 2 + +const branchPageElementSize = unsafe.Sizeof(branchPageElement{}) +const leafPageElementSize = unsafe.Sizeof(leafPageElement{}) + +const ( + branchPageFlag = 0x01 + leafPageFlag = 0x02 + metaPageFlag = 0x04 + freelistPageFlag = 0x10 +) + +const ( + bucketLeafFlag = 0x01 +) + +type pgid uint64 + +type page struct { + id pgid + flags uint16 + count uint16 + overflow uint32 +} + +// typ returns a human readable page type string used for debugging. +func (p *page) typ() string { + if (p.flags & branchPageFlag) != 0 { + return "branch" + } else if (p.flags & leafPageFlag) != 0 { + return "leaf" + } else if (p.flags & metaPageFlag) != 0 { + return "meta" + } else if (p.flags & freelistPageFlag) != 0 { + return "freelist" + } + return fmt.Sprintf("unknown<%02x>", p.flags) +} + +// meta returns a pointer to the metadata section of the page. +func (p *page) meta() *meta { + return (*meta)(unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))) +} + +// leafPageElement retrieves the leaf node by index +func (p *page) leafPageElement(index uint16) *leafPageElement { + return (*leafPageElement)(unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), + leafPageElementSize, int(index))) +} + +// leafPageElements retrieves a list of leaf nodes. +func (p *page) leafPageElements() []leafPageElement { + if p.count == 0 { + return nil + } + var elems []leafPageElement + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&elems), data, int(p.count)) + return elems +} + +// branchPageElement retrieves the branch node by index +func (p *page) branchPageElement(index uint16) *branchPageElement { + return (*branchPageElement)(unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), + unsafe.Sizeof(branchPageElement{}), int(index))) +} + +// branchPageElements retrieves a list of branch nodes. +func (p *page) branchPageElements() []branchPageElement { + if p.count == 0 { + return nil + } + var elems []branchPageElement + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&elems), data, int(p.count)) + return elems +} + +// dump writes n bytes of the page to STDERR as hex output. +func (p *page) hexdump(n int) { + buf := unsafeByteSlice(unsafe.Pointer(p), 0, 0, n) + fmt.Fprintf(os.Stderr, "%x\n", buf) +} + +type pages []*page + +func (s pages) Len() int { return len(s) } +func (s pages) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s pages) Less(i, j int) bool { return s[i].id < s[j].id } + +// branchPageElement represents a node on a branch page. +type branchPageElement struct { + pos uint32 + ksize uint32 + pgid pgid +} + +// key returns a byte slice of the node key. +func (n *branchPageElement) key() []byte { + return unsafeByteSlice(unsafe.Pointer(n), 0, int(n.pos), int(n.pos)+int(n.ksize)) +} + +// leafPageElement represents a node on a leaf page. +type leafPageElement struct { + flags uint32 + pos uint32 + ksize uint32 + vsize uint32 +} + +// key returns a byte slice of the node key. +func (n *leafPageElement) key() []byte { + i := int(n.pos) + j := i + int(n.ksize) + return unsafeByteSlice(unsafe.Pointer(n), 0, i, j) +} + +// value returns a byte slice of the node value. +func (n *leafPageElement) value() []byte { + i := int(n.pos) + int(n.ksize) + j := i + int(n.vsize) + return unsafeByteSlice(unsafe.Pointer(n), 0, i, j) +} + +// PageInfo represents human readable information about a page. +type PageInfo struct { + ID int + Type string + Count int + OverflowCount int +} + +type pgids []pgid + +func (s pgids) Len() int { return len(s) } +func (s pgids) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s pgids) Less(i, j int) bool { return s[i] < s[j] } + +// merge returns the sorted union of a and b. +func (a pgids) merge(b pgids) pgids { + // Return the opposite slice if one is nil. + if len(a) == 0 { + return b + } + if len(b) == 0 { + return a + } + merged := make(pgids, len(a)+len(b)) + mergepgids(merged, a, b) + return merged +} + +// mergepgids copies the sorted union of a and b into dst. +// If dst is too small, it panics. +func mergepgids(dst, a, b pgids) { + if len(dst) < len(a)+len(b) { + panic(fmt.Errorf("mergepgids bad len %d < %d + %d", len(dst), len(a), len(b))) + } + // Copy in the opposite slice if one is nil. + if len(a) == 0 { + copy(dst, b) + return + } + if len(b) == 0 { + copy(dst, a) + return + } + + // Merged will hold all elements from both lists. + merged := dst[:0] + + // Assign lead to the slice with a lower starting value, follow to the higher value. + lead, follow := a, b + if b[0] < a[0] { + lead, follow = b, a + } + + // Continue while there are elements in the lead. + for len(lead) > 0 { + // Merge largest prefix of lead that is ahead of follow[0]. + n := sort.Search(len(lead), func(i int) bool { return lead[i] > follow[0] }) + merged = append(merged, lead[:n]...) + if n >= len(lead) { + break + } + + // Swap lead and follow. + lead, follow = follow, lead[n:] + } + + // Append what's left in follow. + _ = append(merged, follow...) +} diff --git a/vendor/github.com/boltdb/bolt/tx.go b/vendor/go.etcd.io/bbolt/tx.go similarity index 70% rename from vendor/github.com/boltdb/bolt/tx.go rename to vendor/go.etcd.io/bbolt/tx.go index c041d738..869d4120 100644 --- a/vendor/github.com/boltdb/bolt/tx.go +++ b/vendor/go.etcd.io/bbolt/tx.go @@ -1,10 +1,11 @@ -package bolt +package bbolt import ( "fmt" "io" "os" "sort" + "strings" "time" "unsafe" ) @@ -29,6 +30,14 @@ type Tx struct { pages map[pgid]*page stats TxStats commitHandlers []func() + + // WriteFlag specifies the flag for write-related methods like WriteTo(). + // Tx opens the database file with the specified flag to copy the data. + // + // By default, the flag is unset, which works well for mostly in-memory + // workloads. For databases that are much larger than available RAM, + // set the flag to syscall.O_DIRECT to avoid trashing the page cache. + WriteFlag int } // init initializes the transaction. @@ -87,18 +96,21 @@ func (tx *Tx) Stats() TxStats { // Bucket retrieves a bucket by name. // Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. func (tx *Tx) Bucket(name []byte) *Bucket { return tx.root.Bucket(name) } // CreateBucket creates a new bucket. // Returns an error if the bucket already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) { return tx.root.CreateBucket(name) } // CreateBucketIfNotExists creates a new bucket if it doesn't already exist. // Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) { return tx.root.CreateBucketIfNotExists(name) } @@ -114,10 +126,7 @@ func (tx *Tx) DeleteBucket(name []byte) error { // the error is returned to the caller. func (tx *Tx) ForEach(fn func(name []byte, b *Bucket) error) error { return tx.root.ForEach(func(k, v []byte) error { - if err := fn(k, tx.root.Bucket(k)); err != nil { - return err - } - return nil + return fn(k, tx.root.Bucket(k)) }) } @@ -127,7 +136,8 @@ func (tx *Tx) OnCommit(fn func()) { } // Commit writes all changes to disk and updates the meta page. -// Returns an error if a disk write error occurs. +// Returns an error if a disk write error occurs, or if Commit is +// called on a read-only transaction. func (tx *Tx) Commit() error { _assert(!tx.managed, "managed tx commit not allowed") if tx.db == nil { @@ -156,19 +166,19 @@ func (tx *Tx) Commit() error { // Free the old root bucket. tx.meta.root.root = tx.root.root - // Free the freelist and allocate new pages for it. This will overestimate - // the size of the freelist but not underestimate the size (which would be bad). - tx.db.freelist.free(tx.meta.txid, tx.db.page(tx.meta.freelist)) - p, err := tx.allocate((tx.db.freelist.size() / tx.db.pageSize) + 1) - if err != nil { - tx.rollback() - return err + // Free the old freelist because commit writes out a fresh freelist. + if tx.meta.freelist != pgidNoFreelist { + tx.db.freelist.free(tx.meta.txid, tx.db.page(tx.meta.freelist)) } - if err := tx.db.freelist.write(p); err != nil { - tx.rollback() - return err + + if !tx.db.NoFreelistSync { + err := tx.commitFreelist() + if err != nil { + return err + } + } else { + tx.meta.freelist = pgidNoFreelist } - tx.meta.freelist = p.id // Write dirty pages to disk. startTime = time.Now() @@ -178,10 +188,18 @@ func (tx *Tx) Commit() error { } // If strict mode is enabled then perform a consistency check. - // Only the first consistency error is reported in the panic. if tx.db.StrictMode { - if err, ok := <-tx.Check(); ok { - panic("check fail: " + err.Error()) + ch := tx.Check() + var errs []string + for { + err, ok := <-ch + if !ok { + break + } + errs = append(errs, err.Error()) + } + if len(errs) > 0 { + panic("check fail: " + strings.Join(errs, "\n")) } } @@ -203,23 +221,68 @@ func (tx *Tx) Commit() error { return nil } -// Rollback closes the transaction and ignores all previous updates. +func (tx *Tx) commitFreelist() error { + // Allocate new pages for the new free list. This will overestimate + // the size of the freelist but not underestimate the size (which would be bad). + opgid := tx.meta.pgid + p, err := tx.allocate((tx.db.freelist.size() / tx.db.pageSize) + 1) + if err != nil { + tx.rollback() + return err + } + if err := tx.db.freelist.write(p); err != nil { + tx.rollback() + return err + } + tx.meta.freelist = p.id + // If the high water mark has moved up then attempt to grow the database. + if tx.meta.pgid > opgid { + if err := tx.db.grow(int(tx.meta.pgid+1) * tx.db.pageSize); err != nil { + tx.rollback() + return err + } + } + + return nil +} + +// Rollback closes the transaction and ignores all previous updates. Read-only +// transactions must be rolled back and not committed. func (tx *Tx) Rollback() error { _assert(!tx.managed, "managed tx rollback not allowed") if tx.db == nil { return ErrTxClosed } - tx.rollback() + tx.nonPhysicalRollback() return nil } +// nonPhysicalRollback is called when user calls Rollback directly, in this case we do not need to reload the free pages from disk. +func (tx *Tx) nonPhysicalRollback() { + if tx.db == nil { + return + } + if tx.writable { + tx.db.freelist.rollback(tx.meta.txid) + } + tx.close() +} + +// rollback needs to reload the free pages from disk in case some system error happens like fsync error. func (tx *Tx) rollback() { if tx.db == nil { return } if tx.writable { tx.db.freelist.rollback(tx.meta.txid) - tx.db.freelist.reload(tx.db.page(tx.db.meta().freelist)) + if !tx.db.hasSyncedFreelist() { + // Reconstruct free page list by scanning the DB to get the whole free page list. + // Note: scaning the whole db is heavy if your db size is large in NoSyncFreeList mode. + tx.db.freelist.noSyncReload(tx.db.freepages()) + } else { + // Read free page list from freelist page. + tx.db.freelist.reload(tx.db.page(tx.db.meta().freelist)) + } } tx.close() } @@ -234,7 +297,8 @@ func (tx *Tx) close() { var freelistPendingN = tx.db.freelist.pending_count() var freelistAlloc = tx.db.freelist.size() - // Remove writer lock. + // Remove transaction ref & writer lock. + tx.db.rwtx = nil tx.db.rwlock.Unlock() // Merge statistics. @@ -248,53 +312,87 @@ func (tx *Tx) close() { } else { tx.db.removeTx(tx) } + + // Clear all references. tx.db = nil + tx.meta = nil + tx.root = Bucket{tx: tx} + tx.pages = nil } // Copy writes the entire database to a writer. -// A reader transaction is maintained during the copy so it is safe to continue -// using the database while a copy is in progress. -// Copy will write exactly tx.Size() bytes into the writer. +// This function exists for backwards compatibility. +// +// Deprecated; Use WriteTo() instead. func (tx *Tx) Copy(w io.Writer) error { - var f *os.File - var err error + _, err := tx.WriteTo(w) + return err +} - // Attempt to open reader directly. - if f, err = os.OpenFile(tx.db.path, os.O_RDONLY|odirect, 0); err != nil { - // Fallback to a regular open if that doesn't work. - if f, err = os.OpenFile(tx.db.path, os.O_RDONLY, 0); err != nil { - return err +// WriteTo writes the entire database to a writer. +// If err == nil then exactly tx.Size() bytes will be written into the writer. +func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) { + // Attempt to open reader with WriteFlag + f, err := tx.db.openFile(tx.db.path, os.O_RDONLY|tx.WriteFlag, 0) + if err != nil { + return 0, err + } + defer func() { + if cerr := f.Close(); err == nil { + err = cerr } + }() + + // Generate a meta page. We use the same page data for both meta pages. + buf := make([]byte, tx.db.pageSize) + page := (*page)(unsafe.Pointer(&buf[0])) + page.flags = metaPageFlag + *page.meta() = *tx.meta + + // Write meta 0. + page.id = 0 + page.meta().checksum = page.meta().sum64() + nn, err := w.Write(buf) + n += int64(nn) + if err != nil { + return n, fmt.Errorf("meta 0 copy: %s", err) } - // Copy the meta pages. - tx.db.metalock.Lock() - _, err = io.CopyN(w, f, int64(tx.db.pageSize*2)) - tx.db.metalock.Unlock() + // Write meta 1 with a lower transaction id. + page.id = 1 + page.meta().txid -= 1 + page.meta().checksum = page.meta().sum64() + nn, err = w.Write(buf) + n += int64(nn) if err != nil { - _ = f.Close() - return fmt.Errorf("meta copy: %s", err) + return n, fmt.Errorf("meta 1 copy: %s", err) + } + + // Move past the meta pages in the file. + if _, err := f.Seek(int64(tx.db.pageSize*2), io.SeekStart); err != nil { + return n, fmt.Errorf("seek: %s", err) } // Copy data pages. - if _, err := io.CopyN(w, f, tx.Size()-int64(tx.db.pageSize*2)); err != nil { - _ = f.Close() - return err + wn, err := io.CopyN(w, f, tx.Size()-int64(tx.db.pageSize*2)) + n += wn + if err != nil { + return n, err } - return f.Close() + return n, nil } // CopyFile copies the entire database to file at the given path. // A reader transaction is maintained during the copy so it is safe to continue // using the database while a copy is in progress. func (tx *Tx) CopyFile(path string, mode os.FileMode) error { - f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode) + f, err := tx.db.openFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode) if err != nil { return err } - err = tx.Copy(f) + _, err = tx.WriteTo(f) if err != nil { _ = f.Close() return err @@ -317,9 +415,14 @@ func (tx *Tx) Check() <-chan error { } func (tx *Tx) check(ch chan error) { + // Force loading free list if opened in ReadOnly mode. + tx.db.loadFreelist() + // Check if any pages are double freed. freed := make(map[pgid]bool) - for _, id := range tx.db.freelist.all() { + all := make([]pgid, tx.db.freelist.count()) + tx.db.freelist.copyall(all) + for _, id := range all { if freed[id] { ch <- fmt.Errorf("page %d: already freed", id) } @@ -330,8 +433,10 @@ func (tx *Tx) check(ch chan error) { reachable := make(map[pgid]*page) reachable[0] = tx.page(0) // meta0 reachable[1] = tx.page(1) // meta1 - for i := uint32(0); i <= tx.page(tx.meta.freelist).overflow; i++ { - reachable[tx.meta.freelist+pgid(i)] = tx.page(tx.meta.freelist) + if tx.meta.freelist != pgidNoFreelist { + for i := uint32(0); i <= tx.page(tx.meta.freelist).overflow; i++ { + reachable[tx.meta.freelist+pgid(i)] = tx.page(tx.meta.freelist) + } } // Recursively check buckets. @@ -389,7 +494,7 @@ func (tx *Tx) checkBucket(b *Bucket, reachable map[pgid]*page, freed map[pgid]bo // allocate returns a contiguous block of memory starting at a given page. func (tx *Tx) allocate(count int) (*page, error) { - p, err := tx.db.allocate(count) + p, err := tx.db.allocate(tx.meta.txid, count) if err != nil { return nil, err } @@ -398,7 +503,7 @@ func (tx *Tx) allocate(count int) (*page, error) { tx.pages[p.id] = p // Update statistics. - tx.stats.PageCount++ + tx.stats.PageCount += count tx.stats.PageAlloc += count * tx.db.pageSize return p, nil @@ -411,28 +516,66 @@ func (tx *Tx) write() error { for _, p := range tx.pages { pages = append(pages, p) } + // Clear out page cache early. + tx.pages = make(map[pgid]*page) sort.Sort(pages) // Write pages to disk in order. for _, p := range pages { - size := (int(p.overflow) + 1) * tx.db.pageSize - buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:size] + rem := (uint64(p.overflow) + 1) * uint64(tx.db.pageSize) offset := int64(p.id) * int64(tx.db.pageSize) - if _, err := tx.db.ops.writeAt(buf, offset); err != nil { - return err - } + var written uintptr - // Update statistics. - tx.stats.Write++ + // Write out page in "max allocation" sized chunks. + for { + sz := rem + if sz > maxAllocSize-1 { + sz = maxAllocSize - 1 + } + buf := unsafeByteSlice(unsafe.Pointer(p), written, 0, int(sz)) + + if _, err := tx.db.ops.writeAt(buf, offset); err != nil { + return err + } + + // Update statistics. + tx.stats.Write++ + + // Exit inner for loop if we've written all the chunks. + rem -= sz + if rem == 0 { + break + } + + // Otherwise move offset forward and move pointer to next chunk. + offset += int64(sz) + written += uintptr(sz) + } } + + // Ignore file sync if flag is set on DB. if !tx.db.NoSync || IgnoreNoSync { if err := fdatasync(tx.db); err != nil { return err } } - // Clear out page cache. - tx.pages = make(map[pgid]*page) + // Put small pages back to page pool. + for _, p := range pages { + // Ignore page sizes over 1 page. + // These are allocated using make() instead of the page pool. + if int(p.overflow) != 0 { + continue + } + + buf := unsafeByteSlice(unsafe.Pointer(p), 0, 0, tx.db.pageSize) + + // See https://go.googlesource.com/go/+/f03c9202c43e0abb130669852082117ca50aa9b1 + for i := range buf { + buf[i] = 0 + } + tx.db.pagePool.Put(buf) + } return nil } @@ -461,7 +604,7 @@ func (tx *Tx) writeMeta() error { } // page returns a reference to the page with a given id. -// If page has been written to then a temporary bufferred page is returned. +// If page has been written to then a temporary buffered page is returned. func (tx *Tx) page(id pgid) *page { // Check the dirty pages first. if tx.pages != nil { diff --git a/vendor/go.etcd.io/bbolt/unsafe.go b/vendor/go.etcd.io/bbolt/unsafe.go new file mode 100644 index 00000000..c0e50375 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/unsafe.go @@ -0,0 +1,39 @@ +package bbolt + +import ( + "reflect" + "unsafe" +) + +func unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer { + return unsafe.Pointer(uintptr(base) + offset) +} + +func unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer { + return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz) +} + +func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte { + // See: https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices + // + // This memory is not allocated from C, but it is unmanaged by Go's + // garbage collector and should behave similarly, and the compiler + // should produce similar code. Note that this conversion allows a + // subslice to begin after the base address, with an optional offset, + // while the URL above does not cover this case and only slices from + // index 0. However, the wiki never says that the address must be to + // the beginning of a C allocation (or even that malloc was used at + // all), so this is believed to be correct. + return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j] +} + +// unsafeSlice modifies the data, len, and cap of a slice variable pointed to by +// the slice parameter. This helper should be used over other direct +// manipulation of reflect.SliceHeader to prevent misuse, namely, converting +// from reflect.SliceHeader to a Go slice type. +func unsafeSlice(slice, data unsafe.Pointer, len int) { + s := (*reflect.SliceHeader)(slice) + s.Data = uintptr(data) + s.Cap = len + s.Len = len +} diff --git a/vendor/golang.org/x/net/.gitattributes b/vendor/golang.org/x/net/.gitattributes deleted file mode 100644 index d2f212e5..00000000 --- a/vendor/golang.org/x/net/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -# Treat all files in this repo as binary, with no git magic updating -# line endings. Windows users contributing to Go will need to use a -# modern version of git and editors capable of LF line endings. -# -# We'll prevent accidental CRLF line endings from entering the repo -# via the git-review gofmt checks. -# -# See golang.org/issue/9281 - -* -text diff --git a/vendor/golang.org/x/net/.gitignore b/vendor/golang.org/x/net/.gitignore deleted file mode 100644 index 8339fd61..00000000 --- a/vendor/golang.org/x/net/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Add no patterns to .hgignore except for files generated by the build. -last-change diff --git a/vendor/golang.org/x/net/CONTRIBUTING.md b/vendor/golang.org/x/net/CONTRIBUTING.md deleted file mode 100644 index d0485e88..00000000 --- a/vendor/golang.org/x/net/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -Go is an open source project. - -It is the work of hundreds of contributors. We appreciate your help! - -## Filing issues - -When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: - -1. What version of Go are you using (`go version`)? -2. What operating system and processor architecture are you using? -3. What did you do? -4. What did you expect to see? -5. What did you see instead? - -General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. -The gophers there will answer or ask you to file an issue if you've tripped over a bug. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/net/README.md b/vendor/golang.org/x/net/README.md deleted file mode 100644 index 00a9b6eb..00000000 --- a/vendor/golang.org/x/net/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Go Networking - -This repository holds supplementary Go networking libraries. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/net`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/net`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit -changes to this repository, see https://golang.org/doc/contribute.html. -The main issue tracker for the net repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the -subject line, so it is easy to find. diff --git a/vendor/golang.org/x/net/bpf/asm.go b/vendor/golang.org/x/net/bpf/asm.go deleted file mode 100644 index 15e21b18..00000000 --- a/vendor/golang.org/x/net/bpf/asm.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package bpf - -import "fmt" - -// Assemble converts insts into raw instructions suitable for loading -// into a BPF virtual machine. -// -// Currently, no optimization is attempted, the assembled program flow -// is exactly as provided. -func Assemble(insts []Instruction) ([]RawInstruction, error) { - ret := make([]RawInstruction, len(insts)) - var err error - for i, inst := range insts { - ret[i], err = inst.Assemble() - if err != nil { - return nil, fmt.Errorf("assembling instruction %d: %s", i+1, err) - } - } - return ret, nil -} - -// Disassemble attempts to parse raw back into -// Instructions. Unrecognized RawInstructions are assumed to be an -// extension not implemented by this package, and are passed through -// unchanged to the output. The allDecoded value reports whether insts -// contains no RawInstructions. -func Disassemble(raw []RawInstruction) (insts []Instruction, allDecoded bool) { - insts = make([]Instruction, len(raw)) - allDecoded = true - for i, r := range raw { - insts[i] = r.Disassemble() - if _, ok := insts[i].(RawInstruction); ok { - allDecoded = false - } - } - return insts, allDecoded -} diff --git a/vendor/golang.org/x/net/bpf/constants.go b/vendor/golang.org/x/net/bpf/constants.go deleted file mode 100644 index 12f3ee83..00000000 --- a/vendor/golang.org/x/net/bpf/constants.go +++ /dev/null @@ -1,222 +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 bpf - -// A Register is a register of the BPF virtual machine. -type Register uint16 - -const ( - // RegA is the accumulator register. RegA is always the - // destination register of ALU operations. - RegA Register = iota - // RegX is the indirection register, used by LoadIndirect - // operations. - RegX -) - -// An ALUOp is an arithmetic or logic operation. -type ALUOp uint16 - -// ALU binary operation types. -const ( - ALUOpAdd ALUOp = iota << 4 - ALUOpSub - ALUOpMul - ALUOpDiv - ALUOpOr - ALUOpAnd - ALUOpShiftLeft - ALUOpShiftRight - aluOpNeg // Not exported because it's the only unary ALU operation, and gets its own instruction type. - ALUOpMod - ALUOpXor -) - -// A JumpTest is a comparison operator used in conditional jumps. -type JumpTest uint16 - -// Supported operators for conditional jumps. -// K can be RegX for JumpIfX -const ( - // K == A - JumpEqual JumpTest = iota - // K != A - JumpNotEqual - // K > A - JumpGreaterThan - // K < A - JumpLessThan - // K >= A - JumpGreaterOrEqual - // K <= A - JumpLessOrEqual - // K & A != 0 - JumpBitsSet - // K & A == 0 - JumpBitsNotSet -) - -// An Extension is a function call provided by the kernel that -// performs advanced operations that are expensive or impossible -// within the BPF virtual machine. -// -// Extensions are only implemented by the Linux kernel. -// -// TODO: should we prune this list? Some of these extensions seem -// either broken or near-impossible to use correctly, whereas other -// (len, random, ifindex) are quite useful. -type Extension int - -// Extension functions available in the Linux kernel. -const ( - // extOffset is the negative maximum number of instructions used - // to load instructions by overloading the K argument. - extOffset = -0x1000 - // ExtLen returns the length of the packet. - ExtLen Extension = 1 - // ExtProto returns the packet's L3 protocol type. - ExtProto Extension = 0 - // ExtType returns the packet's type (skb->pkt_type in the kernel) - // - // TODO: better documentation. How nice an API do we want to - // provide for these esoteric extensions? - ExtType Extension = 4 - // ExtPayloadOffset returns the offset of the packet payload, or - // the first protocol header that the kernel does not know how to - // parse. - ExtPayloadOffset Extension = 52 - // ExtInterfaceIndex returns the index of the interface on which - // the packet was received. - ExtInterfaceIndex Extension = 8 - // ExtNetlinkAttr returns the netlink attribute of type X at - // offset A. - ExtNetlinkAttr Extension = 12 - // ExtNetlinkAttrNested returns the nested netlink attribute of - // type X at offset A. - ExtNetlinkAttrNested Extension = 16 - // ExtMark returns the packet's mark value. - ExtMark Extension = 20 - // ExtQueue returns the packet's assigned hardware queue. - ExtQueue Extension = 24 - // ExtLinkLayerType returns the packet's hardware address type - // (e.g. Ethernet, Infiniband). - ExtLinkLayerType Extension = 28 - // ExtRXHash returns the packets receive hash. - // - // TODO: figure out what this rxhash actually is. - ExtRXHash Extension = 32 - // ExtCPUID returns the ID of the CPU processing the current - // packet. - ExtCPUID Extension = 36 - // ExtVLANTag returns the packet's VLAN tag. - ExtVLANTag Extension = 44 - // ExtVLANTagPresent returns non-zero if the packet has a VLAN - // tag. - // - // TODO: I think this might be a lie: it reads bit 0x1000 of the - // VLAN header, which changed meaning in recent revisions of the - // spec - this extension may now return meaningless information. - ExtVLANTagPresent Extension = 48 - // ExtVLANProto returns 0x8100 if the frame has a VLAN header, - // 0x88a8 if the frame has a "Q-in-Q" double VLAN header, or some - // other value if no VLAN information is present. - ExtVLANProto Extension = 60 - // ExtRand returns a uniformly random uint32. - ExtRand Extension = 56 -) - -// The following gives names to various bit patterns used in opcode construction. - -const ( - opMaskCls uint16 = 0x7 - // opClsLoad masks - opMaskLoadDest = 0x01 - opMaskLoadWidth = 0x18 - opMaskLoadMode = 0xe0 - // opClsALU & opClsJump - opMaskOperand = 0x08 - opMaskOperator = 0xf0 -) - -const ( - // +---------------+-----------------+---+---+---+ - // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 0 | - // +---------------+-----------------+---+---+---+ - opClsLoadA uint16 = iota - // +---------------+-----------------+---+---+---+ - // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 1 | - // +---------------+-----------------+---+---+---+ - opClsLoadX - // +---+---+---+---+---+---+---+---+ - // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | - // +---+---+---+---+---+---+---+---+ - opClsStoreA - // +---+---+---+---+---+---+---+---+ - // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | - // +---+---+---+---+---+---+---+---+ - opClsStoreX - // +---------------+-----------------+---+---+---+ - // | Operator (4b) | OperandSrc (1b) | 1 | 0 | 0 | - // +---------------+-----------------+---+---+---+ - opClsALU - // +-----------------------------+---+---+---+---+ - // | TestOperator (4b) | 0 | 1 | 0 | 1 | - // +-----------------------------+---+---+---+---+ - opClsJump - // +---+-------------------------+---+---+---+---+ - // | 0 | 0 | 0 | RetSrc (1b) | 0 | 1 | 1 | 0 | - // +---+-------------------------+---+---+---+---+ - opClsReturn - // +---+-------------------------+---+---+---+---+ - // | 0 | 0 | 0 | TXAorTAX (1b) | 0 | 1 | 1 | 1 | - // +---+-------------------------+---+---+---+---+ - opClsMisc -) - -const ( - opAddrModeImmediate uint16 = iota << 5 - opAddrModeAbsolute - opAddrModeIndirect - opAddrModeScratch - opAddrModePacketLen // actually an extension, not an addressing mode. - opAddrModeMemShift -) - -const ( - opLoadWidth4 uint16 = iota << 3 - opLoadWidth2 - opLoadWidth1 -) - -// Operand for ALU and Jump instructions -type opOperand uint16 - -// Supported operand sources. -const ( - opOperandConstant opOperand = iota << 3 - opOperandX -) - -// An jumpOp is a conditional jump condition. -type jumpOp uint16 - -// Supported jump conditions. -const ( - opJumpAlways jumpOp = iota << 4 - opJumpEqual - opJumpGT - opJumpGE - opJumpSet -) - -const ( - opRetSrcConstant uint16 = iota << 4 - opRetSrcA -) - -const ( - opMiscTAX = 0x00 - opMiscTXA = 0x80 -) diff --git a/vendor/golang.org/x/net/bpf/doc.go b/vendor/golang.org/x/net/bpf/doc.go deleted file mode 100644 index ae62feb5..00000000 --- a/vendor/golang.org/x/net/bpf/doc.go +++ /dev/null @@ -1,82 +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 bpf implements marshaling and unmarshaling of programs for the -Berkeley Packet Filter virtual machine, and provides a Go implementation -of the virtual machine. - -BPF's main use is to specify a packet filter for network taps, so that -the kernel doesn't have to expensively copy every packet it sees to -userspace. However, it's been repurposed to other areas where running -user code in-kernel is needed. For example, Linux's seccomp uses BPF -to apply security policies to system calls. For simplicity, this -documentation refers only to packets, but other uses of BPF have their -own data payloads. - -BPF programs run in a restricted virtual machine. It has almost no -access to kernel functions, and while conditional branches are -allowed, they can only jump forwards, to guarantee that there are no -infinite loops. - -The virtual machine - -The BPF VM is an accumulator machine. Its main register, called -register A, is an implicit source and destination in all arithmetic -and logic operations. The machine also has 16 scratch registers for -temporary storage, and an indirection register (register X) for -indirect memory access. All registers are 32 bits wide. - -Each run of a BPF program is given one packet, which is placed in the -VM's read-only "main memory". LoadAbsolute and LoadIndirect -instructions can fetch up to 32 bits at a time into register A for -examination. - -The goal of a BPF program is to produce and return a verdict (uint32), -which tells the kernel what to do with the packet. In the context of -packet filtering, the returned value is the number of bytes of the -packet to forward to userspace, or 0 to ignore the packet. Other -contexts like seccomp define their own return values. - -In order to simplify programs, attempts to read past the end of the -packet terminate the program execution with a verdict of 0 (ignore -packet). This means that the vast majority of BPF programs don't need -to do any explicit bounds checking. - -In addition to the bytes of the packet, some BPF programs have access -to extensions, which are essentially calls to kernel utility -functions. Currently, the only extensions supported by this package -are the Linux packet filter extensions. - -Examples - -This packet filter selects all ARP packets. - - bpf.Assemble([]bpf.Instruction{ - // Load "EtherType" field from the ethernet header. - bpf.LoadAbsolute{Off: 12, Size: 2}, - // Skip over the next instruction if EtherType is not ARP. - bpf.JumpIf{Cond: bpf.JumpNotEqual, Val: 0x0806, SkipTrue: 1}, - // Verdict is "send up to 4k of the packet to userspace." - bpf.RetConstant{Val: 4096}, - // Verdict is "ignore packet." - bpf.RetConstant{Val: 0}, - }) - -This packet filter captures a random 1% sample of traffic. - - bpf.Assemble([]bpf.Instruction{ - // Get a 32-bit random number from the Linux kernel. - bpf.LoadExtension{Num: bpf.ExtRand}, - // 1% dice roll? - bpf.JumpIf{Cond: bpf.JumpLessThan, Val: 2^32/100, SkipFalse: 1}, - // Capture. - bpf.RetConstant{Val: 4096}, - // Ignore. - bpf.RetConstant{Val: 0}, - }) - -*/ -package bpf // import "golang.org/x/net/bpf" diff --git a/vendor/golang.org/x/net/bpf/instructions.go b/vendor/golang.org/x/net/bpf/instructions.go deleted file mode 100644 index 3cffcaa0..00000000 --- a/vendor/golang.org/x/net/bpf/instructions.go +++ /dev/null @@ -1,726 +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 bpf - -import "fmt" - -// An Instruction is one instruction executed by the BPF virtual -// machine. -type Instruction interface { - // Assemble assembles the Instruction into a RawInstruction. - Assemble() (RawInstruction, error) -} - -// A RawInstruction is a raw BPF virtual machine instruction. -type RawInstruction struct { - // Operation to execute. - Op uint16 - // For conditional jump instructions, the number of instructions - // to skip if the condition is true/false. - Jt uint8 - Jf uint8 - // Constant parameter. The meaning depends on the Op. - K uint32 -} - -// Assemble implements the Instruction Assemble method. -func (ri RawInstruction) Assemble() (RawInstruction, error) { return ri, nil } - -// Disassemble parses ri into an Instruction and returns it. If ri is -// not recognized by this package, ri itself is returned. -func (ri RawInstruction) Disassemble() Instruction { - switch ri.Op & opMaskCls { - case opClsLoadA, opClsLoadX: - reg := Register(ri.Op & opMaskLoadDest) - sz := 0 - switch ri.Op & opMaskLoadWidth { - case opLoadWidth4: - sz = 4 - case opLoadWidth2: - sz = 2 - case opLoadWidth1: - sz = 1 - default: - return ri - } - switch ri.Op & opMaskLoadMode { - case opAddrModeImmediate: - if sz != 4 { - return ri - } - return LoadConstant{Dst: reg, Val: ri.K} - case opAddrModeScratch: - if sz != 4 || ri.K > 15 { - return ri - } - return LoadScratch{Dst: reg, N: int(ri.K)} - case opAddrModeAbsolute: - if ri.K > extOffset+0xffffffff { - return LoadExtension{Num: Extension(-extOffset + ri.K)} - } - return LoadAbsolute{Size: sz, Off: ri.K} - case opAddrModeIndirect: - return LoadIndirect{Size: sz, Off: ri.K} - case opAddrModePacketLen: - if sz != 4 { - return ri - } - return LoadExtension{Num: ExtLen} - case opAddrModeMemShift: - return LoadMemShift{Off: ri.K} - default: - return ri - } - - case opClsStoreA: - if ri.Op != opClsStoreA || ri.K > 15 { - return ri - } - return StoreScratch{Src: RegA, N: int(ri.K)} - - case opClsStoreX: - if ri.Op != opClsStoreX || ri.K > 15 { - return ri - } - return StoreScratch{Src: RegX, N: int(ri.K)} - - case opClsALU: - switch op := ALUOp(ri.Op & opMaskOperator); op { - case ALUOpAdd, ALUOpSub, ALUOpMul, ALUOpDiv, ALUOpOr, ALUOpAnd, ALUOpShiftLeft, ALUOpShiftRight, ALUOpMod, ALUOpXor: - switch operand := opOperand(ri.Op & opMaskOperand); operand { - case opOperandX: - return ALUOpX{Op: op} - case opOperandConstant: - return ALUOpConstant{Op: op, Val: ri.K} - default: - return ri - } - case aluOpNeg: - return NegateA{} - default: - return ri - } - - case opClsJump: - switch op := jumpOp(ri.Op & opMaskOperator); op { - case opJumpAlways: - return Jump{Skip: ri.K} - case opJumpEqual, opJumpGT, opJumpGE, opJumpSet: - cond, skipTrue, skipFalse := jumpOpToTest(op, ri.Jt, ri.Jf) - switch operand := opOperand(ri.Op & opMaskOperand); operand { - case opOperandX: - return JumpIfX{Cond: cond, SkipTrue: skipTrue, SkipFalse: skipFalse} - case opOperandConstant: - return JumpIf{Cond: cond, Val: ri.K, SkipTrue: skipTrue, SkipFalse: skipFalse} - default: - return ri - } - default: - return ri - } - - case opClsReturn: - switch ri.Op { - case opClsReturn | opRetSrcA: - return RetA{} - case opClsReturn | opRetSrcConstant: - return RetConstant{Val: ri.K} - default: - return ri - } - - case opClsMisc: - switch ri.Op { - case opClsMisc | opMiscTAX: - return TAX{} - case opClsMisc | opMiscTXA: - return TXA{} - default: - return ri - } - - default: - panic("unreachable") // switch is exhaustive on the bit pattern - } -} - -func jumpOpToTest(op jumpOp, skipTrue uint8, skipFalse uint8) (JumpTest, uint8, uint8) { - var test JumpTest - - // Decode "fake" jump conditions that don't appear in machine code - // Ensures the Assemble -> Disassemble stage recreates the same instructions - // See https://github.com/golang/go/issues/18470 - if skipTrue == 0 { - switch op { - case opJumpEqual: - test = JumpNotEqual - case opJumpGT: - test = JumpLessOrEqual - case opJumpGE: - test = JumpLessThan - case opJumpSet: - test = JumpBitsNotSet - } - - return test, skipFalse, 0 - } - - switch op { - case opJumpEqual: - test = JumpEqual - case opJumpGT: - test = JumpGreaterThan - case opJumpGE: - test = JumpGreaterOrEqual - case opJumpSet: - test = JumpBitsSet - } - - return test, skipTrue, skipFalse -} - -// LoadConstant loads Val into register Dst. -type LoadConstant struct { - Dst Register - Val uint32 -} - -// Assemble implements the Instruction Assemble method. -func (a LoadConstant) Assemble() (RawInstruction, error) { - return assembleLoad(a.Dst, 4, opAddrModeImmediate, a.Val) -} - -// String returns the instruction in assembler notation. -func (a LoadConstant) String() string { - switch a.Dst { - case RegA: - return fmt.Sprintf("ld #%d", a.Val) - case RegX: - return fmt.Sprintf("ldx #%d", a.Val) - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// LoadScratch loads scratch[N] into register Dst. -type LoadScratch struct { - Dst Register - N int // 0-15 -} - -// Assemble implements the Instruction Assemble method. -func (a LoadScratch) Assemble() (RawInstruction, error) { - if a.N < 0 || a.N > 15 { - return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N) - } - return assembleLoad(a.Dst, 4, opAddrModeScratch, uint32(a.N)) -} - -// String returns the instruction in assembler notation. -func (a LoadScratch) String() string { - switch a.Dst { - case RegA: - return fmt.Sprintf("ld M[%d]", a.N) - case RegX: - return fmt.Sprintf("ldx M[%d]", a.N) - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// LoadAbsolute loads packet[Off:Off+Size] as an integer value into -// register A. -type LoadAbsolute struct { - Off uint32 - Size int // 1, 2 or 4 -} - -// Assemble implements the Instruction Assemble method. -func (a LoadAbsolute) Assemble() (RawInstruction, error) { - return assembleLoad(RegA, a.Size, opAddrModeAbsolute, a.Off) -} - -// String returns the instruction in assembler notation. -func (a LoadAbsolute) String() string { - switch a.Size { - case 1: // byte - return fmt.Sprintf("ldb [%d]", a.Off) - case 2: // half word - return fmt.Sprintf("ldh [%d]", a.Off) - case 4: // word - if a.Off > extOffset+0xffffffff { - return LoadExtension{Num: Extension(a.Off + 0x1000)}.String() - } - return fmt.Sprintf("ld [%d]", a.Off) - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// LoadIndirect loads packet[X+Off:X+Off+Size] as an integer value -// into register A. -type LoadIndirect struct { - Off uint32 - Size int // 1, 2 or 4 -} - -// Assemble implements the Instruction Assemble method. -func (a LoadIndirect) Assemble() (RawInstruction, error) { - return assembleLoad(RegA, a.Size, opAddrModeIndirect, a.Off) -} - -// String returns the instruction in assembler notation. -func (a LoadIndirect) String() string { - switch a.Size { - case 1: // byte - return fmt.Sprintf("ldb [x + %d]", a.Off) - case 2: // half word - return fmt.Sprintf("ldh [x + %d]", a.Off) - case 4: // word - return fmt.Sprintf("ld [x + %d]", a.Off) - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// LoadMemShift multiplies the first 4 bits of the byte at packet[Off] -// by 4 and stores the result in register X. -// -// This instruction is mainly useful to load into X the length of an -// IPv4 packet header in a single instruction, rather than have to do -// the arithmetic on the header's first byte by hand. -type LoadMemShift struct { - Off uint32 -} - -// Assemble implements the Instruction Assemble method. -func (a LoadMemShift) Assemble() (RawInstruction, error) { - return assembleLoad(RegX, 1, opAddrModeMemShift, a.Off) -} - -// String returns the instruction in assembler notation. -func (a LoadMemShift) String() string { - return fmt.Sprintf("ldx 4*([%d]&0xf)", a.Off) -} - -// LoadExtension invokes a linux-specific extension and stores the -// result in register A. -type LoadExtension struct { - Num Extension -} - -// Assemble implements the Instruction Assemble method. -func (a LoadExtension) Assemble() (RawInstruction, error) { - if a.Num == ExtLen { - return assembleLoad(RegA, 4, opAddrModePacketLen, 0) - } - return assembleLoad(RegA, 4, opAddrModeAbsolute, uint32(extOffset+a.Num)) -} - -// String returns the instruction in assembler notation. -func (a LoadExtension) String() string { - switch a.Num { - case ExtLen: - return "ld #len" - case ExtProto: - return "ld #proto" - case ExtType: - return "ld #type" - case ExtPayloadOffset: - return "ld #poff" - case ExtInterfaceIndex: - return "ld #ifidx" - case ExtNetlinkAttr: - return "ld #nla" - case ExtNetlinkAttrNested: - return "ld #nlan" - case ExtMark: - return "ld #mark" - case ExtQueue: - return "ld #queue" - case ExtLinkLayerType: - return "ld #hatype" - case ExtRXHash: - return "ld #rxhash" - case ExtCPUID: - return "ld #cpu" - case ExtVLANTag: - return "ld #vlan_tci" - case ExtVLANTagPresent: - return "ld #vlan_avail" - case ExtVLANProto: - return "ld #vlan_tpid" - case ExtRand: - return "ld #rand" - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// StoreScratch stores register Src into scratch[N]. -type StoreScratch struct { - Src Register - N int // 0-15 -} - -// Assemble implements the Instruction Assemble method. -func (a StoreScratch) Assemble() (RawInstruction, error) { - if a.N < 0 || a.N > 15 { - return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N) - } - var op uint16 - switch a.Src { - case RegA: - op = opClsStoreA - case RegX: - op = opClsStoreX - default: - return RawInstruction{}, fmt.Errorf("invalid source register %v", a.Src) - } - - return RawInstruction{ - Op: op, - K: uint32(a.N), - }, nil -} - -// String returns the instruction in assembler notation. -func (a StoreScratch) String() string { - switch a.Src { - case RegA: - return fmt.Sprintf("st M[%d]", a.N) - case RegX: - return fmt.Sprintf("stx M[%d]", a.N) - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// ALUOpConstant executes A = A Val. -type ALUOpConstant struct { - Op ALUOp - Val uint32 -} - -// Assemble implements the Instruction Assemble method. -func (a ALUOpConstant) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsALU | uint16(opOperandConstant) | uint16(a.Op), - K: a.Val, - }, nil -} - -// String returns the instruction in assembler notation. -func (a ALUOpConstant) String() string { - switch a.Op { - case ALUOpAdd: - return fmt.Sprintf("add #%d", a.Val) - case ALUOpSub: - return fmt.Sprintf("sub #%d", a.Val) - case ALUOpMul: - return fmt.Sprintf("mul #%d", a.Val) - case ALUOpDiv: - return fmt.Sprintf("div #%d", a.Val) - case ALUOpMod: - return fmt.Sprintf("mod #%d", a.Val) - case ALUOpAnd: - return fmt.Sprintf("and #%d", a.Val) - case ALUOpOr: - return fmt.Sprintf("or #%d", a.Val) - case ALUOpXor: - return fmt.Sprintf("xor #%d", a.Val) - case ALUOpShiftLeft: - return fmt.Sprintf("lsh #%d", a.Val) - case ALUOpShiftRight: - return fmt.Sprintf("rsh #%d", a.Val) - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// ALUOpX executes A = A X -type ALUOpX struct { - Op ALUOp -} - -// Assemble implements the Instruction Assemble method. -func (a ALUOpX) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsALU | uint16(opOperandX) | uint16(a.Op), - }, nil -} - -// String returns the instruction in assembler notation. -func (a ALUOpX) String() string { - switch a.Op { - case ALUOpAdd: - return "add x" - case ALUOpSub: - return "sub x" - case ALUOpMul: - return "mul x" - case ALUOpDiv: - return "div x" - case ALUOpMod: - return "mod x" - case ALUOpAnd: - return "and x" - case ALUOpOr: - return "or x" - case ALUOpXor: - return "xor x" - case ALUOpShiftLeft: - return "lsh x" - case ALUOpShiftRight: - return "rsh x" - default: - return fmt.Sprintf("unknown instruction: %#v", a) - } -} - -// NegateA executes A = -A. -type NegateA struct{} - -// Assemble implements the Instruction Assemble method. -func (a NegateA) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsALU | uint16(aluOpNeg), - }, nil -} - -// String returns the instruction in assembler notation. -func (a NegateA) String() string { - return fmt.Sprintf("neg") -} - -// Jump skips the following Skip instructions in the program. -type Jump struct { - Skip uint32 -} - -// Assemble implements the Instruction Assemble method. -func (a Jump) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsJump | uint16(opJumpAlways), - K: a.Skip, - }, nil -} - -// String returns the instruction in assembler notation. -func (a Jump) String() string { - return fmt.Sprintf("ja %d", a.Skip) -} - -// JumpIf skips the following Skip instructions in the program if A -// Val is true. -type JumpIf struct { - Cond JumpTest - Val uint32 - SkipTrue uint8 - SkipFalse uint8 -} - -// Assemble implements the Instruction Assemble method. -func (a JumpIf) Assemble() (RawInstruction, error) { - return jumpToRaw(a.Cond, opOperandConstant, a.Val, a.SkipTrue, a.SkipFalse) -} - -// String returns the instruction in assembler notation. -func (a JumpIf) String() string { - return jumpToString(a.Cond, fmt.Sprintf("#%d", a.Val), a.SkipTrue, a.SkipFalse) -} - -// JumpIfX skips the following Skip instructions in the program if A -// X is true. -type JumpIfX struct { - Cond JumpTest - SkipTrue uint8 - SkipFalse uint8 -} - -// Assemble implements the Instruction Assemble method. -func (a JumpIfX) Assemble() (RawInstruction, error) { - return jumpToRaw(a.Cond, opOperandX, 0, a.SkipTrue, a.SkipFalse) -} - -// String returns the instruction in assembler notation. -func (a JumpIfX) String() string { - return jumpToString(a.Cond, "x", a.SkipTrue, a.SkipFalse) -} - -// jumpToRaw assembles a jump instruction into a RawInstruction -func jumpToRaw(test JumpTest, operand opOperand, k uint32, skipTrue, skipFalse uint8) (RawInstruction, error) { - var ( - cond jumpOp - flip bool - ) - switch test { - case JumpEqual: - cond = opJumpEqual - case JumpNotEqual: - cond, flip = opJumpEqual, true - case JumpGreaterThan: - cond = opJumpGT - case JumpLessThan: - cond, flip = opJumpGE, true - case JumpGreaterOrEqual: - cond = opJumpGE - case JumpLessOrEqual: - cond, flip = opJumpGT, true - case JumpBitsSet: - cond = opJumpSet - case JumpBitsNotSet: - cond, flip = opJumpSet, true - default: - return RawInstruction{}, fmt.Errorf("unknown JumpTest %v", test) - } - jt, jf := skipTrue, skipFalse - if flip { - jt, jf = jf, jt - } - return RawInstruction{ - Op: opClsJump | uint16(cond) | uint16(operand), - Jt: jt, - Jf: jf, - K: k, - }, nil -} - -// jumpToString converts a jump instruction to assembler notation -func jumpToString(cond JumpTest, operand string, skipTrue, skipFalse uint8) string { - switch cond { - // K == A - case JumpEqual: - return conditionalJump(operand, skipTrue, skipFalse, "jeq", "jneq") - // K != A - case JumpNotEqual: - return fmt.Sprintf("jneq %s,%d", operand, skipTrue) - // K > A - case JumpGreaterThan: - return conditionalJump(operand, skipTrue, skipFalse, "jgt", "jle") - // K < A - case JumpLessThan: - return fmt.Sprintf("jlt %s,%d", operand, skipTrue) - // K >= A - case JumpGreaterOrEqual: - return conditionalJump(operand, skipTrue, skipFalse, "jge", "jlt") - // K <= A - case JumpLessOrEqual: - return fmt.Sprintf("jle %s,%d", operand, skipTrue) - // K & A != 0 - case JumpBitsSet: - if skipFalse > 0 { - return fmt.Sprintf("jset %s,%d,%d", operand, skipTrue, skipFalse) - } - return fmt.Sprintf("jset %s,%d", operand, skipTrue) - // K & A == 0, there is no assembler instruction for JumpBitNotSet, use JumpBitSet and invert skips - case JumpBitsNotSet: - return jumpToString(JumpBitsSet, operand, skipFalse, skipTrue) - default: - return fmt.Sprintf("unknown JumpTest %#v", cond) - } -} - -func conditionalJump(operand string, skipTrue, skipFalse uint8, positiveJump, negativeJump string) string { - if skipTrue > 0 { - if skipFalse > 0 { - return fmt.Sprintf("%s %s,%d,%d", positiveJump, operand, skipTrue, skipFalse) - } - return fmt.Sprintf("%s %s,%d", positiveJump, operand, skipTrue) - } - return fmt.Sprintf("%s %s,%d", negativeJump, operand, skipFalse) -} - -// RetA exits the BPF program, returning the value of register A. -type RetA struct{} - -// Assemble implements the Instruction Assemble method. -func (a RetA) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsReturn | opRetSrcA, - }, nil -} - -// String returns the instruction in assembler notation. -func (a RetA) String() string { - return fmt.Sprintf("ret a") -} - -// RetConstant exits the BPF program, returning a constant value. -type RetConstant struct { - Val uint32 -} - -// Assemble implements the Instruction Assemble method. -func (a RetConstant) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsReturn | opRetSrcConstant, - K: a.Val, - }, nil -} - -// String returns the instruction in assembler notation. -func (a RetConstant) String() string { - return fmt.Sprintf("ret #%d", a.Val) -} - -// TXA copies the value of register X to register A. -type TXA struct{} - -// Assemble implements the Instruction Assemble method. -func (a TXA) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsMisc | opMiscTXA, - }, nil -} - -// String returns the instruction in assembler notation. -func (a TXA) String() string { - return fmt.Sprintf("txa") -} - -// TAX copies the value of register A to register X. -type TAX struct{} - -// Assemble implements the Instruction Assemble method. -func (a TAX) Assemble() (RawInstruction, error) { - return RawInstruction{ - Op: opClsMisc | opMiscTAX, - }, nil -} - -// String returns the instruction in assembler notation. -func (a TAX) String() string { - return fmt.Sprintf("tax") -} - -func assembleLoad(dst Register, loadSize int, mode uint16, k uint32) (RawInstruction, error) { - var ( - cls uint16 - sz uint16 - ) - switch dst { - case RegA: - cls = opClsLoadA - case RegX: - cls = opClsLoadX - default: - return RawInstruction{}, fmt.Errorf("invalid target register %v", dst) - } - switch loadSize { - case 1: - sz = opLoadWidth1 - case 2: - sz = opLoadWidth2 - case 4: - sz = opLoadWidth4 - default: - return RawInstruction{}, fmt.Errorf("invalid load byte length %d", sz) - } - return RawInstruction{ - Op: cls | sz | mode, - K: k, - }, nil -} diff --git a/vendor/golang.org/x/net/bpf/instructions_test.go b/vendor/golang.org/x/net/bpf/instructions_test.go deleted file mode 100644 index 69b25c54..00000000 --- a/vendor/golang.org/x/net/bpf/instructions_test.go +++ /dev/null @@ -1,593 +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 bpf - -import ( - "fmt" - "io/ioutil" - "reflect" - "strconv" - "strings" - "testing" -) - -// This is a direct translation of the program in -// testdata/all_instructions.txt. -var allInstructions = []Instruction{ - LoadConstant{Dst: RegA, Val: 42}, - LoadConstant{Dst: RegX, Val: 42}, - - LoadScratch{Dst: RegA, N: 3}, - LoadScratch{Dst: RegX, N: 3}, - - LoadAbsolute{Off: 42, Size: 1}, - LoadAbsolute{Off: 42, Size: 2}, - LoadAbsolute{Off: 42, Size: 4}, - - LoadIndirect{Off: 42, Size: 1}, - LoadIndirect{Off: 42, Size: 2}, - LoadIndirect{Off: 42, Size: 4}, - - LoadMemShift{Off: 42}, - - LoadExtension{Num: ExtLen}, - LoadExtension{Num: ExtProto}, - LoadExtension{Num: ExtType}, - LoadExtension{Num: ExtRand}, - - StoreScratch{Src: RegA, N: 3}, - StoreScratch{Src: RegX, N: 3}, - - ALUOpConstant{Op: ALUOpAdd, Val: 42}, - ALUOpConstant{Op: ALUOpSub, Val: 42}, - ALUOpConstant{Op: ALUOpMul, Val: 42}, - ALUOpConstant{Op: ALUOpDiv, Val: 42}, - ALUOpConstant{Op: ALUOpOr, Val: 42}, - ALUOpConstant{Op: ALUOpAnd, Val: 42}, - ALUOpConstant{Op: ALUOpShiftLeft, Val: 42}, - ALUOpConstant{Op: ALUOpShiftRight, Val: 42}, - ALUOpConstant{Op: ALUOpMod, Val: 42}, - ALUOpConstant{Op: ALUOpXor, Val: 42}, - - ALUOpX{Op: ALUOpAdd}, - ALUOpX{Op: ALUOpSub}, - ALUOpX{Op: ALUOpMul}, - ALUOpX{Op: ALUOpDiv}, - ALUOpX{Op: ALUOpOr}, - ALUOpX{Op: ALUOpAnd}, - ALUOpX{Op: ALUOpShiftLeft}, - ALUOpX{Op: ALUOpShiftRight}, - ALUOpX{Op: ALUOpMod}, - ALUOpX{Op: ALUOpXor}, - - NegateA{}, - - Jump{Skip: 17}, - JumpIf{Cond: JumpEqual, Val: 42, SkipTrue: 15, SkipFalse: 16}, - JumpIf{Cond: JumpNotEqual, Val: 42, SkipTrue: 15}, - JumpIf{Cond: JumpLessThan, Val: 42, SkipTrue: 14}, - JumpIf{Cond: JumpLessOrEqual, Val: 42, SkipTrue: 13}, - JumpIf{Cond: JumpGreaterThan, Val: 42, SkipTrue: 11, SkipFalse: 12}, - JumpIf{Cond: JumpGreaterOrEqual, Val: 42, SkipTrue: 10, SkipFalse: 11}, - JumpIf{Cond: JumpBitsSet, Val: 42, SkipTrue: 9, SkipFalse: 10}, - - JumpIfX{Cond: JumpEqual, SkipTrue: 8, SkipFalse: 9}, - JumpIfX{Cond: JumpNotEqual, SkipTrue: 8}, - JumpIfX{Cond: JumpLessThan, SkipTrue: 7}, - JumpIfX{Cond: JumpLessOrEqual, SkipTrue: 6}, - JumpIfX{Cond: JumpGreaterThan, SkipTrue: 4, SkipFalse: 5}, - JumpIfX{Cond: JumpGreaterOrEqual, SkipTrue: 3, SkipFalse: 4}, - JumpIfX{Cond: JumpBitsSet, SkipTrue: 2, SkipFalse: 3}, - - TAX{}, - TXA{}, - - RetA{}, - RetConstant{Val: 42}, -} -var allInstructionsExpected = "testdata/all_instructions.bpf" - -// Check that we produce the same output as the canonical bpf_asm -// linux kernel tool. -func TestInterop(t *testing.T) { - out, err := Assemble(allInstructions) - if err != nil { - t.Fatalf("assembly of allInstructions program failed: %s", err) - } - t.Logf("Assembled program is %d instructions long", len(out)) - - bs, err := ioutil.ReadFile(allInstructionsExpected) - if err != nil { - t.Fatalf("reading %s: %s", allInstructionsExpected, err) - } - // First statement is the number of statements, last statement is - // empty. We just ignore both and rely on slice length. - stmts := strings.Split(string(bs), ",") - if len(stmts)-2 != len(out) { - t.Fatalf("test program lengths don't match: %s has %d, Go implementation has %d", allInstructionsExpected, len(stmts)-2, len(allInstructions)) - } - - for i, stmt := range stmts[1 : len(stmts)-2] { - nums := strings.Split(stmt, " ") - if len(nums) != 4 { - t.Fatalf("malformed instruction %d in %s: %s", i+1, allInstructionsExpected, stmt) - } - - actual := out[i] - - op, err := strconv.ParseUint(nums[0], 10, 16) - if err != nil { - t.Fatalf("malformed opcode %s in instruction %d of %s", nums[0], i+1, allInstructionsExpected) - } - if actual.Op != uint16(op) { - t.Errorf("opcode mismatch on instruction %d (%#v): got 0x%02x, want 0x%02x", i+1, allInstructions[i], actual.Op, op) - } - - jt, err := strconv.ParseUint(nums[1], 10, 8) - if err != nil { - t.Fatalf("malformed jt offset %s in instruction %d of %s", nums[1], i+1, allInstructionsExpected) - } - if actual.Jt != uint8(jt) { - t.Errorf("jt mismatch on instruction %d (%#v): got %d, want %d", i+1, allInstructions[i], actual.Jt, jt) - } - - jf, err := strconv.ParseUint(nums[2], 10, 8) - if err != nil { - t.Fatalf("malformed jf offset %s in instruction %d of %s", nums[2], i+1, allInstructionsExpected) - } - if actual.Jf != uint8(jf) { - t.Errorf("jf mismatch on instruction %d (%#v): got %d, want %d", i+1, allInstructions[i], actual.Jf, jf) - } - - k, err := strconv.ParseUint(nums[3], 10, 32) - if err != nil { - t.Fatalf("malformed constant %s in instruction %d of %s", nums[3], i+1, allInstructionsExpected) - } - if actual.K != uint32(k) { - t.Errorf("constant mismatch on instruction %d (%#v): got %d, want %d", i+1, allInstructions[i], actual.K, k) - } - } -} - -// Check that assembly and disassembly match each other. -func TestAsmDisasm(t *testing.T) { - prog1, err := Assemble(allInstructions) - if err != nil { - t.Fatalf("assembly of allInstructions program failed: %s", err) - } - t.Logf("Assembled program is %d instructions long", len(prog1)) - - got, allDecoded := Disassemble(prog1) - if !allDecoded { - t.Errorf("Disassemble(Assemble(allInstructions)) produced unrecognized instructions:") - for i, inst := range got { - if r, ok := inst.(RawInstruction); ok { - t.Logf(" insn %d, %#v --> %#v", i+1, allInstructions[i], r) - } - } - } - - if len(allInstructions) != len(got) { - t.Fatalf("disassembly changed program size: %d insns before, %d insns after", len(allInstructions), len(got)) - } - if !reflect.DeepEqual(allInstructions, got) { - t.Errorf("program mutated by disassembly:") - for i := range got { - if !reflect.DeepEqual(allInstructions[i], got[i]) { - t.Logf(" insn %d, s: %#v, p1: %#v, got: %#v", i+1, allInstructions[i], prog1[i], got[i]) - } - } - } -} - -type InvalidInstruction struct{} - -func (a InvalidInstruction) Assemble() (RawInstruction, error) { - return RawInstruction{}, fmt.Errorf("Invalid Instruction") -} - -func (a InvalidInstruction) String() string { - return fmt.Sprintf("unknown instruction: %#v", a) -} - -func TestString(t *testing.T) { - testCases := []struct { - instruction Instruction - assembler string - }{ - { - instruction: LoadConstant{Dst: RegA, Val: 42}, - assembler: "ld #42", - }, - { - instruction: LoadConstant{Dst: RegX, Val: 42}, - assembler: "ldx #42", - }, - { - instruction: LoadConstant{Dst: 0xffff, Val: 42}, - assembler: "unknown instruction: bpf.LoadConstant{Dst:0xffff, Val:0x2a}", - }, - { - instruction: LoadScratch{Dst: RegA, N: 3}, - assembler: "ld M[3]", - }, - { - instruction: LoadScratch{Dst: RegX, N: 3}, - assembler: "ldx M[3]", - }, - { - instruction: LoadScratch{Dst: 0xffff, N: 3}, - assembler: "unknown instruction: bpf.LoadScratch{Dst:0xffff, N:3}", - }, - { - instruction: LoadAbsolute{Off: 42, Size: 1}, - assembler: "ldb [42]", - }, - { - instruction: LoadAbsolute{Off: 42, Size: 2}, - assembler: "ldh [42]", - }, - { - instruction: LoadAbsolute{Off: 42, Size: 4}, - assembler: "ld [42]", - }, - { - instruction: LoadAbsolute{Off: 42, Size: -1}, - assembler: "unknown instruction: bpf.LoadAbsolute{Off:0x2a, Size:-1}", - }, - { - instruction: LoadIndirect{Off: 42, Size: 1}, - assembler: "ldb [x + 42]", - }, - { - instruction: LoadIndirect{Off: 42, Size: 2}, - assembler: "ldh [x + 42]", - }, - { - instruction: LoadIndirect{Off: 42, Size: 4}, - assembler: "ld [x + 42]", - }, - { - instruction: LoadIndirect{Off: 42, Size: -1}, - assembler: "unknown instruction: bpf.LoadIndirect{Off:0x2a, Size:-1}", - }, - { - instruction: LoadMemShift{Off: 42}, - assembler: "ldx 4*([42]&0xf)", - }, - { - instruction: LoadExtension{Num: ExtLen}, - assembler: "ld #len", - }, - { - instruction: LoadExtension{Num: ExtProto}, - assembler: "ld #proto", - }, - { - instruction: LoadExtension{Num: ExtType}, - assembler: "ld #type", - }, - { - instruction: LoadExtension{Num: ExtPayloadOffset}, - assembler: "ld #poff", - }, - { - instruction: LoadExtension{Num: ExtInterfaceIndex}, - assembler: "ld #ifidx", - }, - { - instruction: LoadExtension{Num: ExtNetlinkAttr}, - assembler: "ld #nla", - }, - { - instruction: LoadExtension{Num: ExtNetlinkAttrNested}, - assembler: "ld #nlan", - }, - { - instruction: LoadExtension{Num: ExtMark}, - assembler: "ld #mark", - }, - { - instruction: LoadExtension{Num: ExtQueue}, - assembler: "ld #queue", - }, - { - instruction: LoadExtension{Num: ExtLinkLayerType}, - assembler: "ld #hatype", - }, - { - instruction: LoadExtension{Num: ExtRXHash}, - assembler: "ld #rxhash", - }, - { - instruction: LoadExtension{Num: ExtCPUID}, - assembler: "ld #cpu", - }, - { - instruction: LoadExtension{Num: ExtVLANTag}, - assembler: "ld #vlan_tci", - }, - { - instruction: LoadExtension{Num: ExtVLANTagPresent}, - assembler: "ld #vlan_avail", - }, - { - instruction: LoadExtension{Num: ExtVLANProto}, - assembler: "ld #vlan_tpid", - }, - { - instruction: LoadExtension{Num: ExtRand}, - assembler: "ld #rand", - }, - { - instruction: LoadAbsolute{Off: 0xfffff038, Size: 4}, - assembler: "ld #rand", - }, - { - instruction: LoadExtension{Num: 0xfff}, - assembler: "unknown instruction: bpf.LoadExtension{Num:4095}", - }, - { - instruction: StoreScratch{Src: RegA, N: 3}, - assembler: "st M[3]", - }, - { - instruction: StoreScratch{Src: RegX, N: 3}, - assembler: "stx M[3]", - }, - { - instruction: StoreScratch{Src: 0xffff, N: 3}, - assembler: "unknown instruction: bpf.StoreScratch{Src:0xffff, N:3}", - }, - { - instruction: ALUOpConstant{Op: ALUOpAdd, Val: 42}, - assembler: "add #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpSub, Val: 42}, - assembler: "sub #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpMul, Val: 42}, - assembler: "mul #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpDiv, Val: 42}, - assembler: "div #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpOr, Val: 42}, - assembler: "or #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpAnd, Val: 42}, - assembler: "and #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpShiftLeft, Val: 42}, - assembler: "lsh #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpShiftRight, Val: 42}, - assembler: "rsh #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpMod, Val: 42}, - assembler: "mod #42", - }, - { - instruction: ALUOpConstant{Op: ALUOpXor, Val: 42}, - assembler: "xor #42", - }, - { - instruction: ALUOpConstant{Op: 0xffff, Val: 42}, - assembler: "unknown instruction: bpf.ALUOpConstant{Op:0xffff, Val:0x2a}", - }, - { - instruction: ALUOpX{Op: ALUOpAdd}, - assembler: "add x", - }, - { - instruction: ALUOpX{Op: ALUOpSub}, - assembler: "sub x", - }, - { - instruction: ALUOpX{Op: ALUOpMul}, - assembler: "mul x", - }, - { - instruction: ALUOpX{Op: ALUOpDiv}, - assembler: "div x", - }, - { - instruction: ALUOpX{Op: ALUOpOr}, - assembler: "or x", - }, - { - instruction: ALUOpX{Op: ALUOpAnd}, - assembler: "and x", - }, - { - instruction: ALUOpX{Op: ALUOpShiftLeft}, - assembler: "lsh x", - }, - { - instruction: ALUOpX{Op: ALUOpShiftRight}, - assembler: "rsh x", - }, - { - instruction: ALUOpX{Op: ALUOpMod}, - assembler: "mod x", - }, - { - instruction: ALUOpX{Op: ALUOpXor}, - assembler: "xor x", - }, - { - instruction: ALUOpX{Op: 0xffff}, - assembler: "unknown instruction: bpf.ALUOpX{Op:0xffff}", - }, - { - instruction: NegateA{}, - assembler: "neg", - }, - { - instruction: Jump{Skip: 10}, - assembler: "ja 10", - }, - { - instruction: JumpIf{Cond: JumpEqual, Val: 42, SkipTrue: 8, SkipFalse: 9}, - assembler: "jeq #42,8,9", - }, - { - instruction: JumpIf{Cond: JumpEqual, Val: 42, SkipTrue: 8}, - assembler: "jeq #42,8", - }, - { - instruction: JumpIf{Cond: JumpEqual, Val: 42, SkipFalse: 8}, - assembler: "jneq #42,8", - }, - { - instruction: JumpIf{Cond: JumpNotEqual, Val: 42, SkipTrue: 8}, - assembler: "jneq #42,8", - }, - { - instruction: JumpIf{Cond: JumpLessThan, Val: 42, SkipTrue: 7}, - assembler: "jlt #42,7", - }, - { - instruction: JumpIf{Cond: JumpLessOrEqual, Val: 42, SkipTrue: 6}, - assembler: "jle #42,6", - }, - { - instruction: JumpIf{Cond: JumpGreaterThan, Val: 42, SkipTrue: 4, SkipFalse: 5}, - assembler: "jgt #42,4,5", - }, - { - instruction: JumpIf{Cond: JumpGreaterThan, Val: 42, SkipTrue: 4}, - assembler: "jgt #42,4", - }, - { - instruction: JumpIf{Cond: JumpGreaterOrEqual, Val: 42, SkipTrue: 3, SkipFalse: 4}, - assembler: "jge #42,3,4", - }, - { - instruction: JumpIf{Cond: JumpGreaterOrEqual, Val: 42, SkipTrue: 3}, - assembler: "jge #42,3", - }, - { - instruction: JumpIf{Cond: JumpBitsSet, Val: 42, SkipTrue: 2, SkipFalse: 3}, - assembler: "jset #42,2,3", - }, - { - instruction: JumpIf{Cond: JumpBitsSet, Val: 42, SkipTrue: 2}, - assembler: "jset #42,2", - }, - { - instruction: JumpIf{Cond: JumpBitsNotSet, Val: 42, SkipTrue: 2, SkipFalse: 3}, - assembler: "jset #42,3,2", - }, - { - instruction: JumpIf{Cond: JumpBitsNotSet, Val: 42, SkipTrue: 2}, - assembler: "jset #42,0,2", - }, - { - instruction: JumpIf{Cond: 0xffff, Val: 42, SkipTrue: 1, SkipFalse: 2}, - assembler: "unknown JumpTest 0xffff", - }, - { - instruction: JumpIfX{Cond: JumpEqual, SkipTrue: 8, SkipFalse: 9}, - assembler: "jeq x,8,9", - }, - { - instruction: JumpIfX{Cond: JumpEqual, SkipTrue: 8}, - assembler: "jeq x,8", - }, - { - instruction: JumpIfX{Cond: JumpEqual, SkipFalse: 8}, - assembler: "jneq x,8", - }, - { - instruction: JumpIfX{Cond: JumpNotEqual, SkipTrue: 8}, - assembler: "jneq x,8", - }, - { - instruction: JumpIfX{Cond: JumpLessThan, SkipTrue: 7}, - assembler: "jlt x,7", - }, - { - instruction: JumpIfX{Cond: JumpLessOrEqual, SkipTrue: 6}, - assembler: "jle x,6", - }, - { - instruction: JumpIfX{Cond: JumpGreaterThan, SkipTrue: 4, SkipFalse: 5}, - assembler: "jgt x,4,5", - }, - { - instruction: JumpIfX{Cond: JumpGreaterThan, SkipTrue: 4}, - assembler: "jgt x,4", - }, - { - instruction: JumpIfX{Cond: JumpGreaterOrEqual, SkipTrue: 3, SkipFalse: 4}, - assembler: "jge x,3,4", - }, - { - instruction: JumpIfX{Cond: JumpGreaterOrEqual, SkipTrue: 3}, - assembler: "jge x,3", - }, - { - instruction: JumpIfX{Cond: JumpBitsSet, SkipTrue: 2, SkipFalse: 3}, - assembler: "jset x,2,3", - }, - { - instruction: JumpIfX{Cond: JumpBitsSet, SkipTrue: 2}, - assembler: "jset x,2", - }, - { - instruction: JumpIfX{Cond: JumpBitsNotSet, SkipTrue: 2, SkipFalse: 3}, - assembler: "jset x,3,2", - }, - { - instruction: JumpIfX{Cond: JumpBitsNotSet, SkipTrue: 2}, - assembler: "jset x,0,2", - }, - { - instruction: JumpIfX{Cond: 0xffff, SkipTrue: 1, SkipFalse: 2}, - assembler: "unknown JumpTest 0xffff", - }, - { - instruction: TAX{}, - assembler: "tax", - }, - { - instruction: TXA{}, - assembler: "txa", - }, - { - instruction: RetA{}, - assembler: "ret a", - }, - { - instruction: RetConstant{Val: 42}, - assembler: "ret #42", - }, - // Invalid instruction - { - instruction: InvalidInstruction{}, - assembler: "unknown instruction: bpf.InvalidInstruction{}", - }, - } - - for _, testCase := range testCases { - if input, ok := testCase.instruction.(fmt.Stringer); ok { - got := input.String() - if got != testCase.assembler { - t.Errorf("String did not return expected assembler notation, expected: %s, got: %s", testCase.assembler, got) - } - } else { - t.Errorf("Instruction %#v is not a fmt.Stringer", testCase.instruction) - } - } -} diff --git a/vendor/golang.org/x/net/bpf/setter.go b/vendor/golang.org/x/net/bpf/setter.go deleted file mode 100644 index 43e35f0a..00000000 --- a/vendor/golang.org/x/net/bpf/setter.go +++ /dev/null @@ -1,10 +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 bpf - -// A Setter is a type which can attach a compiled BPF filter to itself. -type Setter interface { - SetBPF(filter []RawInstruction) error -} diff --git a/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf b/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf deleted file mode 100644 index 929eb25a..00000000 --- a/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf +++ /dev/null @@ -1 +0,0 @@ -57,0 0 0 42,1 0 0 42,96 0 0 3,97 0 0 3,48 0 0 42,40 0 0 42,32 0 0 42,80 0 0 42,72 0 0 42,64 0 0 42,177 0 0 42,128 0 0 0,32 0 0 4294963200,32 0 0 4294963204,32 0 0 4294963256,2 0 0 3,3 0 0 3,4 0 0 42,20 0 0 42,36 0 0 42,52 0 0 42,68 0 0 42,84 0 0 42,100 0 0 42,116 0 0 42,148 0 0 42,164 0 0 42,12 0 0 0,28 0 0 0,44 0 0 0,60 0 0 0,76 0 0 0,92 0 0 0,108 0 0 0,124 0 0 0,156 0 0 0,172 0 0 0,132 0 0 0,5 0 0 17,21 15 16 42,21 0 15 42,53 0 14 42,37 0 13 42,37 11 12 42,53 10 11 42,69 9 10 42,29 8 9 0,29 0 8 0,61 0 7 0,45 0 6 0,45 4 5 0,61 3 4 0,77 2 3 0,7 0 0 0,135 0 0 0,22 0 0 0,6 0 0 42, diff --git a/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt b/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt deleted file mode 100644 index 8e4d7587..00000000 --- a/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This filter is compiled to all_instructions.bpf by the `bpf_asm` -# tool, which can be found in the linux kernel source tree under -# tools/bpf. - -# Load immediate -ld #42 -ldx #42 - -# Load scratch -ld M[3] -ldx M[3] - -# Load absolute -ldb [42] -ldh [42] -ld [42] - -# Load indirect -ldb [x + 42] -ldh [x + 42] -ld [x + 42] - -# Load IPv4 header length -ldx 4*([42]&0xf) - -# Run extension function -ld #len -ld #proto -ld #type -ld #rand - -# Store scratch -st M[3] -stx M[3] - -# A constant -add #42 -sub #42 -mul #42 -div #42 -or #42 -and #42 -lsh #42 -rsh #42 -mod #42 -xor #42 - -# A X -add x -sub x -mul x -div x -or x -and x -lsh x -rsh x -mod x -xor x - -# !A -neg - -# Jump A constant -ja end -jeq #42,prev,end -jne #42,end -jlt #42,end -jle #42,end -jgt #42,prev,end -jge #42,prev,end -jset #42,prev,end - -# Jump A X -jeq x,prev,end -jne x,end -jlt x,end -jle x,end -jgt x,prev,end -jge x,prev,end -jset x,prev,end - -# Register transfers -tax -txa - -# Returns -prev: ret a -end: ret #42 diff --git a/vendor/golang.org/x/net/bpf/vm.go b/vendor/golang.org/x/net/bpf/vm.go deleted file mode 100644 index 73f57f1f..00000000 --- a/vendor/golang.org/x/net/bpf/vm.go +++ /dev/null @@ -1,150 +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 bpf - -import ( - "errors" - "fmt" -) - -// A VM is an emulated BPF virtual machine. -type VM struct { - filter []Instruction -} - -// NewVM returns a new VM using the input BPF program. -func NewVM(filter []Instruction) (*VM, error) { - if len(filter) == 0 { - return nil, errors.New("one or more Instructions must be specified") - } - - for i, ins := range filter { - check := len(filter) - (i + 1) - switch ins := ins.(type) { - // Check for out-of-bounds jumps in instructions - case Jump: - if check <= int(ins.Skip) { - return nil, fmt.Errorf("cannot jump %d instructions; jumping past program bounds", ins.Skip) - } - case JumpIf: - if check <= int(ins.SkipTrue) { - return nil, fmt.Errorf("cannot jump %d instructions in true case; jumping past program bounds", ins.SkipTrue) - } - if check <= int(ins.SkipFalse) { - return nil, fmt.Errorf("cannot jump %d instructions in false case; jumping past program bounds", ins.SkipFalse) - } - case JumpIfX: - if check <= int(ins.SkipTrue) { - return nil, fmt.Errorf("cannot jump %d instructions in true case; jumping past program bounds", ins.SkipTrue) - } - if check <= int(ins.SkipFalse) { - return nil, fmt.Errorf("cannot jump %d instructions in false case; jumping past program bounds", ins.SkipFalse) - } - // Check for division or modulus by zero - case ALUOpConstant: - if ins.Val != 0 { - break - } - - switch ins.Op { - case ALUOpDiv, ALUOpMod: - return nil, errors.New("cannot divide by zero using ALUOpConstant") - } - // Check for unknown extensions - case LoadExtension: - switch ins.Num { - case ExtLen: - default: - return nil, fmt.Errorf("extension %d not implemented", ins.Num) - } - } - } - - // Make sure last instruction is a return instruction - switch filter[len(filter)-1].(type) { - case RetA, RetConstant: - default: - return nil, errors.New("BPF program must end with RetA or RetConstant") - } - - // Though our VM works using disassembled instructions, we - // attempt to assemble the input filter anyway to ensure it is compatible - // with an operating system VM. - _, err := Assemble(filter) - - return &VM{ - filter: filter, - }, err -} - -// Run runs the VM's BPF program against the input bytes. -// Run returns the number of bytes accepted by the BPF program, and any errors -// which occurred while processing the program. -func (v *VM) Run(in []byte) (int, error) { - var ( - // Registers of the virtual machine - regA uint32 - regX uint32 - regScratch [16]uint32 - - // OK is true if the program should continue processing the next - // instruction, or false if not, causing the loop to break - ok = true - ) - - // TODO(mdlayher): implement: - // - NegateA: - // - would require a change from uint32 registers to int32 - // registers - - // TODO(mdlayher): add interop tests that check signedness of ALU - // operations against kernel implementation, and make sure Go - // implementation matches behavior - - for i := 0; i < len(v.filter) && ok; i++ { - ins := v.filter[i] - - switch ins := ins.(type) { - case ALUOpConstant: - regA = aluOpConstant(ins, regA) - case ALUOpX: - regA, ok = aluOpX(ins, regA, regX) - case Jump: - i += int(ins.Skip) - case JumpIf: - jump := jumpIf(ins, regA) - i += jump - case JumpIfX: - jump := jumpIfX(ins, regA, regX) - i += jump - case LoadAbsolute: - regA, ok = loadAbsolute(ins, in) - case LoadConstant: - regA, regX = loadConstant(ins, regA, regX) - case LoadExtension: - regA = loadExtension(ins, in) - case LoadIndirect: - regA, ok = loadIndirect(ins, in, regX) - case LoadMemShift: - regX, ok = loadMemShift(ins, in) - case LoadScratch: - regA, regX = loadScratch(ins, regScratch, regA, regX) - case RetA: - return int(regA), nil - case RetConstant: - return int(ins.Val), nil - case StoreScratch: - regScratch = storeScratch(ins, regScratch, regA, regX) - case TAX: - regX = regA - case TXA: - regA = regX - default: - return 0, fmt.Errorf("unknown Instruction at index %d: %T", i, ins) - } - } - - return 0, nil -} diff --git a/vendor/golang.org/x/net/bpf/vm_aluop_test.go b/vendor/golang.org/x/net/bpf/vm_aluop_test.go deleted file mode 100644 index 16678244..00000000 --- a/vendor/golang.org/x/net/bpf/vm_aluop_test.go +++ /dev/null @@ -1,512 +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 bpf_test - -import ( - "testing" - - "golang.org/x/net/bpf" -) - -func TestVMALUOpAdd(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpAdd, - Val: 3, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 8, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 3, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpSub(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.TAX{}, - bpf.ALUOpX{ - Op: bpf.ALUOpSub, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpMul(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpMul, - Val: 2, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 6, 2, 3, 4, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpDiv(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpDiv, - Val: 2, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 20, 2, 3, 4, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpDivByZeroALUOpConstant(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.ALUOpConstant{ - Op: bpf.ALUOpDiv, - Val: 0, - }, - bpf.RetA{}, - }) - if errStr(err) != "cannot divide by zero using ALUOpConstant" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMALUOpDivByZeroALUOpX(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - // Load byte 0 into X - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.TAX{}, - // Load byte 1 into A - bpf.LoadAbsolute{ - Off: 9, - Size: 1, - }, - // Attempt to perform 1/0 - bpf.ALUOpX{ - Op: bpf.ALUOpDiv, - }, - // Return 4 bytes if program does not terminate - bpf.LoadConstant{ - Val: 12, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 3, 4, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpOr(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 2, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpOr, - Val: 0x01, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x00, 0x10, 0x03, 0x04, - 0x05, 0x06, 0x07, 0x08, - 0x09, 0xff, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 9, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpAnd(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 2, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpAnd, - Val: 0x0019, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0xaa, 0x09, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpShiftLeft(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpShiftLeft, - Val: 0x01, - }, - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 0x02, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x01, 0xaa, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpShiftRight(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpShiftRight, - Val: 0x01, - }, - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 0x04, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x08, 0xff, 0xff, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpMod(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpMod, - Val: 20, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 30, 0, 0, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpModByZeroALUOpConstant(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpMod, - Val: 0, - }, - bpf.RetA{}, - }) - if errStr(err) != "cannot divide by zero using ALUOpConstant" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMALUOpModByZeroALUOpX(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - // Load byte 0 into X - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.TAX{}, - // Load byte 1 into A - bpf.LoadAbsolute{ - Off: 9, - Size: 1, - }, - // Attempt to perform 1%0 - bpf.ALUOpX{ - Op: bpf.ALUOpMod, - }, - // Return 4 bytes if program does not terminate - bpf.LoadConstant{ - Val: 12, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 3, 4, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpXor(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpXor, - Val: 0x0a, - }, - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 0x01, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x0b, 0x00, 0x00, 0x00, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMALUOpUnknown(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.ALUOpConstant{ - Op: bpf.ALUOpAdd, - Val: 1, - }, - // Verify that an unknown operation is a no-op - bpf.ALUOpConstant{ - Op: 100, - }, - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 0x02, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} diff --git a/vendor/golang.org/x/net/bpf/vm_bpf_test.go b/vendor/golang.org/x/net/bpf/vm_bpf_test.go deleted file mode 100644 index 137eea16..00000000 --- a/vendor/golang.org/x/net/bpf/vm_bpf_test.go +++ /dev/null @@ -1,199 +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 bpf_test - -import ( - "net" - "runtime" - "testing" - "time" - - "golang.org/x/net/bpf" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" - "golang.org/x/net/nettest" -) - -// A virtualMachine is a BPF virtual machine which can process an -// input packet against a BPF program and render a verdict. -type virtualMachine interface { - Run(in []byte) (int, error) -} - -// canUseOSVM indicates if the OS BPF VM is available on this platform. -func canUseOSVM() bool { - // OS BPF VM can only be used on platforms where x/net/ipv4 supports - // attaching a BPF program to a socket. - switch runtime.GOOS { - case "linux": - return true - } - - return false -} - -// All BPF tests against both the Go VM and OS VM are assumed to -// be used with a UDP socket. As a result, the entire contents -// of a UDP datagram is sent through the BPF program, but only -// the body after the UDP header will ever be returned in output. - -// testVM sets up a Go BPF VM, and if available, a native OS BPF VM -// for integration testing. -func testVM(t *testing.T, filter []bpf.Instruction) (virtualMachine, func(), error) { - goVM, err := bpf.NewVM(filter) - if err != nil { - // Some tests expect an error, so this error must be returned - // instead of fatally exiting the test - return nil, nil, err - } - - mvm := &multiVirtualMachine{ - goVM: goVM, - - t: t, - } - - // If available, add the OS VM for tests which verify that both the Go - // VM and OS VM have exactly the same output for the same input program - // and packet. - done := func() {} - if canUseOSVM() { - osVM, osVMDone := testOSVM(t, filter) - done = func() { osVMDone() } - mvm.osVM = osVM - } - - return mvm, done, nil -} - -// udpHeaderLen is the length of a UDP header. -const udpHeaderLen = 8 - -// A multiVirtualMachine is a virtualMachine which can call out to both the Go VM -// and the native OS VM, if the OS VM is available. -type multiVirtualMachine struct { - goVM virtualMachine - osVM virtualMachine - - t *testing.T -} - -func (mvm *multiVirtualMachine) Run(in []byte) (int, error) { - if len(in) < udpHeaderLen { - mvm.t.Fatalf("input must be at least length of UDP header (%d), got: %d", - udpHeaderLen, len(in)) - } - - // All tests have a UDP header as part of input, because the OS VM - // packets always will. For the Go VM, this output is trimmed before - // being sent back to tests. - goOut, goErr := mvm.goVM.Run(in) - if goOut >= udpHeaderLen { - goOut -= udpHeaderLen - } - - // If Go output is larger than the size of the packet, packet filtering - // interop tests must trim the output bytes to the length of the packet. - // The BPF VM should not do this on its own, as other uses of it do - // not trim the output byte count. - trim := len(in) - udpHeaderLen - if goOut > trim { - goOut = trim - } - - // When the OS VM is not available, process using the Go VM alone - if mvm.osVM == nil { - return goOut, goErr - } - - // The OS VM will apply its own UDP header, so remove the pseudo header - // that the Go VM needs. - osOut, err := mvm.osVM.Run(in[udpHeaderLen:]) - if err != nil { - mvm.t.Fatalf("error while running OS VM: %v", err) - } - - // Verify both VMs return same number of bytes - var mismatch bool - if goOut != osOut { - mismatch = true - mvm.t.Logf("output byte count does not match:\n- go: %v\n- os: %v", goOut, osOut) - } - - if mismatch { - mvm.t.Fatal("Go BPF and OS BPF packet outputs do not match") - } - - return goOut, goErr -} - -// An osVirtualMachine is a virtualMachine which uses the OS's BPF VM for -// processing BPF programs. -type osVirtualMachine struct { - l net.PacketConn - s net.Conn -} - -// testOSVM creates a virtualMachine which uses the OS's BPF VM by injecting -// packets into a UDP listener with a BPF program attached to it. -func testOSVM(t *testing.T, filter []bpf.Instruction) (virtualMachine, func()) { - l, err := nettest.NewLocalPacketListener("udp") - if err != nil { - t.Fatalf("failed to open OS VM UDP listener: %v", err) - } - - prog, err := bpf.Assemble(filter) - if err != nil { - t.Fatalf("failed to compile BPF program: %v", err) - } - - ip := l.LocalAddr().(*net.UDPAddr).IP - if ip.To4() != nil && ip.To16() == nil { - err = ipv4.NewPacketConn(l).SetBPF(prog) - } else { - err = ipv6.NewPacketConn(l).SetBPF(prog) - } - if err != nil { - t.Fatalf("failed to attach BPF program to listener: %v", err) - } - - s, err := net.Dial(l.LocalAddr().Network(), l.LocalAddr().String()) - if err != nil { - t.Fatalf("failed to dial connection to listener: %v", err) - } - - done := func() { - _ = s.Close() - _ = l.Close() - } - - return &osVirtualMachine{ - l: l, - s: s, - }, done -} - -// Run sends the input bytes into the OS's BPF VM and returns its verdict. -func (vm *osVirtualMachine) Run(in []byte) (int, error) { - go func() { - _, _ = vm.s.Write(in) - }() - - vm.l.SetDeadline(time.Now().Add(50 * time.Millisecond)) - - var b [512]byte - n, _, err := vm.l.ReadFrom(b[:]) - if err != nil { - // A timeout indicates that BPF filtered out the packet, and thus, - // no input should be returned. - if nerr, ok := err.(net.Error); ok && nerr.Timeout() { - return n, nil - } - - return n, err - } - - return n, nil -} diff --git a/vendor/golang.org/x/net/bpf/vm_extension_test.go b/vendor/golang.org/x/net/bpf/vm_extension_test.go deleted file mode 100644 index 7a48c82f..00000000 --- a/vendor/golang.org/x/net/bpf/vm_extension_test.go +++ /dev/null @@ -1,49 +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 bpf_test - -import ( - "testing" - - "golang.org/x/net/bpf" -) - -func TestVMLoadExtensionNotImplemented(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.LoadExtension{ - Num: 100, - }, - bpf.RetA{}, - }) - if errStr(err) != "extension 100 not implemented" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMLoadExtensionExtLen(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadExtension{ - Num: bpf.ExtLen, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} diff --git a/vendor/golang.org/x/net/bpf/vm_instructions.go b/vendor/golang.org/x/net/bpf/vm_instructions.go deleted file mode 100644 index cf8947c3..00000000 --- a/vendor/golang.org/x/net/bpf/vm_instructions.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package bpf - -import ( - "encoding/binary" - "fmt" -) - -func aluOpConstant(ins ALUOpConstant, regA uint32) uint32 { - return aluOpCommon(ins.Op, regA, ins.Val) -} - -func aluOpX(ins ALUOpX, regA uint32, regX uint32) (uint32, bool) { - // Guard against division or modulus by zero by terminating - // the program, as the OS BPF VM does - if regX == 0 { - switch ins.Op { - case ALUOpDiv, ALUOpMod: - return 0, false - } - } - - return aluOpCommon(ins.Op, regA, regX), true -} - -func aluOpCommon(op ALUOp, regA uint32, value uint32) uint32 { - switch op { - case ALUOpAdd: - return regA + value - case ALUOpSub: - return regA - value - case ALUOpMul: - return regA * value - case ALUOpDiv: - // Division by zero not permitted by NewVM and aluOpX checks - return regA / value - case ALUOpOr: - return regA | value - case ALUOpAnd: - return regA & value - case ALUOpShiftLeft: - return regA << value - case ALUOpShiftRight: - return regA >> value - case ALUOpMod: - // Modulus by zero not permitted by NewVM and aluOpX checks - return regA % value - case ALUOpXor: - return regA ^ value - default: - return regA - } -} - -func jumpIf(ins JumpIf, regA uint32) int { - return jumpIfCommon(ins.Cond, ins.SkipTrue, ins.SkipFalse, regA, ins.Val) -} - -func jumpIfX(ins JumpIfX, regA uint32, regX uint32) int { - return jumpIfCommon(ins.Cond, ins.SkipTrue, ins.SkipFalse, regA, regX) -} - -func jumpIfCommon(cond JumpTest, skipTrue, skipFalse uint8, regA uint32, value uint32) int { - var ok bool - - switch cond { - case JumpEqual: - ok = regA == value - case JumpNotEqual: - ok = regA != value - case JumpGreaterThan: - ok = regA > value - case JumpLessThan: - ok = regA < value - case JumpGreaterOrEqual: - ok = regA >= value - case JumpLessOrEqual: - ok = regA <= value - case JumpBitsSet: - ok = (regA & value) != 0 - case JumpBitsNotSet: - ok = (regA & value) == 0 - } - - if ok { - return int(skipTrue) - } - - return int(skipFalse) -} - -func loadAbsolute(ins LoadAbsolute, in []byte) (uint32, bool) { - offset := int(ins.Off) - size := int(ins.Size) - - return loadCommon(in, offset, size) -} - -func loadConstant(ins LoadConstant, regA uint32, regX uint32) (uint32, uint32) { - switch ins.Dst { - case RegA: - regA = ins.Val - case RegX: - regX = ins.Val - } - - return regA, regX -} - -func loadExtension(ins LoadExtension, in []byte) uint32 { - switch ins.Num { - case ExtLen: - return uint32(len(in)) - default: - panic(fmt.Sprintf("unimplemented extension: %d", ins.Num)) - } -} - -func loadIndirect(ins LoadIndirect, in []byte, regX uint32) (uint32, bool) { - offset := int(ins.Off) + int(regX) - size := int(ins.Size) - - return loadCommon(in, offset, size) -} - -func loadMemShift(ins LoadMemShift, in []byte) (uint32, bool) { - offset := int(ins.Off) - - // Size of LoadMemShift is always 1 byte - if !inBounds(len(in), offset, 1) { - return 0, false - } - - // Mask off high 4 bits and multiply low 4 bits by 4 - return uint32(in[offset]&0x0f) * 4, true -} - -func inBounds(inLen int, offset int, size int) bool { - return offset+size <= inLen -} - -func loadCommon(in []byte, offset int, size int) (uint32, bool) { - if !inBounds(len(in), offset, size) { - return 0, false - } - - switch size { - case 1: - return uint32(in[offset]), true - case 2: - return uint32(binary.BigEndian.Uint16(in[offset : offset+size])), true - case 4: - return uint32(binary.BigEndian.Uint32(in[offset : offset+size])), true - default: - panic(fmt.Sprintf("invalid load size: %d", size)) - } -} - -func loadScratch(ins LoadScratch, regScratch [16]uint32, regA uint32, regX uint32) (uint32, uint32) { - switch ins.Dst { - case RegA: - regA = regScratch[ins.N] - case RegX: - regX = regScratch[ins.N] - } - - return regA, regX -} - -func storeScratch(ins StoreScratch, regScratch [16]uint32, regA uint32, regX uint32) [16]uint32 { - switch ins.Src { - case RegA: - regScratch[ins.N] = regA - case RegX: - regScratch[ins.N] = regX - } - - return regScratch -} diff --git a/vendor/golang.org/x/net/bpf/vm_jump_test.go b/vendor/golang.org/x/net/bpf/vm_jump_test.go deleted file mode 100644 index 77a2d470..00000000 --- a/vendor/golang.org/x/net/bpf/vm_jump_test.go +++ /dev/null @@ -1,726 +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 bpf_test - -import ( - "testing" - - "golang.org/x/net/bpf" -) - -func TestVMJumpOne(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.Jump{ - Skip: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpOutOfProgram(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.Jump{ - Skip: 1, - }, - bpf.RetA{}, - }) - if errStr(err) != "cannot jump 1 instructions; jumping past program bounds" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMJumpIfTrueOutOfProgram(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.JumpIf{ - Cond: bpf.JumpEqual, - SkipTrue: 2, - }, - bpf.RetA{}, - }) - if errStr(err) != "cannot jump 2 instructions in true case; jumping past program bounds" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMJumpIfFalseOutOfProgram(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.JumpIf{ - Cond: bpf.JumpEqual, - SkipFalse: 3, - }, - bpf.RetA{}, - }) - if errStr(err) != "cannot jump 3 instructions in false case; jumping past program bounds" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMJumpIfXTrueOutOfProgram(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.JumpIfX{ - Cond: bpf.JumpEqual, - SkipTrue: 2, - }, - bpf.RetA{}, - }) - if errStr(err) != "cannot jump 2 instructions in true case; jumping past program bounds" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMJumpIfXFalseOutOfProgram(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.JumpIfX{ - Cond: bpf.JumpEqual, - SkipFalse: 3, - }, - bpf.RetA{}, - }) - if errStr(err) != "cannot jump 3 instructions in false case; jumping past program bounds" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMJumpIfEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 1, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfNotEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.JumpIf{ - Cond: bpf.JumpNotEqual, - Val: 1, - SkipFalse: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfGreaterThan(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.JumpIf{ - Cond: bpf.JumpGreaterThan, - Val: 0x00010202, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfLessThan(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.JumpIf{ - Cond: bpf.JumpLessThan, - Val: 0xff010203, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfGreaterOrEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.JumpIf{ - Cond: bpf.JumpGreaterOrEqual, - Val: 0x00010203, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfLessOrEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.JumpIf{ - Cond: bpf.JumpLessOrEqual, - Val: 0xff010203, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfBitsSet(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 2, - }, - bpf.JumpIf{ - Cond: bpf.JumpBitsSet, - Val: 0x1122, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 10, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x01, 0x02, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfBitsNotSet(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 2, - }, - bpf.JumpIf{ - Cond: bpf.JumpBitsNotSet, - Val: 0x1221, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 10, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x01, 0x02, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 1, - }, - bpf.JumpIfX{ - Cond: bpf.JumpEqual, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXNotEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 1, - }, - bpf.JumpIfX{ - Cond: bpf.JumpNotEqual, - SkipFalse: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXGreaterThan(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 0x00010202, - }, - bpf.JumpIfX{ - Cond: bpf.JumpGreaterThan, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXLessThan(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 0xff010203, - }, - bpf.JumpIfX{ - Cond: bpf.JumpLessThan, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXGreaterOrEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 0x00010203, - }, - bpf.JumpIfX{ - Cond: bpf.JumpGreaterOrEqual, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXLessOrEqual(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 4, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 0xff010203, - }, - bpf.JumpIfX{ - Cond: bpf.JumpLessOrEqual, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 12, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 4, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXBitsSet(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 2, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 0x1122, - }, - bpf.JumpIfX{ - Cond: bpf.JumpBitsSet, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 10, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x01, 0x02, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMJumpIfXBitsNotSet(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 2, - }, - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 0x1221, - }, - bpf.JumpIfX{ - Cond: bpf.JumpBitsNotSet, - SkipTrue: 1, - }, - bpf.RetConstant{ - Val: 0, - }, - bpf.RetConstant{ - Val: 10, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x01, 0x02, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} diff --git a/vendor/golang.org/x/net/bpf/vm_load_test.go b/vendor/golang.org/x/net/bpf/vm_load_test.go deleted file mode 100644 index d57e4af1..00000000 --- a/vendor/golang.org/x/net/bpf/vm_load_test.go +++ /dev/null @@ -1,258 +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 bpf_test - -import ( - "net" - "testing" - - "golang.org/x/net/bpf" - "golang.org/x/net/ipv4" -) - -func TestVMLoadAbsoluteOffsetOutOfBounds(t *testing.T) { - pkt := []byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, 2, 3, - } - - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: uint32(len(pkt)), - Size: 1, - }, - // Out of bounds should return 0, return 1 to tell if execution continued - bpf.RetConstant{Val: 1}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run(pkt) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected result:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMLoadAbsoluteOffsetPlusSizeOutOfBounds(t *testing.T) { - pkt := []byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, - } - - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: uint32(len(pkt) - 1), - Size: 2, - }, - // Out of bounds should return 0, return 1 to tell if execution continued - bpf.RetConstant{Val: 1}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run(pkt) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected result:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMLoadAbsoluteBadInstructionSize(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Size: 5, - }, - bpf.RetA{}, - }) - if errStr(err) != "assembling instruction 1: invalid load byte length 0" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMLoadConstantOK(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadConstant{ - Dst: bpf.RegX, - Val: 9, - }, - bpf.TXA{}, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMLoadIndirectOutOfBounds(t *testing.T) { - pkt := []byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, - } - - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadIndirect{ - Off: uint32(len(pkt)), - Size: 1, - }, - // Out of bounds should return 0, return 1 to tell if execution continued - bpf.RetConstant{Val: 1}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run(pkt) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected result:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMLoadMemShiftOutOfBounds(t *testing.T) { - pkt := []byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, - } - - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadMemShift{ - Off: uint32(len(pkt)), - }, - // Out of bounds should return 0, return 1 to tell if execution continued - bpf.RetConstant{Val: 1}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run(pkt) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected result:\n- want: %d\n- got: %d", - want, got) - } -} - -const ( - dhcp4Port = 53 -) - -func TestVMLoadMemShiftLoadIndirectNoResult(t *testing.T) { - vm, in, done := testDHCPv4(t) - defer done() - - // Append mostly empty UDP header with incorrect DHCPv4 port - in = append(in, []byte{ - 0, 0, - 0, dhcp4Port + 1, - 0, 0, - 0, 0, - }...) - - out, err := vm.Run(in) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 0, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMLoadMemShiftLoadIndirectOK(t *testing.T) { - vm, in, done := testDHCPv4(t) - defer done() - - // Append mostly empty UDP header with correct DHCPv4 port - in = append(in, []byte{ - 0, 0, - 0, dhcp4Port, - 0, 0, - 0, 0, - }...) - - out, err := vm.Run(in) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := len(in)-8, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func testDHCPv4(t *testing.T) (virtualMachine, []byte, func()) { - // DHCPv4 test data courtesy of David Anderson: - // https://github.com/google/netboot/blob/master/dhcp4/conn_linux.go#L59-L70 - vm, done, err := testVM(t, []bpf.Instruction{ - // Load IPv4 packet length - bpf.LoadMemShift{Off: 8}, - // Get UDP dport - bpf.LoadIndirect{Off: 8 + 2, Size: 2}, - // Correct dport? - bpf.JumpIf{Cond: bpf.JumpEqual, Val: dhcp4Port, SkipFalse: 1}, - // Accept - bpf.RetConstant{Val: 1500}, - // Ignore - bpf.RetConstant{Val: 0}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - - // Minimal requirements to make a valid IPv4 header - h := &ipv4.Header{ - Len: ipv4.HeaderLen, - Src: net.IPv4(192, 168, 1, 1), - Dst: net.IPv4(192, 168, 1, 2), - } - hb, err := h.Marshal() - if err != nil { - t.Fatalf("failed to marshal IPv4 header: %v", err) - } - - hb = append([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - }, hb...) - - return vm, hb, done -} diff --git a/vendor/golang.org/x/net/bpf/vm_ret_test.go b/vendor/golang.org/x/net/bpf/vm_ret_test.go deleted file mode 100644 index 2d86eae3..00000000 --- a/vendor/golang.org/x/net/bpf/vm_ret_test.go +++ /dev/null @@ -1,115 +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 bpf_test - -import ( - "testing" - - "golang.org/x/net/bpf" -) - -func TestVMRetA(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 9, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMRetALargerThanInput(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadAbsolute{ - Off: 8, - Size: 2, - }, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 255, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMRetConstant(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.RetConstant{ - Val: 9, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 1, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMRetConstantLargerThanInput(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.RetConstant{ - Val: 16, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0, 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} diff --git a/vendor/golang.org/x/net/bpf/vm_scratch_test.go b/vendor/golang.org/x/net/bpf/vm_scratch_test.go deleted file mode 100644 index e600e3c2..00000000 --- a/vendor/golang.org/x/net/bpf/vm_scratch_test.go +++ /dev/null @@ -1,247 +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 bpf_test - -import ( - "testing" - - "golang.org/x/net/bpf" -) - -func TestVMStoreScratchInvalidScratchRegisterTooSmall(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.StoreScratch{ - Src: bpf.RegA, - N: -1, - }, - bpf.RetA{}, - }) - if errStr(err) != "assembling instruction 1: invalid scratch slot -1" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMStoreScratchInvalidScratchRegisterTooLarge(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.StoreScratch{ - Src: bpf.RegA, - N: 16, - }, - bpf.RetA{}, - }) - if errStr(err) != "assembling instruction 1: invalid scratch slot 16" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMStoreScratchUnknownSourceRegister(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.StoreScratch{ - Src: 100, - N: 0, - }, - bpf.RetA{}, - }) - if errStr(err) != "assembling instruction 1: invalid source register 100" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMLoadScratchInvalidScratchRegisterTooSmall(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.LoadScratch{ - Dst: bpf.RegX, - N: -1, - }, - bpf.RetA{}, - }) - if errStr(err) != "assembling instruction 1: invalid scratch slot -1" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMLoadScratchInvalidScratchRegisterTooLarge(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.LoadScratch{ - Dst: bpf.RegX, - N: 16, - }, - bpf.RetA{}, - }) - if errStr(err) != "assembling instruction 1: invalid scratch slot 16" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMLoadScratchUnknownDestinationRegister(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.LoadScratch{ - Dst: 100, - N: 0, - }, - bpf.RetA{}, - }) - if errStr(err) != "assembling instruction 1: invalid target register 100" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMStoreScratchLoadScratchOneValue(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - // Load byte 255 - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - // Copy to X and store in scratch[0] - bpf.TAX{}, - bpf.StoreScratch{ - Src: bpf.RegX, - N: 0, - }, - // Load byte 1 - bpf.LoadAbsolute{ - Off: 9, - Size: 1, - }, - // Overwrite 1 with 255 from scratch[0] - bpf.LoadScratch{ - Dst: bpf.RegA, - N: 0, - }, - // Return 255 - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 255, 1, 2, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 3, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} - -func TestVMStoreScratchLoadScratchMultipleValues(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - // Load byte 10 - bpf.LoadAbsolute{ - Off: 8, - Size: 1, - }, - // Store in scratch[0] - bpf.StoreScratch{ - Src: bpf.RegA, - N: 0, - }, - // Load byte 20 - bpf.LoadAbsolute{ - Off: 9, - Size: 1, - }, - // Store in scratch[1] - bpf.StoreScratch{ - Src: bpf.RegA, - N: 1, - }, - // Load byte 30 - bpf.LoadAbsolute{ - Off: 10, - Size: 1, - }, - // Store in scratch[2] - bpf.StoreScratch{ - Src: bpf.RegA, - N: 2, - }, - // Load byte 1 - bpf.LoadAbsolute{ - Off: 11, - Size: 1, - }, - // Store in scratch[3] - bpf.StoreScratch{ - Src: bpf.RegA, - N: 3, - }, - // Load in byte 10 to X - bpf.LoadScratch{ - Dst: bpf.RegX, - N: 0, - }, - // Copy X -> A - bpf.TXA{}, - // Verify value is 10 - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 10, - SkipTrue: 1, - }, - // Fail test if incorrect - bpf.RetConstant{ - Val: 0, - }, - // Load in byte 20 to A - bpf.LoadScratch{ - Dst: bpf.RegA, - N: 1, - }, - // Verify value is 20 - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 20, - SkipTrue: 1, - }, - // Fail test if incorrect - bpf.RetConstant{ - Val: 0, - }, - // Load in byte 30 to A - bpf.LoadScratch{ - Dst: bpf.RegA, - N: 2, - }, - // Verify value is 30 - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: 30, - SkipTrue: 1, - }, - // Fail test if incorrect - bpf.RetConstant{ - Val: 0, - }, - // Return first two bytes on success - bpf.RetConstant{ - Val: 10, - }, - }) - if err != nil { - t.Fatalf("failed to load BPF program: %v", err) - } - defer done() - - out, err := vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 10, 20, 30, 1, - }) - if err != nil { - t.Fatalf("unexpected error while running program: %v", err) - } - if want, got := 2, out; want != got { - t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", - want, got) - } -} diff --git a/vendor/golang.org/x/net/bpf/vm_test.go b/vendor/golang.org/x/net/bpf/vm_test.go deleted file mode 100644 index 6bd4dd5c..00000000 --- a/vendor/golang.org/x/net/bpf/vm_test.go +++ /dev/null @@ -1,144 +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 bpf_test - -import ( - "fmt" - "testing" - - "golang.org/x/net/bpf" -) - -var _ bpf.Instruction = unknown{} - -type unknown struct{} - -func (unknown) Assemble() (bpf.RawInstruction, error) { - return bpf.RawInstruction{}, nil -} - -func TestVMUnknownInstruction(t *testing.T) { - vm, done, err := testVM(t, []bpf.Instruction{ - bpf.LoadConstant{ - Dst: bpf.RegA, - Val: 100, - }, - // Should terminate the program with an error immediately - unknown{}, - bpf.RetA{}, - }) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - defer done() - - _, err = vm.Run([]byte{ - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, - }) - if errStr(err) != "unknown Instruction at index 1: bpf_test.unknown" { - t.Fatalf("unexpected error while running program: %v", err) - } -} - -func TestVMNoReturnInstruction(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{ - bpf.LoadConstant{ - Dst: bpf.RegA, - Val: 1, - }, - }) - if errStr(err) != "BPF program must end with RetA or RetConstant" { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestVMNoInputInstructions(t *testing.T) { - _, _, err := testVM(t, []bpf.Instruction{}) - if errStr(err) != "one or more Instructions must be specified" { - t.Fatalf("unexpected error: %v", err) - } -} - -// ExampleNewVM demonstrates usage of a VM, using an Ethernet frame -// as input and checking its EtherType to determine if it should be accepted. -func ExampleNewVM() { - // Offset | Length | Comment - // ------------------------- - // 00 | 06 | Ethernet destination MAC address - // 06 | 06 | Ethernet source MAC address - // 12 | 02 | Ethernet EtherType - const ( - etOff = 12 - etLen = 2 - - etARP = 0x0806 - ) - - // Set up a VM to filter traffic based on if its EtherType - // matches the ARP EtherType. - vm, err := bpf.NewVM([]bpf.Instruction{ - // Load EtherType value from Ethernet header - bpf.LoadAbsolute{ - Off: etOff, - Size: etLen, - }, - // If EtherType is equal to the ARP EtherType, jump to allow - // packet to be accepted - bpf.JumpIf{ - Cond: bpf.JumpEqual, - Val: etARP, - SkipTrue: 1, - }, - // EtherType does not match the ARP EtherType - bpf.RetConstant{ - Val: 0, - }, - // EtherType matches the ARP EtherType, accept up to 1500 - // bytes of packet - bpf.RetConstant{ - Val: 1500, - }, - }) - if err != nil { - panic(fmt.Sprintf("failed to load BPF program: %v", err)) - } - - // Create an Ethernet frame with the ARP EtherType for testing - frame := []byte{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x08, 0x06, - // Payload omitted for brevity - } - - // Run our VM's BPF program using the Ethernet frame as input - out, err := vm.Run(frame) - if err != nil { - panic(fmt.Sprintf("failed to accept Ethernet frame: %v", err)) - } - - // BPF VM can return a byte count greater than the number of input - // bytes, so trim the output to match the input byte length - if out > len(frame) { - out = len(frame) - } - - fmt.Printf("out: %d bytes", out) - - // Output: - // out: 14 bytes -} - -// errStr returns the string representation of an error, or -// "" if it is nil. -func errStr(err error) string { - if err == nil { - return "" - } - - return err.Error() -} diff --git a/vendor/golang.org/x/net/codereview.cfg b/vendor/golang.org/x/net/codereview.cfg deleted file mode 100644 index 3f8b14b6..00000000 --- a/vendor/golang.org/x/net/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/net/context/context_test.go b/vendor/golang.org/x/net/context/context_test.go deleted file mode 100644 index 62844131..00000000 --- a/vendor/golang.org/x/net/context/context_test.go +++ /dev/null @@ -1,583 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package context - -import ( - "fmt" - "math/rand" - "runtime" - "strings" - "sync" - "testing" - "time" -) - -// otherContext is a Context that's not one of the types defined in context.go. -// This lets us test code paths that differ based on the underlying type of the -// Context. -type otherContext struct { - Context -} - -func TestBackground(t *testing.T) { - c := Background() - if c == nil { - t.Fatalf("Background returned nil") - } - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - if got, want := fmt.Sprint(c), "context.Background"; got != want { - t.Errorf("Background().String() = %q want %q", got, want) - } -} - -func TestTODO(t *testing.T) { - c := TODO() - if c == nil { - t.Fatalf("TODO returned nil") - } - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - if got, want := fmt.Sprint(c), "context.TODO"; got != want { - t.Errorf("TODO().String() = %q want %q", got, want) - } -} - -func TestWithCancel(t *testing.T) { - c1, cancel := WithCancel(Background()) - - if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want { - t.Errorf("c1.String() = %q want %q", got, want) - } - - o := otherContext{c1} - c2, _ := WithCancel(o) - contexts := []Context{c1, o, c2} - - for i, c := range contexts { - if d := c.Done(); d == nil { - t.Errorf("c[%d].Done() == %v want non-nil", i, d) - } - if e := c.Err(); e != nil { - t.Errorf("c[%d].Err() == %v want nil", i, e) - } - - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - } - - cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate - - for i, c := range contexts { - select { - case <-c.Done(): - default: - t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i) - } - if e := c.Err(); e != Canceled { - t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled) - } - } -} - -func TestParentFinishesChild(t *testing.T) { - // Context tree: - // parent -> cancelChild - // parent -> valueChild -> timerChild - parent, cancel := WithCancel(Background()) - cancelChild, stop := WithCancel(parent) - defer stop() - valueChild := WithValue(parent, "key", "value") - timerChild, stop := WithTimeout(valueChild, 10000*time.Hour) - defer stop() - - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - case x := <-cancelChild.Done(): - t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x) - case x := <-timerChild.Done(): - t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x) - case x := <-valueChild.Done(): - t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x) - default: - } - - // The parent's children should contain the two cancelable children. - pc := parent.(*cancelCtx) - cc := cancelChild.(*cancelCtx) - tc := timerChild.(*timerCtx) - pc.mu.Lock() - if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] { - t.Errorf("bad linkage: pc.children = %v, want %v and %v", - pc.children, cc, tc) - } - pc.mu.Unlock() - - if p, ok := parentCancelCtx(cc.Context); !ok || p != pc { - t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc) - } - if p, ok := parentCancelCtx(tc.Context); !ok || p != pc { - t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc) - } - - cancel() - - pc.mu.Lock() - if len(pc.children) != 0 { - t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children) - } - pc.mu.Unlock() - - // parent and children should all be finished. - check := func(ctx Context, name string) { - select { - case <-ctx.Done(): - default: - t.Errorf("<-%s.Done() blocked, but shouldn't have", name) - } - if e := ctx.Err(); e != Canceled { - t.Errorf("%s.Err() == %v want %v", name, e, Canceled) - } - } - check(parent, "parent") - check(cancelChild, "cancelChild") - check(valueChild, "valueChild") - check(timerChild, "timerChild") - - // WithCancel should return a canceled context on a canceled parent. - precanceledChild := WithValue(parent, "key", "value") - select { - case <-precanceledChild.Done(): - default: - t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have") - } - if e := precanceledChild.Err(); e != Canceled { - t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled) - } -} - -func TestChildFinishesFirst(t *testing.T) { - cancelable, stop := WithCancel(Background()) - defer stop() - for _, parent := range []Context{Background(), cancelable} { - child, cancel := WithCancel(parent) - - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - case x := <-child.Done(): - t.Errorf("<-child.Done() == %v want nothing (it should block)", x) - default: - } - - cc := child.(*cancelCtx) - pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background() - if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) { - t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok) - } - - if pcok { - pc.mu.Lock() - if len(pc.children) != 1 || !pc.children[cc] { - t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc) - } - pc.mu.Unlock() - } - - cancel() - - if pcok { - pc.mu.Lock() - if len(pc.children) != 0 { - t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children) - } - pc.mu.Unlock() - } - - // child should be finished. - select { - case <-child.Done(): - default: - t.Errorf("<-child.Done() blocked, but shouldn't have") - } - if e := child.Err(); e != Canceled { - t.Errorf("child.Err() == %v want %v", e, Canceled) - } - - // parent should not be finished. - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - default: - } - if e := parent.Err(); e != nil { - t.Errorf("parent.Err() == %v want nil", e) - } - } -} - -func testDeadline(c Context, wait time.Duration, t *testing.T) { - select { - case <-time.After(wait): - t.Fatalf("context should have timed out") - case <-c.Done(): - } - if e := c.Err(); e != DeadlineExceeded { - t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded) - } -} - -func TestDeadline(t *testing.T) { - t.Parallel() - const timeUnit = 500 * time.Millisecond - c, _ := WithDeadline(Background(), time.Now().Add(1*timeUnit)) - if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { - t.Errorf("c.String() = %q want prefix %q", got, prefix) - } - testDeadline(c, 2*timeUnit, t) - - c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit)) - o := otherContext{c} - testDeadline(o, 2*timeUnit, t) - - c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit)) - o = otherContext{c} - c, _ = WithDeadline(o, time.Now().Add(3*timeUnit)) - testDeadline(c, 2*timeUnit, t) -} - -func TestTimeout(t *testing.T) { - t.Parallel() - const timeUnit = 500 * time.Millisecond - c, _ := WithTimeout(Background(), 1*timeUnit) - if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { - t.Errorf("c.String() = %q want prefix %q", got, prefix) - } - testDeadline(c, 2*timeUnit, t) - - c, _ = WithTimeout(Background(), 1*timeUnit) - o := otherContext{c} - testDeadline(o, 2*timeUnit, t) - - c, _ = WithTimeout(Background(), 1*timeUnit) - o = otherContext{c} - c, _ = WithTimeout(o, 3*timeUnit) - testDeadline(c, 2*timeUnit, t) -} - -func TestCanceledTimeout(t *testing.T) { - t.Parallel() - const timeUnit = 500 * time.Millisecond - c, _ := WithTimeout(Background(), 2*timeUnit) - o := otherContext{c} - c, cancel := WithTimeout(o, 4*timeUnit) - cancel() - time.Sleep(1 * timeUnit) // let cancelation propagate - select { - case <-c.Done(): - default: - t.Errorf("<-c.Done() blocked, but shouldn't have") - } - if e := c.Err(); e != Canceled { - t.Errorf("c.Err() == %v want %v", e, Canceled) - } -} - -type key1 int -type key2 int - -var k1 = key1(1) -var k2 = key2(1) // same int as k1, different type -var k3 = key2(3) // same type as k2, different int - -func TestValues(t *testing.T) { - check := func(c Context, nm, v1, v2, v3 string) { - if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 { - t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0) - } - if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 { - t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0) - } - if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 { - t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0) - } - } - - c0 := Background() - check(c0, "c0", "", "", "") - - c1 := WithValue(Background(), k1, "c1k1") - check(c1, "c1", "c1k1", "", "") - - if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want { - t.Errorf("c.String() = %q want %q", got, want) - } - - c2 := WithValue(c1, k2, "c2k2") - check(c2, "c2", "c1k1", "c2k2", "") - - c3 := WithValue(c2, k3, "c3k3") - check(c3, "c2", "c1k1", "c2k2", "c3k3") - - c4 := WithValue(c3, k1, nil) - check(c4, "c4", "", "c2k2", "c3k3") - - o0 := otherContext{Background()} - check(o0, "o0", "", "", "") - - o1 := otherContext{WithValue(Background(), k1, "c1k1")} - check(o1, "o1", "c1k1", "", "") - - o2 := WithValue(o1, k2, "o2k2") - check(o2, "o2", "c1k1", "o2k2", "") - - o3 := otherContext{c4} - check(o3, "o3", "", "c2k2", "c3k3") - - o4 := WithValue(o3, k3, nil) - check(o4, "o4", "", "c2k2", "") -} - -func TestAllocs(t *testing.T) { - bg := Background() - for _, test := range []struct { - desc string - f func() - limit float64 - gccgoLimit float64 - }{ - { - desc: "Background()", - f: func() { Background() }, - limit: 0, - gccgoLimit: 0, - }, - { - desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1), - f: func() { - c := WithValue(bg, k1, nil) - c.Value(k1) - }, - limit: 3, - gccgoLimit: 3, - }, - { - desc: "WithTimeout(bg, 15*time.Millisecond)", - f: func() { - c, _ := WithTimeout(bg, 15*time.Millisecond) - <-c.Done() - }, - limit: 8, - gccgoLimit: 16, - }, - { - desc: "WithCancel(bg)", - f: func() { - c, cancel := WithCancel(bg) - cancel() - <-c.Done() - }, - limit: 5, - gccgoLimit: 8, - }, - { - desc: "WithTimeout(bg, 100*time.Millisecond)", - f: func() { - c, cancel := WithTimeout(bg, 100*time.Millisecond) - cancel() - <-c.Done() - }, - limit: 8, - gccgoLimit: 25, - }, - } { - limit := test.limit - if runtime.Compiler == "gccgo" { - // gccgo does not yet do escape analysis. - // TODO(iant): Remove this when gccgo does do escape analysis. - limit = test.gccgoLimit - } - if n := testing.AllocsPerRun(100, test.f); n > limit { - t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit)) - } - } -} - -func TestSimultaneousCancels(t *testing.T) { - root, cancel := WithCancel(Background()) - m := map[Context]CancelFunc{root: cancel} - q := []Context{root} - // Create a tree of contexts. - for len(q) != 0 && len(m) < 100 { - parent := q[0] - q = q[1:] - for i := 0; i < 4; i++ { - ctx, cancel := WithCancel(parent) - m[ctx] = cancel - q = append(q, ctx) - } - } - // Start all the cancels in a random order. - var wg sync.WaitGroup - wg.Add(len(m)) - for _, cancel := range m { - go func(cancel CancelFunc) { - cancel() - wg.Done() - }(cancel) - } - // Wait on all the contexts in a random order. - for ctx := range m { - select { - case <-ctx.Done(): - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n]) - } - } - // Wait for all the cancel functions to return. - done := make(chan struct{}) - go func() { - wg.Wait() - close(done) - }() - select { - case <-done: - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n]) - } -} - -func TestInterlockedCancels(t *testing.T) { - parent, cancelParent := WithCancel(Background()) - child, cancelChild := WithCancel(parent) - go func() { - parent.Done() - cancelChild() - }() - cancelParent() - select { - case <-child.Done(): - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n]) - } -} - -func TestLayersCancel(t *testing.T) { - testLayers(t, time.Now().UnixNano(), false) -} - -func TestLayersTimeout(t *testing.T) { - testLayers(t, time.Now().UnixNano(), true) -} - -func testLayers(t *testing.T, seed int64, testTimeout bool) { - rand.Seed(seed) - errorf := func(format string, a ...interface{}) { - t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) - } - const ( - timeout = 200 * time.Millisecond - minLayers = 30 - ) - type value int - var ( - vals []*value - cancels []CancelFunc - numTimers int - ctx = Background() - ) - for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ { - switch rand.Intn(3) { - case 0: - v := new(value) - ctx = WithValue(ctx, v, v) - vals = append(vals, v) - case 1: - var cancel CancelFunc - ctx, cancel = WithCancel(ctx) - cancels = append(cancels, cancel) - case 2: - var cancel CancelFunc - ctx, cancel = WithTimeout(ctx, timeout) - cancels = append(cancels, cancel) - numTimers++ - } - } - checkValues := func(when string) { - for _, key := range vals { - if val := ctx.Value(key).(*value); key != val { - errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key) - } - } - } - select { - case <-ctx.Done(): - errorf("ctx should not be canceled yet") - default: - } - if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) { - t.Errorf("ctx.String() = %q want prefix %q", s, prefix) - } - t.Log(ctx) - checkValues("before cancel") - if testTimeout { - select { - case <-ctx.Done(): - case <-time.After(timeout + 100*time.Millisecond): - errorf("ctx should have timed out") - } - checkValues("after timeout") - } else { - cancel := cancels[rand.Intn(len(cancels))] - cancel() - select { - case <-ctx.Done(): - default: - errorf("ctx should be canceled") - } - checkValues("after cancel") - } -} - -func TestCancelRemoves(t *testing.T) { - checkChildren := func(when string, ctx Context, want int) { - if got := len(ctx.(*cancelCtx).children); got != want { - t.Errorf("%s: context has %d children, want %d", when, got, want) - } - } - - ctx, _ := WithCancel(Background()) - checkChildren("after creation", ctx, 0) - _, cancel := WithCancel(ctx) - checkChildren("with WithCancel child ", ctx, 1) - cancel() - checkChildren("after cancelling WithCancel child", ctx, 0) - - ctx, _ = WithCancel(Background()) - checkChildren("after creation", ctx, 0) - _, cancel = WithTimeout(ctx, 60*time.Minute) - checkChildren("with WithTimeout child ", ctx, 1) - cancel() - checkChildren("after cancelling WithTimeout child", ctx, 0) -} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go deleted file mode 100644 index c4339c4e..00000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go +++ /dev/null @@ -1,117 +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 !plan9 - -package ctxhttp - -import ( - "context" - "io" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - "time" -) - -func TestGo17Context(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "ok") - })) - defer ts.Close() - ctx := context.Background() - resp, err := Get(ctx, http.DefaultClient, ts.URL) - if resp == nil || err != nil { - t.Fatalf("error received from client: %v %v", err, resp) - } - resp.Body.Close() -} - -const ( - requestDuration = 100 * time.Millisecond - requestBody = "ok" -) - -func okHandler(w http.ResponseWriter, r *http.Request) { - time.Sleep(requestDuration) - io.WriteString(w, requestBody) -} - -func TestNoTimeout(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(okHandler)) - defer ts.Close() - - ctx := context.Background() - res, err := Get(ctx, nil, ts.URL) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Fatal(err) - } - if string(slurp) != requestBody { - t.Errorf("body = %q; want %q", slurp, requestBody) - } -} - -func TestCancelBeforeHeaders(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - - blockServer := make(chan struct{}) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - cancel() - <-blockServer - io.WriteString(w, requestBody) - })) - defer ts.Close() - defer close(blockServer) - - res, err := Get(ctx, nil, ts.URL) - if err == nil { - res.Body.Close() - t.Fatal("Get returned unexpected nil error") - } - if err != context.Canceled { - t.Errorf("err = %v; want %v", err, context.Canceled) - } -} - -func TestCancelAfterHangingRequest(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - w.(http.Flusher).Flush() - <-w.(http.CloseNotifier).CloseNotify() - })) - defer ts.Close() - - ctx, cancel := context.WithCancel(context.Background()) - resp, err := Get(ctx, nil, ts.URL) - if err != nil { - t.Fatalf("unexpected error in Get: %v", err) - } - - // Cancel befer reading the body. - // Reading Request.Body should fail, since the request was - // canceled before anything was written. - cancel() - - done := make(chan struct{}) - - go func() { - b, err := ioutil.ReadAll(resp.Body) - if len(b) != 0 || err == nil { - t.Errorf(`Read got (%q, %v); want ("", error)`, b, err) - } - close(done) - }() - - select { - case <-time.After(1 * time.Second): - t.Errorf("Test timed out") - case <-done: - } -} diff --git a/vendor/golang.org/x/net/context/withtimeout_test.go b/vendor/golang.org/x/net/context/withtimeout_test.go deleted file mode 100644 index e6f56691..00000000 --- a/vendor/golang.org/x/net/context/withtimeout_test.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package context_test - -import ( - "fmt" - "time" - - "golang.org/x/net/context" -) - -// This example passes a context with a timeout to tell a blocking function that -// it should abandon its work after the timeout elapses. -func ExampleWithTimeout() { - // Pass a context with a timeout to tell a blocking function that it - // should abandon its work after the timeout elapses. - ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) - defer cancel() - - select { - case <-time.After(1 * time.Second): - fmt.Println("overslept") - case <-ctx.Done(): - fmt.Println(ctx.Err()) // prints "context deadline exceeded" - } - - // Output: - // context deadline exceeded -} diff --git a/vendor/golang.org/x/net/dict/dict.go b/vendor/golang.org/x/net/dict/dict.go deleted file mode 100644 index 93e65c03..00000000 --- a/vendor/golang.org/x/net/dict/dict.go +++ /dev/null @@ -1,210 +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 dict implements the Dictionary Server Protocol -// as defined in RFC 2229. -package dict // import "golang.org/x/net/dict" - -import ( - "net/textproto" - "strconv" - "strings" -) - -// A Client represents a client connection to a dictionary server. -type Client struct { - text *textproto.Conn -} - -// Dial returns a new client connected to a dictionary server at -// addr on the given network. -func Dial(network, addr string) (*Client, error) { - text, err := textproto.Dial(network, addr) - if err != nil { - return nil, err - } - _, _, err = text.ReadCodeLine(220) - if err != nil { - text.Close() - return nil, err - } - return &Client{text: text}, nil -} - -// Close closes the connection to the dictionary server. -func (c *Client) Close() error { - return c.text.Close() -} - -// A Dict represents a dictionary available on the server. -type Dict struct { - Name string // short name of dictionary - Desc string // long description -} - -// Dicts returns a list of the dictionaries available on the server. -func (c *Client) Dicts() ([]Dict, error) { - id, err := c.text.Cmd("SHOW DB") - if err != nil { - return nil, err - } - - c.text.StartResponse(id) - defer c.text.EndResponse(id) - - _, _, err = c.text.ReadCodeLine(110) - if err != nil { - return nil, err - } - lines, err := c.text.ReadDotLines() - if err != nil { - return nil, err - } - _, _, err = c.text.ReadCodeLine(250) - - dicts := make([]Dict, len(lines)) - for i := range dicts { - d := &dicts[i] - a, _ := fields(lines[i]) - if len(a) < 2 { - return nil, textproto.ProtocolError("invalid dictionary: " + lines[i]) - } - d.Name = a[0] - d.Desc = a[1] - } - return dicts, err -} - -// A Defn represents a definition. -type Defn struct { - Dict Dict // Dict where definition was found - Word string // Word being defined - Text []byte // Definition text, typically multiple lines -} - -// Define requests the definition of the given word. -// The argument dict names the dictionary to use, -// the Name field of a Dict returned by Dicts. -// -// The special dictionary name "*" means to look in all the -// server's dictionaries. -// The special dictionary name "!" means to look in all the -// server's dictionaries in turn, stopping after finding the word -// in one of them. -func (c *Client) Define(dict, word string) ([]*Defn, error) { - id, err := c.text.Cmd("DEFINE %s %q", dict, word) - if err != nil { - return nil, err - } - - c.text.StartResponse(id) - defer c.text.EndResponse(id) - - _, line, err := c.text.ReadCodeLine(150) - if err != nil { - return nil, err - } - a, _ := fields(line) - if len(a) < 1 { - return nil, textproto.ProtocolError("malformed response: " + line) - } - n, err := strconv.Atoi(a[0]) - if err != nil { - return nil, textproto.ProtocolError("invalid definition count: " + a[0]) - } - def := make([]*Defn, n) - for i := 0; i < n; i++ { - _, line, err = c.text.ReadCodeLine(151) - if err != nil { - return nil, err - } - a, _ := fields(line) - if len(a) < 3 { - // skip it, to keep protocol in sync - i-- - n-- - def = def[0:n] - continue - } - d := &Defn{Word: a[0], Dict: Dict{a[1], a[2]}} - d.Text, err = c.text.ReadDotBytes() - if err != nil { - return nil, err - } - def[i] = d - } - _, _, err = c.text.ReadCodeLine(250) - return def, err -} - -// Fields returns the fields in s. -// Fields are space separated unquoted words -// or quoted with single or double quote. -func fields(s string) ([]string, error) { - var v []string - i := 0 - for { - for i < len(s) && (s[i] == ' ' || s[i] == '\t') { - i++ - } - if i >= len(s) { - break - } - if s[i] == '"' || s[i] == '\'' { - q := s[i] - // quoted string - var j int - for j = i + 1; ; j++ { - if j >= len(s) { - return nil, textproto.ProtocolError("malformed quoted string") - } - if s[j] == '\\' { - j++ - continue - } - if s[j] == q { - j++ - break - } - } - v = append(v, unquote(s[i+1:j-1])) - i = j - } else { - // atom - var j int - for j = i; j < len(s); j++ { - if s[j] == ' ' || s[j] == '\t' || s[j] == '\\' || s[j] == '"' || s[j] == '\'' { - break - } - } - v = append(v, s[i:j]) - i = j - } - if i < len(s) { - c := s[i] - if c != ' ' && c != '\t' { - return nil, textproto.ProtocolError("quotes not on word boundaries") - } - } - } - return v, nil -} - -func unquote(s string) string { - if strings.Index(s, "\\") < 0 { - return s - } - b := []byte(s) - w := 0 - for r := 0; r < len(b); r++ { - c := b[r] - if c == '\\' { - r++ - c = b[r] - } - b[w] = c - w++ - } - return string(b[0:w]) -} diff --git a/vendor/golang.org/x/net/dns/dnsmessage/example_test.go b/vendor/golang.org/x/net/dns/dnsmessage/example_test.go deleted file mode 100644 index 8600a6bc..00000000 --- a/vendor/golang.org/x/net/dns/dnsmessage/example_test.go +++ /dev/null @@ -1,132 +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 dnsmessage_test - -import ( - "fmt" - "net" - "strings" - - "golang.org/x/net/dns/dnsmessage" -) - -func mustNewName(name string) dnsmessage.Name { - n, err := dnsmessage.NewName(name) - if err != nil { - panic(err) - } - return n -} - -func ExampleParser() { - msg := dnsmessage.Message{ - Header: dnsmessage.Header{Response: true, Authoritative: true}, - Questions: []dnsmessage.Question{ - { - Name: mustNewName("foo.bar.example.com."), - Type: dnsmessage.TypeA, - Class: dnsmessage.ClassINET, - }, - { - Name: mustNewName("bar.example.com."), - Type: dnsmessage.TypeA, - Class: dnsmessage.ClassINET, - }, - }, - Answers: []dnsmessage.Resource{ - { - Header: dnsmessage.ResourceHeader{ - Name: mustNewName("foo.bar.example.com."), - Type: dnsmessage.TypeA, - Class: dnsmessage.ClassINET, - }, - Body: &dnsmessage.AResource{A: [4]byte{127, 0, 0, 1}}, - }, - { - Header: dnsmessage.ResourceHeader{ - Name: mustNewName("bar.example.com."), - Type: dnsmessage.TypeA, - Class: dnsmessage.ClassINET, - }, - Body: &dnsmessage.AResource{A: [4]byte{127, 0, 0, 2}}, - }, - }, - } - - buf, err := msg.Pack() - if err != nil { - panic(err) - } - - wantName := "bar.example.com." - - var p dnsmessage.Parser - if _, err := p.Start(buf); err != nil { - panic(err) - } - - for { - q, err := p.Question() - if err == dnsmessage.ErrSectionDone { - break - } - if err != nil { - panic(err) - } - - if q.Name.String() != wantName { - continue - } - - fmt.Println("Found question for name", wantName) - if err := p.SkipAllQuestions(); err != nil { - panic(err) - } - break - } - - var gotIPs []net.IP - for { - h, err := p.AnswerHeader() - if err == dnsmessage.ErrSectionDone { - break - } - if err != nil { - panic(err) - } - - if (h.Type != dnsmessage.TypeA && h.Type != dnsmessage.TypeAAAA) || h.Class != dnsmessage.ClassINET { - continue - } - - if !strings.EqualFold(h.Name.String(), wantName) { - if err := p.SkipAnswer(); err != nil { - panic(err) - } - continue - } - - switch h.Type { - case dnsmessage.TypeA: - r, err := p.AResource() - if err != nil { - panic(err) - } - gotIPs = append(gotIPs, r.A[:]) - case dnsmessage.TypeAAAA: - r, err := p.AAAAResource() - if err != nil { - panic(err) - } - gotIPs = append(gotIPs, r.AAAA[:]) - } - } - - fmt.Printf("Found A/AAAA records for name %s: %v\n", wantName, gotIPs) - - // Output: - // Found question for name bar.example.com. - // Found A/AAAA records for name bar.example.com.: [127.0.0.2] -} diff --git a/vendor/golang.org/x/net/dns/dnsmessage/message.go b/vendor/golang.org/x/net/dns/dnsmessage/message.go deleted file mode 100644 index 13fbc081..00000000 --- a/vendor/golang.org/x/net/dns/dnsmessage/message.go +++ /dev/null @@ -1,2606 +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 dnsmessage provides a mostly RFC 1035 compliant implementation of -// DNS message packing and unpacking. -// -// The package also supports messages with Extension Mechanisms for DNS -// (EDNS(0)) as defined in RFC 6891. -// -// This implementation is designed to minimize heap allocations and avoid -// unnecessary packing and unpacking as much as possible. -package dnsmessage - -import ( - "errors" -) - -// Message formats - -// A Type is a type of DNS request and response. -type Type uint16 - -const ( - // ResourceHeader.Type and Question.Type - TypeA Type = 1 - TypeNS Type = 2 - TypeCNAME Type = 5 - TypeSOA Type = 6 - TypePTR Type = 12 - TypeMX Type = 15 - TypeTXT Type = 16 - TypeAAAA Type = 28 - TypeSRV Type = 33 - TypeOPT Type = 41 - - // Question.Type - TypeWKS Type = 11 - TypeHINFO Type = 13 - TypeMINFO Type = 14 - TypeAXFR Type = 252 - TypeALL Type = 255 -) - -var typeNames = map[Type]string{ - TypeA: "TypeA", - TypeNS: "TypeNS", - TypeCNAME: "TypeCNAME", - TypeSOA: "TypeSOA", - TypePTR: "TypePTR", - TypeMX: "TypeMX", - TypeTXT: "TypeTXT", - TypeAAAA: "TypeAAAA", - TypeSRV: "TypeSRV", - TypeOPT: "TypeOPT", - TypeWKS: "TypeWKS", - TypeHINFO: "TypeHINFO", - TypeMINFO: "TypeMINFO", - TypeAXFR: "TypeAXFR", - TypeALL: "TypeALL", -} - -// String implements fmt.Stringer.String. -func (t Type) String() string { - if n, ok := typeNames[t]; ok { - return n - } - return printUint16(uint16(t)) -} - -// GoString implements fmt.GoStringer.GoString. -func (t Type) GoString() string { - if n, ok := typeNames[t]; ok { - return "dnsmessage." + n - } - return printUint16(uint16(t)) -} - -// A Class is a type of network. -type Class uint16 - -const ( - // ResourceHeader.Class and Question.Class - ClassINET Class = 1 - ClassCSNET Class = 2 - ClassCHAOS Class = 3 - ClassHESIOD Class = 4 - - // Question.Class - ClassANY Class = 255 -) - -var classNames = map[Class]string{ - ClassINET: "ClassINET", - ClassCSNET: "ClassCSNET", - ClassCHAOS: "ClassCHAOS", - ClassHESIOD: "ClassHESIOD", - ClassANY: "ClassANY", -} - -// String implements fmt.Stringer.String. -func (c Class) String() string { - if n, ok := classNames[c]; ok { - return n - } - return printUint16(uint16(c)) -} - -// GoString implements fmt.GoStringer.GoString. -func (c Class) GoString() string { - if n, ok := classNames[c]; ok { - return "dnsmessage." + n - } - return printUint16(uint16(c)) -} - -// An OpCode is a DNS operation code. -type OpCode uint16 - -// GoString implements fmt.GoStringer.GoString. -func (o OpCode) GoString() string { - return printUint16(uint16(o)) -} - -// An RCode is a DNS response status code. -type RCode uint16 - -const ( - // Message.Rcode - RCodeSuccess RCode = 0 - RCodeFormatError RCode = 1 - RCodeServerFailure RCode = 2 - RCodeNameError RCode = 3 - RCodeNotImplemented RCode = 4 - RCodeRefused RCode = 5 -) - -var rCodeNames = map[RCode]string{ - RCodeSuccess: "RCodeSuccess", - RCodeFormatError: "RCodeFormatError", - RCodeServerFailure: "RCodeServerFailure", - RCodeNameError: "RCodeNameError", - RCodeNotImplemented: "RCodeNotImplemented", - RCodeRefused: "RCodeRefused", -} - -// String implements fmt.Stringer.String. -func (r RCode) String() string { - if n, ok := rCodeNames[r]; ok { - return n - } - return printUint16(uint16(r)) -} - -// GoString implements fmt.GoStringer.GoString. -func (r RCode) GoString() string { - if n, ok := rCodeNames[r]; ok { - return "dnsmessage." + n - } - return printUint16(uint16(r)) -} - -func printPaddedUint8(i uint8) string { - b := byte(i) - return string([]byte{ - b/100 + '0', - b/10%10 + '0', - b%10 + '0', - }) -} - -func printUint8Bytes(buf []byte, i uint8) []byte { - b := byte(i) - if i >= 100 { - buf = append(buf, b/100+'0') - } - if i >= 10 { - buf = append(buf, b/10%10+'0') - } - return append(buf, b%10+'0') -} - -func printByteSlice(b []byte) string { - if len(b) == 0 { - return "" - } - buf := make([]byte, 0, 5*len(b)) - buf = printUint8Bytes(buf, uint8(b[0])) - for _, n := range b[1:] { - buf = append(buf, ',', ' ') - buf = printUint8Bytes(buf, uint8(n)) - } - return string(buf) -} - -const hexDigits = "0123456789abcdef" - -func printString(str []byte) string { - buf := make([]byte, 0, len(str)) - for i := 0; i < len(str); i++ { - c := str[i] - if c == '.' || c == '-' || c == ' ' || - 'A' <= c && c <= 'Z' || - 'a' <= c && c <= 'z' || - '0' <= c && c <= '9' { - buf = append(buf, c) - continue - } - - upper := c >> 4 - lower := (c << 4) >> 4 - buf = append( - buf, - '\\', - 'x', - hexDigits[upper], - hexDigits[lower], - ) - } - return string(buf) -} - -func printUint16(i uint16) string { - return printUint32(uint32(i)) -} - -func printUint32(i uint32) string { - // Max value is 4294967295. - buf := make([]byte, 10) - for b, d := buf, uint32(1000000000); d > 0; d /= 10 { - b[0] = byte(i/d%10 + '0') - if b[0] == '0' && len(b) == len(buf) && len(buf) > 1 { - buf = buf[1:] - } - b = b[1:] - i %= d - } - return string(buf) -} - -func printBool(b bool) string { - if b { - return "true" - } - return "false" -} - -var ( - // ErrNotStarted indicates that the prerequisite information isn't - // available yet because the previous records haven't been appropriately - // parsed, skipped or finished. - ErrNotStarted = errors.New("parsing/packing of this type isn't available yet") - - // ErrSectionDone indicated that all records in the section have been - // parsed or finished. - ErrSectionDone = errors.New("parsing/packing of this section has completed") - - errBaseLen = errors.New("insufficient data for base length type") - errCalcLen = errors.New("insufficient data for calculated length type") - errReserved = errors.New("segment prefix is reserved") - errTooManyPtr = errors.New("too many pointers (>10)") - errInvalidPtr = errors.New("invalid pointer") - errNilResouceBody = errors.New("nil resource body") - errResourceLen = errors.New("insufficient data for resource body length") - errSegTooLong = errors.New("segment length too long") - errZeroSegLen = errors.New("zero length segment") - errResTooLong = errors.New("resource length too long") - errTooManyQuestions = errors.New("too many Questions to pack (>65535)") - errTooManyAnswers = errors.New("too many Answers to pack (>65535)") - errTooManyAuthorities = errors.New("too many Authorities to pack (>65535)") - errTooManyAdditionals = errors.New("too many Additionals to pack (>65535)") - errNonCanonicalName = errors.New("name is not in canonical format (it must end with a .)") - errStringTooLong = errors.New("character string exceeds maximum length (255)") - errCompressedSRV = errors.New("compressed name in SRV resource data") -) - -// Internal constants. -const ( - // packStartingCap is the default initial buffer size allocated during - // packing. - // - // The starting capacity doesn't matter too much, but most DNS responses - // Will be <= 512 bytes as it is the limit for DNS over UDP. - packStartingCap = 512 - - // uint16Len is the length (in bytes) of a uint16. - uint16Len = 2 - - // uint32Len is the length (in bytes) of a uint32. - uint32Len = 4 - - // headerLen is the length (in bytes) of a DNS header. - // - // A header is comprised of 6 uint16s and no padding. - headerLen = 6 * uint16Len -) - -type nestedError struct { - // s is the current level's error message. - s string - - // err is the nested error. - err error -} - -// nestedError implements error.Error. -func (e *nestedError) Error() string { - return e.s + ": " + e.err.Error() -} - -// Header is a representation of a DNS message header. -type Header struct { - ID uint16 - Response bool - OpCode OpCode - Authoritative bool - Truncated bool - RecursionDesired bool - RecursionAvailable bool - RCode RCode -} - -func (m *Header) pack() (id uint16, bits uint16) { - id = m.ID - bits = uint16(m.OpCode)<<11 | uint16(m.RCode) - if m.RecursionAvailable { - bits |= headerBitRA - } - if m.RecursionDesired { - bits |= headerBitRD - } - if m.Truncated { - bits |= headerBitTC - } - if m.Authoritative { - bits |= headerBitAA - } - if m.Response { - bits |= headerBitQR - } - return -} - -// GoString implements fmt.GoStringer.GoString. -func (m *Header) GoString() string { - return "dnsmessage.Header{" + - "ID: " + printUint16(m.ID) + ", " + - "Response: " + printBool(m.Response) + ", " + - "OpCode: " + m.OpCode.GoString() + ", " + - "Authoritative: " + printBool(m.Authoritative) + ", " + - "Truncated: " + printBool(m.Truncated) + ", " + - "RecursionDesired: " + printBool(m.RecursionDesired) + ", " + - "RecursionAvailable: " + printBool(m.RecursionAvailable) + ", " + - "RCode: " + m.RCode.GoString() + "}" -} - -// Message is a representation of a DNS message. -type Message struct { - Header - Questions []Question - Answers []Resource - Authorities []Resource - Additionals []Resource -} - -type section uint8 - -const ( - sectionNotStarted section = iota - sectionHeader - sectionQuestions - sectionAnswers - sectionAuthorities - sectionAdditionals - sectionDone - - headerBitQR = 1 << 15 // query/response (response=1) - headerBitAA = 1 << 10 // authoritative - headerBitTC = 1 << 9 // truncated - headerBitRD = 1 << 8 // recursion desired - headerBitRA = 1 << 7 // recursion available -) - -var sectionNames = map[section]string{ - sectionHeader: "header", - sectionQuestions: "Question", - sectionAnswers: "Answer", - sectionAuthorities: "Authority", - sectionAdditionals: "Additional", -} - -// header is the wire format for a DNS message header. -type header struct { - id uint16 - bits uint16 - questions uint16 - answers uint16 - authorities uint16 - additionals uint16 -} - -func (h *header) count(sec section) uint16 { - switch sec { - case sectionQuestions: - return h.questions - case sectionAnswers: - return h.answers - case sectionAuthorities: - return h.authorities - case sectionAdditionals: - return h.additionals - } - return 0 -} - -// pack appends the wire format of the header to msg. -func (h *header) pack(msg []byte) []byte { - msg = packUint16(msg, h.id) - msg = packUint16(msg, h.bits) - msg = packUint16(msg, h.questions) - msg = packUint16(msg, h.answers) - msg = packUint16(msg, h.authorities) - return packUint16(msg, h.additionals) -} - -func (h *header) unpack(msg []byte, off int) (int, error) { - newOff := off - var err error - if h.id, newOff, err = unpackUint16(msg, newOff); err != nil { - return off, &nestedError{"id", err} - } - if h.bits, newOff, err = unpackUint16(msg, newOff); err != nil { - return off, &nestedError{"bits", err} - } - if h.questions, newOff, err = unpackUint16(msg, newOff); err != nil { - return off, &nestedError{"questions", err} - } - if h.answers, newOff, err = unpackUint16(msg, newOff); err != nil { - return off, &nestedError{"answers", err} - } - if h.authorities, newOff, err = unpackUint16(msg, newOff); err != nil { - return off, &nestedError{"authorities", err} - } - if h.additionals, newOff, err = unpackUint16(msg, newOff); err != nil { - return off, &nestedError{"additionals", err} - } - return newOff, nil -} - -func (h *header) header() Header { - return Header{ - ID: h.id, - Response: (h.bits & headerBitQR) != 0, - OpCode: OpCode(h.bits>>11) & 0xF, - Authoritative: (h.bits & headerBitAA) != 0, - Truncated: (h.bits & headerBitTC) != 0, - RecursionDesired: (h.bits & headerBitRD) != 0, - RecursionAvailable: (h.bits & headerBitRA) != 0, - RCode: RCode(h.bits & 0xF), - } -} - -// A Resource is a DNS resource record. -type Resource struct { - Header ResourceHeader - Body ResourceBody -} - -func (r *Resource) GoString() string { - return "dnsmessage.Resource{" + - "Header: " + r.Header.GoString() + - ", Body: &" + r.Body.GoString() + - "}" -} - -// A ResourceBody is a DNS resource record minus the header. -type ResourceBody interface { - // pack packs a Resource except for its header. - pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) - - // realType returns the actual type of the Resource. This is used to - // fill in the header Type field. - realType() Type - - // GoString implements fmt.GoStringer.GoString. - GoString() string -} - -// pack appends the wire format of the Resource to msg. -func (r *Resource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - if r.Body == nil { - return msg, errNilResouceBody - } - oldMsg := msg - r.Header.Type = r.Body.realType() - msg, lenOff, err := r.Header.pack(msg, compression, compressionOff) - if err != nil { - return msg, &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - msg, err = r.Body.pack(msg, compression, compressionOff) - if err != nil { - return msg, &nestedError{"content", err} - } - if err := r.Header.fixLen(msg, lenOff, preLen); err != nil { - return oldMsg, err - } - return msg, nil -} - -// A Parser allows incrementally parsing a DNS message. -// -// When parsing is started, the Header is parsed. Next, each Question can be -// either parsed or skipped. Alternatively, all Questions can be skipped at -// once. When all Questions have been parsed, attempting to parse Questions -// will return (nil, nil) and attempting to skip Questions will return -// (true, nil). After all Questions have been either parsed or skipped, all -// Answers, Authorities and Additionals can be either parsed or skipped in the -// same way, and each type of Resource must be fully parsed or skipped before -// proceeding to the next type of Resource. -// -// Note that there is no requirement to fully skip or parse the message. -type Parser struct { - msg []byte - header header - - section section - off int - index int - resHeaderValid bool - resHeader ResourceHeader -} - -// Start parses the header and enables the parsing of Questions. -func (p *Parser) Start(msg []byte) (Header, error) { - if p.msg != nil { - *p = Parser{} - } - p.msg = msg - var err error - if p.off, err = p.header.unpack(msg, 0); err != nil { - return Header{}, &nestedError{"unpacking header", err} - } - p.section = sectionQuestions - return p.header.header(), nil -} - -func (p *Parser) checkAdvance(sec section) error { - if p.section < sec { - return ErrNotStarted - } - if p.section > sec { - return ErrSectionDone - } - p.resHeaderValid = false - if p.index == int(p.header.count(sec)) { - p.index = 0 - p.section++ - return ErrSectionDone - } - return nil -} - -func (p *Parser) resource(sec section) (Resource, error) { - var r Resource - var err error - r.Header, err = p.resourceHeader(sec) - if err != nil { - return r, err - } - p.resHeaderValid = false - r.Body, p.off, err = unpackResourceBody(p.msg, p.off, r.Header) - if err != nil { - return Resource{}, &nestedError{"unpacking " + sectionNames[sec], err} - } - p.index++ - return r, nil -} - -func (p *Parser) resourceHeader(sec section) (ResourceHeader, error) { - if p.resHeaderValid { - return p.resHeader, nil - } - if err := p.checkAdvance(sec); err != nil { - return ResourceHeader{}, err - } - var hdr ResourceHeader - off, err := hdr.unpack(p.msg, p.off) - if err != nil { - return ResourceHeader{}, err - } - p.resHeaderValid = true - p.resHeader = hdr - p.off = off - return hdr, nil -} - -func (p *Parser) skipResource(sec section) error { - if p.resHeaderValid { - newOff := p.off + int(p.resHeader.Length) - if newOff > len(p.msg) { - return errResourceLen - } - p.off = newOff - p.resHeaderValid = false - p.index++ - return nil - } - if err := p.checkAdvance(sec); err != nil { - return err - } - var err error - p.off, err = skipResource(p.msg, p.off) - if err != nil { - return &nestedError{"skipping: " + sectionNames[sec], err} - } - p.index++ - return nil -} - -// Question parses a single Question. -func (p *Parser) Question() (Question, error) { - if err := p.checkAdvance(sectionQuestions); err != nil { - return Question{}, err - } - var name Name - off, err := name.unpack(p.msg, p.off) - if err != nil { - return Question{}, &nestedError{"unpacking Question.Name", err} - } - typ, off, err := unpackType(p.msg, off) - if err != nil { - return Question{}, &nestedError{"unpacking Question.Type", err} - } - class, off, err := unpackClass(p.msg, off) - if err != nil { - return Question{}, &nestedError{"unpacking Question.Class", err} - } - p.off = off - p.index++ - return Question{name, typ, class}, nil -} - -// AllQuestions parses all Questions. -func (p *Parser) AllQuestions() ([]Question, error) { - // Multiple questions are valid according to the spec, - // but servers don't actually support them. There will - // be at most one question here. - // - // Do not pre-allocate based on info in p.header, since - // the data is untrusted. - qs := []Question{} - for { - q, err := p.Question() - if err == ErrSectionDone { - return qs, nil - } - if err != nil { - return nil, err - } - qs = append(qs, q) - } -} - -// SkipQuestion skips a single Question. -func (p *Parser) SkipQuestion() error { - if err := p.checkAdvance(sectionQuestions); err != nil { - return err - } - off, err := skipName(p.msg, p.off) - if err != nil { - return &nestedError{"skipping Question Name", err} - } - if off, err = skipType(p.msg, off); err != nil { - return &nestedError{"skipping Question Type", err} - } - if off, err = skipClass(p.msg, off); err != nil { - return &nestedError{"skipping Question Class", err} - } - p.off = off - p.index++ - return nil -} - -// SkipAllQuestions skips all Questions. -func (p *Parser) SkipAllQuestions() error { - for { - if err := p.SkipQuestion(); err == ErrSectionDone { - return nil - } else if err != nil { - return err - } - } -} - -// AnswerHeader parses a single Answer ResourceHeader. -func (p *Parser) AnswerHeader() (ResourceHeader, error) { - return p.resourceHeader(sectionAnswers) -} - -// Answer parses a single Answer Resource. -func (p *Parser) Answer() (Resource, error) { - return p.resource(sectionAnswers) -} - -// AllAnswers parses all Answer Resources. -func (p *Parser) AllAnswers() ([]Resource, error) { - // The most common query is for A/AAAA, which usually returns - // a handful of IPs. - // - // Pre-allocate up to a certain limit, since p.header is - // untrusted data. - n := int(p.header.answers) - if n > 20 { - n = 20 - } - as := make([]Resource, 0, n) - for { - a, err := p.Answer() - if err == ErrSectionDone { - return as, nil - } - if err != nil { - return nil, err - } - as = append(as, a) - } -} - -// SkipAnswer skips a single Answer Resource. -func (p *Parser) SkipAnswer() error { - return p.skipResource(sectionAnswers) -} - -// SkipAllAnswers skips all Answer Resources. -func (p *Parser) SkipAllAnswers() error { - for { - if err := p.SkipAnswer(); err == ErrSectionDone { - return nil - } else if err != nil { - return err - } - } -} - -// AuthorityHeader parses a single Authority ResourceHeader. -func (p *Parser) AuthorityHeader() (ResourceHeader, error) { - return p.resourceHeader(sectionAuthorities) -} - -// Authority parses a single Authority Resource. -func (p *Parser) Authority() (Resource, error) { - return p.resource(sectionAuthorities) -} - -// AllAuthorities parses all Authority Resources. -func (p *Parser) AllAuthorities() ([]Resource, error) { - // Authorities contains SOA in case of NXDOMAIN and friends, - // otherwise it is empty. - // - // Pre-allocate up to a certain limit, since p.header is - // untrusted data. - n := int(p.header.authorities) - if n > 10 { - n = 10 - } - as := make([]Resource, 0, n) - for { - a, err := p.Authority() - if err == ErrSectionDone { - return as, nil - } - if err != nil { - return nil, err - } - as = append(as, a) - } -} - -// SkipAuthority skips a single Authority Resource. -func (p *Parser) SkipAuthority() error { - return p.skipResource(sectionAuthorities) -} - -// SkipAllAuthorities skips all Authority Resources. -func (p *Parser) SkipAllAuthorities() error { - for { - if err := p.SkipAuthority(); err == ErrSectionDone { - return nil - } else if err != nil { - return err - } - } -} - -// AdditionalHeader parses a single Additional ResourceHeader. -func (p *Parser) AdditionalHeader() (ResourceHeader, error) { - return p.resourceHeader(sectionAdditionals) -} - -// Additional parses a single Additional Resource. -func (p *Parser) Additional() (Resource, error) { - return p.resource(sectionAdditionals) -} - -// AllAdditionals parses all Additional Resources. -func (p *Parser) AllAdditionals() ([]Resource, error) { - // Additionals usually contain OPT, and sometimes A/AAAA - // glue records. - // - // Pre-allocate up to a certain limit, since p.header is - // untrusted data. - n := int(p.header.additionals) - if n > 10 { - n = 10 - } - as := make([]Resource, 0, n) - for { - a, err := p.Additional() - if err == ErrSectionDone { - return as, nil - } - if err != nil { - return nil, err - } - as = append(as, a) - } -} - -// SkipAdditional skips a single Additional Resource. -func (p *Parser) SkipAdditional() error { - return p.skipResource(sectionAdditionals) -} - -// SkipAllAdditionals skips all Additional Resources. -func (p *Parser) SkipAllAdditionals() error { - for { - if err := p.SkipAdditional(); err == ErrSectionDone { - return nil - } else if err != nil { - return err - } - } -} - -// CNAMEResource parses a single CNAMEResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) CNAMEResource() (CNAMEResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeCNAME { - return CNAMEResource{}, ErrNotStarted - } - r, err := unpackCNAMEResource(p.msg, p.off) - if err != nil { - return CNAMEResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// MXResource parses a single MXResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) MXResource() (MXResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeMX { - return MXResource{}, ErrNotStarted - } - r, err := unpackMXResource(p.msg, p.off) - if err != nil { - return MXResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// NSResource parses a single NSResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) NSResource() (NSResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeNS { - return NSResource{}, ErrNotStarted - } - r, err := unpackNSResource(p.msg, p.off) - if err != nil { - return NSResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// PTRResource parses a single PTRResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) PTRResource() (PTRResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypePTR { - return PTRResource{}, ErrNotStarted - } - r, err := unpackPTRResource(p.msg, p.off) - if err != nil { - return PTRResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// SOAResource parses a single SOAResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) SOAResource() (SOAResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeSOA { - return SOAResource{}, ErrNotStarted - } - r, err := unpackSOAResource(p.msg, p.off) - if err != nil { - return SOAResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// TXTResource parses a single TXTResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) TXTResource() (TXTResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeTXT { - return TXTResource{}, ErrNotStarted - } - r, err := unpackTXTResource(p.msg, p.off, p.resHeader.Length) - if err != nil { - return TXTResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// SRVResource parses a single SRVResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) SRVResource() (SRVResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeSRV { - return SRVResource{}, ErrNotStarted - } - r, err := unpackSRVResource(p.msg, p.off) - if err != nil { - return SRVResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// AResource parses a single AResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) AResource() (AResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeA { - return AResource{}, ErrNotStarted - } - r, err := unpackAResource(p.msg, p.off) - if err != nil { - return AResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// AAAAResource parses a single AAAAResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) AAAAResource() (AAAAResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeAAAA { - return AAAAResource{}, ErrNotStarted - } - r, err := unpackAAAAResource(p.msg, p.off) - if err != nil { - return AAAAResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// OPTResource parses a single OPTResource. -// -// One of the XXXHeader methods must have been called before calling this -// method. -func (p *Parser) OPTResource() (OPTResource, error) { - if !p.resHeaderValid || p.resHeader.Type != TypeOPT { - return OPTResource{}, ErrNotStarted - } - r, err := unpackOPTResource(p.msg, p.off, p.resHeader.Length) - if err != nil { - return OPTResource{}, err - } - p.off += int(p.resHeader.Length) - p.resHeaderValid = false - p.index++ - return r, nil -} - -// Unpack parses a full Message. -func (m *Message) Unpack(msg []byte) error { - var p Parser - var err error - if m.Header, err = p.Start(msg); err != nil { - return err - } - if m.Questions, err = p.AllQuestions(); err != nil { - return err - } - if m.Answers, err = p.AllAnswers(); err != nil { - return err - } - if m.Authorities, err = p.AllAuthorities(); err != nil { - return err - } - if m.Additionals, err = p.AllAdditionals(); err != nil { - return err - } - return nil -} - -// Pack packs a full Message. -func (m *Message) Pack() ([]byte, error) { - return m.AppendPack(make([]byte, 0, packStartingCap)) -} - -// AppendPack is like Pack but appends the full Message to b and returns the -// extended buffer. -func (m *Message) AppendPack(b []byte) ([]byte, error) { - // Validate the lengths. It is very unlikely that anyone will try to - // pack more than 65535 of any particular type, but it is possible and - // we should fail gracefully. - if len(m.Questions) > int(^uint16(0)) { - return nil, errTooManyQuestions - } - if len(m.Answers) > int(^uint16(0)) { - return nil, errTooManyAnswers - } - if len(m.Authorities) > int(^uint16(0)) { - return nil, errTooManyAuthorities - } - if len(m.Additionals) > int(^uint16(0)) { - return nil, errTooManyAdditionals - } - - var h header - h.id, h.bits = m.Header.pack() - - h.questions = uint16(len(m.Questions)) - h.answers = uint16(len(m.Answers)) - h.authorities = uint16(len(m.Authorities)) - h.additionals = uint16(len(m.Additionals)) - - compressionOff := len(b) - msg := h.pack(b) - - // RFC 1035 allows (but does not require) compression for packing. RFC - // 1035 requires unpacking implementations to support compression, so - // unconditionally enabling it is fine. - // - // DNS lookups are typically done over UDP, and RFC 1035 states that UDP - // DNS messages can be a maximum of 512 bytes long. Without compression, - // many DNS response messages are over this limit, so enabling - // compression will help ensure compliance. - compression := map[string]int{} - - for i := range m.Questions { - var err error - if msg, err = m.Questions[i].pack(msg, compression, compressionOff); err != nil { - return nil, &nestedError{"packing Question", err} - } - } - for i := range m.Answers { - var err error - if msg, err = m.Answers[i].pack(msg, compression, compressionOff); err != nil { - return nil, &nestedError{"packing Answer", err} - } - } - for i := range m.Authorities { - var err error - if msg, err = m.Authorities[i].pack(msg, compression, compressionOff); err != nil { - return nil, &nestedError{"packing Authority", err} - } - } - for i := range m.Additionals { - var err error - if msg, err = m.Additionals[i].pack(msg, compression, compressionOff); err != nil { - return nil, &nestedError{"packing Additional", err} - } - } - - return msg, nil -} - -// GoString implements fmt.GoStringer.GoString. -func (m *Message) GoString() string { - s := "dnsmessage.Message{Header: " + m.Header.GoString() + ", " + - "Questions: []dnsmessage.Question{" - if len(m.Questions) > 0 { - s += m.Questions[0].GoString() - for _, q := range m.Questions[1:] { - s += ", " + q.GoString() - } - } - s += "}, Answers: []dnsmessage.Resource{" - if len(m.Answers) > 0 { - s += m.Answers[0].GoString() - for _, a := range m.Answers[1:] { - s += ", " + a.GoString() - } - } - s += "}, Authorities: []dnsmessage.Resource{" - if len(m.Authorities) > 0 { - s += m.Authorities[0].GoString() - for _, a := range m.Authorities[1:] { - s += ", " + a.GoString() - } - } - s += "}, Additionals: []dnsmessage.Resource{" - if len(m.Additionals) > 0 { - s += m.Additionals[0].GoString() - for _, a := range m.Additionals[1:] { - s += ", " + a.GoString() - } - } - return s + "}}" -} - -// A Builder allows incrementally packing a DNS message. -// -// Example usage: -// buf := make([]byte, 2, 514) -// b := NewBuilder(buf, Header{...}) -// b.EnableCompression() -// // Optionally start a section and add things to that section. -// // Repeat adding sections as necessary. -// buf, err := b.Finish() -// // If err is nil, buf[2:] will contain the built bytes. -type Builder struct { - // msg is the storage for the message being built. - msg []byte - - // section keeps track of the current section being built. - section section - - // header keeps track of what should go in the header when Finish is - // called. - header header - - // start is the starting index of the bytes allocated in msg for header. - start int - - // compression is a mapping from name suffixes to their starting index - // in msg. - compression map[string]int -} - -// NewBuilder creates a new builder with compression disabled. -// -// Note: Most users will want to immediately enable compression with the -// EnableCompression method. See that method's comment for why you may or may -// not want to enable compression. -// -// The DNS message is appended to the provided initial buffer buf (which may be -// nil) as it is built. The final message is returned by the (*Builder).Finish -// method, which may return the same underlying array if there was sufficient -// capacity in the slice. -func NewBuilder(buf []byte, h Header) Builder { - if buf == nil { - buf = make([]byte, 0, packStartingCap) - } - b := Builder{msg: buf, start: len(buf)} - b.header.id, b.header.bits = h.pack() - var hb [headerLen]byte - b.msg = append(b.msg, hb[:]...) - b.section = sectionHeader - return b -} - -// EnableCompression enables compression in the Builder. -// -// Leaving compression disabled avoids compression related allocations, but can -// result in larger message sizes. Be careful with this mode as it can cause -// messages to exceed the UDP size limit. -// -// According to RFC 1035, section 4.1.4, the use of compression is optional, but -// all implementations must accept both compressed and uncompressed DNS -// messages. -// -// Compression should be enabled before any sections are added for best results. -func (b *Builder) EnableCompression() { - b.compression = map[string]int{} -} - -func (b *Builder) startCheck(s section) error { - if b.section <= sectionNotStarted { - return ErrNotStarted - } - if b.section > s { - return ErrSectionDone - } - return nil -} - -// StartQuestions prepares the builder for packing Questions. -func (b *Builder) StartQuestions() error { - if err := b.startCheck(sectionQuestions); err != nil { - return err - } - b.section = sectionQuestions - return nil -} - -// StartAnswers prepares the builder for packing Answers. -func (b *Builder) StartAnswers() error { - if err := b.startCheck(sectionAnswers); err != nil { - return err - } - b.section = sectionAnswers - return nil -} - -// StartAuthorities prepares the builder for packing Authorities. -func (b *Builder) StartAuthorities() error { - if err := b.startCheck(sectionAuthorities); err != nil { - return err - } - b.section = sectionAuthorities - return nil -} - -// StartAdditionals prepares the builder for packing Additionals. -func (b *Builder) StartAdditionals() error { - if err := b.startCheck(sectionAdditionals); err != nil { - return err - } - b.section = sectionAdditionals - return nil -} - -func (b *Builder) incrementSectionCount() error { - var count *uint16 - var err error - switch b.section { - case sectionQuestions: - count = &b.header.questions - err = errTooManyQuestions - case sectionAnswers: - count = &b.header.answers - err = errTooManyAnswers - case sectionAuthorities: - count = &b.header.authorities - err = errTooManyAuthorities - case sectionAdditionals: - count = &b.header.additionals - err = errTooManyAdditionals - } - if *count == ^uint16(0) { - return err - } - *count++ - return nil -} - -// Question adds a single Question. -func (b *Builder) Question(q Question) error { - if b.section < sectionQuestions { - return ErrNotStarted - } - if b.section > sectionQuestions { - return ErrSectionDone - } - msg, err := q.pack(b.msg, b.compression, b.start) - if err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -func (b *Builder) checkResourceSection() error { - if b.section < sectionAnswers { - return ErrNotStarted - } - if b.section > sectionAdditionals { - return ErrSectionDone - } - return nil -} - -// CNAMEResource adds a single CNAMEResource. -func (b *Builder) CNAMEResource(h ResourceHeader, r CNAMEResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"CNAMEResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// MXResource adds a single MXResource. -func (b *Builder) MXResource(h ResourceHeader, r MXResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"MXResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// NSResource adds a single NSResource. -func (b *Builder) NSResource(h ResourceHeader, r NSResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"NSResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// PTRResource adds a single PTRResource. -func (b *Builder) PTRResource(h ResourceHeader, r PTRResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"PTRResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// SOAResource adds a single SOAResource. -func (b *Builder) SOAResource(h ResourceHeader, r SOAResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"SOAResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// TXTResource adds a single TXTResource. -func (b *Builder) TXTResource(h ResourceHeader, r TXTResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"TXTResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// SRVResource adds a single SRVResource. -func (b *Builder) SRVResource(h ResourceHeader, r SRVResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"SRVResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// AResource adds a single AResource. -func (b *Builder) AResource(h ResourceHeader, r AResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"AResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// AAAAResource adds a single AAAAResource. -func (b *Builder) AAAAResource(h ResourceHeader, r AAAAResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"AAAAResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// OPTResource adds a single OPTResource. -func (b *Builder) OPTResource(h ResourceHeader, r OPTResource) error { - if err := b.checkResourceSection(); err != nil { - return err - } - h.Type = r.realType() - msg, lenOff, err := h.pack(b.msg, b.compression, b.start) - if err != nil { - return &nestedError{"ResourceHeader", err} - } - preLen := len(msg) - if msg, err = r.pack(msg, b.compression, b.start); err != nil { - return &nestedError{"OPTResource body", err} - } - if err := h.fixLen(msg, lenOff, preLen); err != nil { - return err - } - if err := b.incrementSectionCount(); err != nil { - return err - } - b.msg = msg - return nil -} - -// Finish ends message building and generates a binary message. -func (b *Builder) Finish() ([]byte, error) { - if b.section < sectionHeader { - return nil, ErrNotStarted - } - b.section = sectionDone - // Space for the header was allocated in NewBuilder. - b.header.pack(b.msg[b.start:b.start]) - return b.msg, nil -} - -// A ResourceHeader is the header of a DNS resource record. There are -// many types of DNS resource records, but they all share the same header. -type ResourceHeader struct { - // Name is the domain name for which this resource record pertains. - Name Name - - // Type is the type of DNS resource record. - // - // This field will be set automatically during packing. - Type Type - - // Class is the class of network to which this DNS resource record - // pertains. - Class Class - - // TTL is the length of time (measured in seconds) which this resource - // record is valid for (time to live). All Resources in a set should - // have the same TTL (RFC 2181 Section 5.2). - TTL uint32 - - // Length is the length of data in the resource record after the header. - // - // This field will be set automatically during packing. - Length uint16 -} - -// GoString implements fmt.GoStringer.GoString. -func (h *ResourceHeader) GoString() string { - return "dnsmessage.ResourceHeader{" + - "Name: " + h.Name.GoString() + ", " + - "Type: " + h.Type.GoString() + ", " + - "Class: " + h.Class.GoString() + ", " + - "TTL: " + printUint32(h.TTL) + ", " + - "Length: " + printUint16(h.Length) + "}" -} - -// pack appends the wire format of the ResourceHeader to oldMsg. -// -// lenOff is the offset in msg where the Length field was packed. -func (h *ResourceHeader) pack(oldMsg []byte, compression map[string]int, compressionOff int) (msg []byte, lenOff int, err error) { - msg = oldMsg - if msg, err = h.Name.pack(msg, compression, compressionOff); err != nil { - return oldMsg, 0, &nestedError{"Name", err} - } - msg = packType(msg, h.Type) - msg = packClass(msg, h.Class) - msg = packUint32(msg, h.TTL) - lenOff = len(msg) - msg = packUint16(msg, h.Length) - return msg, lenOff, nil -} - -func (h *ResourceHeader) unpack(msg []byte, off int) (int, error) { - newOff := off - var err error - if newOff, err = h.Name.unpack(msg, newOff); err != nil { - return off, &nestedError{"Name", err} - } - if h.Type, newOff, err = unpackType(msg, newOff); err != nil { - return off, &nestedError{"Type", err} - } - if h.Class, newOff, err = unpackClass(msg, newOff); err != nil { - return off, &nestedError{"Class", err} - } - if h.TTL, newOff, err = unpackUint32(msg, newOff); err != nil { - return off, &nestedError{"TTL", err} - } - if h.Length, newOff, err = unpackUint16(msg, newOff); err != nil { - return off, &nestedError{"Length", err} - } - return newOff, nil -} - -// fixLen updates a packed ResourceHeader to include the length of the -// ResourceBody. -// -// lenOff is the offset of the ResourceHeader.Length field in msg. -// -// preLen is the length that msg was before the ResourceBody was packed. -func (h *ResourceHeader) fixLen(msg []byte, lenOff int, preLen int) error { - conLen := len(msg) - preLen - if conLen > int(^uint16(0)) { - return errResTooLong - } - - // Fill in the length now that we know how long the content is. - packUint16(msg[lenOff:lenOff], uint16(conLen)) - h.Length = uint16(conLen) - - return nil -} - -// EDNS(0) wire costants. -const ( - edns0Version = 0 - - edns0DNSSECOK = 0x00008000 - ednsVersionMask = 0x00ff0000 - edns0DNSSECOKMask = 0x00ff8000 -) - -// SetEDNS0 configures h for EDNS(0). -// -// The provided extRCode must be an extedned RCode. -func (h *ResourceHeader) SetEDNS0(udpPayloadLen int, extRCode RCode, dnssecOK bool) error { - h.Name = Name{Data: [nameLen]byte{'.'}, Length: 1} // RFC 6891 section 6.1.2 - h.Type = TypeOPT - h.Class = Class(udpPayloadLen) - h.TTL = uint32(extRCode) >> 4 << 24 - if dnssecOK { - h.TTL |= edns0DNSSECOK - } - return nil -} - -// DNSSECAllowed reports whether the DNSSEC OK bit is set. -func (h *ResourceHeader) DNSSECAllowed() bool { - return h.TTL&edns0DNSSECOKMask == edns0DNSSECOK // RFC 6891 section 6.1.3 -} - -// ExtendedRCode returns an extended RCode. -// -// The provided rcode must be the RCode in DNS message header. -func (h *ResourceHeader) ExtendedRCode(rcode RCode) RCode { - if h.TTL&ednsVersionMask == edns0Version { // RFC 6891 section 6.1.3 - return RCode(h.TTL>>24<<4) | rcode - } - return rcode -} - -func skipResource(msg []byte, off int) (int, error) { - newOff, err := skipName(msg, off) - if err != nil { - return off, &nestedError{"Name", err} - } - if newOff, err = skipType(msg, newOff); err != nil { - return off, &nestedError{"Type", err} - } - if newOff, err = skipClass(msg, newOff); err != nil { - return off, &nestedError{"Class", err} - } - if newOff, err = skipUint32(msg, newOff); err != nil { - return off, &nestedError{"TTL", err} - } - length, newOff, err := unpackUint16(msg, newOff) - if err != nil { - return off, &nestedError{"Length", err} - } - if newOff += int(length); newOff > len(msg) { - return off, errResourceLen - } - return newOff, nil -} - -// packUint16 appends the wire format of field to msg. -func packUint16(msg []byte, field uint16) []byte { - return append(msg, byte(field>>8), byte(field)) -} - -func unpackUint16(msg []byte, off int) (uint16, int, error) { - if off+uint16Len > len(msg) { - return 0, off, errBaseLen - } - return uint16(msg[off])<<8 | uint16(msg[off+1]), off + uint16Len, nil -} - -func skipUint16(msg []byte, off int) (int, error) { - if off+uint16Len > len(msg) { - return off, errBaseLen - } - return off + uint16Len, nil -} - -// packType appends the wire format of field to msg. -func packType(msg []byte, field Type) []byte { - return packUint16(msg, uint16(field)) -} - -func unpackType(msg []byte, off int) (Type, int, error) { - t, o, err := unpackUint16(msg, off) - return Type(t), o, err -} - -func skipType(msg []byte, off int) (int, error) { - return skipUint16(msg, off) -} - -// packClass appends the wire format of field to msg. -func packClass(msg []byte, field Class) []byte { - return packUint16(msg, uint16(field)) -} - -func unpackClass(msg []byte, off int) (Class, int, error) { - c, o, err := unpackUint16(msg, off) - return Class(c), o, err -} - -func skipClass(msg []byte, off int) (int, error) { - return skipUint16(msg, off) -} - -// packUint32 appends the wire format of field to msg. -func packUint32(msg []byte, field uint32) []byte { - return append( - msg, - byte(field>>24), - byte(field>>16), - byte(field>>8), - byte(field), - ) -} - -func unpackUint32(msg []byte, off int) (uint32, int, error) { - if off+uint32Len > len(msg) { - return 0, off, errBaseLen - } - v := uint32(msg[off])<<24 | uint32(msg[off+1])<<16 | uint32(msg[off+2])<<8 | uint32(msg[off+3]) - return v, off + uint32Len, nil -} - -func skipUint32(msg []byte, off int) (int, error) { - if off+uint32Len > len(msg) { - return off, errBaseLen - } - return off + uint32Len, nil -} - -// packText appends the wire format of field to msg. -func packText(msg []byte, field string) ([]byte, error) { - l := len(field) - if l > 255 { - return nil, errStringTooLong - } - msg = append(msg, byte(l)) - msg = append(msg, field...) - - return msg, nil -} - -func unpackText(msg []byte, off int) (string, int, error) { - if off >= len(msg) { - return "", off, errBaseLen - } - beginOff := off + 1 - endOff := beginOff + int(msg[off]) - if endOff > len(msg) { - return "", off, errCalcLen - } - return string(msg[beginOff:endOff]), endOff, nil -} - -func skipText(msg []byte, off int) (int, error) { - if off >= len(msg) { - return off, errBaseLen - } - endOff := off + 1 + int(msg[off]) - if endOff > len(msg) { - return off, errCalcLen - } - return endOff, nil -} - -// packBytes appends the wire format of field to msg. -func packBytes(msg []byte, field []byte) []byte { - return append(msg, field...) -} - -func unpackBytes(msg []byte, off int, field []byte) (int, error) { - newOff := off + len(field) - if newOff > len(msg) { - return off, errBaseLen - } - copy(field, msg[off:newOff]) - return newOff, nil -} - -func skipBytes(msg []byte, off int, field []byte) (int, error) { - newOff := off + len(field) - if newOff > len(msg) { - return off, errBaseLen - } - return newOff, nil -} - -const nameLen = 255 - -// A Name is a non-encoded domain name. It is used instead of strings to avoid -// allocations. -type Name struct { - Data [nameLen]byte - Length uint8 -} - -// NewName creates a new Name from a string. -func NewName(name string) (Name, error) { - if len([]byte(name)) > nameLen { - return Name{}, errCalcLen - } - n := Name{Length: uint8(len(name))} - copy(n.Data[:], []byte(name)) - return n, nil -} - -// MustNewName creates a new Name from a string and panics on error. -func MustNewName(name string) Name { - n, err := NewName(name) - if err != nil { - panic("creating name: " + err.Error()) - } - return n -} - -// String implements fmt.Stringer.String. -func (n Name) String() string { - return string(n.Data[:n.Length]) -} - -// GoString implements fmt.GoStringer.GoString. -func (n *Name) GoString() string { - return `dnsmessage.MustNewName("` + printString(n.Data[:n.Length]) + `")` -} - -// pack appends the wire format of the Name to msg. -// -// Domain names are a sequence of counted strings split at the dots. They end -// with a zero-length string. Compression can be used to reuse domain suffixes. -// -// The compression map will be updated with new domain suffixes. If compression -// is nil, compression will not be used. -func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - oldMsg := msg - - // Add a trailing dot to canonicalize name. - if n.Length == 0 || n.Data[n.Length-1] != '.' { - return oldMsg, errNonCanonicalName - } - - // Allow root domain. - if n.Data[0] == '.' && n.Length == 1 { - return append(msg, 0), nil - } - - // Emit sequence of counted strings, chopping at dots. - for i, begin := 0, 0; i < int(n.Length); i++ { - // Check for the end of the segment. - if n.Data[i] == '.' { - // The two most significant bits have special meaning. - // It isn't allowed for segments to be long enough to - // need them. - if i-begin >= 1<<6 { - return oldMsg, errSegTooLong - } - - // Segments must have a non-zero length. - if i-begin == 0 { - return oldMsg, errZeroSegLen - } - - msg = append(msg, byte(i-begin)) - - for j := begin; j < i; j++ { - msg = append(msg, n.Data[j]) - } - - begin = i + 1 - continue - } - - // We can only compress domain suffixes starting with a new - // segment. A pointer is two bytes with the two most significant - // bits set to 1 to indicate that it is a pointer. - if (i == 0 || n.Data[i-1] == '.') && compression != nil { - if ptr, ok := compression[string(n.Data[i:])]; ok { - // Hit. Emit a pointer instead of the rest of - // the domain. - return append(msg, byte(ptr>>8|0xC0), byte(ptr)), nil - } - - // Miss. Add the suffix to the compression table if the - // offset can be stored in the available 14 bytes. - if len(msg) <= int(^uint16(0)>>2) { - compression[string(n.Data[i:])] = len(msg) - compressionOff - } - } - } - return append(msg, 0), nil -} - -// unpack unpacks a domain name. -func (n *Name) unpack(msg []byte, off int) (int, error) { - return n.unpackCompressed(msg, off, true /* allowCompression */) -} - -func (n *Name) unpackCompressed(msg []byte, off int, allowCompression bool) (int, error) { - // currOff is the current working offset. - currOff := off - - // newOff is the offset where the next record will start. Pointers lead - // to data that belongs to other names and thus doesn't count towards to - // the usage of this name. - newOff := off - - // ptr is the number of pointers followed. - var ptr int - - // Name is a slice representation of the name data. - name := n.Data[:0] - -Loop: - for { - if currOff >= len(msg) { - return off, errBaseLen - } - c := int(msg[currOff]) - currOff++ - switch c & 0xC0 { - case 0x00: // String segment - if c == 0x00 { - // A zero length signals the end of the name. - break Loop - } - endOff := currOff + c - if endOff > len(msg) { - return off, errCalcLen - } - name = append(name, msg[currOff:endOff]...) - name = append(name, '.') - currOff = endOff - case 0xC0: // Pointer - if !allowCompression { - return off, errCompressedSRV - } - if currOff >= len(msg) { - return off, errInvalidPtr - } - c1 := msg[currOff] - currOff++ - if ptr == 0 { - newOff = currOff - } - // Don't follow too many pointers, maybe there's a loop. - if ptr++; ptr > 10 { - return off, errTooManyPtr - } - currOff = (c^0xC0)<<8 | int(c1) - default: - // Prefixes 0x80 and 0x40 are reserved. - return off, errReserved - } - } - if len(name) == 0 { - name = append(name, '.') - } - if len(name) > len(n.Data) { - return off, errCalcLen - } - n.Length = uint8(len(name)) - if ptr == 0 { - newOff = currOff - } - return newOff, nil -} - -func skipName(msg []byte, off int) (int, error) { - // newOff is the offset where the next record will start. Pointers lead - // to data that belongs to other names and thus doesn't count towards to - // the usage of this name. - newOff := off - -Loop: - for { - if newOff >= len(msg) { - return off, errBaseLen - } - c := int(msg[newOff]) - newOff++ - switch c & 0xC0 { - case 0x00: - if c == 0x00 { - // A zero length signals the end of the name. - break Loop - } - // literal string - newOff += c - if newOff > len(msg) { - return off, errCalcLen - } - case 0xC0: - // Pointer to somewhere else in msg. - - // Pointers are two bytes. - newOff++ - - // Don't follow the pointer as the data here has ended. - break Loop - default: - // Prefixes 0x80 and 0x40 are reserved. - return off, errReserved - } - } - - return newOff, nil -} - -// A Question is a DNS query. -type Question struct { - Name Name - Type Type - Class Class -} - -// pack appends the wire format of the Question to msg. -func (q *Question) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - msg, err := q.Name.pack(msg, compression, compressionOff) - if err != nil { - return msg, &nestedError{"Name", err} - } - msg = packType(msg, q.Type) - return packClass(msg, q.Class), nil -} - -// GoString implements fmt.GoStringer.GoString. -func (q *Question) GoString() string { - return "dnsmessage.Question{" + - "Name: " + q.Name.GoString() + ", " + - "Type: " + q.Type.GoString() + ", " + - "Class: " + q.Class.GoString() + "}" -} - -func unpackResourceBody(msg []byte, off int, hdr ResourceHeader) (ResourceBody, int, error) { - var ( - r ResourceBody - err error - name string - ) - switch hdr.Type { - case TypeA: - var rb AResource - rb, err = unpackAResource(msg, off) - r = &rb - name = "A" - case TypeNS: - var rb NSResource - rb, err = unpackNSResource(msg, off) - r = &rb - name = "NS" - case TypeCNAME: - var rb CNAMEResource - rb, err = unpackCNAMEResource(msg, off) - r = &rb - name = "CNAME" - case TypeSOA: - var rb SOAResource - rb, err = unpackSOAResource(msg, off) - r = &rb - name = "SOA" - case TypePTR: - var rb PTRResource - rb, err = unpackPTRResource(msg, off) - r = &rb - name = "PTR" - case TypeMX: - var rb MXResource - rb, err = unpackMXResource(msg, off) - r = &rb - name = "MX" - case TypeTXT: - var rb TXTResource - rb, err = unpackTXTResource(msg, off, hdr.Length) - r = &rb - name = "TXT" - case TypeAAAA: - var rb AAAAResource - rb, err = unpackAAAAResource(msg, off) - r = &rb - name = "AAAA" - case TypeSRV: - var rb SRVResource - rb, err = unpackSRVResource(msg, off) - r = &rb - name = "SRV" - case TypeOPT: - var rb OPTResource - rb, err = unpackOPTResource(msg, off, hdr.Length) - r = &rb - name = "OPT" - } - if err != nil { - return nil, off, &nestedError{name + " record", err} - } - if r == nil { - return nil, off, errors.New("invalid resource type: " + string(hdr.Type+'0')) - } - return r, off + int(hdr.Length), nil -} - -// A CNAMEResource is a CNAME Resource record. -type CNAMEResource struct { - CNAME Name -} - -func (r *CNAMEResource) realType() Type { - return TypeCNAME -} - -// pack appends the wire format of the CNAMEResource to msg. -func (r *CNAMEResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - return r.CNAME.pack(msg, compression, compressionOff) -} - -// GoString implements fmt.GoStringer.GoString. -func (r *CNAMEResource) GoString() string { - return "dnsmessage.CNAMEResource{CNAME: " + r.CNAME.GoString() + "}" -} - -func unpackCNAMEResource(msg []byte, off int) (CNAMEResource, error) { - var cname Name - if _, err := cname.unpack(msg, off); err != nil { - return CNAMEResource{}, err - } - return CNAMEResource{cname}, nil -} - -// An MXResource is an MX Resource record. -type MXResource struct { - Pref uint16 - MX Name -} - -func (r *MXResource) realType() Type { - return TypeMX -} - -// pack appends the wire format of the MXResource to msg. -func (r *MXResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - oldMsg := msg - msg = packUint16(msg, r.Pref) - msg, err := r.MX.pack(msg, compression, compressionOff) - if err != nil { - return oldMsg, &nestedError{"MXResource.MX", err} - } - return msg, nil -} - -// GoString implements fmt.GoStringer.GoString. -func (r *MXResource) GoString() string { - return "dnsmessage.MXResource{" + - "Pref: " + printUint16(r.Pref) + ", " + - "MX: " + r.MX.GoString() + "}" -} - -func unpackMXResource(msg []byte, off int) (MXResource, error) { - pref, off, err := unpackUint16(msg, off) - if err != nil { - return MXResource{}, &nestedError{"Pref", err} - } - var mx Name - if _, err := mx.unpack(msg, off); err != nil { - return MXResource{}, &nestedError{"MX", err} - } - return MXResource{pref, mx}, nil -} - -// An NSResource is an NS Resource record. -type NSResource struct { - NS Name -} - -func (r *NSResource) realType() Type { - return TypeNS -} - -// pack appends the wire format of the NSResource to msg. -func (r *NSResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - return r.NS.pack(msg, compression, compressionOff) -} - -// GoString implements fmt.GoStringer.GoString. -func (r *NSResource) GoString() string { - return "dnsmessage.NSResource{NS: " + r.NS.GoString() + "}" -} - -func unpackNSResource(msg []byte, off int) (NSResource, error) { - var ns Name - if _, err := ns.unpack(msg, off); err != nil { - return NSResource{}, err - } - return NSResource{ns}, nil -} - -// A PTRResource is a PTR Resource record. -type PTRResource struct { - PTR Name -} - -func (r *PTRResource) realType() Type { - return TypePTR -} - -// pack appends the wire format of the PTRResource to msg. -func (r *PTRResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - return r.PTR.pack(msg, compression, compressionOff) -} - -// GoString implements fmt.GoStringer.GoString. -func (r *PTRResource) GoString() string { - return "dnsmessage.PTRResource{PTR: " + r.PTR.GoString() + "}" -} - -func unpackPTRResource(msg []byte, off int) (PTRResource, error) { - var ptr Name - if _, err := ptr.unpack(msg, off); err != nil { - return PTRResource{}, err - } - return PTRResource{ptr}, nil -} - -// An SOAResource is an SOA Resource record. -type SOAResource struct { - NS Name - MBox Name - Serial uint32 - Refresh uint32 - Retry uint32 - Expire uint32 - - // MinTTL the is the default TTL of Resources records which did not - // contain a TTL value and the TTL of negative responses. (RFC 2308 - // Section 4) - MinTTL uint32 -} - -func (r *SOAResource) realType() Type { - return TypeSOA -} - -// pack appends the wire format of the SOAResource to msg. -func (r *SOAResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - oldMsg := msg - msg, err := r.NS.pack(msg, compression, compressionOff) - if err != nil { - return oldMsg, &nestedError{"SOAResource.NS", err} - } - msg, err = r.MBox.pack(msg, compression, compressionOff) - if err != nil { - return oldMsg, &nestedError{"SOAResource.MBox", err} - } - msg = packUint32(msg, r.Serial) - msg = packUint32(msg, r.Refresh) - msg = packUint32(msg, r.Retry) - msg = packUint32(msg, r.Expire) - return packUint32(msg, r.MinTTL), nil -} - -// GoString implements fmt.GoStringer.GoString. -func (r *SOAResource) GoString() string { - return "dnsmessage.SOAResource{" + - "NS: " + r.NS.GoString() + ", " + - "MBox: " + r.MBox.GoString() + ", " + - "Serial: " + printUint32(r.Serial) + ", " + - "Refresh: " + printUint32(r.Refresh) + ", " + - "Retry: " + printUint32(r.Retry) + ", " + - "Expire: " + printUint32(r.Expire) + ", " + - "MinTTL: " + printUint32(r.MinTTL) + "}" -} - -func unpackSOAResource(msg []byte, off int) (SOAResource, error) { - var ns Name - off, err := ns.unpack(msg, off) - if err != nil { - return SOAResource{}, &nestedError{"NS", err} - } - var mbox Name - if off, err = mbox.unpack(msg, off); err != nil { - return SOAResource{}, &nestedError{"MBox", err} - } - serial, off, err := unpackUint32(msg, off) - if err != nil { - return SOAResource{}, &nestedError{"Serial", err} - } - refresh, off, err := unpackUint32(msg, off) - if err != nil { - return SOAResource{}, &nestedError{"Refresh", err} - } - retry, off, err := unpackUint32(msg, off) - if err != nil { - return SOAResource{}, &nestedError{"Retry", err} - } - expire, off, err := unpackUint32(msg, off) - if err != nil { - return SOAResource{}, &nestedError{"Expire", err} - } - minTTL, _, err := unpackUint32(msg, off) - if err != nil { - return SOAResource{}, &nestedError{"MinTTL", err} - } - return SOAResource{ns, mbox, serial, refresh, retry, expire, minTTL}, nil -} - -// A TXTResource is a TXT Resource record. -type TXTResource struct { - TXT []string -} - -func (r *TXTResource) realType() Type { - return TypeTXT -} - -// pack appends the wire format of the TXTResource to msg. -func (r *TXTResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - oldMsg := msg - for _, s := range r.TXT { - var err error - msg, err = packText(msg, s) - if err != nil { - return oldMsg, err - } - } - return msg, nil -} - -// GoString implements fmt.GoStringer.GoString. -func (r *TXTResource) GoString() string { - s := "dnsmessage.TXTResource{TXT: []string{" - if len(r.TXT) == 0 { - return s + "}}" - } - s += `"` + printString([]byte(r.TXT[0])) - for _, t := range r.TXT[1:] { - s += `", "` + printString([]byte(t)) - } - return s + `"}}` -} - -func unpackTXTResource(msg []byte, off int, length uint16) (TXTResource, error) { - txts := make([]string, 0, 1) - for n := uint16(0); n < length; { - var t string - var err error - if t, off, err = unpackText(msg, off); err != nil { - return TXTResource{}, &nestedError{"text", err} - } - // Check if we got too many bytes. - if length-n < uint16(len(t))+1 { - return TXTResource{}, errCalcLen - } - n += uint16(len(t)) + 1 - txts = append(txts, t) - } - return TXTResource{txts}, nil -} - -// An SRVResource is an SRV Resource record. -type SRVResource struct { - Priority uint16 - Weight uint16 - Port uint16 - Target Name // Not compressed as per RFC 2782. -} - -func (r *SRVResource) realType() Type { - return TypeSRV -} - -// pack appends the wire format of the SRVResource to msg. -func (r *SRVResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - oldMsg := msg - msg = packUint16(msg, r.Priority) - msg = packUint16(msg, r.Weight) - msg = packUint16(msg, r.Port) - msg, err := r.Target.pack(msg, nil, compressionOff) - if err != nil { - return oldMsg, &nestedError{"SRVResource.Target", err} - } - return msg, nil -} - -// GoString implements fmt.GoStringer.GoString. -func (r *SRVResource) GoString() string { - return "dnsmessage.SRVResource{" + - "Priority: " + printUint16(r.Priority) + ", " + - "Weight: " + printUint16(r.Weight) + ", " + - "Port: " + printUint16(r.Port) + ", " + - "Target: " + r.Target.GoString() + "}" -} - -func unpackSRVResource(msg []byte, off int) (SRVResource, error) { - priority, off, err := unpackUint16(msg, off) - if err != nil { - return SRVResource{}, &nestedError{"Priority", err} - } - weight, off, err := unpackUint16(msg, off) - if err != nil { - return SRVResource{}, &nestedError{"Weight", err} - } - port, off, err := unpackUint16(msg, off) - if err != nil { - return SRVResource{}, &nestedError{"Port", err} - } - var target Name - if _, err := target.unpackCompressed(msg, off, false /* allowCompression */); err != nil { - return SRVResource{}, &nestedError{"Target", err} - } - return SRVResource{priority, weight, port, target}, nil -} - -// An AResource is an A Resource record. -type AResource struct { - A [4]byte -} - -func (r *AResource) realType() Type { - return TypeA -} - -// pack appends the wire format of the AResource to msg. -func (r *AResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - return packBytes(msg, r.A[:]), nil -} - -// GoString implements fmt.GoStringer.GoString. -func (r *AResource) GoString() string { - return "dnsmessage.AResource{" + - "A: [4]byte{" + printByteSlice(r.A[:]) + "}}" -} - -func unpackAResource(msg []byte, off int) (AResource, error) { - var a [4]byte - if _, err := unpackBytes(msg, off, a[:]); err != nil { - return AResource{}, err - } - return AResource{a}, nil -} - -// An AAAAResource is an AAAA Resource record. -type AAAAResource struct { - AAAA [16]byte -} - -func (r *AAAAResource) realType() Type { - return TypeAAAA -} - -// GoString implements fmt.GoStringer.GoString. -func (r *AAAAResource) GoString() string { - return "dnsmessage.AAAAResource{" + - "AAAA: [16]byte{" + printByteSlice(r.AAAA[:]) + "}}" -} - -// pack appends the wire format of the AAAAResource to msg. -func (r *AAAAResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - return packBytes(msg, r.AAAA[:]), nil -} - -func unpackAAAAResource(msg []byte, off int) (AAAAResource, error) { - var aaaa [16]byte - if _, err := unpackBytes(msg, off, aaaa[:]); err != nil { - return AAAAResource{}, err - } - return AAAAResource{aaaa}, nil -} - -// An OPTResource is an OPT pseudo Resource record. -// -// The pseudo resource record is part of the extension mechanisms for DNS -// as defined in RFC 6891. -type OPTResource struct { - Options []Option -} - -// An Option represents a DNS message option within OPTResource. -// -// The message option is part of the extension mechanisms for DNS as -// defined in RFC 6891. -type Option struct { - Code uint16 // option code - Data []byte -} - -// GoString implements fmt.GoStringer.GoString. -func (o *Option) GoString() string { - return "dnsmessage.Option{" + - "Code: " + printUint16(o.Code) + ", " + - "Data: []byte{" + printByteSlice(o.Data) + "}}" -} - -func (r *OPTResource) realType() Type { - return TypeOPT -} - -func (r *OPTResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) { - for _, opt := range r.Options { - msg = packUint16(msg, opt.Code) - l := uint16(len(opt.Data)) - msg = packUint16(msg, l) - msg = packBytes(msg, opt.Data) - } - return msg, nil -} - -// GoString implements fmt.GoStringer.GoString. -func (r *OPTResource) GoString() string { - s := "dnsmessage.OPTResource{Options: []dnsmessage.Option{" - if len(r.Options) == 0 { - return s + "}}" - } - s += r.Options[0].GoString() - for _, o := range r.Options[1:] { - s += ", " + o.GoString() - } - return s + "}}" -} - -func unpackOPTResource(msg []byte, off int, length uint16) (OPTResource, error) { - var opts []Option - for oldOff := off; off < oldOff+int(length); { - var err error - var o Option - o.Code, off, err = unpackUint16(msg, off) - if err != nil { - return OPTResource{}, &nestedError{"Code", err} - } - var l uint16 - l, off, err = unpackUint16(msg, off) - if err != nil { - return OPTResource{}, &nestedError{"Data", err} - } - o.Data = make([]byte, l) - if copy(o.Data, msg[off:]) != int(l) { - return OPTResource{}, &nestedError{"Data", errCalcLen} - } - off += int(l) - opts = append(opts, o) - } - return OPTResource{opts}, nil -} diff --git a/vendor/golang.org/x/net/dns/dnsmessage/message_test.go b/vendor/golang.org/x/net/dns/dnsmessage/message_test.go deleted file mode 100644 index 25ba8f06..00000000 --- a/vendor/golang.org/x/net/dns/dnsmessage/message_test.go +++ /dev/null @@ -1,1451 +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 dnsmessage - -import ( - "bytes" - "fmt" - "reflect" - "strings" - "testing" -) - -func TestPrintPaddedUint8(t *testing.T) { - tests := []struct { - num uint8 - want string - }{ - {0, "000"}, - {1, "001"}, - {9, "009"}, - {10, "010"}, - {99, "099"}, - {100, "100"}, - {124, "124"}, - {104, "104"}, - {120, "120"}, - {255, "255"}, - } - - for _, test := range tests { - if got := printPaddedUint8(test.num); got != test.want { - t.Errorf("got printPaddedUint8(%d) = %s, want = %s", test.num, got, test.want) - } - } -} - -func TestPrintUint8Bytes(t *testing.T) { - tests := []uint8{ - 0, - 1, - 9, - 10, - 99, - 100, - 124, - 104, - 120, - 255, - } - - for _, test := range tests { - if got, want := string(printUint8Bytes(nil, test)), fmt.Sprint(test); got != want { - t.Errorf("got printUint8Bytes(%d) = %s, want = %s", test, got, want) - } - } -} - -func TestPrintUint16(t *testing.T) { - tests := []uint16{ - 65535, - 0, - 1, - 10, - 100, - 1000, - 10000, - 324, - 304, - 320, - } - - for _, test := range tests { - if got, want := printUint16(test), fmt.Sprint(test); got != want { - t.Errorf("got printUint16(%d) = %s, want = %s", test, got, want) - } - } -} - -func TestPrintUint32(t *testing.T) { - tests := []uint32{ - 4294967295, - 65535, - 0, - 1, - 10, - 100, - 1000, - 10000, - 100000, - 1000000, - 10000000, - 100000000, - 1000000000, - 324, - 304, - 320, - } - - for _, test := range tests { - if got, want := printUint32(test), fmt.Sprint(test); got != want { - t.Errorf("got printUint32(%d) = %s, want = %s", test, got, want) - } - } -} - -func mustEDNS0ResourceHeader(l int, extrc RCode, do bool) ResourceHeader { - h := ResourceHeader{Class: ClassINET} - if err := h.SetEDNS0(l, extrc, do); err != nil { - panic(err) - } - return h -} - -func (m *Message) String() string { - s := fmt.Sprintf("Message: %#v\n", &m.Header) - if len(m.Questions) > 0 { - s += "-- Questions\n" - for _, q := range m.Questions { - s += fmt.Sprintf("%#v\n", q) - } - } - if len(m.Answers) > 0 { - s += "-- Answers\n" - for _, a := range m.Answers { - s += fmt.Sprintf("%#v\n", a) - } - } - if len(m.Authorities) > 0 { - s += "-- Authorities\n" - for _, ns := range m.Authorities { - s += fmt.Sprintf("%#v\n", ns) - } - } - if len(m.Additionals) > 0 { - s += "-- Additionals\n" - for _, e := range m.Additionals { - s += fmt.Sprintf("%#v\n", e) - } - } - return s -} - -func TestNameString(t *testing.T) { - want := "foo" - name := MustNewName(want) - if got := fmt.Sprint(name); got != want { - t.Errorf("got fmt.Sprint(%#v) = %s, want = %s", name, got, want) - } -} - -func TestQuestionPackUnpack(t *testing.T) { - want := Question{ - Name: MustNewName("."), - Type: TypeA, - Class: ClassINET, - } - buf, err := want.pack(make([]byte, 1, 50), map[string]int{}, 1) - if err != nil { - t.Fatal("Question.pack() =", err) - } - var p Parser - p.msg = buf - p.header.questions = 1 - p.section = sectionQuestions - p.off = 1 - got, err := p.Question() - if err != nil { - t.Fatalf("Parser{%q}.Question() = %v", string(buf[1:]), err) - } - if p.off != len(buf) { - t.Errorf("unpacked different amount than packed: got = %d, want = %d", p.off, len(buf)) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("got from Parser.Question() = %+v, want = %+v", got, want) - } -} - -func TestName(t *testing.T) { - tests := []string{ - "", - ".", - "google..com", - "google.com", - "google..com.", - "google.com.", - ".google.com.", - "www..google.com.", - "www.google.com.", - } - - for _, test := range tests { - n, err := NewName(test) - if err != nil { - t.Errorf("NewName(%q) = %v", test, err) - continue - } - if ns := n.String(); ns != test { - t.Errorf("got %#v.String() = %q, want = %q", n, ns, test) - continue - } - } -} - -func TestNamePackUnpack(t *testing.T) { - tests := []struct { - in string - want string - err error - }{ - {"", "", errNonCanonicalName}, - {".", ".", nil}, - {"google..com", "", errNonCanonicalName}, - {"google.com", "", errNonCanonicalName}, - {"google..com.", "", errZeroSegLen}, - {"google.com.", "google.com.", nil}, - {".google.com.", "", errZeroSegLen}, - {"www..google.com.", "", errZeroSegLen}, - {"www.google.com.", "www.google.com.", nil}, - } - - for _, test := range tests { - in := MustNewName(test.in) - want := MustNewName(test.want) - buf, err := in.pack(make([]byte, 0, 30), map[string]int{}, 0) - if err != test.err { - t.Errorf("got %q.pack() = %v, want = %v", test.in, err, test.err) - continue - } - if test.err != nil { - continue - } - var got Name - n, err := got.unpack(buf, 0) - if err != nil { - t.Errorf("%q.unpack() = %v", test.in, err) - continue - } - if n != len(buf) { - t.Errorf( - "unpacked different amount than packed for %q: got = %d, want = %d", - test.in, - n, - len(buf), - ) - } - if got != want { - t.Errorf("unpacking packing of %q: got = %#v, want = %#v", test.in, got, want) - } - } -} - -func TestIncompressibleName(t *testing.T) { - name := MustNewName("example.com.") - compression := map[string]int{} - buf, err := name.pack(make([]byte, 0, 100), compression, 0) - if err != nil { - t.Fatal("first Name.pack() =", err) - } - buf, err = name.pack(buf, compression, 0) - if err != nil { - t.Fatal("second Name.pack() =", err) - } - var n1 Name - off, err := n1.unpackCompressed(buf, 0, false /* allowCompression */) - if err != nil { - t.Fatal("unpacking incompressible name without pointers failed:", err) - } - var n2 Name - if _, err := n2.unpackCompressed(buf, off, false /* allowCompression */); err != errCompressedSRV { - t.Errorf("unpacking compressed incompressible name with pointers: got %v, want = %v", err, errCompressedSRV) - } -} - -func checkErrorPrefix(err error, prefix string) bool { - e, ok := err.(*nestedError) - return ok && e.s == prefix -} - -func TestHeaderUnpackError(t *testing.T) { - wants := []string{ - "id", - "bits", - "questions", - "answers", - "authorities", - "additionals", - } - var buf []byte - var h header - for _, want := range wants { - n, err := h.unpack(buf, 0) - if n != 0 || !checkErrorPrefix(err, want) { - t.Errorf("got header.unpack([%d]byte, 0) = %d, %v, want = 0, %s", len(buf), n, err, want) - } - buf = append(buf, 0, 0) - } -} - -func TestParserStart(t *testing.T) { - const want = "unpacking header" - var p Parser - for i := 0; i <= 1; i++ { - _, err := p.Start([]byte{}) - if !checkErrorPrefix(err, want) { - t.Errorf("got Parser.Start(nil) = _, %v, want = _, %s", err, want) - } - } -} - -func TestResourceNotStarted(t *testing.T) { - tests := []struct { - name string - fn func(*Parser) error - }{ - {"CNAMEResource", func(p *Parser) error { _, err := p.CNAMEResource(); return err }}, - {"MXResource", func(p *Parser) error { _, err := p.MXResource(); return err }}, - {"NSResource", func(p *Parser) error { _, err := p.NSResource(); return err }}, - {"PTRResource", func(p *Parser) error { _, err := p.PTRResource(); return err }}, - {"SOAResource", func(p *Parser) error { _, err := p.SOAResource(); return err }}, - {"TXTResource", func(p *Parser) error { _, err := p.TXTResource(); return err }}, - {"SRVResource", func(p *Parser) error { _, err := p.SRVResource(); return err }}, - {"AResource", func(p *Parser) error { _, err := p.AResource(); return err }}, - {"AAAAResource", func(p *Parser) error { _, err := p.AAAAResource(); return err }}, - } - - for _, test := range tests { - if err := test.fn(&Parser{}); err != ErrNotStarted { - t.Errorf("got Parser.%s() = _ , %v, want = _, %v", test.name, err, ErrNotStarted) - } - } -} - -func TestDNSPackUnpack(t *testing.T) { - wants := []Message{ - { - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeAAAA, - Class: ClassINET, - }, - }, - Answers: []Resource{}, - Authorities: []Resource{}, - Additionals: []Resource{}, - }, - largeTestMsg(), - } - for i, want := range wants { - b, err := want.Pack() - if err != nil { - t.Fatalf("%d: Message.Pack() = %v", i, err) - } - var got Message - err = got.Unpack(b) - if err != nil { - t.Fatalf("%d: Message.Unapck() = %v", i, err) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("%d: Message.Pack/Unpack() roundtrip: got = %+v, want = %+v", i, &got, &want) - } - } -} - -func TestDNSAppendPackUnpack(t *testing.T) { - wants := []Message{ - { - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeAAAA, - Class: ClassINET, - }, - }, - Answers: []Resource{}, - Authorities: []Resource{}, - Additionals: []Resource{}, - }, - largeTestMsg(), - } - for i, want := range wants { - b := make([]byte, 2, 514) - b, err := want.AppendPack(b) - if err != nil { - t.Fatalf("%d: Message.AppendPack() = %v", i, err) - } - b = b[2:] - var got Message - err = got.Unpack(b) - if err != nil { - t.Fatalf("%d: Message.Unapck() = %v", i, err) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("%d: Message.AppendPack/Unpack() roundtrip: got = %+v, want = %+v", i, &got, &want) - } - } -} - -func TestSkipAll(t *testing.T) { - msg := largeTestMsg() - buf, err := msg.Pack() - if err != nil { - t.Fatal("Message.Pack() =", err) - } - var p Parser - if _, err := p.Start(buf); err != nil { - t.Fatal("Parser.Start(non-nil) =", err) - } - - tests := []struct { - name string - f func() error - }{ - {"SkipAllQuestions", p.SkipAllQuestions}, - {"SkipAllAnswers", p.SkipAllAnswers}, - {"SkipAllAuthorities", p.SkipAllAuthorities}, - {"SkipAllAdditionals", p.SkipAllAdditionals}, - } - for _, test := range tests { - for i := 1; i <= 3; i++ { - if err := test.f(); err != nil { - t.Errorf("%d: Parser.%s() = %v", i, test.name, err) - } - } - } -} - -func TestSkipEach(t *testing.T) { - msg := smallTestMsg() - - buf, err := msg.Pack() - if err != nil { - t.Fatal("Message.Pack() =", err) - } - var p Parser - if _, err := p.Start(buf); err != nil { - t.Fatal("Parser.Start(non-nil) =", err) - } - - tests := []struct { - name string - f func() error - }{ - {"SkipQuestion", p.SkipQuestion}, - {"SkipAnswer", p.SkipAnswer}, - {"SkipAuthority", p.SkipAuthority}, - {"SkipAdditional", p.SkipAdditional}, - } - for _, test := range tests { - if err := test.f(); err != nil { - t.Errorf("first Parser.%s() = %v, want = nil", test.name, err) - } - if err := test.f(); err != ErrSectionDone { - t.Errorf("second Parser.%s() = %v, want = %v", test.name, err, ErrSectionDone) - } - } -} - -func TestSkipAfterRead(t *testing.T) { - msg := smallTestMsg() - - buf, err := msg.Pack() - if err != nil { - t.Fatal("Message.Pack() =", err) - } - var p Parser - if _, err := p.Start(buf); err != nil { - t.Fatal("Parser.Srart(non-nil) =", err) - } - - tests := []struct { - name string - skip func() error - read func() error - }{ - {"Question", p.SkipQuestion, func() error { _, err := p.Question(); return err }}, - {"Answer", p.SkipAnswer, func() error { _, err := p.Answer(); return err }}, - {"Authority", p.SkipAuthority, func() error { _, err := p.Authority(); return err }}, - {"Additional", p.SkipAdditional, func() error { _, err := p.Additional(); return err }}, - } - for _, test := range tests { - if err := test.read(); err != nil { - t.Errorf("got Parser.%s() = _, %v, want = _, nil", test.name, err) - } - if err := test.skip(); err != ErrSectionDone { - t.Errorf("got Parser.Skip%s() = %v, want = %v", test.name, err, ErrSectionDone) - } - } -} - -func TestSkipNotStarted(t *testing.T) { - var p Parser - - tests := []struct { - name string - f func() error - }{ - {"SkipAllQuestions", p.SkipAllQuestions}, - {"SkipAllAnswers", p.SkipAllAnswers}, - {"SkipAllAuthorities", p.SkipAllAuthorities}, - {"SkipAllAdditionals", p.SkipAllAdditionals}, - } - for _, test := range tests { - if err := test.f(); err != ErrNotStarted { - t.Errorf("got Parser.%s() = %v, want = %v", test.name, err, ErrNotStarted) - } - } -} - -func TestTooManyRecords(t *testing.T) { - const recs = int(^uint16(0)) + 1 - tests := []struct { - name string - msg Message - want error - }{ - { - "Questions", - Message{ - Questions: make([]Question, recs), - }, - errTooManyQuestions, - }, - { - "Answers", - Message{ - Answers: make([]Resource, recs), - }, - errTooManyAnswers, - }, - { - "Authorities", - Message{ - Authorities: make([]Resource, recs), - }, - errTooManyAuthorities, - }, - { - "Additionals", - Message{ - Additionals: make([]Resource, recs), - }, - errTooManyAdditionals, - }, - } - - for _, test := range tests { - if _, got := test.msg.Pack(); got != test.want { - t.Errorf("got Message.Pack() for %d %s = %v, want = %v", recs, test.name, got, test.want) - } - } -} - -func TestVeryLongTxt(t *testing.T) { - want := Resource{ - ResourceHeader{ - Name: MustNewName("foo.bar.example.com."), - Type: TypeTXT, - Class: ClassINET, - }, - &TXTResource{[]string{ - "", - "", - "foo bar", - "", - "www.example.com", - "www.example.com.", - strings.Repeat(".", 255), - }}, - } - buf, err := want.pack(make([]byte, 0, 8000), map[string]int{}, 0) - if err != nil { - t.Fatal("Resource.pack() =", err) - } - var got Resource - off, err := got.Header.unpack(buf, 0) - if err != nil { - t.Fatal("ResourceHeader.unpack() =", err) - } - body, n, err := unpackResourceBody(buf, off, got.Header) - if err != nil { - t.Fatal("unpackResourceBody() =", err) - } - got.Body = body - if n != len(buf) { - t.Errorf("unpacked different amount than packed: got = %d, want = %d", n, len(buf)) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("Resource.pack/unpack() roundtrip: got = %#v, want = %#v", got, want) - } -} - -func TestTooLongTxt(t *testing.T) { - rb := TXTResource{[]string{strings.Repeat(".", 256)}} - if _, err := rb.pack(make([]byte, 0, 8000), map[string]int{}, 0); err != errStringTooLong { - t.Errorf("packing TXTResource with 256 character string: got err = %v, want = %v", err, errStringTooLong) - } -} - -func TestStartAppends(t *testing.T) { - buf := make([]byte, 2, 514) - wantBuf := []byte{4, 44} - copy(buf, wantBuf) - - b := NewBuilder(buf, Header{}) - b.EnableCompression() - - buf, err := b.Finish() - if err != nil { - t.Fatal("Builder.Finish() =", err) - } - if got, want := len(buf), headerLen+2; got != want { - t.Errorf("got len(buf) = %d, want = %d", got, want) - } - if string(buf[:2]) != string(wantBuf) { - t.Errorf("original data not preserved, got = %#v, want = %#v", buf[:2], wantBuf) - } -} - -func TestStartError(t *testing.T) { - tests := []struct { - name string - fn func(*Builder) error - }{ - {"Questions", func(b *Builder) error { return b.StartQuestions() }}, - {"Answers", func(b *Builder) error { return b.StartAnswers() }}, - {"Authorities", func(b *Builder) error { return b.StartAuthorities() }}, - {"Additionals", func(b *Builder) error { return b.StartAdditionals() }}, - } - - envs := []struct { - name string - fn func() *Builder - want error - }{ - {"sectionNotStarted", func() *Builder { return &Builder{section: sectionNotStarted} }, ErrNotStarted}, - {"sectionDone", func() *Builder { return &Builder{section: sectionDone} }, ErrSectionDone}, - } - - for _, env := range envs { - for _, test := range tests { - if got := test.fn(env.fn()); got != env.want { - t.Errorf("got Builder{%s}.Start%s() = %v, want = %v", env.name, test.name, got, env.want) - } - } - } -} - -func TestBuilderResourceError(t *testing.T) { - tests := []struct { - name string - fn func(*Builder) error - }{ - {"CNAMEResource", func(b *Builder) error { return b.CNAMEResource(ResourceHeader{}, CNAMEResource{}) }}, - {"MXResource", func(b *Builder) error { return b.MXResource(ResourceHeader{}, MXResource{}) }}, - {"NSResource", func(b *Builder) error { return b.NSResource(ResourceHeader{}, NSResource{}) }}, - {"PTRResource", func(b *Builder) error { return b.PTRResource(ResourceHeader{}, PTRResource{}) }}, - {"SOAResource", func(b *Builder) error { return b.SOAResource(ResourceHeader{}, SOAResource{}) }}, - {"TXTResource", func(b *Builder) error { return b.TXTResource(ResourceHeader{}, TXTResource{}) }}, - {"SRVResource", func(b *Builder) error { return b.SRVResource(ResourceHeader{}, SRVResource{}) }}, - {"AResource", func(b *Builder) error { return b.AResource(ResourceHeader{}, AResource{}) }}, - {"AAAAResource", func(b *Builder) error { return b.AAAAResource(ResourceHeader{}, AAAAResource{}) }}, - {"OPTResource", func(b *Builder) error { return b.OPTResource(ResourceHeader{}, OPTResource{}) }}, - } - - envs := []struct { - name string - fn func() *Builder - want error - }{ - {"sectionNotStarted", func() *Builder { return &Builder{section: sectionNotStarted} }, ErrNotStarted}, - {"sectionHeader", func() *Builder { return &Builder{section: sectionHeader} }, ErrNotStarted}, - {"sectionQuestions", func() *Builder { return &Builder{section: sectionQuestions} }, ErrNotStarted}, - {"sectionDone", func() *Builder { return &Builder{section: sectionDone} }, ErrSectionDone}, - } - - for _, env := range envs { - for _, test := range tests { - if got := test.fn(env.fn()); got != env.want { - t.Errorf("got Builder{%s}.%s() = %v, want = %v", env.name, test.name, got, env.want) - } - } - } -} - -func TestFinishError(t *testing.T) { - var b Builder - want := ErrNotStarted - if _, got := b.Finish(); got != want { - t.Errorf("got Builder.Finish() = %v, want = %v", got, want) - } -} - -func TestBuilder(t *testing.T) { - msg := largeTestMsg() - want, err := msg.Pack() - if err != nil { - t.Fatal("Message.Pack() =", err) - } - - b := NewBuilder(nil, msg.Header) - b.EnableCompression() - - if err := b.StartQuestions(); err != nil { - t.Fatal("Builder.StartQuestions() =", err) - } - for _, q := range msg.Questions { - if err := b.Question(q); err != nil { - t.Fatalf("Builder.Question(%#v) = %v", q, err) - } - } - - if err := b.StartAnswers(); err != nil { - t.Fatal("Builder.StartAnswers() =", err) - } - for _, a := range msg.Answers { - switch a.Header.Type { - case TypeA: - if err := b.AResource(a.Header, *a.Body.(*AResource)); err != nil { - t.Fatalf("Builder.AResource(%#v) = %v", a, err) - } - case TypeNS: - if err := b.NSResource(a.Header, *a.Body.(*NSResource)); err != nil { - t.Fatalf("Builder.NSResource(%#v) = %v", a, err) - } - case TypeCNAME: - if err := b.CNAMEResource(a.Header, *a.Body.(*CNAMEResource)); err != nil { - t.Fatalf("Builder.CNAMEResource(%#v) = %v", a, err) - } - case TypeSOA: - if err := b.SOAResource(a.Header, *a.Body.(*SOAResource)); err != nil { - t.Fatalf("Builder.SOAResource(%#v) = %v", a, err) - } - case TypePTR: - if err := b.PTRResource(a.Header, *a.Body.(*PTRResource)); err != nil { - t.Fatalf("Builder.PTRResource(%#v) = %v", a, err) - } - case TypeMX: - if err := b.MXResource(a.Header, *a.Body.(*MXResource)); err != nil { - t.Fatalf("Builder.MXResource(%#v) = %v", a, err) - } - case TypeTXT: - if err := b.TXTResource(a.Header, *a.Body.(*TXTResource)); err != nil { - t.Fatalf("Builder.TXTResource(%#v) = %v", a, err) - } - case TypeAAAA: - if err := b.AAAAResource(a.Header, *a.Body.(*AAAAResource)); err != nil { - t.Fatalf("Builder.AAAAResource(%#v) = %v", a, err) - } - case TypeSRV: - if err := b.SRVResource(a.Header, *a.Body.(*SRVResource)); err != nil { - t.Fatalf("Builder.SRVResource(%#v) = %v", a, err) - } - } - } - - if err := b.StartAuthorities(); err != nil { - t.Fatal("Builder.StartAuthorities() =", err) - } - for _, a := range msg.Authorities { - if err := b.NSResource(a.Header, *a.Body.(*NSResource)); err != nil { - t.Fatalf("Builder.NSResource(%#v) = %v", a, err) - } - } - - if err := b.StartAdditionals(); err != nil { - t.Fatal("Builder.StartAdditionals() =", err) - } - for _, a := range msg.Additionals { - switch a.Body.(type) { - case *TXTResource: - if err := b.TXTResource(a.Header, *a.Body.(*TXTResource)); err != nil { - t.Fatalf("Builder.TXTResource(%#v) = %v", a, err) - } - case *OPTResource: - if err := b.OPTResource(a.Header, *a.Body.(*OPTResource)); err != nil { - t.Fatalf("Builder.OPTResource(%#v) = %v", a, err) - } - } - } - - got, err := b.Finish() - if err != nil { - t.Fatal("Builder.Finish() =", err) - } - if !bytes.Equal(got, want) { - t.Fatalf("got from Builder.Finish() = %#v\nwant = %#v", got, want) - } -} - -func TestResourcePack(t *testing.T) { - for _, tt := range []struct { - m Message - err error - }{ - { - Message{ - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeAAAA, - Class: ClassINET, - }, - }, - Answers: []Resource{{ResourceHeader{}, nil}}, - }, - &nestedError{"packing Answer", errNilResouceBody}, - }, - { - Message{ - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeAAAA, - Class: ClassINET, - }, - }, - Authorities: []Resource{{ResourceHeader{}, (*NSResource)(nil)}}, - }, - &nestedError{"packing Authority", - &nestedError{"ResourceHeader", - &nestedError{"Name", errNonCanonicalName}, - }, - }, - }, - { - Message{ - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeA, - Class: ClassINET, - }, - }, - Additionals: []Resource{{ResourceHeader{}, nil}}, - }, - &nestedError{"packing Additional", errNilResouceBody}, - }, - } { - _, err := tt.m.Pack() - if !reflect.DeepEqual(err, tt.err) { - t.Errorf("got Message{%v}.Pack() = %v, want %v", tt.m, err, tt.err) - } - } -} - -func TestResourcePackLength(t *testing.T) { - r := Resource{ - ResourceHeader{ - Name: MustNewName("."), - Type: TypeA, - Class: ClassINET, - }, - &AResource{[4]byte{127, 0, 0, 2}}, - } - - hb, _, err := r.Header.pack(nil, nil, 0) - if err != nil { - t.Fatal("ResourceHeader.pack() =", err) - } - buf := make([]byte, 0, len(hb)) - buf, err = r.pack(buf, nil, 0) - if err != nil { - t.Fatal("Resource.pack() =", err) - } - - var hdr ResourceHeader - if _, err := hdr.unpack(buf, 0); err != nil { - t.Fatal("ResourceHeader.unpack() =", err) - } - - if got, want := int(hdr.Length), len(buf)-len(hb); got != want { - t.Errorf("got hdr.Length = %d, want = %d", got, want) - } -} - -func TestOptionPackUnpack(t *testing.T) { - for _, tt := range []struct { - name string - w []byte // wire format of m.Additionals - m Message - dnssecOK bool - extRCode RCode - }{ - { - name: "without EDNS(0) options", - w: []byte{ - 0x00, 0x00, 0x29, 0x10, 0x00, 0xfe, 0x00, 0x80, - 0x00, 0x00, 0x00, - }, - m: Message{ - Header: Header{RCode: RCodeFormatError}, - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeA, - Class: ClassINET, - }, - }, - Additionals: []Resource{ - { - mustEDNS0ResourceHeader(4096, 0xfe0|RCodeFormatError, true), - &OPTResource{}, - }, - }, - }, - dnssecOK: true, - extRCode: 0xfe0 | RCodeFormatError, - }, - { - name: "with EDNS(0) options", - w: []byte{ - 0x00, 0x00, 0x29, 0x10, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x0b, 0x00, 0x02, 0x12, 0x34, - }, - m: Message{ - Header: Header{RCode: RCodeServerFailure}, - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeAAAA, - Class: ClassINET, - }, - }, - Additionals: []Resource{ - { - mustEDNS0ResourceHeader(4096, 0xff0|RCodeServerFailure, false), - &OPTResource{ - Options: []Option{ - { - Code: 12, // see RFC 7828 - Data: []byte{0x00, 0x00}, - }, - { - Code: 11, // see RFC 7830 - Data: []byte{0x12, 0x34}, - }, - }, - }, - }, - }, - }, - dnssecOK: false, - extRCode: 0xff0 | RCodeServerFailure, - }, - { - // Containing multiple OPT resources in a - // message is invalid, but it's necessary for - // protocol conformance testing. - name: "with multiple OPT resources", - w: []byte{ - 0x00, 0x00, 0x29, 0x10, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x00, 0x0b, 0x00, 0x02, 0x12, - 0x34, 0x00, 0x00, 0x29, 0x10, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x02, - 0x00, 0x00, - }, - m: Message{ - Header: Header{RCode: RCodeNameError}, - Questions: []Question{ - { - Name: MustNewName("."), - Type: TypeAAAA, - Class: ClassINET, - }, - }, - Additionals: []Resource{ - { - mustEDNS0ResourceHeader(4096, 0xff0|RCodeNameError, false), - &OPTResource{ - Options: []Option{ - { - Code: 11, // see RFC 7830 - Data: []byte{0x12, 0x34}, - }, - }, - }, - }, - { - mustEDNS0ResourceHeader(4096, 0xff0|RCodeNameError, false), - &OPTResource{ - Options: []Option{ - { - Code: 12, // see RFC 7828 - Data: []byte{0x00, 0x00}, - }, - }, - }, - }, - }, - }, - }, - } { - w, err := tt.m.Pack() - if err != nil { - t.Errorf("Message.Pack() for %s = %v", tt.name, err) - continue - } - if !bytes.Equal(w[len(w)-len(tt.w):], tt.w) { - t.Errorf("got Message.Pack() for %s = %#v, want %#v", tt.name, w[len(w)-len(tt.w):], tt.w) - continue - } - var m Message - if err := m.Unpack(w); err != nil { - t.Errorf("Message.Unpack() for %s = %v", tt.name, err) - continue - } - if !reflect.DeepEqual(m.Additionals, tt.m.Additionals) { - t.Errorf("got Message.Pack/Unpack() roundtrip for %s = %+v, want %+v", tt.name, m, tt.m) - continue - } - } -} - -// TestGoString tests that Message.GoString produces Go code that compiles to -// reproduce the Message. -// -// This test was produced as follows: -// 1. Run (*Message).GoString on largeTestMsg(). -// 2. Remove "dnsmessage." from the output. -// 3. Paste the result in the test to store it in msg. -// 4. Also put the original output in the test to store in want. -func TestGoString(t *testing.T) { - msg := Message{Header: Header{ID: 0, Response: true, OpCode: 0, Authoritative: true, Truncated: false, RecursionDesired: false, RecursionAvailable: false, RCode: RCodeSuccess}, Questions: []Question{{Name: MustNewName("foo.bar.example.com."), Type: TypeA, Class: ClassINET}}, Answers: []Resource{{Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeA, Class: ClassINET, TTL: 0, Length: 0}, Body: &AResource{A: [4]byte{127, 0, 0, 1}}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeA, Class: ClassINET, TTL: 0, Length: 0}, Body: &AResource{A: [4]byte{127, 0, 0, 2}}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeAAAA, Class: ClassINET, TTL: 0, Length: 0}, Body: &AAAAResource{AAAA: [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeCNAME, Class: ClassINET, TTL: 0, Length: 0}, Body: &CNAMEResource{CNAME: MustNewName("alias.example.com.")}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeSOA, Class: ClassINET, TTL: 0, Length: 0}, Body: &SOAResource{NS: MustNewName("ns1.example.com."), MBox: MustNewName("mb.example.com."), Serial: 1, Refresh: 2, Retry: 3, Expire: 4, MinTTL: 5}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypePTR, Class: ClassINET, TTL: 0, Length: 0}, Body: &PTRResource{PTR: MustNewName("ptr.example.com.")}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeMX, Class: ClassINET, TTL: 0, Length: 0}, Body: &MXResource{Pref: 7, MX: MustNewName("mx.example.com.")}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeSRV, Class: ClassINET, TTL: 0, Length: 0}, Body: &SRVResource{Priority: 8, Weight: 9, Port: 11, Target: MustNewName("srv.example.com.")}}}, Authorities: []Resource{{Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeNS, Class: ClassINET, TTL: 0, Length: 0}, Body: &NSResource{NS: MustNewName("ns1.example.com.")}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeNS, Class: ClassINET, TTL: 0, Length: 0}, Body: &NSResource{NS: MustNewName("ns2.example.com.")}}}, Additionals: []Resource{{Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeTXT, Class: ClassINET, TTL: 0, Length: 0}, Body: &TXTResource{TXT: []string{"So Long\x2c and Thanks for All the Fish"}}}, {Header: ResourceHeader{Name: MustNewName("foo.bar.example.com."), Type: TypeTXT, Class: ClassINET, TTL: 0, Length: 0}, Body: &TXTResource{TXT: []string{"Hamster Huey and the Gooey Kablooie"}}}, {Header: ResourceHeader{Name: MustNewName("."), Type: TypeOPT, Class: 4096, TTL: 4261412864, Length: 0}, Body: &OPTResource{Options: []Option{{Code: 10, Data: []byte{1, 35, 69, 103, 137, 171, 205, 239}}}}}}} - if !reflect.DeepEqual(msg, largeTestMsg()) { - t.Error("Message.GoString lost information or largeTestMsg changed: msg != largeTestMsg()") - } - got := msg.GoString() - want := `dnsmessage.Message{Header: dnsmessage.Header{ID: 0, Response: true, OpCode: 0, Authoritative: true, Truncated: false, RecursionDesired: false, RecursionAvailable: false, RCode: dnsmessage.RCodeSuccess}, Questions: []dnsmessage.Question{dnsmessage.Question{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeA, Class: dnsmessage.ClassINET}}, Answers: []dnsmessage.Resource{dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeA, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.AResource{A: [4]byte{127, 0, 0, 1}}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeA, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.AResource{A: [4]byte{127, 0, 0, 2}}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeAAAA, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.AAAAResource{AAAA: [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeCNAME, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.CNAMEResource{CNAME: dnsmessage.MustNewName("alias.example.com.")}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeSOA, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.SOAResource{NS: dnsmessage.MustNewName("ns1.example.com."), MBox: dnsmessage.MustNewName("mb.example.com."), Serial: 1, Refresh: 2, Retry: 3, Expire: 4, MinTTL: 5}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypePTR, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.PTRResource{PTR: dnsmessage.MustNewName("ptr.example.com.")}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeMX, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.MXResource{Pref: 7, MX: dnsmessage.MustNewName("mx.example.com.")}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeSRV, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.SRVResource{Priority: 8, Weight: 9, Port: 11, Target: dnsmessage.MustNewName("srv.example.com.")}}}, Authorities: []dnsmessage.Resource{dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeNS, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.NSResource{NS: dnsmessage.MustNewName("ns1.example.com.")}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeNS, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.NSResource{NS: dnsmessage.MustNewName("ns2.example.com.")}}}, Additionals: []dnsmessage.Resource{dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeTXT, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.TXTResource{TXT: []string{"So Long\x2c and Thanks for All the Fish"}}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("foo.bar.example.com."), Type: dnsmessage.TypeTXT, Class: dnsmessage.ClassINET, TTL: 0, Length: 0}, Body: &dnsmessage.TXTResource{TXT: []string{"Hamster Huey and the Gooey Kablooie"}}}, dnsmessage.Resource{Header: dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName("."), Type: dnsmessage.TypeOPT, Class: 4096, TTL: 4261412864, Length: 0}, Body: &dnsmessage.OPTResource{Options: []dnsmessage.Option{dnsmessage.Option{Code: 10, Data: []byte{1, 35, 69, 103, 137, 171, 205, 239}}}}}}}` - if got != want { - t.Errorf("got msg1.GoString() = %s\nwant = %s", got, want) - } -} - -func benchmarkParsingSetup() ([]byte, error) { - name := MustNewName("foo.bar.example.com.") - msg := Message{ - Header: Header{Response: true, Authoritative: true}, - Questions: []Question{ - { - Name: name, - Type: TypeA, - Class: ClassINET, - }, - }, - Answers: []Resource{ - { - ResourceHeader{ - Name: name, - Class: ClassINET, - }, - &AResource{[4]byte{}}, - }, - { - ResourceHeader{ - Name: name, - Class: ClassINET, - }, - &AAAAResource{[16]byte{}}, - }, - { - ResourceHeader{ - Name: name, - Class: ClassINET, - }, - &CNAMEResource{name}, - }, - { - ResourceHeader{ - Name: name, - Class: ClassINET, - }, - &NSResource{name}, - }, - }, - } - - buf, err := msg.Pack() - if err != nil { - return nil, fmt.Errorf("Message.Pack() = %v", err) - } - return buf, nil -} - -func benchmarkParsing(tb testing.TB, buf []byte) { - var p Parser - if _, err := p.Start(buf); err != nil { - tb.Fatal("Parser.Start(non-nil) =", err) - } - - for { - _, err := p.Question() - if err == ErrSectionDone { - break - } - if err != nil { - tb.Fatal("Parser.Question() =", err) - } - } - - for { - h, err := p.AnswerHeader() - if err == ErrSectionDone { - break - } - if err != nil { - tb.Fatal("Parser.AnswerHeader() =", err) - } - - switch h.Type { - case TypeA: - if _, err := p.AResource(); err != nil { - tb.Fatal("Parser.AResource() =", err) - } - case TypeAAAA: - if _, err := p.AAAAResource(); err != nil { - tb.Fatal("Parser.AAAAResource() =", err) - } - case TypeCNAME: - if _, err := p.CNAMEResource(); err != nil { - tb.Fatal("Parser.CNAMEResource() =", err) - } - case TypeNS: - if _, err := p.NSResource(); err != nil { - tb.Fatal("Parser.NSResource() =", err) - } - case TypeOPT: - if _, err := p.OPTResource(); err != nil { - tb.Fatal("Parser.OPTResource() =", err) - } - default: - tb.Fatalf("got unknown type: %T", h) - } - } -} - -func BenchmarkParsing(b *testing.B) { - buf, err := benchmarkParsingSetup() - if err != nil { - b.Fatal(err) - } - - b.ReportAllocs() - for i := 0; i < b.N; i++ { - benchmarkParsing(b, buf) - } -} - -func TestParsingAllocs(t *testing.T) { - buf, err := benchmarkParsingSetup() - if err != nil { - t.Fatal(err) - } - - if allocs := testing.AllocsPerRun(100, func() { benchmarkParsing(t, buf) }); allocs > 0.5 { - t.Errorf("allocations during parsing: got = %f, want ~0", allocs) - } -} - -func benchmarkBuildingSetup() (Name, []byte) { - name := MustNewName("foo.bar.example.com.") - buf := make([]byte, 0, packStartingCap) - return name, buf -} - -func benchmarkBuilding(tb testing.TB, name Name, buf []byte) { - bld := NewBuilder(buf, Header{Response: true, Authoritative: true}) - - if err := bld.StartQuestions(); err != nil { - tb.Fatal("Builder.StartQuestions() =", err) - } - q := Question{ - Name: name, - Type: TypeA, - Class: ClassINET, - } - if err := bld.Question(q); err != nil { - tb.Fatalf("Builder.Question(%+v) = %v", q, err) - } - - hdr := ResourceHeader{ - Name: name, - Class: ClassINET, - } - if err := bld.StartAnswers(); err != nil { - tb.Fatal("Builder.StartQuestions() =", err) - } - - ar := AResource{[4]byte{}} - if err := bld.AResource(hdr, ar); err != nil { - tb.Fatalf("Builder.AResource(%+v, %+v) = %v", hdr, ar, err) - } - - aaar := AAAAResource{[16]byte{}} - if err := bld.AAAAResource(hdr, aaar); err != nil { - tb.Fatalf("Builder.AAAAResource(%+v, %+v) = %v", hdr, aaar, err) - } - - cnr := CNAMEResource{name} - if err := bld.CNAMEResource(hdr, cnr); err != nil { - tb.Fatalf("Builder.CNAMEResource(%+v, %+v) = %v", hdr, cnr, err) - } - - nsr := NSResource{name} - if err := bld.NSResource(hdr, nsr); err != nil { - tb.Fatalf("Builder.NSResource(%+v, %+v) = %v", hdr, nsr, err) - } - - extrc := 0xfe0 | RCodeNotImplemented - if err := (&hdr).SetEDNS0(4096, extrc, true); err != nil { - tb.Fatalf("ResourceHeader.SetEDNS0(4096, %#x, true) = %v", extrc, err) - } - optr := OPTResource{} - if err := bld.OPTResource(hdr, optr); err != nil { - tb.Fatalf("Builder.OPTResource(%+v, %+v) = %v", hdr, optr, err) - } - - if _, err := bld.Finish(); err != nil { - tb.Fatal("Builder.Finish() =", err) - } -} - -func BenchmarkBuilding(b *testing.B) { - name, buf := benchmarkBuildingSetup() - b.ReportAllocs() - for i := 0; i < b.N; i++ { - benchmarkBuilding(b, name, buf) - } -} - -func TestBuildingAllocs(t *testing.T) { - name, buf := benchmarkBuildingSetup() - if allocs := testing.AllocsPerRun(100, func() { benchmarkBuilding(t, name, buf) }); allocs > 0.5 { - t.Errorf("allocations during building: got = %f, want ~0", allocs) - } -} - -func smallTestMsg() Message { - name := MustNewName("example.com.") - return Message{ - Header: Header{Response: true, Authoritative: true}, - Questions: []Question{ - { - Name: name, - Type: TypeA, - Class: ClassINET, - }, - }, - Answers: []Resource{ - { - ResourceHeader{ - Name: name, - Type: TypeA, - Class: ClassINET, - }, - &AResource{[4]byte{127, 0, 0, 1}}, - }, - }, - Authorities: []Resource{ - { - ResourceHeader{ - Name: name, - Type: TypeA, - Class: ClassINET, - }, - &AResource{[4]byte{127, 0, 0, 1}}, - }, - }, - Additionals: []Resource{ - { - ResourceHeader{ - Name: name, - Type: TypeA, - Class: ClassINET, - }, - &AResource{[4]byte{127, 0, 0, 1}}, - }, - }, - } -} - -func BenchmarkPack(b *testing.B) { - msg := largeTestMsg() - - b.ReportAllocs() - - for i := 0; i < b.N; i++ { - if _, err := msg.Pack(); err != nil { - b.Fatal("Message.Pack() =", err) - } - } -} - -func BenchmarkAppendPack(b *testing.B) { - msg := largeTestMsg() - buf := make([]byte, 0, packStartingCap) - - b.ReportAllocs() - - for i := 0; i < b.N; i++ { - if _, err := msg.AppendPack(buf[:0]); err != nil { - b.Fatal("Message.AppendPack() = ", err) - } - } -} - -func largeTestMsg() Message { - name := MustNewName("foo.bar.example.com.") - return Message{ - Header: Header{Response: true, Authoritative: true}, - Questions: []Question{ - { - Name: name, - Type: TypeA, - Class: ClassINET, - }, - }, - Answers: []Resource{ - { - ResourceHeader{ - Name: name, - Type: TypeA, - Class: ClassINET, - }, - &AResource{[4]byte{127, 0, 0, 1}}, - }, - { - ResourceHeader{ - Name: name, - Type: TypeA, - Class: ClassINET, - }, - &AResource{[4]byte{127, 0, 0, 2}}, - }, - { - ResourceHeader{ - Name: name, - Type: TypeAAAA, - Class: ClassINET, - }, - &AAAAResource{[16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, - }, - { - ResourceHeader{ - Name: name, - Type: TypeCNAME, - Class: ClassINET, - }, - &CNAMEResource{MustNewName("alias.example.com.")}, - }, - { - ResourceHeader{ - Name: name, - Type: TypeSOA, - Class: ClassINET, - }, - &SOAResource{ - NS: MustNewName("ns1.example.com."), - MBox: MustNewName("mb.example.com."), - Serial: 1, - Refresh: 2, - Retry: 3, - Expire: 4, - MinTTL: 5, - }, - }, - { - ResourceHeader{ - Name: name, - Type: TypePTR, - Class: ClassINET, - }, - &PTRResource{MustNewName("ptr.example.com.")}, - }, - { - ResourceHeader{ - Name: name, - Type: TypeMX, - Class: ClassINET, - }, - &MXResource{ - 7, - MustNewName("mx.example.com."), - }, - }, - { - ResourceHeader{ - Name: name, - Type: TypeSRV, - Class: ClassINET, - }, - &SRVResource{ - 8, - 9, - 11, - MustNewName("srv.example.com."), - }, - }, - }, - Authorities: []Resource{ - { - ResourceHeader{ - Name: name, - Type: TypeNS, - Class: ClassINET, - }, - &NSResource{MustNewName("ns1.example.com.")}, - }, - { - ResourceHeader{ - Name: name, - Type: TypeNS, - Class: ClassINET, - }, - &NSResource{MustNewName("ns2.example.com.")}, - }, - }, - Additionals: []Resource{ - { - ResourceHeader{ - Name: name, - Type: TypeTXT, - Class: ClassINET, - }, - &TXTResource{[]string{"So Long, and Thanks for All the Fish"}}, - }, - { - ResourceHeader{ - Name: name, - Type: TypeTXT, - Class: ClassINET, - }, - &TXTResource{[]string{"Hamster Huey and the Gooey Kablooie"}}, - }, - { - mustEDNS0ResourceHeader(4096, 0xfe0|RCodeSuccess, false), - &OPTResource{ - Options: []Option{ - { - Code: 10, // see RFC 7873 - Data: []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, - }, - }, - }, - }, - }, - } -} diff --git a/vendor/golang.org/x/net/go.mod b/vendor/golang.org/x/net/go.mod deleted file mode 100644 index 325937b4..00000000 --- a/vendor/golang.org/x/net/go.mod +++ /dev/null @@ -1,9 +0,0 @@ -module golang.org/x/net - -go 1.11 - -require ( - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 - golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a - golang.org/x/text v0.3.0 -) diff --git a/vendor/golang.org/x/net/go.sum b/vendor/golang.org/x/net/go.sum deleted file mode 100644 index 0fa675a4..00000000 --- a/vendor/golang.org/x/net/go.sum +++ /dev/null @@ -1,6 +0,0 @@ -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/golang.org/x/net/html/atom/atom_test.go b/vendor/golang.org/x/net/html/atom/atom_test.go deleted file mode 100644 index 6e33704d..00000000 --- a/vendor/golang.org/x/net/html/atom/atom_test.go +++ /dev/null @@ -1,109 +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 - -import ( - "sort" - "testing" -) - -func TestKnown(t *testing.T) { - for _, s := range testAtomList { - if atom := Lookup([]byte(s)); atom.String() != s { - t.Errorf("Lookup(%q) = %#x (%q)", s, uint32(atom), atom.String()) - } - } -} - -func TestHits(t *testing.T) { - for _, a := range table { - if a == 0 { - continue - } - got := Lookup([]byte(a.String())) - if got != a { - t.Errorf("Lookup(%q) = %#x, want %#x", a.String(), uint32(got), uint32(a)) - } - } -} - -func TestMisses(t *testing.T) { - testCases := []string{ - "", - "\x00", - "\xff", - "A", - "DIV", - "Div", - "dIV", - "aa", - "a\x00", - "ab", - "abb", - "abbr0", - "abbr ", - " abbr", - " a", - "acceptcharset", - "acceptCharset", - "accept_charset", - "h0", - "h1h2", - "h7", - "onClick", - "λ", - // The following string has the same hash (0xa1d7fab7) as "onmouseover". - "\x00\x00\x00\x00\x00\x50\x18\xae\x38\xd0\xb7", - } - for _, tc := range testCases { - got := Lookup([]byte(tc)) - if got != 0 { - t.Errorf("Lookup(%q): got %d, want 0", tc, got) - } - } -} - -func TestForeignObject(t *testing.T) { - const ( - afo = Foreignobject - afO = ForeignObject - sfo = "foreignobject" - sfO = "foreignObject" - ) - if got := Lookup([]byte(sfo)); got != afo { - t.Errorf("Lookup(%q): got %#v, want %#v", sfo, got, afo) - } - if got := Lookup([]byte(sfO)); got != afO { - t.Errorf("Lookup(%q): got %#v, want %#v", sfO, got, afO) - } - if got := afo.String(); got != sfo { - t.Errorf("Atom(%#v).String(): got %q, want %q", afo, got, sfo) - } - if got := afO.String(); got != sfO { - t.Errorf("Atom(%#v).String(): got %q, want %q", afO, got, sfO) - } -} - -func BenchmarkLookup(b *testing.B) { - sortedTable := make([]string, 0, len(table)) - for _, a := range table { - if a != 0 { - sortedTable = append(sortedTable, a.String()) - } - } - sort.Strings(sortedTable) - - x := make([][]byte, 1000) - for i := range x { - x[i] = []byte(sortedTable[i%len(sortedTable)]) - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - for _, s := range x { - Lookup(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 5d052781..00000000 --- a/vendor/golang.org/x/net/html/atom/gen.go +++ /dev/null @@ -1,712 +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 16 April 2018" 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{ - "acronym", - "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", - "rb", - "rtc", - "spacer", - "strike", - "svg", - "system", - "tt", - "xmp", -} diff --git a/vendor/golang.org/x/net/html/atom/table_test.go b/vendor/golang.org/x/net/html/atom/table_test.go deleted file mode 100644 index 8a30762e..00000000 --- a/vendor/golang.org/x/net/html/atom/table_test.go +++ /dev/null @@ -1,376 +0,0 @@ -// Code generated by go generate gen.go; DO NOT EDIT. - -//go:generate go run gen.go -test - -package atom - -var testAtomList = []string{ - "a", - "abbr", - "accept", - "accept-charset", - "accesskey", - "acronym", - "action", - "address", - "align", - "allowfullscreen", - "allowpaymentrequest", - "allowusermedia", - "alt", - "annotation", - "annotation-xml", - "applet", - "area", - "article", - "as", - "aside", - "async", - "audio", - "autocomplete", - "autofocus", - "autoplay", - "b", - "base", - "basefont", - "bdi", - "bdo", - "bgsound", - "big", - "blink", - "blockquote", - "body", - "br", - "button", - "canvas", - "caption", - "center", - "challenge", - "charset", - "checked", - "cite", - "class", - "code", - "col", - "colgroup", - "color", - "cols", - "colspan", - "command", - "content", - "contenteditable", - "contextmenu", - "controls", - "coords", - "crossorigin", - "data", - "datalist", - "datetime", - "dd", - "default", - "defer", - "del", - "desc", - "details", - "dfn", - "dialog", - "dir", - "dirname", - "disabled", - "div", - "dl", - "download", - "draggable", - "dropzone", - "dt", - "em", - "embed", - "enctype", - "face", - "fieldset", - "figcaption", - "figure", - "font", - "footer", - "for", - "foreignObject", - "foreignobject", - "form", - "formaction", - "formenctype", - "formmethod", - "formnovalidate", - "formtarget", - "frame", - "frameset", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "headers", - "height", - "hgroup", - "hidden", - "high", - "hr", - "href", - "hreflang", - "html", - "http-equiv", - "i", - "icon", - "id", - "iframe", - "image", - "img", - "input", - "inputmode", - "ins", - "integrity", - "is", - "isindex", - "ismap", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "kbd", - "keygen", - "keytype", - "kind", - "label", - "lang", - "legend", - "li", - "link", - "list", - "listing", - "loop", - "low", - "main", - "malignmark", - "manifest", - "map", - "mark", - "marquee", - "math", - "max", - "maxlength", - "media", - "mediagroup", - "menu", - "menuitem", - "meta", - "meter", - "method", - "mglyph", - "mi", - "min", - "minlength", - "mn", - "mo", - "ms", - "mtext", - "multiple", - "muted", - "name", - "nav", - "nobr", - "noembed", - "noframes", - "nomodule", - "nonce", - "noscript", - "novalidate", - "object", - "ol", - "onabort", - "onafterprint", - "onautocomplete", - "onautocompleteerror", - "onauxclick", - "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", - "onoffline", - "ononline", - "onpagehide", - "onpageshow", - "onpaste", - "onpause", - "onplay", - "onplaying", - "onpopstate", - "onprogress", - "onratechange", - "onrejectionhandled", - "onreset", - "onresize", - "onscroll", - "onsecuritypolicyviolation", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onsort", - "onstalled", - "onstorage", - "onsubmit", - "onsuspend", - "ontimeupdate", - "ontoggle", - "onunhandledrejection", - "onunload", - "onvolumechange", - "onwaiting", - "onwheel", - "open", - "optgroup", - "optimum", - "option", - "output", - "p", - "param", - "pattern", - "picture", - "ping", - "placeholder", - "plaintext", - "playsinline", - "poster", - "pre", - "preload", - "progress", - "prompt", - "public", - "q", - "radiogroup", - "rb", - "readonly", - "referrerpolicy", - "rel", - "required", - "reversed", - "rows", - "rowspan", - "rp", - "rt", - "rtc", - "ruby", - "s", - "samp", - "sandbox", - "scope", - "scoped", - "script", - "seamless", - "section", - "select", - "selected", - "shape", - "size", - "sizes", - "slot", - "small", - "sortable", - "sorted", - "source", - "spacer", - "span", - "spellcheck", - "src", - "srcdoc", - "srclang", - "srcset", - "start", - "step", - "strike", - "strong", - "style", - "sub", - "summary", - "sup", - "svg", - "system", - "tabindex", - "table", - "target", - "tbody", - "td", - "template", - "textarea", - "tfoot", - "th", - "thead", - "time", - "title", - "tr", - "track", - "translate", - "tt", - "type", - "typemustmatch", - "u", - "ul", - "updateviacache", - "usemap", - "value", - "var", - "video", - "wbr", - "width", - "workertype", - "wrap", - "xmp", -} diff --git a/vendor/golang.org/x/net/html/charset/charset_test.go b/vendor/golang.org/x/net/html/charset/charset_test.go deleted file mode 100644 index e4e7d86b..00000000 --- a/vendor/golang.org/x/net/html/charset/charset_test.go +++ /dev/null @@ -1,237 +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 - -import ( - "bytes" - "encoding/xml" - "io/ioutil" - "runtime" - "strings" - "testing" - - "golang.org/x/text/transform" -) - -func transformString(t transform.Transformer, s string) (string, error) { - r := transform.NewReader(strings.NewReader(s), t) - b, err := ioutil.ReadAll(r) - return string(b), err -} - -type testCase struct { - utf8, other, otherEncoding string -} - -// testCases for encoding and decoding. -var testCases = []testCase{ - {"Résumé", "Résumé", "utf8"}, - {"Résumé", "R\xe9sum\xe9", "latin1"}, - {"これは漢字です。", "S0\x8c0o0\"oW[g0Y0\x020", "UTF-16LE"}, - {"これは漢字です。", "0S0\x8c0oo\"[W0g0Y0\x02", "UTF-16BE"}, - {"Hello, world", "Hello, world", "ASCII"}, - {"Gdańsk", "Gda\xf1sk", "ISO-8859-2"}, - {"Ââ Čč Đđ Ŋŋ Õõ Šš Žž Åå Ää", "\xc2\xe2 \xc8\xe8 \xa9\xb9 \xaf\xbf \xd5\xf5 \xaa\xba \xac\xbc \xc5\xe5 \xc4\xe4", "ISO-8859-10"}, - {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "ISO-8859-11"}, - {"latviešu", "latvie\xf0u", "ISO-8859-13"}, - {"Seònaid", "Se\xf2naid", "ISO-8859-14"}, - {"€1 is cheap", "\xa41 is cheap", "ISO-8859-15"}, - {"românește", "rom\xe2ne\xbate", "ISO-8859-16"}, - {"nutraĵo", "nutra\xbco", "ISO-8859-3"}, - {"Kalâdlit", "Kal\xe2dlit", "ISO-8859-4"}, - {"русский", "\xe0\xe3\xe1\xe1\xda\xd8\xd9", "ISO-8859-5"}, - {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "ISO-8859-7"}, - {"Kağan", "Ka\xf0an", "ISO-8859-9"}, - {"Résumé", "R\x8esum\x8e", "macintosh"}, - {"Gdańsk", "Gda\xf1sk", "windows-1250"}, - {"русский", "\xf0\xf3\xf1\xf1\xea\xe8\xe9", "windows-1251"}, - {"Résumé", "R\xe9sum\xe9", "windows-1252"}, - {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "windows-1253"}, - {"Kağan", "Ka\xf0an", "windows-1254"}, - {"עִבְרִית", "\xf2\xc4\xe1\xc0\xf8\xc4\xe9\xfa", "windows-1255"}, - {"العربية", "\xc7\xe1\xda\xd1\xc8\xed\xc9", "windows-1256"}, - {"latviešu", "latvie\xf0u", "windows-1257"}, - {"Việt", "Vi\xea\xf2t", "windows-1258"}, - {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "windows-874"}, - {"русский", "\xd2\xd5\xd3\xd3\xcb\xc9\xca", "KOI8-R"}, - {"українська", "\xd5\xcb\xd2\xc1\xa7\xce\xd3\xd8\xcb\xc1", "KOI8-U"}, - {"Hello 常用國字標準字體表", "Hello \xb1`\xa5\u03b0\xea\xa6r\xbc\u0437\u01e6r\xc5\xe9\xaa\xed", "big5"}, - {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gbk"}, - {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gb18030"}, - {"עִבְרִית", "\x81\x30\xfb\x30\x81\x30\xf6\x34\x81\x30\xf9\x33\x81\x30\xf6\x30\x81\x30\xfb\x36\x81\x30\xf6\x34\x81\x30\xfa\x31\x81\x30\xfb\x38", "gb18030"}, - {"㧯", "\x82\x31\x89\x38", "gb18030"}, - {"これは漢字です。", "\x82\xb1\x82\xea\x82\xcd\x8a\xbf\x8e\x9a\x82\xc5\x82\xb7\x81B", "SJIS"}, - {"Hello, 世界!", "Hello, \x90\xa2\x8aE!", "SJIS"}, - {"イウエオカ", "\xb2\xb3\xb4\xb5\xb6", "SJIS"}, - {"これは漢字です。", "\xa4\xb3\xa4\xec\xa4\u03f4\xc1\xbb\xfa\xa4\u01e4\xb9\xa1\xa3", "EUC-JP"}, - {"Hello, 世界!", "Hello, \x1b$B@$3&\x1b(B!", "ISO-2022-JP"}, - {"다음과 같은 조건을 따라야 합니다: 저작자표시", "\xb4\xd9\xc0\xbd\xb0\xfa \xb0\xb0\xc0\xba \xc1\xb6\xb0\xc7\xc0\xbb \xb5\xfb\xb6\xf3\xbe\xdf \xc7մϴ\xd9: \xc0\xfa\xc0\xdb\xc0\xdaǥ\xbd\xc3", "EUC-KR"}, -} - -func TestDecode(t *testing.T) { - testCases := append(testCases, []testCase{ - // Replace multi-byte maximum subpart of ill-formed subsequence with - // single replacement character (WhatWG requirement). - {"Rés\ufffdumé", "Rés\xe1\x80umé", "utf8"}, - }...) - for _, tc := range testCases { - e, _ := Lookup(tc.otherEncoding) - if e == nil { - t.Errorf("%s: not found", tc.otherEncoding) - continue - } - s, err := transformString(e.NewDecoder(), tc.other) - if err != nil { - t.Errorf("%s: decode %q: %v", tc.otherEncoding, tc.other, err) - continue - } - if s != tc.utf8 { - t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.utf8) - } - } -} - -func TestEncode(t *testing.T) { - testCases := append(testCases, []testCase{ - // Use Go-style replacement. - {"Rés\xe1\x80umé", "Rés\ufffd\ufffdumé", "utf8"}, - // U+0144 LATIN SMALL LETTER N WITH ACUTE not supported by encoding. - {"Gdańsk", "Gdańsk", "ISO-8859-11"}, - {"\ufffd", "�", "ISO-8859-11"}, - {"a\xe1\x80b", "a��b", "ISO-8859-11"}, - }...) - for _, tc := range testCases { - e, _ := Lookup(tc.otherEncoding) - if e == nil { - t.Errorf("%s: not found", tc.otherEncoding) - continue - } - s, err := transformString(e.NewEncoder(), tc.utf8) - if err != nil { - t.Errorf("%s: encode %q: %s", tc.otherEncoding, tc.utf8, err) - continue - } - if s != tc.other { - t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.other) - } - } -} - -var sniffTestCases = []struct { - filename, declared, want string -}{ - {"HTTP-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, - {"UTF-16LE-BOM.html", "", "utf-16le"}, - {"UTF-16BE-BOM.html", "", "utf-16be"}, - {"meta-content-attribute.html", "text/html", "iso-8859-15"}, - {"meta-charset-attribute.html", "text/html", "iso-8859-15"}, - {"No-encoding-declaration.html", "text/html", "utf-8"}, - {"HTTP-vs-UTF-8-BOM.html", "text/html; charset=iso-8859-15", "utf-8"}, - {"HTTP-vs-meta-content.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, - {"HTTP-vs-meta-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, - {"UTF-8-BOM-vs-meta-content.html", "text/html", "utf-8"}, - {"UTF-8-BOM-vs-meta-charset.html", "text/html", "utf-8"}, -} - -func TestSniff(t *testing.T) { - switch runtime.GOOS { - case "nacl": // platforms that don't permit direct file system access - t.Skipf("not supported on %q", runtime.GOOS) - } - - for _, tc := range sniffTestCases { - content, err := ioutil.ReadFile("testdata/" + tc.filename) - if err != nil { - t.Errorf("%s: error reading file: %v", tc.filename, err) - continue - } - - _, name, _ := DetermineEncoding(content, tc.declared) - if name != tc.want { - t.Errorf("%s: got %q, want %q", tc.filename, name, tc.want) - continue - } - } -} - -func TestReader(t *testing.T) { - switch runtime.GOOS { - case "nacl": // platforms that don't permit direct file system access - t.Skipf("not supported on %q", runtime.GOOS) - } - - for _, tc := range sniffTestCases { - content, err := ioutil.ReadFile("testdata/" + tc.filename) - if err != nil { - t.Errorf("%s: error reading file: %v", tc.filename, err) - continue - } - - r, err := NewReader(bytes.NewReader(content), tc.declared) - if err != nil { - t.Errorf("%s: error creating reader: %v", tc.filename, err) - continue - } - - got, err := ioutil.ReadAll(r) - if err != nil { - t.Errorf("%s: error reading from charset.NewReader: %v", tc.filename, err) - continue - } - - e, _ := Lookup(tc.want) - want, err := ioutil.ReadAll(transform.NewReader(bytes.NewReader(content), e.NewDecoder())) - if err != nil { - t.Errorf("%s: error decoding with hard-coded charset name: %v", tc.filename, err) - continue - } - - if !bytes.Equal(got, want) { - t.Errorf("%s: got %q, want %q", tc.filename, got, want) - continue - } - } -} - -var metaTestCases = []struct { - meta, want string -}{ - {"", ""}, - {"text/html", ""}, - {"text/html; charset utf-8", ""}, - {"text/html; charset=latin-2", "latin-2"}, - {"text/html; charset; charset = utf-8", "utf-8"}, - {`charset="big5"`, "big5"}, - {"charset='shift_jis'", "shift_jis"}, -} - -func TestFromMeta(t *testing.T) { - for _, tc := range metaTestCases { - got := fromMetaElement(tc.meta) - if got != tc.want { - t.Errorf("%q: got %q, want %q", tc.meta, got, tc.want) - } - } -} - -func TestXML(t *testing.T) { - const s = "r\xe9sum\xe9" - - d := xml.NewDecoder(strings.NewReader(s)) - d.CharsetReader = NewReaderLabel - - var a struct { - Word string - } - err := d.Decode(&a) - if err != nil { - t.Fatalf("Decode: %v", err) - } - - want := "résumé" - if a.Word != want { - t.Errorf("got %q, want %q", a.Word, want) - } -} diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html deleted file mode 100644 index 9915fa0e..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - HTTP charset - - - - - - - - - - - -

HTTP charset

- - -
- - -
 
- - - - - -
-

The character encoding of a page can be set using the HTTP header charset declaration.

-

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

The only character encoding declaration for this HTML file is in the HTTP header, which sets the encoding to ISO 8859-15.

-
-
-
HTML5
-

the-input-byte-stream-001
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html deleted file mode 100644 index 26e5d8b4..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - HTTP vs UTF-8 BOM - - - - - - - - - - - -

HTTP vs UTF-8 BOM

- - -
- - -
 
- - - - - -
-

A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.

-

The HTTP header attempts to set the character encoding to ISO 8859-15. The page starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

If the test is unsuccessful, the characters  should appear at the top of the page. These represent the bytes that make up the UTF-8 signature when encountered in the ISO 8859-15 encoding.

-
-
-
HTML5
-

the-input-byte-stream-034
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html deleted file mode 100644 index 2f07e951..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - HTTP vs meta charset - - - - - - - - - - - -

HTTP vs meta charset

- - -
- - -
 
- - - - - -
-

The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.

-

The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-1.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-018
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html deleted file mode 100644 index 6853cdde..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - HTTP vs meta content - - - - - - - - - - - -

HTTP vs meta content

- - -
- - -
 
- - - - - -
-

The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.

-

The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-1.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-016
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html b/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html deleted file mode 100644 index 612e26c6..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - No encoding declaration - - - - - - - - - - - -

No encoding declaration

- - -
- - -
 
- - - - - -
-

A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.

-

The test on this page contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-015
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/README b/vendor/golang.org/x/net/html/charset/testdata/README deleted file mode 100644 index 38ef0f9f..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/README +++ /dev/null @@ -1,9 +0,0 @@ -These test cases come from -http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics - -Distributed under both the W3C Test Suite License -(http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) -and the W3C 3-clause BSD License -(http://www.w3.org/Consortium/Legal/2008/03-bsd-license). -To contribute to a W3C Test Suite, see the policies and contribution -forms (http://www.w3.org/2004/10/27-testcases). diff --git a/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html b/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html deleted file mode 100644 index 3abf7a9343c20518e57dfea58b374fb0f4fb58a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2670 zcmcJR?QRoS5Qc}JAoU&=BQ-(7b^;2j8i*i3RV1JlO@;VXIsPurV!WHiDdLW}i`*CO z^UnC>tih=KsVr;H&Y7?C&O3AV(?534uG?e##U9y_y|!QNi4``n+D>d{2lky^LnFNx z?9HrarH$>rwQR_$g)Hk0*&STI*EYq|47~&U9sfUB+ji})9eR{QqCUra7oDsZ5obtB zdxP%<)-$4Q;rSHJiM>U(#ZI=;?n^BC?Dp6lu=~_1-lnX3u03&2BlmQIY>L+!Uq7XoytKw^Q#oZSM?3*J?)&ojG&yzQRkC!Ml5JE?ax;lp_NYEcdUht`ZswOviB~L5hmJ|pXI71nn20w;>vG! zQGB$EE9&wC``&J#_Ym~PgRu-Bd>1!pOp0||k`kr=VJ zfH6I6rmRaeHA7U-A^OTsT+|d2a^i(>DePzZ{)ibXoCBvJnuYrd-3kkN$uy{qQK;=*Y;S87ro12aTgu^i*%f8zC3>a}9DIe4cfxOzsCw&(cqvP9{ud{N6f` z#TNDY(B6@Gpr|uN+%&x^XZjBHdc@2vsM(Tyc2=vshHQ5w+obmp>tuWT(t4BTUGAQw zxeI$UGSLUBg=WFbF;4f@4=^P2AgY@CFn8A`bcC=_&~)fiDe)#cUARRBzJ^k|%X)69 z+{Cb`wq}Rsg%B62CC_tK!AV(W{(MV?#mndR46CU#BUN<{8e?*oT+!pE5wF#O#TR#a z$9qRT)tpbw8zAI~QQJg2C3|6$I%(T(;`zOMy6SO+&;pG=c#2P|P-WZn$$DpWJlC3U z3*nvmz zwP{u~r$L?-m3uqp9I1+#3yE|3M$(s-BEtih=LQ>`qYoiktOop(wi%!;yh%+Rm z{e|xntY<{q!1F1Z6MKtngPm-p-4|H&+3m4AVE3_AyiHm6Tzlf4M(*ht*%YrezJ6kr zHGj45pc?64*$Cm%-zseWMA`x;)v*~jA=i}szqts9xmQkS`M11|(H7bTXAycsXU53+ zJ?120SRZeyiFjW7enPN`bxk$IaWV3o48oJF7D&2ysoY;6(s6%6vVfaYd&mC=erK!) zNGI^7upQgN)53OHe_VE<@J+G8*Y|p*)zB2Thdi}+YR<5QWHm!|a_*AoZXuv7)$xe| zm3Q$D7{|#}{m4X&UY!6(ZhyYi2(5JLzGE$H)W6BQklnjPMwn<Yvv7Z*TVWwD*=E3QpH37* z#lqXJA0A~J9T_<^W5smspmDg2p6ac5Bjn+~LAoow%1TCdZ*$K8`O zw_$HaCi+0N&@7la#_7KL5r$+QL{)Pi=I&aDjt~|Knht#`CEi4*3%97i_fSfASlwUz0=3V0GCxY}z81UC-nP=CGt2OqYV$ zoRCo+qM9YX*3FFORLC=E3B~S@+KROyk4r5 yX7?DaslDfIebqXgC!KKp4IYy+W~X?ddE6o=`A+x#x0AK&6MF#W&AXxbRrv+SX}PNa diff --git a/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html b/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html deleted file mode 100644 index 83de4333..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - UTF-8 BOM vs meta charset - - - - - - - - - - - -

UTF-8 BOM vs meta charset

- - -
- - -
 
- - - - - -
-

A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding.

-

The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-038
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html b/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html deleted file mode 100644 index 501aac2d..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - UTF-8 BOM vs meta content - - - - - - - - - - - -

UTF-8 BOM vs meta content

- - -
- - -
 
- - - - - -
-

A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding.

-

The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-037
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html b/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html deleted file mode 100644 index 2d7d25ab..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - meta charset attribute - - - - - - - - - - - -

meta charset attribute

- - -
- - -
 
- - - - - -
-

The character encoding of the page can be set by a meta element with charset attribute.

-

The only character encoding declaration for this HTML file is in the charset attribute of the meta element, which declares the encoding to be ISO 8859-15.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-009
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html b/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html deleted file mode 100644 index 1c3f228e..00000000 --- a/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - meta content attribute - - - - - - - - - - - -

meta content attribute

- - -
- - -
 
- - - - - -
-

The character encoding of the page can be set by a meta element with http-equiv and content attributes.

-

The only character encoding declaration for this HTML file is in the content attribute of the meta element, which declares the encoding to be ISO 8859-15.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-007
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/vendor/golang.org/x/net/html/entity_test.go b/vendor/golang.org/x/net/html/entity_test.go deleted file mode 100644 index b53f866f..00000000 --- a/vendor/golang.org/x/net/html/entity_test.go +++ /dev/null @@ -1,29 +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 ( - "testing" - "unicode/utf8" -) - -func TestEntityLength(t *testing.T) { - // We verify that the length of UTF-8 encoding of each value is <= 1 + len(key). - // The +1 comes from the leading "&". This property implies that the length of - // unescaped text is <= the length of escaped text. - for k, v := range entity { - if 1+len(k) < utf8.RuneLen(v) { - t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v)) - } - if len(k) > longestEntityWithoutSemicolon && k[len(k)-1] != ';' { - t.Errorf("entity name %s is %d characters, but longestEntityWithoutSemicolon=%d", k, len(k), longestEntityWithoutSemicolon) - } - } - for k, v := range entity2 { - if 1+len(k) < utf8.RuneLen(v[0])+utf8.RuneLen(v[1]) { - t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v[0]) + string(v[1])) - } - } -} diff --git a/vendor/golang.org/x/net/html/escape_test.go b/vendor/golang.org/x/net/html/escape_test.go deleted file mode 100644 index b405d4b4..00000000 --- a/vendor/golang.org/x/net/html/escape_test.go +++ /dev/null @@ -1,97 +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 html - -import "testing" - -type unescapeTest struct { - // A short description of the test case. - desc string - // The HTML text. - html string - // The unescaped text. - unescaped string -} - -var unescapeTests = []unescapeTest{ - // Handle no entities. - { - "copy", - "A\ttext\nstring", - "A\ttext\nstring", - }, - // Handle simple named entities. - { - "simple", - "& > <", - "& > <", - }, - // Handle hitting the end of the string. - { - "stringEnd", - "& &", - "& &", - }, - // Handle entities with two codepoints. - { - "multiCodepoint", - "text ⋛︀ blah", - "text \u22db\ufe00 blah", - }, - // Handle decimal numeric entities. - { - "decimalEntity", - "Delta = Δ ", - "Delta = Δ ", - }, - // Handle hexadecimal numeric entities. - { - "hexadecimalEntity", - "Lambda = λ = λ ", - "Lambda = λ = λ ", - }, - // Handle numeric early termination. - { - "numericEnds", - "&# &#x €43 © = ©f = ©", - "&# &#x €43 © = ©f = ©", - }, - // Handle numeric ISO-8859-1 entity replacements. - { - "numericReplacements", - "Footnote‡", - "Footnote‡", - }, -} - -func TestUnescape(t *testing.T) { - for _, tt := range unescapeTests { - unescaped := UnescapeString(tt.html) - if unescaped != tt.unescaped { - t.Errorf("TestUnescape %s: want %q, got %q", tt.desc, tt.unescaped, unescaped) - } - } -} - -func TestUnescapeEscape(t *testing.T) { - ss := []string{ - ``, - `abc def`, - `a & b`, - `a&b`, - `a & b`, - `"`, - `"`, - `"<&>"`, - `"<&>"`, - `3&5==1 && 0<1, "0<1", a+acute=á`, - `The special characters are: <, >, &, ' and "`, - } - for _, s := range ss { - if got := UnescapeString(EscapeString(s)); got != s { - t.Errorf("got %q want %q", got, s) - } - } -} diff --git a/vendor/golang.org/x/net/html/example_test.go b/vendor/golang.org/x/net/html/example_test.go deleted file mode 100644 index 0b06ed77..00000000 --- a/vendor/golang.org/x/net/html/example_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This example demonstrates parsing HTML data and walking the resulting tree. -package html_test - -import ( - "fmt" - "log" - "strings" - - "golang.org/x/net/html" -) - -func ExampleParse() { - s := `

Links:

` - doc, err := html.Parse(strings.NewReader(s)) - if err != nil { - log.Fatal(err) - } - var f func(*html.Node) - f = func(n *html.Node) { - if n.Type == html.ElementNode && n.Data == "a" { - for _, a := range n.Attr { - if a.Key == "href" { - fmt.Println(a.Val) - break - } - } - } - for c := n.FirstChild; c != nil; c = c.NextSibling { - f(c) - } - } - f(doc) - // Output: - // foo - // /bar/baz -} diff --git a/vendor/golang.org/x/net/html/node_test.go b/vendor/golang.org/x/net/html/node_test.go deleted file mode 100644 index 471102f3..00000000 --- a/vendor/golang.org/x/net/html/node_test.go +++ /dev/null @@ -1,146 +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 ( - "fmt" -) - -// checkTreeConsistency checks that a node and its descendants are all -// consistent in their parent/child/sibling relationships. -func checkTreeConsistency(n *Node) error { - return checkTreeConsistency1(n, 0) -} - -func checkTreeConsistency1(n *Node, depth int) error { - if depth == 1e4 { - return fmt.Errorf("html: tree looks like it contains a cycle") - } - if err := checkNodeConsistency(n); err != nil { - return err - } - for c := n.FirstChild; c != nil; c = c.NextSibling { - if err := checkTreeConsistency1(c, depth+1); err != nil { - return err - } - } - return nil -} - -// checkNodeConsistency checks that a node's parent/child/sibling relationships -// are consistent. -func checkNodeConsistency(n *Node) error { - if n == nil { - return nil - } - - nParent := 0 - for p := n.Parent; p != nil; p = p.Parent { - nParent++ - if nParent == 1e4 { - return fmt.Errorf("html: parent list looks like an infinite loop") - } - } - - nForward := 0 - for c := n.FirstChild; c != nil; c = c.NextSibling { - nForward++ - if nForward == 1e6 { - return fmt.Errorf("html: forward list of children looks like an infinite loop") - } - if c.Parent != n { - return fmt.Errorf("html: inconsistent child/parent relationship") - } - } - - nBackward := 0 - for c := n.LastChild; c != nil; c = c.PrevSibling { - nBackward++ - if nBackward == 1e6 { - return fmt.Errorf("html: backward list of children looks like an infinite loop") - } - if c.Parent != n { - return fmt.Errorf("html: inconsistent child/parent relationship") - } - } - - if n.Parent != nil { - if n.Parent == n { - return fmt.Errorf("html: inconsistent parent relationship") - } - if n.Parent == n.FirstChild { - return fmt.Errorf("html: inconsistent parent/first relationship") - } - if n.Parent == n.LastChild { - return fmt.Errorf("html: inconsistent parent/last relationship") - } - if n.Parent == n.PrevSibling { - return fmt.Errorf("html: inconsistent parent/prev relationship") - } - if n.Parent == n.NextSibling { - return fmt.Errorf("html: inconsistent parent/next relationship") - } - - parentHasNAsAChild := false - for c := n.Parent.FirstChild; c != nil; c = c.NextSibling { - if c == n { - parentHasNAsAChild = true - break - } - } - if !parentHasNAsAChild { - return fmt.Errorf("html: inconsistent parent/child relationship") - } - } - - if n.PrevSibling != nil && n.PrevSibling.NextSibling != n { - return fmt.Errorf("html: inconsistent prev/next relationship") - } - if n.NextSibling != nil && n.NextSibling.PrevSibling != n { - return fmt.Errorf("html: inconsistent next/prev relationship") - } - - if (n.FirstChild == nil) != (n.LastChild == nil) { - return fmt.Errorf("html: inconsistent first/last relationship") - } - if n.FirstChild != nil && n.FirstChild == n.LastChild { - // We have a sole child. - if n.FirstChild.PrevSibling != nil || n.FirstChild.NextSibling != nil { - return fmt.Errorf("html: inconsistent sole child's sibling relationship") - } - } - - seen := map[*Node]bool{} - - var last *Node - for c := n.FirstChild; c != nil; c = c.NextSibling { - if seen[c] { - return fmt.Errorf("html: inconsistent repeated child") - } - seen[c] = true - last = c - } - if last != n.LastChild { - return fmt.Errorf("html: inconsistent last relationship") - } - - var first *Node - for c := n.LastChild; c != nil; c = c.PrevSibling { - if !seen[c] { - return fmt.Errorf("html: inconsistent missing child") - } - delete(seen, c) - first = c - } - if first != n.FirstChild { - return fmt.Errorf("html: inconsistent first relationship") - } - - if len(seen) != 0 { - return fmt.Errorf("html: inconsistent forwards/backwards child list") - } - - return nil -} diff --git a/vendor/golang.org/x/net/html/parse_test.go b/vendor/golang.org/x/net/html/parse_test.go deleted file mode 100644 index b16d69ac..00000000 --- a/vendor/golang.org/x/net/html/parse_test.go +++ /dev/null @@ -1,423 +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 ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "runtime" - "sort" - "strings" - "testing" - - "golang.org/x/net/html/atom" -) - -// readParseTest reads a single test case from r. -func readParseTest(r *bufio.Reader) (text, want, context string, err error) { - line, err := r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - var b []byte - - // Read the HTML. - if string(line) != "#data\n" { - return "", "", "", fmt.Errorf(`got %q want "#data\n"`, line) - } - for { - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - if line[0] == '#' { - break - } - b = append(b, line...) - } - text = strings.TrimSuffix(string(b), "\n") - b = b[:0] - - // Skip the error list. - if string(line) != "#errors\n" { - return "", "", "", fmt.Errorf(`got %q want "#errors\n"`, line) - } - for { - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - if line[0] == '#' { - break - } - } - - if string(line) == "#document-fragment\n" { - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - context = strings.TrimSpace(string(line)) - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - } - - // Read the dump of what the parse tree should be. - if string(line) != "#document\n" { - return "", "", "", fmt.Errorf(`got %q want "#document\n"`, line) - } - inQuote := false - for { - line, err = r.ReadSlice('\n') - if err != nil && err != io.EOF { - return "", "", "", err - } - trimmed := bytes.Trim(line, "| \n") - if len(trimmed) > 0 { - if line[0] == '|' && trimmed[0] == '"' { - inQuote = true - } - if trimmed[len(trimmed)-1] == '"' && !(line[0] == '|' && len(trimmed) == 1) { - inQuote = false - } - } - if len(line) == 0 || len(line) == 1 && line[0] == '\n' && !inQuote { - break - } - b = append(b, line...) - } - return text, string(b), context, nil -} - -func dumpIndent(w io.Writer, level int) { - io.WriteString(w, "| ") - for i := 0; i < level; i++ { - io.WriteString(w, " ") - } -} - -type sortedAttributes []Attribute - -func (a sortedAttributes) Len() int { - return len(a) -} - -func (a sortedAttributes) Less(i, j int) bool { - if a[i].Namespace != a[j].Namespace { - return a[i].Namespace < a[j].Namespace - } - return a[i].Key < a[j].Key -} - -func (a sortedAttributes) Swap(i, j int) { - a[i], a[j] = a[j], a[i] -} - -func dumpLevel(w io.Writer, n *Node, level int) error { - dumpIndent(w, level) - level++ - switch n.Type { - case ErrorNode: - return errors.New("unexpected ErrorNode") - case DocumentNode: - return errors.New("unexpected DocumentNode") - case ElementNode: - if n.Namespace != "" { - fmt.Fprintf(w, "<%s %s>", n.Namespace, n.Data) - } else { - fmt.Fprintf(w, "<%s>", n.Data) - } - attr := sortedAttributes(n.Attr) - sort.Sort(attr) - for _, a := range attr { - io.WriteString(w, "\n") - dumpIndent(w, level) - if a.Namespace != "" { - fmt.Fprintf(w, `%s %s="%s"`, a.Namespace, a.Key, a.Val) - } else { - fmt.Fprintf(w, `%s="%s"`, a.Key, a.Val) - } - } - if n.Namespace == "" && n.DataAtom == atom.Template { - io.WriteString(w, "\n") - dumpIndent(w, level) - level++ - io.WriteString(w, "content") - } - case TextNode: - fmt.Fprintf(w, `"%s"`, n.Data) - case CommentNode: - fmt.Fprintf(w, "", n.Data) - case DoctypeNode: - fmt.Fprintf(w, "") - case scopeMarkerNode: - return errors.New("unexpected scopeMarkerNode") - default: - return errors.New("unknown node type") - } - io.WriteString(w, "\n") - for c := n.FirstChild; c != nil; c = c.NextSibling { - if err := dumpLevel(w, c, level); err != nil { - return err - } - } - return nil -} - -func dump(n *Node) (string, error) { - if n == nil || n.FirstChild == nil { - return "", nil - } - var b bytes.Buffer - for c := n.FirstChild; c != nil; c = c.NextSibling { - if err := dumpLevel(&b, c, 0); err != nil { - return "", err - } - } - return b.String(), nil -} - -var testDataDirs = []string{"testdata/webkit/", "testdata/go/"} - -func TestParser(t *testing.T) { - for _, testDataDir := range testDataDirs { - testFiles, err := filepath.Glob(testDataDir + "*.dat") - if err != nil { - t.Fatal(err) - } - for _, tf := range testFiles { - f, err := os.Open(tf) - if err != nil { - t.Fatal(err) - } - defer f.Close() - r := bufio.NewReader(f) - - for i := 0; ; i++ { - text, want, context, err := readParseTest(r) - if err == io.EOF { - break - } - if err != nil { - t.Fatal(err) - } - - err = testParseCase(text, want, context) - - if err != nil { - t.Errorf("%s test #%d %q, %s", tf, i, text, err) - } - } - } - } -} - -// Issue 16318 -func TestParserWithoutScripting(t *testing.T) { - text := `

` - want := `| -| -|